add more spacing
[personal-kdebase.git] / workspace / khotkeys / libkhotkeysprivate / action_data / action_data.h
blob60072f9f9647a620e49b6d7b8aaaada89f124bb0
1 /****************************************************************************
3 KHotKeys
5 Copyright (C) 1999-2001 Lubos Lunak <l.lunak@kde.org>
7 Distributed under the terms of the GNU General Public License version 2.
9 ****************************************************************************/
11 #ifndef ACTION_DATA_H
12 #define ACTION_DATA_H
14 #include "action_data_base.h"
16 namespace KHotKeys {
18 class Action;
19 class ActionDataGroup;
20 class ActionList;
21 class Trigger_list;
22 class Trigger;
25 // TODO : code documentation
26 class KDE_EXPORT ActionData
27 : public ActionDataBase
30 typedef ActionDataBase base;
32 public:
34 ActionData( ActionDataGroup* parent_P, const QString& name_P,
35 const QString& comment_P, Trigger_list* triggers_P, Condition_list* conditions_P,
36 ActionList* actions_P, bool enabled_P = true );
38 ActionData( KConfigGroup& cfg_P, ActionDataGroup* parent_P );
40 virtual ~ActionData();
42 virtual void update_triggers();
44 virtual void cfg_write( KConfigGroup& cfg_P ) const = 0;
46 virtual void execute();
48 /**
49 * @reimp
51 void aboutToBeErased();
53 const Trigger_list* triggers() const;
55 const ActionList* actions() const;
57 protected:
58 virtual void add_trigger( Trigger* trigger_P );
60 virtual void add_triggers(
61 Trigger_list* triggers_P ); // Trigger_list instance will be deleted
63 virtual void set_triggers( Trigger_list* triggers_P );
65 virtual void add_action( Action* action_P, Action* after_P = 0 );
67 virtual void add_actions( ActionList* actions_P,
68 Action* after_P = 0 ); // ActionList will be deleted
70 virtual void set_actions( ActionList* actions_P );
72 private:
74 Trigger_list* _triggers;
75 ActionList* _actions;
80 } // namespace KHotKeys
82 #endif