Fix typo found by Yuri Chornoivan
[kdepim.git] / libkdepim / categoryselectdialog.h
blob0a5b027e9aead7c675d41b94b66351387fadc393
1 /*
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"
27 #include <KDialog>
29 namespace KPIM {
31 class KPimPrefs;
32 class AutoCheckTreeWidget;
33 class CategorySelectWidgetBase;
35 class KDEPIM_EXPORT CategorySelectWidget : public QWidget
37 Q_OBJECT
38 public:
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 );
51 void hideButton();
52 void hideHeader();
54 KPIM::AutoCheckTreeWidget *listView() const;
56 public Q_SLOTS:
57 void clear();
59 Q_SIGNALS:
60 void editCategories();
62 private:
63 QStringList mCategoryList;
64 CategorySelectWidgetBase *mWidgets;
65 KPimPrefs *mPrefs;
68 class KDEPIM_EXPORT CategorySelectDialog : public KDialog
70 Q_OBJECT
71 public:
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 );
81 public Q_SLOTS:
82 void slotOk();
83 void slotApply();
84 void updateCategoryConfig();
86 Q_SIGNALS:
87 void categoriesSelected( const QString & );
88 void categoriesSelected( const QStringList & );
89 void editCategories();
91 protected:
92 /*reimp*/void enterEvent( QEvent * );
94 private:
95 CategorySelectWidget *mWidgets;
97 class CategorySelectDialogPrivate;
98 CategorySelectDialogPrivate *d;
103 #endif