1
#ifndef SETTINGS_WRITER_H
2
#define SETTINGS_WRITER_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"
24
#include <QtCore/QStack>
35
* @author Michael Jansen <kde@michael-jansen.biz>
37
class SettingsWriter : public ActionDataConstVisitor
43
const Settings *settings,
45
const QString &id = QString(),
46
bool allowMerging = false);
49
const ActionDataBase *element,
52
void writeTo(KConfigBase &cfg);
54
virtual void visitActionDataBase(const ActionDataBase *base);
56
virtual void visitActionData(const ActionData *group);
58
virtual void visitActionDataGroup(const ActionDataGroup *group);
60
virtual void visitGenericActionData(const Generic_action_data *data);
62
virtual void visitMenuentryShortcutActionData(const MenuEntryShortcutActionData *data);
64
virtual void visitSimpleActionData(const SimpleActionData *data);
68
const Settings *_settings;
70
QStack<KConfigGroup*> _stack;
81
SettingsWriter(const SettingsWriter&);
82
SettingsWriter& operator=(const SettingsWriter&);
86
} // namespace KHotKeys
89
#endif /* SETTINGS_WRITER_H */