summaryrefslogtreecommitdiff
path: root/library/backend/categories.h
Side-by-side diff
Diffstat (limited to 'library/backend/categories.h') (more/less context) (show whitespace changes)
-rw-r--r--library/backend/categories.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/library/backend/categories.h b/library/backend/categories.h
index 91c93e7..6be3bc0 100644
--- a/library/backend/categories.h
+++ b/library/backend/categories.h
@@ -1,81 +1,82 @@
/**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved.
**
** This file is part of Qtopia Environment.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free
** Software Foundation and appearing in the file LICENSE.GPL included
** in the packaging of this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING
** THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A
** PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
#ifndef QTPALMTOP_CATEGORIES_H
#define QTPALMTOP_CATEGORIES_H
#include <qstring.h>
#include <qstringlist.h>
#include <qmap.h>
#include <qlistview.h>
#include <qarray.h>
#include "qpcglobal.h"
#include "palmtopuidgen.h"
class CategoryGroup;
+QString categoryFileName();
#if defined(QPC_TEMPLATEDLL)
// MOC_SKIP_BEGIN
template class QPC_EXPORT QMap<int, QString>;
template class QPC_EXPORT QMap<QString, int>;
template class QPC_EXPORT QMap< QString, CategoryGroup >;
// MOC_SKIP_END
#endif
class QPC_EXPORT CategoryGroup
{
friend class Categories;
public:
CategoryGroup(): mIdLabelMap(), mLabelIdMap() { }
CategoryGroup( const CategoryGroup &c ) :
mIdLabelMap( c.mIdLabelMap), mLabelIdMap( c.mLabelIdMap ) { }
void clear() { mIdLabelMap.clear(); mLabelIdMap.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;
/** Returns label associated with the uid or QString::null if
* not found
*/
const QString &label(int id) const;
/** Returns the uid associated with label or 0 if not found */
int id(const QString &label) const;
/** Returns a sorted list of labels */
QStringList labels() const;
QStringList labels( const QArray<int> &catids ) const;
const QMap<int, QString> &idMap() const { return mIdLabelMap; }
private:
void insert( int uid, const QString &label );
QMap<int, QString> mIdLabelMap;