add more spacing
[personal-kdebase.git] / workspace / khotkeys / kcm_hotkeys / simple_action_data_widget.h
blobd8b9d6f3f6ac6962501dcc2c2858de111396cb22
1 /*
2 Copyright (C) 2008 Michael Jansen <kde@michael-jansen.biz>
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
9 This library 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 GNU
12 Library General Public License for more details.
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
19 #ifndef SIMPLE_ACTION_DATA_WIDGET_H
20 #define SIMPLE_ACTION_DATA_WIDGET_H
22 #include "hotkeys_widget_base.h"
24 #include "ui_simple_action_data_widget.h"
25 #include "action_data/simple_action_data.h"
27 #include <QtGui/QWidget>
30 /**
31 * @author Michael Jansen <kde@michael-jansen.biz>
33 class SimpleActionDataWidget : public HotkeysWidgetBase
35 Q_OBJECT
37 typedef HotkeysWidgetBase Base;
39 public:
41 /**
42 * Default constructor
44 SimpleActionDataWidget( QWidget *parent = 0 );
47 /**
48 * Edit \a action.
50 void setActionData( KHotKeys::SimpleActionData *action );
53 KHotKeys::SimpleActionData *data()
55 return static_cast<KHotKeys::SimpleActionData*>( _data );
58 const KHotKeys::SimpleActionData *data() const
60 return static_cast<const KHotKeys::SimpleActionData*>( _data );
64 /**
65 * Destructor
67 virtual ~SimpleActionDataWidget();
69 virtual bool isChanged() const;
71 protected:
73 virtual void doCopyFromObject();
74 virtual void doCopyToObject();
76 private:
78 Ui::SimpleActionDataWidget ui;
80 HotkeysWidgetIFace *currentTrigger;
81 HotkeysWidgetIFace *currentAction;
85 #endif /* #ifndef SIMPLE_ACTION_DATA_WIDGET_H */