|
SHAPER
9.15.0
|
A Choice control. More...

Public Types | |
| enum | ControlType { RadioButtons , ComboBox } |
Signals | |
| void | valueChanged (int theVal) |
| A signal raised on change of current value. More... | |
Public Member Functions | |
| ModuleBase_ChoiceCtrl (QWidget *theParent, const QStringList &theChoiceList, const QStringList &theIconsList, ControlType theType=RadioButtons, Qt::Orientation theButtonsDir=Qt::Horizontal) | |
| Constructor. More... | |
| void | setLabel (const QString &theText) |
| Set label for the controls. More... | |
| void | setLabelIcon (const QString &theIcon) |
| Set Icon for the label. More... | |
| void | setValue (int theVal) |
| Set value: Id of button or item of combo box. More... | |
| void | setValue (const QString &theVal) |
| Set value: text of button or item of combo box. More... | |
| void | setTooltip (QString theTip) |
| Set tool tip for label. Used only for combo box. More... | |
| int | value () const |
| Returns currently selected value. More... | |
| QString | textValue () const |
| Returns text of currently selected value. More... | |
| bool | focusTo () |
| Transfer focus on itself. More... | |
| QList< QWidget * > | getControls () const |
| Returns controls for activation. More... | |
| void | setChoiceList (const QStringList &theChoiceList) |
| Set list of choice. More... | |
A Choice control.
It provides a choice in several strings. It can be represented by several radiobuttons or by combo box. Radio buttons can be represented as by radiou buttons with text or by icons in toggle buttons.
| ModuleBase_ChoiceCtrl::ModuleBase_ChoiceCtrl | ( | QWidget * | theParent, |
| const QStringList & | theChoiceList, | ||
| const QStringList & | theIconsList, | ||
| ControlType | theType = RadioButtons, |
||
| Qt::Orientation | theButtonsDir = Qt::Horizontal |
||
| ) |
Constructor.
| theParent | a parent widget |
| theChoiceList | a list of choice strings |
| theIconsList | a list of icon names for radiou buttons |
| theType | a type of choice representation |
| theButtonsDir | direction of radio buttons placement |
| void ModuleBase_ChoiceCtrl::setLabel | ( | const QString & | theText | ) |
Set label for the controls.
It is a label for combo box and title for group of radio buttons.
| theText | a text of the label |
| void ModuleBase_ChoiceCtrl::setLabelIcon | ( | const QString & | theIcon | ) |
Set Icon for the label.
Used only for combo box.
| theIcon | a name of icon |
| void ModuleBase_ChoiceCtrl::setValue | ( | int | theVal | ) |
Set value: Id of button or item of combo box.
| theVal | a value (from 0 to number of items) |
| void ModuleBase_ChoiceCtrl::setValue | ( | const QString & | theVal | ) |
Set value: text of button or item of combo box.
| theVal | a value (one of text items) |
| void ModuleBase_ChoiceCtrl::setTooltip | ( | QString | theTip | ) |
Set tool tip for label. Used only for combo box.
| int ModuleBase_ChoiceCtrl::value | ( | ) | const |
Returns currently selected value.
| QString ModuleBase_ChoiceCtrl::textValue | ( | ) | const |
Returns text of currently selected value.
| bool ModuleBase_ChoiceCtrl::focusTo | ( | ) |
Transfer focus on itself.
| QList< QWidget * > ModuleBase_ChoiceCtrl::getControls | ( | ) | const |
Returns controls for activation.
| void ModuleBase_ChoiceCtrl::setChoiceList | ( | const QStringList & | theChoiceList | ) |
Set list of choice.
| theChoiceList | a string list of items |
|
signal |
A signal raised on change of current value.