File indexing completed on 2024-05-12 16:39:38

0001 /* This file is part of the KDE project
0002    Copyright (C) 2003 Lucijan Busch <lucijan@kde.org>
0003    Copyright (C) 2003-2014 Jarosław Staniek <staniek@kde.org>
0004 
0005    This library is free software; you can redistribute it and/or
0006    modify it under the terms of the GNU Library General Public
0007    License as published by the Free Software Foundation; either
0008    version 2 of the License, or (at your option) any later version.
0009 
0010    This library is distributed in the hope that it will be useful,
0011    but WITHOUT ANY WARRANTY; without even the implied warranty of
0012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0013    Library General Public License for more details.
0014 
0015    You should have received a copy of the GNU Library General Public License
0016    along with this library; see the file COPYING.LIB.  If not, write to
0017    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
0018  * Boston, MA 02110-1301, USA.
0019 */
0020 
0021 #include "kexipartbase.h"
0022 #include <kexiutils/utils.h>
0023 
0024 namespace KexiPart
0025 {
0026 //! @internal
0027 class Q_DECL_HIDDEN PartBase::Private
0028 {
0029 public:
0030     Private()
0031     : info(0)
0032     {
0033     }
0034     Info *info;
0035 };
0036 }
0037 
0038 using namespace KexiPart;
0039 
0040 PartBase::PartBase(QObject *parent,
0041                    const QVariantList& list)
0042     : QObject(parent)
0043     , d(new Private)
0044 {
0045     Q_UNUSED(list);
0046 }
0047 
0048 PartBase::~PartBase()
0049 {
0050     delete d;
0051 }
0052 
0053 void PartBase::setInfo(Info *info)
0054 {
0055     d->info = info;
0056 }
0057 
0058 Info* PartBase::info() const
0059 {
0060     return d->info;
0061 }
0062 
0063 KLocalizedString PartBase::i18nMessage(const QString& englishMessage, KexiWindow* window) const
0064 {
0065     Q_UNUSED(window);
0066     if (QString(englishMessage).startsWith(':'))
0067         return KLocalizedString();
0068     return kxi18nc("@info", englishMessage.toLatin1());
0069 }
0070 
0071 void PartBase::setupCustomPropertyPanelTabs(QTabWidget *)
0072 {
0073 }
0074