kexi

kexisimpleprintingpagesetup.h
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.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#ifndef KEXISIMPLEPRINTINGPAGESETUP_H
21#define KEXISIMPLEPRINTINGPAGESETUP_H
22
23#include "kexisimpleprintingengine.h"
24#include <kexiviewbase.h>
25
26class KexiSimplePrintingPageSetupBase;
27class KoPageLayoutSize;
29
38class KexiSimplePrintingCommand : public TQObject
39{
40 TQ_OBJECT
41
42
43 public:
44 KexiSimplePrintingCommand(KexiMainWindow* mainWin, int objectId,
45 TQObject* parent = 0);
46 ~KexiSimplePrintingCommand();
47
48 public slots:
49 bool print(const KexiSimplePrintingSettings& settings,
50 const TQString& aTitleText = TQString());
51 bool print(const TQString& aTitleText = TQString());
52 bool showPrintPreview(const KexiSimplePrintingSettings& settings,
53 const TQString& aTitleText = TQString(), bool reload = false);
54// void setPrintPreviewNeedsReloading();
55
56 signals:
59
60 protected slots:
61 void slotShowPageSetupRequested();
62
63 protected:
64 KexiSimplePrintingEngine* m_previewEngine;
65 KexiMainWindow* m_mainWin;
66 int m_objectId;
68 KexiSimplePrintPreviewWindow *m_previewWindow;
69 bool m_printPreviewNeedsReloading : 1;
70};
71
73class KexiSimplePrintingPageSetup : public KexiViewBase
74{
75 TQ_OBJECT
76
77
78 public:
79 KexiSimplePrintingPageSetup( KexiMainWindow *mainWin, TQWidget *parent, TQMap<TQString,TQString>* args );
81
82 public slots:
83 void print();
84 void printPreview();
85
86 signals:
87 void printItemRequested(KexiPart::Item* item,
88 const KexiSimplePrintingSettings& settings, const TQString& titleText);
89 void printPreviewForItemRequested(KexiPart::Item* item,
90 const KexiSimplePrintingSettings& settings, const TQString& titleText, bool reload);
91
92 protected slots:
93 void slotOpenData();
94 void slotSaveSetup();
95 void slotChangeTitleFont();
96 void slotChangePageSizeAndMargins();
97 void slotAddPageNumbersCheckboxToggled(bool set);
98 void slotAddDateTimeCheckboxToggled(bool set);
99 void slotAddTableBordersCheckboxToggled(bool set);
100 void slotTitleTextChanged(const TQString&);
101
102 protected:
103 void setupPrintingCommand();
104 void updatePageLayoutAndUnitInfo();
105 void setDirty(bool set);
106
108// KexiSimplePrintingEngine *m_engine;
109 KoUnit::Unit m_unit;
110 KexiSimplePrintingPageSetupBase *m_contents;
111 KoPageLayoutSize *m_pageLayoutWidget;
112 KexiPart::Item *m_item;
113// KexiSimplePrintingCommand *m_command;
114 TQString m_origCaptionLabelText;
115 bool m_printPreviewNeedsReloading : 1;
116
117};
118
119#endif
Kexi's main window interface This interface is implemented by KexiMainWindowImpl class.
Information about a single object that can be instantiated using Kexi Part.
A window for displaying print preview for simple printing.
bool showPrintPreview(const KexiSimplePrintingSettings &settings, const TQString &aTitleText=TQString(), bool reload=false)
void showPageSetupRequested(KexiPart::Item *item)
connected to Kexi Main Window
An engine painting data on pages using TQPainter. The engine allows for random access to any page.
KexiSimplePrintingPageSetup(KexiMainWindow *mainWin, TQWidget *parent, TQMap< TQString, TQString > *args)
Settings data for simple printing engine.
KexiMainWindow * mainWin() const