kexisimpleprintingpart.cpp
1/* This file is part of the KDE project
2 Copyright (C) 2005 Jaroslaw Staniek <js@iidea.pl>
3
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this program; see the file COPYING. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18*/
19
20#include "kexisimpleprintingpart.h"
21#include "kexisimpleprintingpagesetup.h"
22
23#include <kdebug.h>
24#include <kgenericfactory.h>
25
26#include <keximainwindow.h>
27#include <kexidialogbase.h>
28#include <kexiproject.h>
29#include <kexipartinfo.h>
30
31KexiSimplePrintingPart::KexiSimplePrintingPart()
32 : KexiPart::StaticPart("kexi/simpleprinting", "document-print", i18n("Printing"))
33{
34 // REGISTERED ID:
35//?? m_registeredPartID = (int)KexiPart::QueryObjectType;
36
37/* m_names["instanceName"]
38 = i18n("Translate this word using only lowercase alphanumeric characters (a..z, 0..9). "
39 "Use '_' character instead of spaces. First character should be a..z character. "
40 "If you cannot use latin characters in your language, use english word.",
41 "query");*/
42 m_names["instanceCaption"] = i18n("Printing");
43 m_supportedViewModes = Kexi::DesignViewMode;
44 m_supportedUserViewModes = Kexi::DesignViewMode;
45}
46
47KexiSimplePrintingPart::~KexiSimplePrintingPart()
48{
49}
50
52 KexiPart::Item &item, int viewMode, TQMap<TQString,TQString>* args)
53{
54 Q_UNUSED( item );
55 if (viewMode == Kexi::DesignViewMode) {
56 KexiSimplePrintingPageSetup *w = new KexiSimplePrintingPageSetup( dialog->mainWin(), parent, args );
57 return w;
58 }
59
60 return 0;
61}
62
63#include "kexisimpleprintingpart.moc"
Base class for child window of Kexi's main application window.
Information about a single object that can be instantiated using Kexi Part.
A window for displaying settings for simple printing.
virtual KexiViewBase * createView(TQWidget *parent, KexiDialogBase *dialog, KexiPart::Item &item, int viewMode, TQMap< TQString, TQString > *staticObjectArgs)
Base class for single view embeddable of in KexiDialogBase.