Better wording
[kdepim.git] / incidenceeditor-ng / categoryselectdialog.h
blobc518aaa6ce019b6e7170c062a17f60b1173c39f8
1 /*
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"
26 #include <KDialog>
28 class CategorySelectWidgetBase;
30 namespace CalendarSupport {
31 class CategoryConfig;
34 namespace IncidenceEditorNG {
36 class AutoCheckTreeWidget;
38 class INCIDENCEEDITORS_NG_EXPORT CategorySelectWidget : public QWidget
40 Q_OBJECT
41 public:
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 );
54 void hideButton();
55 void hideHeader();
57 AutoCheckTreeWidget *listView() const;
59 public Q_SLOTS:
60 void clear();
62 Q_SIGNALS:
63 void editCategories();
65 private:
66 QStringList mCategoryList;
67 CategorySelectWidgetBase *mWidgets;
68 CalendarSupport::CategoryConfig *mCategoryConfig;
71 class INCIDENCEEDITORS_NG_EXPORT CategorySelectDialog : public KDialog
73 Q_OBJECT
74 public:
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 );
84 public Q_SLOTS:
85 void slotOk();
86 void slotApply();
87 void updateCategoryConfig();
89 Q_SIGNALS:
90 void categoriesSelected( const QString & );
91 void categoriesSelected( const QStringList & );
92 void editCategories();
94 private:
95 CategorySelectWidget *mWidgets;
97 class CategorySelectDialogPrivate;
98 CategorySelectDialogPrivate *d;
103 #endif