CategoryMenu Class Reference
The CategoryMenu widget aids in filtering records or files by Category. More...Inheritance diagram for CategoryMenu:


Public Slots | |
| void | reload () |
Signals | |
| void | categoryChange () |
Public Member Functions | |
| CategoryMenu (const QString &appName, bool, QWidget *parent=0, const char *name=0) | |
| ~CategoryMenu () | |
| bool | isSelected (const QArray< int > &cUids) const |
| void | setCurrentCategory (int newCatUid) |
| void | setCurrentCategoryAll () |
| void | setCurrentCategoryUnfiled () |
Detailed Description
The CategoryMenu widget aids in filtering records or files by Category.The CategoryMenu widget provides a popup menu that will make filtering records or files by category much easier. The widget will lookup the available categories for an application, populate the menu, and keep a track of which categories are being filtered against. A set of categories can be tested by the isSelected() function to see if a record or file containing those categories would be allowed through by the filter.
- Warning:
- Currently this class is not suitable for extending.
Definition at line 30 of file categorymenu.h.
Constructor & Destructor Documentation
|
||||||||||||||||||||
|
Creates a new CategoryMenu with parent and name. The menu will be populated with the available categories for application. If globals is TRUE then it will also poplulate the menu with the global categories. Definition at line 56 of file categorymenu.cpp. References QPopupMenu::activated(), QObject::connect(), and reload(). |
|
|
Destroys a CategoryMenu. Definition at line 70 of file categorymenu.cpp. |
Member Function Documentation
|
|
Returns TRUE if a record or file with the set of category ids cUids is allowed by the current selection in the CategoryMenu. Otherwise returns FALSE. Definition at line 123 of file categorymenu.cpp. References QArray::contains(), and QArray::count(). |
|
|
Sets the menu to have newCatUid as the currently selected Category. Definition at line 140 of file categorymenu.cpp. References QMap< int, int >::contains(). |
|
|
Sets the menu to allow all category sets. Definition at line 151 of file categorymenu.cpp. |
|
|
Sets the menu to allow only empty category sets. Definition at line 159 of file categorymenu.cpp. |
|
|
This signal is emitted when the user selects a different category in the menu, hence changing what records or files should be selected. |
|
|
Repopulates the widget's list of available categories. Definition at line 77 of file categorymenu.cpp. References QValueList::begin(), QPopupMenu::clear(), QValueList::end(), Categories::id(), QMap< int, int >::insert(), QPopupMenu::insertItem(), Categories::labels(), Categories::load(), QPopupMenu::setItemChecked(), and QObject::tr(). Referenced by CategoryMenu(). |
The documentation for this class was generated from the following files:
