• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KDEUI

  • sources
  • kde-4.14
  • kdelibs
  • kdeui
  • shortcuts
kglobalshortcutinfo_dbus.cpp
Go to the documentation of this file.
1 /* Copyright (C) 2008 Michael Jansen <kde@michael-jansen.biz>
2 
3  This library is free software; you can redistribute it and/or
4  modify it under the terms of the GNU Library General Public
5  License as published by the Free Software Foundation; either
6  version 2 of the License, or (at your option) any later version.
7 
8  This library is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  Library General Public License for more details.
12 
13  You should have received a copy of the GNU Library General Public License
14  along with this library; see the file COPYING.LIB. If not, write to
15  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16  Boston, MA 02110-1301, USA.
17 */
18 
19 #include "kglobalshortcutinfo.h"
20 #include "kglobalshortcutinfo_p.h"
21 
22 
23 
24 QDBusArgument &operator<< (QDBusArgument &argument, const KGlobalShortcutInfo &shortcut)
25  {
26  argument.beginStructure();
27  argument << shortcut.uniqueName()
28  << shortcut.friendlyName()
29  << shortcut.componentUniqueName()
30  << shortcut.componentFriendlyName()
31  << shortcut.contextUniqueName()
32  << shortcut.contextFriendlyName();
33  argument.beginArray(qMetaTypeId<int>());
34  Q_FOREACH(const QKeySequence &key, shortcut.keys())
35  {
36  argument << key.operator int();
37  }
38  argument.endArray();
39  argument.beginArray(qMetaTypeId<int>());
40  Q_FOREACH(const QKeySequence &key, shortcut.defaultKeys())
41  {
42  argument << key.operator int();
43  }
44  argument.endArray();
45  argument.endStructure();
46  return argument;
47  }
48 
49 
50 const QDBusArgument &operator>> (const QDBusArgument &argument, KGlobalShortcutInfo &shortcut)
51  {
52  argument.beginStructure();
53  argument >> shortcut.d->uniqueName
54  >> shortcut.d->friendlyName
55  >> shortcut.d->componentUniqueName
56  >> shortcut.d->componentFriendlyName
57  >> shortcut.d->contextUniqueName
58  >> shortcut.d->contextFriendlyName;
59  argument.beginArray();
60  while (!argument.atEnd())
61  {
62  int key;
63  argument >> key;
64  shortcut.d->keys.append(QKeySequence(key));
65  }
66  argument.endArray();
67  argument.beginArray();
68  while (!argument.atEnd())
69  {
70  int key;
71  argument >> key;
72  shortcut.d->defaultKeys.append(QKeySequence(key));
73  }
74  argument.endArray();
75  argument.endStructure();
76  return argument;
77  }
78 
QDBusArgument::beginArray
void beginArray(int id)
QDBusArgument::atEnd
bool atEnd() const
KGlobalShortcutInfo::componentFriendlyName
QString componentFriendlyName
Definition: kglobalshortcutinfo.h:45
KGlobalShortcutInfo::keys
QList< QKeySequence > keys
Definition: kglobalshortcutinfo.h:50
KStandardShortcut::shortcut
const KShortcut & shortcut(StandardShortcut id)
Returns the keybinding for accel.
Definition: kstandardshortcut.cpp:285
QDBusArgument::beginStructure
void beginStructure()
KGlobalShortcutInfo
Definition: kglobalshortcutinfo.h:35
kglobalshortcutinfo.h
KGlobalShortcutInfo::defaultKeys
QList< QKeySequence > defaultKeys
Definition: kglobalshortcutinfo.h:51
KGlobalShortcutInfo::contextUniqueName
QString contextUniqueName
Definition: kglobalshortcutinfo.h:47
QDBusArgument
QDBusArgument::endArray
void endArray()
operator<<
QDBusArgument & operator<<(QDBusArgument &argument, const KGlobalShortcutInfo &shortcut)
Definition: kglobalshortcutinfo_dbus.cpp:24
KGlobalShortcutInfo::friendlyName
QString friendlyName
Definition: kglobalshortcutinfo.h:42
QKeySequence
KGlobalShortcutInfo::contextFriendlyName
QString contextFriendlyName
Definition: kglobalshortcutinfo.h:48
KGlobalShortcutInfo::uniqueName
QString uniqueName
Definition: kglobalshortcutinfo.h:41
operator>>
const QDBusArgument & operator>>(const QDBusArgument &argument, KGlobalShortcutInfo &shortcut)
Definition: kglobalshortcutinfo_dbus.cpp:50
KGlobalShortcutInfo::componentUniqueName
QString componentUniqueName
Definition: kglobalshortcutinfo.h:44
QDBusArgument::endStructure
void endStructure()
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:23:59 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDEUI

Skip menu "KDEUI"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal