summaryrefslogtreecommitdiff
path: root/library/backend/categories.h
Side-by-side diff
Diffstat (limited to 'library/backend/categories.h') (more/less context) (ignore whitespace changes)
-rw-r--r--library/backend/categories.h3
1 files changed, 3 insertions, 0 deletions
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
@@ -130,48 +130,51 @@ public:
bool removeGlobalCategory( int uid );
QArray<int> ids( const QString &app, const QStringList &labels) const;
/** Returns the id associated with the app */
int id( const QString &app, const QString &cat ) const;
/** Returns the label associated with the id */
QString label( const QString &app, int id ) const;
enum ExtraLabels { NoExtra, AllUnfiled, AllLabel, UnfiledLabel };
/** Returns the sorted list of all categories that are
* associated with the app.
* 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,
const QArray<int> &catids,
DisplaySingle display ) const;
QStringList globalCategories() const { return mGlobalCats.labels();}
bool renameCategory( const QString &appname,
const QString &oldName,
const QString &newName );
bool renameGlobalCategory( const QString &oldName,
const QString &newName );
void setGlobal( const QString &appname, const QString &catname,