Warning, file /office/calligra/libs/flake/KoToolFactoryBase.cpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /* This file is part of the KDE project 0002 * Copyright (C) 2006 Thomas Zander <zander@kde.org> 0003 * 0004 * This library is free software; you can redistribute it and/or 0005 * modify it under the terms of the GNU Library General Public 0006 * License as published by the Free Software Foundation; either 0007 * version 2 of the License, or (at your option) any later version. 0008 * 0009 * This library is distributed in the hope that it will be useful, 0010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0012 * Library General Public License for more details. 0013 * 0014 * You should have received a copy of the GNU Library General Public License 0015 * along with this library; see the file COPYING.LIB. If not, write to 0016 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0017 * Boston, MA 02110-1301, USA. 0018 */ 0019 0020 #include "KoToolFactoryBase.h" 0021 0022 #include "KoToolBase.h" 0023 0024 #include <QKeySequence> 0025 0026 class Q_DECL_HIDDEN KoToolFactoryBase::Private 0027 { 0028 public: 0029 Private(const QString &i) 0030 : priority(100), 0031 id(i) 0032 { 0033 } 0034 int priority; 0035 QString toolType; 0036 QString tooltip; 0037 QString activationId; 0038 QString iconName; 0039 const QString id; 0040 QKeySequence shortcut; 0041 }; 0042 0043 0044 KoToolFactoryBase::KoToolFactoryBase(const QString &id) 0045 : d(new Private(id)) 0046 { 0047 } 0048 0049 KoToolFactoryBase::~KoToolFactoryBase() 0050 { 0051 delete d; 0052 } 0053 0054 QString KoToolFactoryBase::id() const 0055 { 0056 return d->id; 0057 } 0058 0059 int KoToolFactoryBase::priority() const 0060 { 0061 return d->priority; 0062 } 0063 0064 QString KoToolFactoryBase::toolType() const 0065 { 0066 return d->toolType; 0067 } 0068 0069 QString KoToolFactoryBase::toolTip() const 0070 { 0071 return d->tooltip; 0072 } 0073 0074 QString KoToolFactoryBase::iconName() const 0075 { 0076 return d->iconName; 0077 } 0078 0079 QString KoToolFactoryBase::activationShapeId() const 0080 { 0081 return d->activationId; 0082 } 0083 0084 QKeySequence KoToolFactoryBase::shortcut() const 0085 { 0086 return d->shortcut; 0087 } 0088 0089 void KoToolFactoryBase::setActivationShapeId(const QString &activationShapeId) 0090 { 0091 d->activationId = activationShapeId; 0092 } 0093 0094 void KoToolFactoryBase::setToolTip(const QString & tooltip) 0095 { 0096 d->tooltip = tooltip; 0097 } 0098 0099 void KoToolFactoryBase::setToolType(const QString & toolType) 0100 { 0101 d->toolType = toolType; 0102 } 0103 0104 void KoToolFactoryBase::setIconName(const QString &iconName) 0105 { 0106 d->iconName = iconName; 0107 } 0108 0109 void KoToolFactoryBase::setPriority(int newPriority) 0110 { 0111 d->priority = newPriority; 0112 } 0113 0114 void KoToolFactoryBase::setShortcut(const QKeySequence &shortcut) 0115 { 0116 d->shortcut = shortcut; 0117 }