|
gqtbuttonswidget
|
Logical description of one icon-button entry used by GQTButtonsWidget.
More...
#include <gQtButtonsWidget.h>
Public Member Functions | |
| ButtonInfo (const std::string &icon) | |
Constructs a ButtonInfo for a given base icon name. | |
| QIcon | iconForState (int state) const |
| Returns the icon for a given interaction state. | |
Data Fields | |
| QListWidgetItem * | thisButton |
| The UI item representing this logical button. | |
ButtonInfo binds together:
":/images/myButton")QListWidgetItem used by the UI list viewThe helper iconForState() converts the base icon name into a filename using a state suffix:
QListWidgetItem in its constructor and stores it in thisButton. Ownership and lifetime are managed by the container widget that creates these objects. Definition at line 32 of file gQtButtonsWidget.h.
|
explicit |
| icon | Base icon name used to build the icon filenames for different states. Typical value is a Qt resource prefix such as ":/images/firstButton". |
Definition at line 13 of file gQtButtonsWidget.cc.
| QIcon ButtonInfo::iconForState | ( | int | state | ) | const |
The file name is constructed as:
If the file exists, a QIcon is returned. Otherwise an empty QIcon is returned.
| state | State identifier used in the filename suffix. Convention in this module:
|
QIcon for the requested state or an empty icon if the file does not exist. Definition at line 24 of file gQtButtonsWidget.cc.
| QListWidgetItem* ButtonInfo::thisButton |
The item is created in the ButtonInfo constructor and is later inserted into a QListWidget.
Definition at line 51 of file gQtButtonsWidget.h.