add more spacing
[personal-kdebase.git] / workspace / khotkeys / libkhotkeysprivate / action_data / keyboard_input_gesture_action_data.cpp
blobcf0a2dc883b54d6be05bce01c7df33072af5f643
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 "keyboard_input_gesture_action_data.h"
12 #include "actions/actions.h"
13 #include "conditions/conditions.h"
15 #include <kconfiggroup.h>
17 namespace KHotKeys
21 void Keyboard_input_gesture_action_data::set_action( KeyboardInputAction* action_P )
23 ActionList* tmp = new ActionList( "Keyboard_input_gesture_action_data" );
24 tmp->append( action_P );
25 set_actions( tmp );
29 const KeyboardInputAction* Keyboard_input_gesture_action_data::action() const
31 if( actions() == 0 || actions()->isEmpty() ) // CHECKME tohle poradne zkontrolovat
32 return 0;
33 return static_cast< KeyboardInputAction* >( const_cast< ActionList* >( actions())->first());
37 void Keyboard_input_gesture_action_data::cfg_write( KConfigGroup& cfg_P ) const
39 base::cfg_write( cfg_P );
40 cfg_P.writeEntry( "Type", "KEYBOARD_INPUT_GESTURE_ACTION_DATA" );
44 Keyboard_input_gesture_action_data::Keyboard_input_gesture_action_data(
45 ActionDataGroup* parent_P, const QString& name_P, const QString& comment_P, bool enabled_P )
46 : ActionData( parent_P, name_P, comment_P, 0,
47 new Condition_list( "", this ), 0, enabled_P )
52 Keyboard_input_gesture_action_data::Keyboard_input_gesture_action_data( KConfigGroup& cfg_P,
53 ActionDataGroup* parent_P )
54 : ActionData( cfg_P, parent_P )
55 { // CHECKME nothing ?
59 } // namespace KHotKeys