#include </home/clem/local/src/opie/library/categorymenu.h>
Collaboration 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 () |
Private Slots | |
| void | mapMenuId (int) |
Private Attributes | |
| QString | appName |
| bool | includeGlobal |
| QMap< int, int > | menuToId |
| QMap< int, int > | idToMenu |
| int | currentMid |
| CategoryMenuPrivate * | d |
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.
Definition at line 30 of file categorymenu.h.
|
||||||||||||||||||||
|
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 54 of file categorymenu.cpp. References currentMid, mapMenuId(), and reload(). |
|
|
Destroys a CategoryMenu. Definition at line 68 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. Referenced by mapMenuId(). |
|
|
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 121 of file categorymenu.cpp. References currentMid, FALSE, menuToId, and TRUE. |
|
|
For internal use only.
Definition at line 105 of file categorymenu.cpp. References categoryChange(), currentMid, FALSE, and TRUE. Referenced by CategoryMenu(), setCurrentCategory(), setCurrentCategoryAll(), and setCurrentCategoryUnfiled(). |
|
|
Repopulates the widget's list of available categories. Definition at line 75 of file categorymenu.cpp. References appName, QValueList< T >::begin(), categoryFileName(), currentMid, QValueList< T >::end(), Categories::id(), idToMenu, includeGlobal, QMap< Key, T >::insert(), Categories::labels(), Categories::load(), menuToId, tr, and TRUE. Referenced by CategoryMenu(). |
|
|
Sets the menu to have newCatUid as the currently selected Category. Definition at line 138 of file categorymenu.cpp. References QMap< Key, T >::contains(), idToMenu, and mapMenuId(). |
|
|
Sets the menu to allow all category sets. Definition at line 149 of file categorymenu.cpp. References mapMenuId(). |
|
|
Sets the menu to allow only empty category sets. Definition at line 157 of file categorymenu.cpp. References mapMenuId(). |
|
|
Definition at line 54 of file categorymenu.h. Referenced by reload(). |
|
|
Definition at line 59 of file categorymenu.h. Referenced by CategoryMenu(), isSelected(), mapMenuId(), and reload(). |
|
|
Definition at line 61 of file categorymenu.h. |
|
|
Definition at line 58 of file categorymenu.h. Referenced by reload(), and setCurrentCategory(). |
|
|
Definition at line 55 of file categorymenu.h. Referenced by reload(). |
|
|
Definition at line 57 of file categorymenu.h. Referenced by isSelected(), and reload(). |
1.4.2