#include </home/clem/local/src/opie/library/backend/categories.h>
Collaboration diagram for CategoryGroup:

Public Member Functions | |
| CategoryGroup () | |
| CategoryGroup (const CategoryGroup &c) | |
| void | clear () |
| int | add (const QString &label) |
| bool | add (int uid, const QString &label) |
| bool | remove (const QString &label) |
| bool | remove (int uid) |
| bool | rename (int uid, const QString &newLabel) |
| bool | rename (const QString &oldLabel, const QString &newLabel) |
| bool | contains (int id) const |
| bool | contains (const QString &label) const |
| const QString & | label (int id) const |
| int | id (const QString &label) const |
| QStringList | labels () const |
| QStringList | labels (const QArray< int > &catids) const |
| const QMap< int, QString > & | idMap () const |
Private Member Functions | |
| void | insert (int uid, const QString &label) |
Static Private Member Functions | |
| static Qtopia::UidGen & | uidGen () |
Private Attributes | |
| QMap< int, QString > | mIdLabelMap |
| QMap< QString, int > | mLabelIdMap |
Static Private Attributes | |
| static Qtopia::UidGen | sUidGen |
Friends | |
| class | Categories |
CategoryGroup is a group of categories that is associated with an application or global set. Mainly it defines a map of ids to category labels and category labels to ids. Lookups can be done with labels or unique idenifiers.
Definition at line 43 of file categories.h.
|
|
For internal use only.
Definition at line 47 of file categories.h. |
|
|
For internal use only.
Definition at line 48 of file categories.h. |
|
||||||||||||
|
For internal use only.
Definition at line 80 of file categories.cpp. References QMap< Key, T >::end(), FALSE, QMap< Key, T >::find(), insert(), mIdLabelMap, mLabelIdMap, tr, and TRUE. |
|
|
Add label and return the UID. If failure, then 0 is returned. Note that All and Unfiled are reserved labels. For internal use only.
Definition at line 58 of file categories.cpp. References QMap< Key, T >::end(), QMap< Key, T >::find(), insert(), mLabelIdMap, tr, and uidGen(). Referenced by Categories::addCategory(), Categories::addGlobalCategory(), and Categories::load(). |
|
|
For internal use only.
Definition at line 51 of file categories.h. References QMap< Key, T >::clear(), mIdLabelMap, and mLabelIdMap. Referenced by Categories::clear(). |
|
|
Returns TRUE if label is stored in this group, FALSE if not. Definition at line 157 of file categories.cpp. References QMap< Key, T >::end(), QMap< Key, T >::find(), and mLabelIdMap. |
|
|
Returns TRUE if uid is stored in this group, FALSE if not. Definition at line 151 of file categories.cpp. References QMap< Key, T >::end(), QMap< Key, T >::find(), and mIdLabelMap. Referenced by Categories::addCategory(), Categories::isGlobal(), Categories::label(), and Categories::setGlobal(). |
|
|
Returns the uid associated with label or 0 if not found Definition at line 174 of file categories.cpp. References QMap< Key, T >::end(), QMap< Key, T >::find(), and mLabelIdMap. Referenced by Categories::id(), Categories::removeCategory(), Categories::removeGlobalCategory(), Categories::renameCategory(), and Categories::renameGlobalCategory(). |
|
|
Returns a const reference to the id to label QMap Definition at line 77 of file categories.h. References mIdLabelMap. Referenced by Categories::save(). |
|
||||||||||||
|
Definition at line 71 of file categories.cpp. References mIdLabelMap, mLabelIdMap, and uidGen(). Referenced by add(). |
|
|
Returns label associated with the uid or QString::null if not found Definition at line 165 of file categories.cpp. References QMap< Key, T >::end(), QMap< Key, T >::find(), mIdLabelMap, and QString::null. Referenced by Categories::label(). |
|
|
Returns a list of all labels associated with the catids Definition at line 195 of file categories.cpp. References QMap< Key, T >::begin(), QMap< Key, T >::end(), labels(), and mIdLabelMap. |
|
|
Returns a sorted list of labels Definition at line 183 of file categories.cpp. References QMap< Key, T >::begin(), QMap< Key, T >::end(), and mIdLabelMap. Referenced by Categories::dump(), Categories::labels(), and labels(). |
|
|
Returns TRUE if uid was removed from the group, FALSE if not. For internal use only.
Definition at line 113 of file categories.cpp. References QMap< Key, T >::end(), FALSE, QMap< Key, T >::find(), mIdLabelMap, mLabelIdMap, QMap< Key, T >::remove(), and TRUE. |
|
|
Returns TRUE if label was removed from the group, FALSE if not. For internal use only.
Definition at line 98 of file categories.cpp. References QMap< Key, T >::end(), FALSE, QMap< Key, T >::find(), mIdLabelMap, mLabelIdMap, QMap< Key, T >::remove(), and TRUE. Referenced by Categories::removeCategory(), Categories::removeGlobalCategory(), and Categories::setGlobal(). |
|
||||||||||||
|
For internal use only.
Definition at line 145 of file categories.cpp. References rename(). |
|
||||||||||||
|
For internal use only.
Definition at line 127 of file categories.cpp. References QMap< Key, T >::end(), FALSE, QMap< Key, T >::find(), mIdLabelMap, mLabelIdMap, QMap< Key, T >::remove(), tr, and TRUE. Referenced by rename(), Categories::renameCategory(), and Categories::renameGlobalCategory(). |
|
|
Definition at line 84 of file categories.h. References sUidGen. |
|
|
Definition at line 45 of file categories.h. |
|
|
Definition at line 81 of file categories.h. Referenced by add(), clear(), contains(), idMap(), insert(), label(), labels(), remove(), and rename(). |
|
|
Definition at line 82 of file categories.h. Referenced by add(), clear(), contains(), id(), insert(), remove(), and rename(). |
|
|
Referenced by Contact::uidGen(), and uidGen(). |
1.4.2