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 m_supportedUserViewModes = Kexi::DesignViewMode; 00045 } 00046 00047 KexiSimplePrintingPart::~KexiSimplePrintingPart() 00048 { 00049 } 00050 00051 KexiViewBase* KexiSimplePrintingPart::createView(QWidget *parent, KexiDialogBase* dialog, 00052 KexiPart::Item &item, int viewMode, QMap<QString,QString>* args) 00053 { 00054 Q_UNUSED( item ); 00055 if (viewMode == Kexi::DesignViewMode) { 00056 KexiSimplePrintingPageSetup *w = new KexiSimplePrintingPageSetup( dialog->mainWin(), parent, args ); 00057 return w; 00058 } 00059 00060 return 0; 00061 } 00062 00063 #include "kexisimpleprintingpart.moc"