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 KDEPIM_CATEGORYSELECTDIALOG_H
23 #define KDEPIM_CATEGORYSELECTDIALOG_H
25 #include "kdepim_export.h"
32 class AutoCheckTreeWidget
;
33 class CategorySelectWidgetBase
;
35 class KDEPIM_EXPORT CategorySelectWidget
: public QWidget
39 CategorySelectWidget( QWidget
*parent
, KPimPrefs
*prefs
);
40 ~CategorySelectWidget();
42 void setCategories( const QStringList
&categoryList
= QStringList() );
43 void setCategoryList( const QStringList
&categories
);
45 void setSelected( const QStringList
&selList
);
46 QStringList
selectedCategories() const;
47 QStringList
selectedCategories( QString
&categoriesStr
);
49 void setAutoselectChildren( bool autoselectChildren
);
54 KPIM::AutoCheckTreeWidget
*listView() const;
60 void editCategories();
63 QStringList mCategoryList
;
64 CategorySelectWidgetBase
*mWidgets
;
68 class KDEPIM_EXPORT CategorySelectDialog
: public KDialog
72 explicit CategorySelectDialog( KPimPrefs
*prefs
, QWidget
*parent
= 0 );
73 ~CategorySelectDialog();
75 QStringList
selectedCategories() const;
76 void setCategoryList( const QStringList
&categories
);
78 void setAutoselectChildren( bool autoselectChildren
);
79 void setSelected( const QStringList
&selList
);
84 void updateCategoryConfig();
87 void categoriesSelected( const QString
& );
88 void categoriesSelected( const QStringList
& );
89 void editCategories();
92 /*reimp*/void enterEvent( QEvent
* );
95 CategorySelectWidget
*mWidgets
;
97 class CategorySelectDialogPrivate
;
98 CategorySelectDialogPrivate
*d
;