KDEUI
kglobalshortcutinfo.cpp
Go to the documentation of this file.00001 /* Copyright (C) 2008 Michael Jansen <kde@michael-jansen.biz> 00002 00003 This library is free software; you can redistribute it and/or 00004 modify it under the terms of the GNU Library General Public 00005 License as published by the Free Software Foundation; either 00006 version 2 of the License, or (at your option) any later version. 00007 00008 This library is distributed in the hope that it will be useful, 00009 but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00011 Library General Public License for more details. 00012 00013 You should have received a copy of the GNU Library General Public License 00014 along with this library; see the file COPYING.LIB. If not, write to 00015 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00016 Boston, MA 02110-1301, USA. 00017 */ 00018 00019 #include "kglobalshortcutinfo.h" 00020 #include "kglobalshortcutinfo_p.h" 00021 00022 KGlobalShortcutInfo::KGlobalShortcutInfo() 00023 : d(new KGlobalShortcutInfoPrivate) 00024 {} 00025 00026 00027 KGlobalShortcutInfo::KGlobalShortcutInfo(const KGlobalShortcutInfo &rhs) 00028 : QObject() 00029 ,d(new KGlobalShortcutInfoPrivate) 00030 { 00031 d->contextUniqueName = rhs.d->contextUniqueName; 00032 d->contextFriendlyName = rhs.d->contextFriendlyName; 00033 d->componentFriendlyName = rhs.d->componentFriendlyName; 00034 d->componentUniqueName = rhs.d->componentUniqueName; 00035 d->friendlyName = rhs.d->friendlyName; 00036 d->uniqueName = rhs.d->uniqueName; 00037 d->keys = rhs.d->keys; 00038 d->defaultKeys = rhs.d->defaultKeys; 00039 } 00040 00041 00042 KGlobalShortcutInfo::~KGlobalShortcutInfo() 00043 { 00044 delete d; 00045 } 00046 00047 00048 KGlobalShortcutInfo &KGlobalShortcutInfo::operator=(const KGlobalShortcutInfo &rhs) 00049 { 00050 KGlobalShortcutInfo tmp(rhs); 00051 KGlobalShortcutInfoPrivate *swap; 00052 swap = d; 00053 d = tmp.d; 00054 tmp.d = swap; 00055 return *this; 00056 } 00057 00058 00059 QString KGlobalShortcutInfo::contextFriendlyName() const 00060 { 00061 return d->contextFriendlyName.isEmpty() 00062 ? d->contextUniqueName 00063 : d->contextFriendlyName; 00064 } 00065 00066 00067 QString KGlobalShortcutInfo::contextUniqueName() const 00068 { 00069 return d->contextUniqueName; 00070 } 00071 00072 00073 QString KGlobalShortcutInfo::componentFriendlyName() const 00074 { 00075 return d->componentFriendlyName.isEmpty() 00076 ? d->componentUniqueName 00077 : d->componentFriendlyName; 00078 } 00079 00080 00081 QString KGlobalShortcutInfo::componentUniqueName() const 00082 { 00083 return d->componentUniqueName; 00084 } 00085 00086 00087 QList<QKeySequence> KGlobalShortcutInfo::defaultKeys() const 00088 { 00089 return d->defaultKeys; 00090 } 00091 00092 00093 QString KGlobalShortcutInfo::friendlyName() const 00094 { 00095 return d->friendlyName; 00096 } 00097 00098 00099 QList<QKeySequence> KGlobalShortcutInfo::keys() const 00100 { 00101 return d->keys; 00102 } 00103 00104 QString KGlobalShortcutInfo::uniqueName() const 00105 { 00106 return d->uniqueName; 00107 } 00108 00109 00110 #include "moc_kglobalshortcutinfo.cpp"