add more spacing
[personal-kdebase.git] / workspace / khotkeys / app / kded.h
blob4381a5b3260f3fba0e2383557908a6b4a045b4d1
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 #ifndef _KHOTKEYS_KDED_H_
12 #define _KHOTKEYS_KDED_H_
14 #include <kdedmodule.h>
15 #include "settings.h"
17 #include <QtCore/QObject>
18 #include <QtDBus/QtDBus>
19 #include <QtGui/QKeySequence>
21 #include <KService>
23 namespace KHotKeys
25 class ActionDataGroup;
26 class SimpleActionData;
29 class KHotKeysModule
30 : public KDEDModule
32 Q_OBJECT
33 Q_CLASSINFO("D-Bus Interface", "org.kde.khotkeys")
35 public Q_SLOTS:
37 Q_SCRIPTABLE Q_NOREPLY void reread_configuration();
39 Q_SCRIPTABLE Q_NOREPLY void quit();
41 /**
42 * Register an shortcut for service @serviceStorageId with the key
43 * sequence @seq.
45 * @param serviceStorageId the KService::storageId of the service
46 * @param sequence the key sequence to use
48 * @returns @c true if the key sequence was successfully set, @c if
49 * the sequence is not available.
51 Q_SCRIPTABLE QString register_menuentry_shortcut(const QString &storageId, const QString &sequence);
53 /**
54 * Get the currently active shortcut for service @p serviceStorageId.
56 * @param serviceStorageId the KService::storageId of the service
58 * @returns the active global shortcuts for that service
60 Q_SCRIPTABLE QString get_menuentry_shortcut(const QString &storageId);
62 public:
64 KHotKeysModule(QObject* parent, const QList<QVariant>&);
65 virtual ~KHotKeysModule();
67 private:
69 //! The action list from _settings for convenience
70 KHotKeys::ActionDataGroup* actions_root;
72 //! The current settings
73 KHotKeys::Settings _settings;
75 /**
76 * @name Some method in need for a better home
78 //@{
79 //! Get the group for the menuentries. Will create it if needed
80 KHotKeys::ActionDataGroup *menuentries_group();
82 //! Find a menuentry_action for the service with @storageId in group @group
83 KHotKeys::SimpleActionData *menuentry_action(const QString &storageId);
84 //@}
87 //***************************************************************************
88 // Inline
89 //***************************************************************************
92 #endif