krop's commit fixes my problem in a better way, reverting
[kdepim.git] / libkdepim / categoryeditdialog.h
blobe356accdc2ef2da47b9f0d8f34e5cad00e883550
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>
6 Copyright (c) 2005 Rafal Rzepecki <divide@users.sourceforge.net>
8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Library General Public
10 License as published by the Free Software Foundation; either
11 version 2 of the License, or (at your option) any later version.
13 This library is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Library General Public License for more details.
18 You should have received a copy of the GNU Library General Public License
19 along with this library; see the file COPYING.LIB. If not, write to
20 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 Boston, MA 02110-1301, USA.
23 #ifndef KDEPIM_CATEGORYEDITDIALOG_H
24 #define KDEPIM_CATEGORYEDITDIALOG_H
26 #include "kdepim_export.h"
27 #include <KDialog>
29 class QTreeWidgetItem;
31 namespace Ui {
32 class CategoryEditDialog_base;
35 namespace KPIM {
37 class KPimPrefs;
39 class KDEPIM_EXPORT CategoryEditDialog : public KDialog
41 Q_OBJECT
42 public:
43 explicit CategoryEditDialog( KPimPrefs *prefs, QWidget *parent = 0 );
44 ~CategoryEditDialog();
46 public Q_SLOTS:
47 void reload();
48 virtual void show();
50 protected Q_SLOTS:
51 void slotOk();
52 void slotApply();
53 void slotCancel();
54 void slotTextChanged( const QString &text );
55 void slotSelectionChanged();
56 void add();
57 void addSubcategory();
58 void remove();
59 void editItem( QTreeWidgetItem *item );
60 void expandIfToplevel( QTreeWidgetItem *item );
62 Q_SIGNALS:
63 void categoryConfigChanged();
65 protected:
66 void fillList();
68 private:
69 void deleteItem( QTreeWidgetItem *item, QList<QTreeWidgetItem *> &to_remove );
70 KPimPrefs *mPrefs;
71 Ui::CategoryEditDialog_base *mWidgets;
76 #endif