summaryrefslogtreecommitdiff
authorzecke <zecke>2003-08-25 15:06:32 (UTC)
committer zecke <zecke>2003-08-25 15:06:32 (UTC)
commit44b9e62c1e5071fc6e5f8e80204b9974dbc704b6 (patch) (side-by-side diff)
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 )
Returns a const reference to the id to label QMap
*/
/*! \fn CategoryGroup::CategoryGroup()
\internal
*/
/*! \fn CategoryGroup::CategoryGroup(const CategoryGroup &c)
\internal
*/
+
+/* ### FIXME properly merge */
+QStringList Categories::labels( const QString & app, const QArray<int> &catids ) const
+{
+ QStringList strs = mGlobalCats.labels( catids );
+ strs += mAppCats[app].labels( catids );
+ return strs;
+}
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:
* If includeGlobal parameter is TRUE then the returned
* categories will include the global category items.
* If extra = NoExtra, then
* If extra = AllUnfiled, then All and Unfiled will be prepended to
* the list
* If extra = AllLabel, then All is prepended
* If extra = UnfiledLabel, then Unfiled is prepended
*/
QStringList labels( const QString &app,
bool includeGlobal = TRUE,
ExtraLabels extra = NoExtra ) const;
+ QStringList labels( const QString &app,
+ const QArray<int> &catids ) const;
+
enum DisplaySingle { ShowMulti, ShowAll, ShowFirst };
/** Returns a single string associated with the cat ids for display in
* a combobox or any area that requires one string. If catids are empty
* then "Unfiled" will be returned. If multiple categories are assigned
* then the behavior depends on the DisplaySingle type.
* If /a display is set to ShowMulti then " (multi)" appended to the
* first string. If /a display is set to ShowAll, then a space seperated
* string is returned with all categories. If ShowFirst is returned,
* the just the first string is returned.
*/
QString displaySingle( const QString &app,