libyui-qt
2.53.0
|
Public Member Functions | |
YQItemSelector (YWidget *parent, bool enforceSingleSelection=true) | |
Standard constructor. | |
virtual | ~YQItemSelector () |
Destructor. | |
virtual void | addItem (YItem *item) |
Add an item. More... | |
virtual void | addItems (const YItemCollection &itemCollection) |
Add multiple items. More... | |
virtual void | selectItem (YItem *item, bool selected=true) |
Select or deselect an item. More... | |
virtual void | deselectAllItems () |
Deselect all items. More... | |
virtual void | deleteAllItems () |
Delete all items. More... | |
virtual void | setEnabled (bool enabled) |
Set enabled/disabled state. More... | |
virtual int | preferredWidth () |
Preferred width of the widget. More... | |
virtual int | preferredHeight () |
Preferred height of the widget. More... | |
virtual void | setSize (int newWidth, int newHeight) |
Set the new size of the widget. More... | |
virtual bool | setKeyboardFocus () |
Accept the keyboard focus. More... | |
QWidget * | itemContainer () const |
Return the QWidget that will accept the item widgets. | |
QButtonGroup * | buttonGroup () const |
Return the QButtonGroup that manages exclusive buttons in single selection mode. | |
void | addItemWidget (YQSelectorItemWidget *itemWidget) |
Add an item widget to the appropriate layout. More... | |
virtual void | activateItem (YItem *item) |
Activate selected item. More... | |
Protected Slots | |
void | slotSelectionChanged (YQSelectorItemWidget *itemWidget, bool selected) |
Notification that an item has been selected. More... | |
Protected Member Functions | |
YQItemSelector (YWidget *parent, const YItemCustomStatusVector &customStates) | |
Constructor for custom item status values. More... | |
void | init () |
Common initializations for all constructors. | |
void | deselectOtherItems (YItem *selectedItem) |
Deselect all items except 'selectedItem'. | |
Protected Attributes | |
QWidget * | _itemContainer |
QButtonGroup * | _buttonGroup |
QVBoxLayout * | _itemLayout |
QMap< YItem *, YQSelectorItemWidget * > | _itemWidgets |
Definition at line 42 of file YQItemSelector.h.
|
protected |
Constructor for custom item status values.
This is intended for derived classes; this class does not support custom item status values directly.
See YItemSelector and YQCustomStatusItemSelector for more details.
Definition at line 58 of file YQItemSelector.cc.
|
virtual |
Activate selected item.
Can be used in tests to simulate user input.
Derived classes are required to implement this.
Reimplemented in YQCustomStatusItemSelector.
Definition at line 295 of file YQItemSelector.cc.
|
virtual |
Add an item.
Reimplemented from YSelectionWidget.
Reimplemented in YQCustomStatusItemSelector.
Definition at line 109 of file YQItemSelector.cc.
|
virtual |
Add multiple items.
Reimplemented for efficiency from YSelectionWidget.
Definition at line 128 of file YQItemSelector.cc.
void YQItemSelector::addItemWidget | ( | YQSelectorItemWidget * | itemWidget | ) |
Add an item widget to the appropriate layout.
Not to confuse with addItem( YItem * ).
Definition at line 98 of file YQItemSelector.cc.
|
virtual |
Delete all items.
Reimplemented from YSelectionWidget.
Definition at line 176 of file YQItemSelector.cc.
|
virtual |
Deselect all items.
Reimplemented from YSelectionWidget.
Definition at line 152 of file YQItemSelector.cc.
|
virtual |
Preferred height of the widget.
Reimplemented from YWidget.
Definition at line 206 of file YQItemSelector.cc.
|
virtual |
Preferred width of the widget.
Reimplemented from YWidget.
Definition at line 193 of file YQItemSelector.cc.
|
virtual |
Select or deselect an item.
Reimplemented from YSelectionWidget.
Reimplemented in YQCustomStatusItemSelector.
Definition at line 135 of file YQItemSelector.cc.
|
virtual |
Set enabled/disabled state.
Reimplemented from YWidget.
Definition at line 187 of file YQItemSelector.cc.
|
virtual |
Accept the keyboard focus.
Reimplemented from YWidget.
Definition at line 247 of file YQItemSelector.cc.
|
virtual |
Set the new size of the widget.
Reimplemented from YWidget.
Definition at line 241 of file YQItemSelector.cc.
|
protectedslot |
Notification that an item has been selected.
This is only relevant if opt(
notify ) is set.
Definition at line 264 of file YQItemSelector.cc.