1 /****************************************************************************
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>
17 #include <QtCore/QObject>
18 #include <QtDBus/QtDBus>
19 #include <QtGui/QKeySequence>
25 class ActionDataGroup
;
26 class SimpleActionData
;
33 Q_CLASSINFO("D-Bus Interface", "org.kde.khotkeys")
37 Q_SCRIPTABLE Q_NOREPLY
void reread_configuration();
39 Q_SCRIPTABLE Q_NOREPLY
void quit();
42 * Register an shortcut for service @serviceStorageId with the key
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
);
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
);
64 KHotKeysModule(QObject
* parent
, const QList
<QVariant
>&);
65 virtual ~KHotKeysModule();
69 //! The action list from _settings for convenience
70 KHotKeys::ActionDataGroup
* actions_root
;
72 //! The current settings
73 KHotKeys::Settings _settings
;
76 * @name Some method in need for a better home
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
);
87 //***************************************************************************
89 //***************************************************************************