kexi

kexisimpleprintpreviewwindow.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. 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 KEXISIMPLEPRINTPREVIEWWINDOW_H
21#define KEXISIMPLEPRINTPREVIEWWINDOW_H
22
23#include <tqpainter.h>
24#include <tqscrollview.h>
25#include <tdetoolbar.h>
26#include <KoPageLayoutDia.h>
27
28class KexiSimplePrintPreviewScrollView;
29class KexiSimplePrintPreviewView;
32
34class KexiSimplePrintPreviewWindow : public TQWidget
35{
36 TQ_OBJECT
37
38
39 public:
41 const TQString& previewName, TQWidget *parent, WFlags f = 0);
43
44 int currentPage() const { return m_pageNumber; }
45
46 const KexiSimplePrintingSettings& settings() const { return m_settings; }
47
48 public slots:
49 void updatePagesCount();
50// void setPagesCount(int pagesCount);
51 void goToPage(int pageNumber);
52 void setFullWidth();
53
54 signals:
55 void printRequested();
56 void pageSetupRequested();
57
58 protected slots:
59 void slotPageSetup();
60 void slotPrintClicked();
61 void slotZoomInClicked();
62 void slotZoomOutClicked();
63 void slotFirstClicked();
64 void slotPreviousClicked();
65 void slotNextClicked();
66 void slotLastClicked();
67 void initLater();
68
69 protected:
70 virtual bool event( TQEvent * e );
71
73 const KexiSimplePrintingSettings& m_settings;
74 TDEToolBar *m_toolbar, *m_navToolbar;
75 int m_pageNumber;
77 int m_idFirst, m_idLast, m_idPrevious, m_idNext, m_idPageNumberLabel;
78 KexiSimplePrintPreviewScrollView *m_scrollView;
79 KexiSimplePrintPreviewView *m_view;
80
81 friend class KexiSimplePrintPreviewView;
82};
83
84#endif
int m_pagesCount
needed to know that pages could has been changed
KexiSimplePrintPreviewWindow(KexiSimplePrintingEngine &engine, const TQString &previewName, TQWidget *parent, WFlags f=0)
An engine painting data on pages using TQPainter. The engine allows for random access to any page.
Settings data for simple printing engine.