kexi

kexistaticpart.cpp

00001 /* This file is part of the KDE project
00002    Copyright (C) 2003 Lucijan Busch <lucijan@kde.org>
00003    Copyright (C) 2003 Jaroslaw Staniek <js@iidea.pl>
00004 
00005    This library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Library General Public
00007    License as published by the Free Software Foundation; either
00008    version 2 of the License, or (at your option) any later version.
00009 
00010    This library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Library General Public License for more details.
00014 
00015    You should have received a copy of the GNU Library General Public License
00016    along with this library; see the file COPYING.LIB.  If not, write to
00017    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018  * Boston, MA 02110-1301, USA.
00019 */
00020 
00021 #include "kexistaticpart.h"
00022 #include "kexipartinfo_p.h"
00023 #include "kexipartitem.h"
00024 #include "kexi.h"
00025 
00026 using namespace KexiPart;
00027 
00028 //------------------------------
00029 
00030 StaticInfo::StaticInfo(const QCString& mimeType, const QString& itemIcon, const QString& objectName)
00031  : Info()
00032 {
00033     d->mimeType = mimeType;
00034     d->itemIcon = itemIcon;
00035     d->objectName = objectName;
00036 }
00037 
00038 StaticInfo::~StaticInfo()
00039 {
00040 }
00041 
00042 //------------------------------
00043 
00044 StaticPart::StaticPart(const QCString& mimeType, const QString& itemIcon, const QString& objectName)
00045  : Part(&Kexi::partManager(), new StaticInfo(mimeType, itemIcon, objectName))
00046 {
00047     Kexi::partManager().insertStaticPart(this);
00048 }
00049 
00050 StaticPart::~StaticPart()
00051 {
00052 }
00053 
00054 KexiViewBase* StaticPart::createView(QWidget *parent, KexiDialogBase* dialog, 
00055     KexiPart::Item &item, int viewMode)
00056 {
00057     Q_UNUSED(parent);
00058     Q_UNUSED(dialog);
00059     Q_UNUSED(item);
00060     Q_UNUSED(viewMode);
00061     //unused
00062     return 0;
00063 }
KDE Home | KDE Accessibility Home | Description of Access Keys