KGlobalAccel

kglobalshortcutinfo.h
1 /*
2  SPDX-FileCopyrightText: 2008 Michael Jansen <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #ifndef KGLOBALSHORTCUTINFO_H
8 #define KGLOBALSHORTCUTINFO_H
9 
10 #include <kglobalaccel_export.h>
11 
12 #include <QDBusArgument>
13 #include <QKeySequence>
14 #include <QList>
15 #include <QObject>
16 
17 class KGlobalShortcutInfoPrivate;
18 
19 /**
20  * @author Michael Jansen <[email protected]>
21  */
22 class KGLOBALACCEL_EXPORT KGlobalShortcutInfo : public QObject
23 {
24  Q_OBJECT
25 
26  Q_CLASSINFO("D-Bus Interface", "org.kde.kglobalaccel.KShortcutInfo")
27 
28  /* clang-format off */
29  Q_SCRIPTABLE Q_PROPERTY(QString uniqueName READ uniqueName)
30  Q_SCRIPTABLE Q_PROPERTY(QString friendlyName READ friendlyName)
31 
32  Q_SCRIPTABLE Q_PROPERTY(QString componentUniqueName READ componentUniqueName)
33  Q_SCRIPTABLE Q_PROPERTY(QString componentFriendlyName READ componentFriendlyName)
34 
35  Q_SCRIPTABLE Q_PROPERTY(QString contextUniqueName READ contextUniqueName)
36  Q_SCRIPTABLE Q_PROPERTY(QString contextFriendlyName READ contextFriendlyName)
37 
38  Q_SCRIPTABLE Q_PROPERTY(QList<QKeySequence> keys READ keys)
39  Q_SCRIPTABLE Q_PROPERTY(QList<QKeySequence> defaultKeys READ keys)
40 
41 public:
43  /* clang-format on */
44 
46 
48 
49  KGlobalShortcutInfo &operator=(const KGlobalShortcutInfo &rhs);
50 
51  QString contextFriendlyName() const;
52 
53  QString contextUniqueName() const;
54 
55  QString componentFriendlyName() const;
56 
57  QString componentUniqueName() const;
58 
59  QList<QKeySequence> defaultKeys() const;
60 
61  QString friendlyName() const;
62 
63  QList<QKeySequence> keys() const;
64 
65  QString uniqueName() const;
66 
67 private:
68  friend class GlobalShortcut;
69 
70  friend KGLOBALACCEL_EXPORT const QDBusArgument &operator>>(const QDBusArgument &argument, KGlobalShortcutInfo &shortcut);
71 
72  //! Implementation details
73  KGlobalShortcutInfoPrivate *d;
74 };
75 
76 KGLOBALACCEL_EXPORT QDBusArgument &operator<<(QDBusArgument &argument, const KGlobalShortcutInfo &shortcut);
77 
78 KGLOBALACCEL_EXPORT const QDBusArgument &operator>>(const QDBusArgument &argument, KGlobalShortcutInfo &shortcut);
79 
80 Q_DECLARE_METATYPE(KGlobalShortcutInfo)
81 
82 #endif /* #ifndef KGLOBALSHORTCUTINFO_H */
Q_CLASSINFO(Name, Value)
QDataStream & operator>>(QDataStream &in, KDateTime::Spec &spec)
Represents a global shortcut.
Q_PROPERTY(...)
QDataStream & operator<<(QDataStream &out, const KDateTime::Spec &spec)
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sun May 16 2021 22:53:45 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.