1 | /*************************************************************************** |
2 | * Copyright (C) 2009 by Ben Cooksley <ben@eclipse.endoftheinternet.org> * |
3 | * * |
4 | * This program is free software; you can redistribute it and/or modify * |
5 | * it under the terms of the GNU General Public License as published by * |
6 | * the Free Software Foundation; either version 2 of the License, or * |
7 | * (at your option) any later version. * |
8 | * * |
9 | * This program is distributed in the hope that it will be useful, * |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * |
12 | * GNU General Public License for more details. * |
13 | * * |
14 | * You should have received a copy of the GNU General Public License * |
15 | * along with this program; if not, write to the * |
16 | * Free Software Foundation, Inc., * |
17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * |
18 | ***************************************************************************/ |
19 | |
20 | #ifndef SOLIDACTIONS_H |
21 | #define SOLIDACTIONS_H |
22 | |
23 | #include <KCModule> |
24 | |
25 | #include "SolidActions.h" |
26 | #include "ActionModel.h" |
27 | #include "ActionEditor.h" |
28 | #include "ui_AddAction.h" |
29 | #include "ui_SolidActions.h" |
30 | |
31 | class ActionItem; |
32 | |
33 | class SolidActions: public KCModule |
34 | { |
35 | Q_OBJECT |
36 | |
37 | public: |
38 | SolidActions(QWidget* parent, const QVariantList&); |
39 | ~SolidActions(); |
40 | void load(); |
41 | void save(); |
42 | void defaults(); |
43 | |
44 | private slots: |
45 | void addAction(); |
46 | void editAction(); |
47 | void deleteAction(); |
48 | ActionItem * selectedAction(); |
49 | void fillActionsList(); |
50 | void acceptActionChanges(); |
51 | void toggleEditDelete(); |
52 | void slotTextChanged( const QString& ); |
53 | void slotShowAddDialog(); |
54 | |
55 | private: |
56 | Ui::SolidActions mainUi; |
57 | ActionModel * actionModel; |
58 | ActionEditor * editUi; |
59 | Ui::AddAction addUi; |
60 | KDialog * addDialog; |
61 | void clearActions(); |
62 | |
63 | }; |
64 | |
65 | #endif |
66 | |