summaryrefslogtreecommitdiff
path: root/library/backend/categories.cpp
Side-by-side diff
Diffstat (limited to 'library/backend/categories.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--library/backend/categories.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/library/backend/categories.cpp b/library/backend/categories.cpp
index 2e84089..cce9f38 100644
--- a/library/backend/categories.cpp
+++ b/library/backend/categories.cpp
@@ -466,49 +466,49 @@ QString Categories::label( const QString &app, int id ) const
set, the just the first string is returned.
*/
QString Categories::displaySingle( const QString &app,
const QArray<int> &catids,
DisplaySingle display ) const
{
QStringList strs = labels( app, catids );
if ( !strs.count() )
return tr("Unfiled");
strs.sort();
QString r;
if ( strs.count() > 1 ) {
switch ( display ) {
case ShowFirst:
r = strs.first();
break;
case ShowMulti:
r = strs.first() + tr(" (multi.)");
break;
case ShowAll:
r = strs.join(" ");
break;
}
}
- else r = strs.first();
+ else r = strs.first();
return r;
}
/*!
Returns all ids associated with the application CategoryGroup \a app
and the passed in \a labels in that group.
*/
QArray<int> Categories::ids( const QString &app, const QStringList &labels) const
{
QArray<int> results;
QStringList::ConstIterator it;
int i;
for ( i=0, it=labels.begin(); it!=labels.end(); i++, ++it ) {
int value = id( app, *it );
if ( value != 0 ) {
int tmp = results.size();
results.resize( tmp + 1 );
results[ tmp ] = value;
}
}
return results;
}
@@ -827,78 +827,73 @@ void CheckedListView::setChecked( const QStringList &checked )
// iterate over all items
bool showingChecked = FALSE;
for ( QCheckListItem *i = (QCheckListItem *) firstChild();
i; i = (QCheckListItem *)i->nextSibling() )
// see if the item should be checked by searching the
// checked list
if ( checked.find( i->text( 0 ) ) != checked.end() ) {
i->setOn( TRUE );
// make sure it is showing at least one checked item
if ( !showingChecked ) {
ensureItemVisible( i );
showingChecked = TRUE;
}
}
else
i->setOn( FALSE );
}
/*! \fn Categories &Categories::operator= ( const Categories &c )
Performs deep copy.
*/
-/*! \fn QStringList Categories::labels( const QString & app, const QArray<int> &catids ) const
-
- Returns list of labels associated with the application and catids
-*/
-
/*! \fn QStringList Categories::globalCategories() const
Returns list of all global category labels
*/
/*! \fn const QMap<QString, CategoryGroup> &Categories::appGroupMap() const
Returns a map of application names to CategoryGroup. The CategoryGroup
class defines a map of ids to category labels and category labels to ids.
*/
/*! \fn const CategoryGroup &Categories::globalGroup() const
Returns the global CategoryGroup. The CategoryGroup
class defines a map of ids to category labels and category labels to ids.
*/
/*! \fn void Categories::categoryAdded( const Categories &cats, const QString &appname, int uid)
Emitted if a category is added.
\a cats is a const reference to this object
\a appname is the CategoryGroup application name that the category was added to or QString::null if it was global
\a uid is the unique identifier associated with the added category
-*/
+*/
/*! \fn void Categories::categoryRemoved( const Categories &cats, const QString &appname,
int uid)
Emitted if removed category is removed.
\a cats is a const reference to this object
\a appname is the CategoryGroup application name that the category was removed from or QString::null if it was the global CategoryGroup
\a uid is the unique identifier associated with the removed category
*/
/*! \fn void Categories::categoryRenamed( const Categories &cats, const QString &appname,
int uid)
Emitted if \a uid in the \a appname CategoryGroup is renamed in \a cats
object.
\a cats is a const reference to this object
\a appname is the CategoryGroup application name that the category was renamed in or QString::null if it was the global CategoryGroup
\a uid is the unique identifier associated with the renamed category
*/
/*! \fn Categories::Categories( QObject *parent=0, const char *name = 0 )