2 This file is part of libkdepim.
4 Copyright (c) 2000, 2001, 2002 Cornelius Schumacher <schumacher@kde.org>
5 Copyright (C) 2003-2004 Reinhold Kainhofer <reinhold@kainhofer.com>
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Library General Public
9 License as published by the Free Software Foundation; either
10 version 2 of the License, or (at your option) any later version.
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Library General Public License for more details.
17 You should have received a copy of the GNU Library General Public License
18 along with this library; see the file COPYING.LIB. If not, write to
19 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 Boston, MA 02110-1301, USA.
22 #ifndef KPIM_CATEGORYSELECTDIALOG_H
23 #define KPIM_CATEGORYSELECTDIALOG_H
26 #include <kdepim_export.h>
27 #include "ui_categoryselectdialog_base.h"
34 class CategorySelectWidgetBase
: public QWidget
, public Ui::CategorySelectDialog_base
37 CategorySelectWidgetBase( QWidget
*parent
) : QWidget( parent
) {
43 class KDEPIM_EXPORT CategorySelectWidget
: public QWidget
47 CategorySelectWidget(QWidget
*parent
, KPimPrefs
*prefs
);
48 ~CategorySelectWidget();
50 void setCategories( const QStringList
&categoryList
= QStringList() );
51 void setSelected( const QStringList
&selList
);
52 QStringList
selectedCategories() const;
53 void setAutoselectChildren( bool autoselectChildren
);
54 void setCategoryList(const QStringList
&categories
);
59 Q3ListView
*listView() const;
65 void editCategories();
68 QStringList mCategoryList
;
69 CategorySelectWidgetBase
*mWidgets
;
73 class KDEPIM_EXPORT CategorySelectDialog
: public KDialog
77 CategorySelectDialog( KPimPrefs
*prefs
, QWidget
*parent
= 0,
78 const char *name
= 0, bool modal
= false );
79 ~CategorySelectDialog();
81 QStringList
selectedCategories() const;
82 void setCategoryList(const QStringList
&categories
);
84 void setAutoselectChildren( bool autoselectChildren
);
85 void setSelected( const QStringList
&selList
);
90 void updateCategoryConfig();
93 void categoriesSelected( const QString
& );
94 void categoriesSelected( const QStringList
& );
95 void editCategories();
98 CategorySelectWidget
*mWidgets
;
100 class CategorySelectDialogPrivate
;
101 CategorySelectDialogPrivate
*d
;