1
#ifndef SETTINGS_READER_V2_H
2
#define SETTINGS_READER_V2_H
4
* Copyright (C) 1999-2001 Lubos Lunak <l.lunak@kde.org>
5
* Copyright (C) 2009 Michael Jansen <kde@michael-jansen.biz>
7
* This library is free software; you can redistribute it and/or
8
* modify it under the terms of the GNU Library General Public
9
* License version 2 as published by the Free Software Foundation.
11
* This library is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
* Library General Public License for more details.
16
* You should have received a copy of the GNU Library General Public License
17
* along with this library; see the file COPYING.LIB. If not, write to
18
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19
* Boston, MA 02110-1301, USA.
22
#include "action_data/action_data_visitor.h"
23
#include "actions/actions.h"
24
#include "triggers/triggers.h"
33
template< typename T, typename A > class SimpleActionDataHelper;
38
* @author Michael Jansen <kde@michael-jansen.biz>
40
class SettingsReaderV2 :
41
public KHotKeys::ActionDataVisitor,
43
public KHotKeys::ActionVisitor,
44
public KHotKeys::ActivateWindowActionVisitor,
45
public KHotKeys::CommandUrlActionVisitor,
46
public KHotKeys::DBusActionVisitor,
47
public KHotKeys::KeyboardInputActionVisitor,
48
public KHotKeys::MenuEntryActionVisitor,
50
public KHotKeys::TriggerVisitor,
51
public KHotKeys::WindowTriggerVisitor,
52
public KHotKeys::ShortcutTriggerVisitor,
53
public KHotKeys::GestureTriggerVisitor
58
KHotKeys::Settings *settings,
60
KHotKeys::ActionState _stateStrategy = KHotKeys::Disabled,
61
const QString &importId = QString());
63
virtual ~SettingsReaderV2();
65
void read(const KConfigBase &config, KHotKeys::ActionDataGroup *parent);
67
KHotKeys::ActionDataGroup *readGroup(const KConfigGroup &config, KHotKeys::ActionDataGroup *parent);
69
KHotKeys::ActionDataBase *readActionData(const KConfigGroup &config, KHotKeys::ActionDataGroup *parent);
71
KHotKeys::Trigger_list *readTriggerList(const KConfigGroup &config, KHotKeys::ActionData *parent);
73
KHotKeys::ActionList *readActionList(const KConfigGroup &config, KHotKeys::ActionData *parent);
75
virtual void visitActionDataBase(KHotKeys::ActionDataBase *base);
77
virtual void visitActionData(KHotKeys::ActionData *group);
79
virtual void visitActionDataGroup(KHotKeys::ActionDataGroup *group);
81
virtual void visitGenericActionData(KHotKeys::Generic_action_data *data);
83
virtual void visitMenuentryShortcutActionData(KHotKeys::MenuEntryShortcutActionData *data);
85
virtual void visitSimpleActionData(KHotKeys::SimpleActionData *data);
87
virtual void visit(KHotKeys::ActivateWindowAction&);
88
virtual void visit(KHotKeys::CommandUrlAction&);
89
virtual void visit(KHotKeys::DBusAction&);
90
virtual void visit(KHotKeys::KeyboardInputAction&);
91
virtual void visit(KHotKeys::MenuEntryAction&);
93
virtual void visit(KHotKeys::GestureTrigger&);
94
virtual void visit(KHotKeys::ShortcutTrigger&);
95
virtual void visit(KHotKeys::WindowTrigger&);
98
const KConfigGroup *_config;
100
KHotKeys::Settings *_settings;
104
KHotKeys::ActionState _stateStrategy;
108
}; // SettingsReaderV2
111
#endif /* SETTINGS_READER_V2_H */