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

KDEUI

  • 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
24QDBusArgument &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
50const 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
KGlobalShortcutInfo
Definition: kglobalshortcutinfo.h:36
kglobalshortcutinfo.h
operator<<
QDBusArgument & operator<<(QDBusArgument &argument, const KGlobalShortcutInfo &shortcut)
Definition: kglobalshortcutinfo_dbus.cpp:24
operator>>
const QDBusArgument & operator>>(const QDBusArgument &argument, KGlobalShortcutInfo &shortcut)
Definition: kglobalshortcutinfo_dbus.cpp:50
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 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-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 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
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