not quite so much needs to be delayed to the init() function
[personal-kdebase.git] / workspace / khotkeys / libkhotkeysprivate / action_data / menuentry_shortcut_action_data.cpp
blob11e338aec51df1ceffed0b14be1596fd591c4f8a
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 #include "menuentry_shortcut_action_data.h"
12 #include "actions/actions.h"
13 #include "conditions/conditions.h"
15 #include <kconfiggroup.h>
16 #include <kdebug.h>
18 namespace KHotKeys
22 template<> KDE_EXPORT
23 void Simple_action_data< ShortcutTrigger, MenuEntryAction >
24 ::cfg_write( KConfigGroup& cfg_P ) const
26 base::cfg_write( cfg_P );
27 cfg_P.writeEntry( "Type", "MENUENTRY_SHORTCUT_ACTION_DATA" );
31 MenuEntryShortcutActionData::MenuEntryShortcutActionData(
32 ActionDataGroup* parent_P,
33 const QString& name_P,
34 const QString& comment_P,
35 const KShortcut& shortcut_P,
36 const QString& menuentry_P,
37 bool enabled_P )
38 : Simple_action_data< ShortcutTrigger, MenuEntryAction >(
39 parent_P,
40 name_P,
41 comment_P,
42 enabled_P )
44 set_action( new MenuEntryAction( this, menuentry_P ));
45 set_trigger( new ShortcutTrigger( this, shortcut_P ));
49 MenuEntryShortcutActionData::MenuEntryShortcutActionData( ActionDataGroup* parent_P,
50 const QString& name_P, const QString& comment_P, bool enabled_P )
51 : Simple_action_data< ShortcutTrigger, MenuEntryAction >( parent_P, name_P,
52 comment_P, enabled_P )
57 MenuEntryShortcutActionData::MenuEntryShortcutActionData( KConfigGroup& cfg_P,
58 ActionDataGroup* parent_P )
59 : Simple_action_data< ShortcutTrigger, MenuEntryAction >( cfg_P, parent_P )
64 } // namespace KHotKeys