1/*
2 SPDX-FileCopyrightText: 2008 Michael Jansen <kde@michael-jansen.biz>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#include "kglobalshortcutinfo.h"
8#include "kglobalshortcutinfo_p.h"
9
10KGlobalShortcutInfo::KGlobalShortcutInfo()
11 : d(new KGlobalShortcutInfoPrivate)
12{
13}
14
15KGlobalShortcutInfo::KGlobalShortcutInfo(const KGlobalShortcutInfo &rhs)
16 : QObject()
17 , d(new KGlobalShortcutInfoPrivate)
18{
19 d->contextUniqueName = rhs.d->contextUniqueName;
20 d->contextFriendlyName = rhs.d->contextFriendlyName;
21 d->componentFriendlyName = rhs.d->componentFriendlyName;
22 d->componentUniqueName = rhs.d->componentUniqueName;
23 d->friendlyName = rhs.d->friendlyName;
24 d->uniqueName = rhs.d->uniqueName;
25 d->keys = rhs.d->keys;
26 d->defaultKeys = rhs.d->defaultKeys;
27}
28
29KGlobalShortcutInfo::~KGlobalShortcutInfo()
30{
31 delete d;
32}
33
34KGlobalShortcutInfo &KGlobalShortcutInfo::operator=(const KGlobalShortcutInfo &rhs)
35{
36 KGlobalShortcutInfo tmp(rhs);
37 KGlobalShortcutInfoPrivate *swap;
38 swap = d;
39 d = tmp.d;
40 tmp.d = swap;
41 return *this;
42}
43
44QString KGlobalShortcutInfo::contextFriendlyName() const
45{
46 return d->contextFriendlyName.isEmpty() ? d->contextUniqueName : d->contextFriendlyName;
47}
48
49QString KGlobalShortcutInfo::contextUniqueName() const
50{
51 return d->contextUniqueName;
52}
53
54QString KGlobalShortcutInfo::componentFriendlyName() const
55{
56 return d->componentFriendlyName.isEmpty() ? d->componentUniqueName : d->componentFriendlyName;
57}
58
59QString KGlobalShortcutInfo::componentUniqueName() const
60{
61 return d->componentUniqueName;
62}
63
64QList<QKeySequence> KGlobalShortcutInfo::defaultKeys() const
65{
66 return d->defaultKeys;
67}
68
69QString KGlobalShortcutInfo::friendlyName() const
70{
71 return d->friendlyName;
72}
73
74QList<QKeySequence> KGlobalShortcutInfo::keys() const
75{
76 return d->keys;
77}
78
79QString KGlobalShortcutInfo::uniqueName() const
80{
81 return d->uniqueName;
82}
83
84#include "moc_kglobalshortcutinfo.cpp"
85

source code of kglobalaccel/src/kglobalshortcutinfo.cpp