casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Signals | Public Member Functions | Private Slots | Private Member Functions | Private Attributes
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 vector< String > &names)
 Only valid if type is NAME.
void setNames (const vector< unsigned int > &indices, const vector< String > &names)
void setNames (const map< unsigned int, String > &names)
void setNames (const 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 43 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 50 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.

Destructor.


Member Function Documentation

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

Returns the currently set index on the widget.

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

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

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

Slot for when the index changes.

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

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 vector< String > &  names)

Only valid if type is NAME.

Sets the available names to the given.

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

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 100 of file QtIndexChooser.qo.h.

Type.

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


The documentation for this class was generated from the following file: