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 ACTIONEDITOR_H
21#define ACTIONEDITOR_H
22
23#include <KDialog>
24
25#include "ActionItem.h"
26#include "PredicateItem.h"
27#include "PredicateModel.h"
28#include "SolidActionData.h"
29#include "ui_ActionEditor.h"
30
31class ActionEditor : public KDialog
32{
33 Q_OBJECT
34public:
35 ActionEditor(QWidget *parent = 0);
36 ~ActionEditor();
37
38 void setActionToEdit( ActionItem * item );
39
40public slots:
41 virtual void accept();
42
43private:
44 SolidActionData * actionData();
45 QString predicateString();
46
47 Ui::ActionEditor ui;
48 ActionItem * activeItem;
49 PredicateItem * topItem;
50 PredicateItem * rootItem;
51 PredicateModel * rootModel;
52
53private slots:
54 void updatePropertyList();
55 void manageControlStatus();
56 void updateParameter();
57 void saveParameter();
58 void setPredicate( Solid::Predicate predicate );
59
60};
61
62#endif
63