2 Copyright (c) 2000, 2001, 2002 Cornelius Schumacher <schumacher@kde.org>
3 Copyright (C) 2003-2004 Reinhold Kainhofer <reinhold@kainhofer.com>
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
21 #ifndef INCIDENCEEDITOR_CATEGORYSELECTDIALOG_H
22 #define INCIDENCEEDITOR_CATEGORYSELECTDIALOG_H
24 #include "incidenceeditors-ng_export.h"
28 class CategorySelectWidgetBase
;
30 namespace CalendarSupport
{
34 namespace IncidenceEditorNG
{
36 class AutoCheckTreeWidget
;
38 class INCIDENCEEDITORS_NG_EXPORT CategorySelectWidget
: public QWidget
42 explicit CategorySelectWidget( CalendarSupport::CategoryConfig
*config
, QWidget
*parent
=0 );
43 ~CategorySelectWidget();
45 void setCategories( const QStringList
&categoryList
= QStringList() );
46 void setCategoryList( const QStringList
&categories
);
48 void setSelected( const QStringList
&selList
);
49 QStringList
selectedCategories() const;
50 QStringList
selectedCategories( QString
&categoriesStr
);
52 void setAutoselectChildren( bool autoselectChildren
);
57 AutoCheckTreeWidget
*listView() const;
63 void editCategories();
66 QStringList mCategoryList
;
67 CategorySelectWidgetBase
*mWidgets
;
68 CalendarSupport::CategoryConfig
*mCategoryConfig
;
71 class INCIDENCEEDITORS_NG_EXPORT CategorySelectDialog
: public KDialog
75 explicit CategorySelectDialog( CalendarSupport::CategoryConfig
*cfg
, QWidget
*parent
= 0 );
76 ~CategorySelectDialog();
78 QStringList
selectedCategories() const;
79 void setCategoryList( const QStringList
&categories
);
81 void setAutoselectChildren( bool autoselectChildren
);
82 void setSelected( const QStringList
&selList
);
87 void updateCategoryConfig();
90 void categoriesSelected( const QString
& );
91 void categoriesSelected( const QStringList
& );
92 void editCategories();
95 CategorySelectWidget
*mWidgets
;
97 class CategorySelectDialogPrivate
;
98 CategorySelectDialogPrivate
*d
;