summaryrefslogtreecommitdiff
authorzecke <zecke>2003-08-25 15:06:32 (UTC)
committer zecke <zecke>2003-08-25 15:06:32 (UTC)
commit44b9e62c1e5071fc6e5f8e80204b9974dbc704b6 (patch) (unidiff)
tree2ed47cff84f9b9cfb94fd38f6931ba69316f32aa
parentbf3c4abb9dff716e098f05852d9a3d8ac8cbcb44 (diff)
downloadopie-44b9e62c1e5071fc6e5f8e80204b9974dbc704b6.zip
opie-44b9e62c1e5071fc6e5f8e80204b9974dbc704b6.tar.gz
opie-44b9e62c1e5071fc6e5f8e80204b9974dbc704b6.tar.bz2
add a qtopia method we need for the new launcher
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--library/backend/categories.cpp8
-rw-r--r--library/backend/categories.h3
2 files changed, 11 insertions, 0 deletions
diff --git a/library/backend/categories.cpp b/library/backend/categories.cpp
index cce9f38..34ff6fe 100644
--- a/library/backend/categories.cpp
+++ b/library/backend/categories.cpp
@@ -920,12 +920,20 @@ void CheckedListView::setChecked( const QStringList &checked )
920 920
921 Returns a const reference to the id to label QMap 921 Returns a const reference to the id to label QMap
922*/ 922*/
923 923
924/*! \fn CategoryGroup::CategoryGroup() 924/*! \fn CategoryGroup::CategoryGroup()
925 \internal 925 \internal
926*/ 926*/
927 927
928/*! \fn CategoryGroup::CategoryGroup(const CategoryGroup &c) 928/*! \fn CategoryGroup::CategoryGroup(const CategoryGroup &c)
929 \internal 929 \internal
930*/ 930*/
931 931
932
933/* ### FIXME properly merge */
934QStringList Categories::labels( const QString & app, const QArray<int> &catids ) const
935{
936 QStringList strs = mGlobalCats.labels( catids );
937 strs += mAppCats[app].labels( catids );
938 return strs;
939}
diff --git a/library/backend/categories.h b/library/backend/categories.h
index d5b3669..91c93e7 100644
--- a/library/backend/categories.h
+++ b/library/backend/categories.h
@@ -142,24 +142,27 @@ public:
142 * If includeGlobal parameter is TRUE then the returned 142 * If includeGlobal parameter is TRUE then the returned
143 * categories will include the global category items. 143 * categories will include the global category items.
144 * If extra = NoExtra, then 144 * If extra = NoExtra, then
145 * If extra = AllUnfiled, then All and Unfiled will be prepended to 145 * If extra = AllUnfiled, then All and Unfiled will be prepended to
146 * the list 146 * the list
147 * If extra = AllLabel, then All is prepended 147 * If extra = AllLabel, then All is prepended
148 * If extra = UnfiledLabel, then Unfiled is prepended 148 * If extra = UnfiledLabel, then Unfiled is prepended
149 */ 149 */
150 QStringList labels( const QString &app, 150 QStringList labels( const QString &app,
151 bool includeGlobal = TRUE, 151 bool includeGlobal = TRUE,
152 ExtraLabels extra = NoExtra ) const; 152 ExtraLabels extra = NoExtra ) const;
153 153
154 QStringList labels( const QString &app,
155 const QArray<int> &catids ) const;
156
154 enum DisplaySingle { ShowMulti, ShowAll, ShowFirst }; 157 enum DisplaySingle { ShowMulti, ShowAll, ShowFirst };
155 158
156 /** Returns a single string associated with the cat ids for display in 159 /** Returns a single string associated with the cat ids for display in
157 * a combobox or any area that requires one string. If catids are empty 160 * a combobox or any area that requires one string. If catids are empty
158 * then "Unfiled" will be returned. If multiple categories are assigned 161 * then "Unfiled" will be returned. If multiple categories are assigned
159 * then the behavior depends on the DisplaySingle type. 162 * then the behavior depends on the DisplaySingle type.
160 * If /a display is set to ShowMulti then " (multi)" appended to the 163 * If /a display is set to ShowMulti then " (multi)" appended to the
161 * first string. If /a display is set to ShowAll, then a space seperated 164 * first string. If /a display is set to ShowAll, then a space seperated
162 * string is returned with all categories. If ShowFirst is returned, 165 * string is returned with all categories. If ShowFirst is returned,
163 * the just the first string is returned. 166 * the just the first string is returned.
164 */ 167 */
165 QString displaySingle( const QString &app, 168 QString displaySingle( const QString &app,