kexi

kexisimpleprintpreviewwindow.h

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 #ifndef KEXISIMPLEPRINTPREVIEWWINDOW_H
00021 #define KEXISIMPLEPRINTPREVIEWWINDOW_H
00022 
00023 #include <qpainter.h>
00024 #include <qscrollview.h>
00025 #include <ktoolbar.h>
00026 #include <KoPageLayoutDia.h>
00027 
00028 class KexiSimplePrintPreviewScrollView;
00029 class KexiSimplePrintPreviewView;
00030 class KexiSimplePrintingSettings;
00031 class KexiSimplePrintingEngine;
00032 
00034 class KexiSimplePrintPreviewWindow : public QWidget
00035 {
00036     Q_OBJECT
00037 
00038     public:
00039         KexiSimplePrintPreviewWindow(KexiSimplePrintingEngine &engine,
00040             const QString& previewName, QWidget *parent, WFlags f = 0);
00041         ~KexiSimplePrintPreviewWindow();
00042 
00043         int currentPage() const { return m_pageNumber; }
00044 
00045         const KexiSimplePrintingSettings& settings() const { return m_settings; }
00046 
00047     public slots:
00048         void updatePagesCount();
00049 //      void setPagesCount(int pagesCount);
00050         void goToPage(int pageNumber);
00051         void setFullWidth();
00052 
00053     signals:
00054         void printRequested();
00055         void pageSetupRequested();
00056 
00057     protected slots:
00058         void slotPageSetup();
00059         void slotPrintClicked();
00060         void slotZoomInClicked();
00061         void slotZoomOutClicked();
00062         void slotFirstClicked();
00063         void slotPreviousClicked();
00064         void slotNextClicked();
00065         void slotLastClicked();
00066         void initLater();
00067 
00068     protected:
00069         virtual bool event( QEvent * e );
00070 
00071         KexiSimplePrintingEngine &m_engine;
00072         const KexiSimplePrintingSettings& m_settings;
00073         KToolBar *m_toolbar, *m_navToolbar;
00074         int m_pageNumber;
00075         int m_pagesCount; 
00076         int m_idFirst, m_idLast, m_idPrevious, m_idNext, m_idPageNumberLabel;
00077         KexiSimplePrintPreviewScrollView *m_scrollView;
00078         KexiSimplePrintPreviewView *m_view;
00079 
00080         friend class KexiSimplePrintPreviewView;
00081 };
00082 
00083 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys