casa::QtIndexChooser Class Reference

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>

List of all members.

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.

Public Member Functions

 QtIndexChooser (Type type, QWidget *parent=NULL)
 Non-Static //.
 ~QtIndexChooser ()
 Destructor.
unsigned int index () const
 Returns the currently set index on the widget.
void setType (Type type, bool resizeToHint=true)
 Sets the type to the given, resizing if indicated.
void setName (unsigned int index, const String &name)
 Only valid if type is NAME.
void setNames (const std::vector< String > &names)
 Only valid if type is NAME.
void setNames (const std::vector< unsigned int > &indices, const std::vector< String > &names)
void setNames (const std::map< unsigned int, String > &names)
void setNames (const std::map< String, unsigned int > &names)
void setRowsCols (unsigned int nRows, unsigned int nCols)
 Only valid if type is ROW_COL.
void setMaxIndex (unsigned int maxIndex)
 Only valid if type is INDEX.

Private Slots

void indexChanged_ ()
 Slot for when the index changes.

Private Member Functions

void setupNameChooser ()
 Sets up the name chooser for the currently set name/index mappings.

Private Attributes

Type itsType_
 Type.
QMap< QString, unsigned int > itsNames_
 Name/Index map.

Detailed Description

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.


Member Enumeration Documentation

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.


Constructor & Destructor Documentation

casa::QtIndexChooser::QtIndexChooser ( Type  type,
QWidget *  parent = NULL 
)

Non-Static //.

Constructor which takes the type and an optional parent widget.

casa::QtIndexChooser::~QtIndexChooser (  ) 

Destructor.


Member Function Documentation

unsigned int casa::QtIndexChooser::index (  )  const

Returns the currently set index on the widget.

Referenced by indexChanged_().

void casa::QtIndexChooser::indexChanged ( unsigned int  newIndex  )  [signal]

Emitted when the index changes, and contains the new index value.

Referenced by indexChanged_().

void casa::QtIndexChooser::indexChanged_ (  )  [inline, private, slot]

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 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::map< String, unsigned int > &  names  ) 
void casa::QtIndexChooser::setNames ( const std::map< unsigned int, String > &  names  ) 
void casa::QtIndexChooser::setNames ( const std::vector< unsigned int > &  indices,
const std::vector< String > &  names 
)
void casa::QtIndexChooser::setNames ( const std::vector< String > &  names  ) 

Only valid if type is NAME.

Sets the available names to the given.

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.

void casa::QtIndexChooser::setupNameChooser (  )  [private]

Sets up the name chooser for the currently set name/index mappings.


Member Data Documentation

QMap<QString, unsigned int> casa::QtIndexChooser::itsNames_ [private]

Name/Index map.

Definition at line 97 of file QtIndexChooser.qo.h.

Type.

Definition at line 94 of file QtIndexChooser.qo.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1