1 /****************************************************************************
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 ****************************************************************************/
14 #include "action_data_base.h"
19 class ActionDataGroup
;
25 // TODO : code documentation
26 class KDE_EXPORT ActionData
27 : public ActionDataBase
30 typedef ActionDataBase base
;
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();
51 void aboutToBeErased();
53 const Trigger_list
* triggers() const;
55 const ActionList
* actions() const;
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
);
74 Trigger_list
* _triggers
;
80 } // namespace KHotKeys