CategorySelect Class Reference
The CategorySelect widget allows users to select Categories with a combobox interface. More...Inheritance diagram for CategorySelect:


Public Slots | |
| void | slotNewCat (int id) |
Signals | |
| void | signalSelected (int) |
Public Member Functions | |
| CategorySelect (QWidget *parent=0, const char *name=0) | |
| CategorySelect (QWidget *parent, const char *name, int width) | |
| CategorySelect (const QArray< int > &vlCats, const QString &appName, QWidget *parent=0, const char *name=0, int width=0) | |
| CategorySelect (const QArray< int > &vlCats, const QString &appName, const QString &visibleName, QWidget *parent=0, const char *name=0, int width=0) | |
| ~CategorySelect () | |
| const QArray< int > & | currentCategories () const |
| int | currentCategory () const |
| void | setCurrentCategory (int newCatUid) |
| QString | setCategories (const QArray< int > &vlCats, const QString &appName) |
| QString | setCategories (const QArray< int > &vlCats, const QString &appName, const QString &visibleName) |
| void | setRemoveCategoryEdit (bool remove) |
| void | setAllCategories (bool add) |
| void | setFixedWidth (int width) |
Detailed Description
The CategorySelect widget allows users to select Categories with a combobox interface.CategorySelect is useful to provide a QComboBox of Categories for filtering (such as in the Contacts table view) or to allow the user to select multiple Categories. The allCategories variable sets whether the CategorySelect is in filtering or selecting mode.
In filtering mode, the All and Unfiled categories are added. The
In selecting mode, the CategorySelect may either be a QComboBox and a QToolButton or a QListView with checkable items depending on the screen size.
CategorySelect automatically updates itself if Categories has been changed elsewhere in the environment.
Signals and slots are provided to notify the application of the users selections. A QToolButton is also provided so that users can edit the Categories manually.
Definition at line 67 of file categoryselect.h.
Constructor & Destructor Documentation
|
||||||||||||
|
Constructs a category selector with parent parent, name name. This constructor is provided to make Opie compatible with Sharp ROM. Definition at line 330 of file categoryselect.cpp. |
|
||||||||||||||||
|
Constructs a category selector with parent parent, name name and fixed width width. This constructor is provided to make integration with Qt Designer easier. Definition at line 345 of file categoryselect.cpp. |
|
||||||||||||||||||||||||
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. This constructor accepts an array vl of integers representing Categories. appName is used as the visible name string. Definition at line 360 of file categoryselect.cpp. References setCategories(). |
|
||||||||||||||||||||||||||||
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. This constructor accepts an array vl of integers representing Categories. visibleName is the string used when the name of this widget is required to be displayed. width is an integer used as the fixed width of the widget. Definition at line 379 of file categoryselect.cpp. References setCategories(). |
|
|
Destructs a CategorySelect widget. Definition at line 393 of file categoryselect.cpp. |
Member Function Documentation
|
|
Returns a shallow copy of the categories in this CategorySelect. Definition at line 520 of file categoryselect.cpp. |
|
|
Return the value of the currently selected category. Definition at line 506 of file categoryselect.cpp. Referenced by slotNewCat(). |
|
||||||||||||
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Resets the CategorySelect to select the vlCats for the Categories assoicated with appName. This function should only be called if filtering on Categories and not selecting and therefore possibly allowing the user to edit Categories. Definition at line 467 of file categoryselect.cpp. Referenced by CategorySelect(). |
|
||||||||||||||||
|
Resets the CategorySelect to select the vlCats for the Categories assoicated with appName and displays the visibleName if the user is selecting and therefore editing new Categories. Definition at line 479 of file categoryselect.cpp. |
|
|
Hides the edit section of the CategorySelect widget if remove is TRUE. Definition at line 528 of file categoryselect.cpp. References QWidget::hide(), QWidget::setEnabled(), and QWidget::show(). |
|
|
Changes this CategorySelect to the All category if all is TRUE. Definition at line 542 of file categoryselect.cpp. References QObject::tr(). |
|
|
Sets the fixed width of the widget to width. Reimplemented from QWidget. Definition at line 556 of file categoryselect.cpp. References QWidget::width(). |
|
|
This slot is called when a new Category is available. Definition at line 438 of file categoryselect.cpp. References currentCategory(). |
The documentation for this class was generated from the following files:
