casa
5.7.0-16
|
Widget that allows the user to pick an index, with a number of choices on how the index can be chosen. More...
#include <QtIndexChooser.qo.h>
Public Types | |
enum | Type { NAME, ROW_COL, INDEX } |
Static //. More... | |
Signals | |
void | indexChanged (unsigned int newIndex) |
Emitted when the index changes, and contains the new index value. More... | |
Public Member Functions | |
QtIndexChooser (Type type, QWidget *parent=NULL) | |
Non-Static //. More... | |
~QtIndexChooser () | |
Destructor. More... | |
unsigned int | index () const |
Returns the currently set index on the widget. More... | |
void | setType (Type type, bool resizeToHint=true) |
Sets the type to the given, resizing if indicated. More... | |
void | setName (unsigned int index, const casacore::String &name) |
Only valid if type is NAME. More... | |
void | setNames (const std::vector< casacore::String > &names) |
Only valid if type is NAME. More... | |
void | setNames (const std::vector< unsigned int > &indices, const std::vector< casacore::String > &names) |
void | setNames (const std::map< unsigned int, casacore::String > &names) |
void | setNames (const std::map< casacore::String, unsigned int > &names) |
void | setRowsCols (unsigned int nRows, unsigned int nCols) |
Only valid if type is ROW_COL. More... | |
void | setMaxIndex (unsigned int maxIndex) |
Only valid if type is INDEX. More... | |
Private Slots | |
void | indexChanged_ () |
Slot for when the index changes. More... | |
Private Member Functions | |
void | setupNameChooser () |
Sets up the name chooser for the currently set name/index mappings. More... | |
Private Attributes | |
Type | itsType_ |
Type. More... | |
QMap< QString, unsigned int > | itsNames_ |
Name/Index map. More... | |
Widget that allows the user to pick an index, with a number of choices on how the index can be chosen.
(See Type enum.)
Definition at line 40 of file QtIndexChooser.qo.h.
Static //.
The type of the chooser; i.e., how the user picks the index.
Enumerator | |
---|---|
NAME | |
ROW_COL | |
INDEX |
Definition at line 47 of file QtIndexChooser.qo.h.
casa::QtIndexChooser::QtIndexChooser | ( | Type | type, |
QWidget * | parent = NULL |
||
) |
Non-Static //.
Constructor which takes the type and an optional parent widget.
casa::QtIndexChooser::~QtIndexChooser | ( | ) |
Destructor.
unsigned int casa::QtIndexChooser::index | ( | ) | const |
Returns the currently set index on the widget.
Referenced by indexChanged_().
|
signal |
Emitted when the index changes, and contains the new index value.
Referenced by indexChanged_().
|
inlineprivateslot |
Slot for when the index changes.
Definition at line 105 of file QtIndexChooser.qo.h.
References index(), and indexChanged().
void casa::QtIndexChooser::setMaxIndex | ( | unsigned int | maxIndex | ) |
Only valid if type is INDEX.
Sets the maximum index (inclusive).
void casa::QtIndexChooser::setName | ( | unsigned int | index, |
const casacore::String & | name | ||
) |
Only valid if type is NAME.
Sets the name for the given index and makes it available in the GUI.
void casa::QtIndexChooser::setNames | ( | const std::vector< casacore::String > & | names | ) |
Only valid if type is NAME.
Sets the available names to the given.
void casa::QtIndexChooser::setNames | ( | const std::vector< unsigned int > & | indices, |
const std::vector< casacore::String > & | names | ||
) |
void casa::QtIndexChooser::setNames | ( | const std::map< unsigned int, casacore::String > & | names | ) |
void casa::QtIndexChooser::setNames | ( | const std::map< casacore::String, unsigned int > & | names | ) |
void casa::QtIndexChooser::setRowsCols | ( | unsigned int | nRows, |
unsigned int | nCols | ||
) |
Only valid if type is ROW_COL.
Sets the number of rows and columns.
void casa::QtIndexChooser::setType | ( | Type | type, |
bool | resizeToHint = true |
||
) |
Sets the type to the given, resizing if indicated.
|
private |
Sets up the name chooser for the currently set name/index mappings.
|
private |
Name/Index map.
Definition at line 97 of file QtIndexChooser.qo.h.
|
private |
Type.
Definition at line 94 of file QtIndexChooser.qo.h.