1
#ifndef CONDITIONS_WIDGET_H
2
#define CONDITIONS_WIDGET_H
3
/* Copyright (C) 2009 Michael Jansen <kde@michael-jansen.biz>
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
#include <QtCore/QMap>
22
#include <QtGui/QWidget>
25
#include "ui_conditions_widget.h"
28
class QTreeWidgetItem;
37
* @author Michael Jansen <kde@michael-jansen.biz>
39
class ConditionsWidget : public QWidget
48
ConditionsWidget(QWidget *parent = NULL);
53
virtual ~ConditionsWidget();
55
void copyFromObject();
58
void setConditionsList(KHotKeys::Condition_list *list);
60
//! Are there uncommited changes?
61
bool hasChanges() const;
69
void slotNew(QAction*);
75
// Emit the changed(bool) signal if our changed status changes
76
void emitChanged(bool);
79
KHotKeys::Condition_list *_conditions_list;
82
KHotKeys::Condition_list *_working;
84
//! User Interface Definition
85
Ui::ConditionsWidget ui;
87
//! Are there uncommited changes?
90
//! Map between treewidgetitems and conditions
91
QMap<QTreeWidgetItem*, KHotKeys::Condition*> _items;
96
#endif /* #ifndef CONDITIONS_WIDGET_H */