kexi
kexisimpleprintingpart.cpp
00001 /* This file is part of the KDE project 00002 Copyright (C) 2005 Jaroslaw Staniek <js@iidea.pl> 00003 00004 This program is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU Library General Public 00006 License as published by the Free Software Foundation; either 00007 version 2 of the License, or (at your option) any later version. 00008 00009 This program is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 Library General Public License for more details. 00013 00014 You should have received a copy of the GNU Library General Public License 00015 along with this program; see the file COPYING. If not, write to 00016 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00017 * Boston, MA 02110-1301, USA. 00018 */ 00019 00020 #include "kexisimpleprintingpart.h" 00021 #include "kexisimpleprintingpagesetup.h" 00022 00023 #include <kdebug.h> 00024 #include <kgenericfactory.h> 00025 00026 #include <keximainwindow.h> 00027 #include <kexidialogbase.h> 00028 #include <kexiproject.h> 00029 #include <kexipartinfo.h> 00030 00031 KexiSimplePrintingPart::KexiSimplePrintingPart() 00032 : KexiPart::StaticPart("kexi/simpleprinting", "fileprint", i18n("Printing")) 00033 { 00034 // REGISTERED ID: 00035 //?? m_registeredPartID = (int)KexiPart::QueryObjectType; 00036 00037 /* m_names["instanceName"] 00038 = i18n("Translate this word using only lowercase alphanumeric characters (a..z, 0..9). " 00039 "Use '_' character instead of spaces. First character should be a..z character. " 00040 "If you cannot use latin characters in your language, use english word.", 00041 "query");*/ 00042 m_names["instanceCaption"] = i18n("Printing"); 00043 m_supportedViewModes = Kexi::DesignViewMode; 00044 } 00045 00046 KexiSimplePrintingPart::~KexiSimplePrintingPart() 00047 { 00048 } 00049 00050 KexiViewBase* KexiSimplePrintingPart::createView(QWidget *parent, KexiDialogBase* dialog, 00051 KexiPart::Item &item, int viewMode, QMap<QString,QString>* args) 00052 { 00053 Q_UNUSED( item ); 00054 if (viewMode == Kexi::DesignViewMode) { 00055 KexiSimplePrintingPageSetup *w = new KexiSimplePrintingPageSetup( dialog->mainWin(), parent, args ); 00056 return w; 00057 } 00058 00059 return 0; 00060 } 00061 00062 #include "kexisimpleprintingpart.moc"