Changeset View
Changeset View
Standalone View
Standalone View
src/part/simpleprintpreviewwindow.h
Show All 23 Lines | 19 | /* This file was part of the KDE project | |||
---|---|---|---|---|---|
24 | License as published by the Free Software Foundation; either | 24 | License as published by the Free Software Foundation; either | ||
25 | version 2 of the License, or (at your option) any later version. | 25 | version 2 of the License, or (at your option) any later version. | ||
26 | */ | 26 | */ | ||
27 | 27 | | |||
28 | #ifndef KGVSIMPLEPRINTPREVIEWWINDOW_H | 28 | #ifndef KGVSIMPLEPRINTPREVIEWWINDOW_H | ||
29 | #define KGVSIMPLEPRINTPREVIEWWINDOW_H | 29 | #define KGVSIMPLEPRINTPREVIEWWINDOW_H | ||
30 | 30 | | |||
31 | #include <qpainter.h> | 31 | #include <qpainter.h> | ||
32 | //Added by qt3to4: | 32 | // Added by qt3to4: | ||
33 | #include <KgvPageLayoutDia.h> | ||||
33 | #include <QEvent> | 34 | #include <QEvent> | ||
34 | #include <ktoolbar.h> | | |||
35 | #include <kactioncollection.h> | 35 | #include <kactioncollection.h> | ||
36 | #include <KgvPageLayoutDia.h> | 36 | #include <ktoolbar.h> | ||
37 | 37 | | |||
38 | class QLabel; | 38 | class QLabel; | ||
39 | class QScrollArea; | 39 | class QScrollArea; | ||
40 | 40 | | |||
41 | namespace KGraphViewer | 41 | namespace KGraphViewer | ||
42 | { | 42 | { | ||
43 | | ||||
44 | class KGVSimplePrintPreviewScrollView; | 43 | class KGVSimplePrintPreviewScrollView; | ||
45 | class KGVSimplePrintPreviewView; | 44 | class KGVSimplePrintPreviewView; | ||
46 | class KGVSimplePrintingSettings; | 45 | class KGVSimplePrintingSettings; | ||
47 | class KGVSimplePrintingEngine; | 46 | class KGVSimplePrintingEngine; | ||
48 | 47 | | |||
49 | //! @short A window for displaying print preview for simple printing. | 48 | //! @short A window for displaying print preview for simple printing. | ||
50 | class KGVSimplePrintPreviewWindow : public QWidget | 49 | class KGVSimplePrintPreviewWindow : public QWidget | ||
51 | { | 50 | { | ||
52 | Q_OBJECT | 51 | Q_OBJECT | ||
53 | 52 | | |||
54 | public: | 53 | public: | ||
55 | KGVSimplePrintPreviewWindow(KGVSimplePrintingEngine &engine, | 54 | KGVSimplePrintPreviewWindow(KGVSimplePrintingEngine &engine, const QString &previewName, QWidget *parent); | ||
56 | const QString& previewName, QWidget *parent); | | |||
57 | ~KGVSimplePrintPreviewWindow(); | 55 | ~KGVSimplePrintPreviewWindow(); | ||
58 | 56 | | |||
59 | int currentPage() const { return m_pageNumber; } | 57 | int currentPage() const | ||
58 | { | ||||
59 | return m_pageNumber; | ||||
60 | } | ||||
60 | 61 | | |||
61 | KGVSimplePrintingSettings* settings() const { return m_settings; } | 62 | KGVSimplePrintingSettings *settings() const | ||
63 | { | ||||
64 | return m_settings; | ||||
65 | } | ||||
62 | 66 | | |||
63 | public Q_SLOTS: | 67 | public Q_SLOTS: | ||
64 | void updatePagesCount(); | 68 | void updatePagesCount(); | ||
65 | // void setPagesCount(int pagesCount); | 69 | // void setPagesCount(int pagesCount); | ||
66 | void goToPage(int pageNumber); | 70 | void goToPage(int pageNumber); | ||
67 | void setFullWidth(); | 71 | void setFullWidth(); | ||
68 | void slotRedraw(); | 72 | void slotRedraw(); | ||
69 | 73 | | |||
70 | Q_SIGNALS: | 74 | Q_SIGNALS: | ||
71 | void printRequested(); | 75 | void printRequested(); | ||
72 | void pageSetupRequested(); | 76 | void pageSetupRequested(); | ||
73 | 77 | | |||
74 | protected Q_SLOTS: | 78 | protected Q_SLOTS: | ||
75 | void slotPageSetup(); | 79 | void slotPageSetup(); | ||
76 | void slotPrintClicked(); | 80 | void slotPrintClicked(); | ||
77 | void slotZoomInClicked(); | 81 | void slotZoomInClicked(); | ||
78 | void slotZoomOutClicked(); | 82 | void slotZoomOutClicked(); | ||
79 | void slotFirstClicked(); | 83 | void slotFirstClicked(); | ||
80 | void slotPreviousClicked(); | 84 | void slotPreviousClicked(); | ||
81 | void slotNextClicked(); | 85 | void slotNextClicked(); | ||
82 | void slotLastClicked(); | 86 | void slotLastClicked(); | ||
83 | void initLater(); | 87 | void initLater(); | ||
84 | 88 | | |||
85 | protected: | 89 | protected: | ||
86 | bool event(QEvent* e) override; | 90 | bool event(QEvent *e) override; | ||
87 | 91 | | |||
88 | KGVSimplePrintingEngine &m_engine; | 92 | KGVSimplePrintingEngine &m_engine; | ||
89 | KGVSimplePrintingSettings* m_settings; | 93 | KGVSimplePrintingSettings *m_settings; | ||
90 | KToolBar *m_toolbar, *m_navToolbar; | 94 | KToolBar *m_toolbar, *m_navToolbar; | ||
91 | int m_pageNumber;//, m_pagesCount; | 95 | int m_pageNumber; //, m_pagesCount; | ||
92 | int m_idFirst, m_idLast, m_idPrevious, m_idNext; | 96 | int m_idFirst, m_idLast, m_idPrevious, m_idNext; | ||
93 | QLabel* m_pageNumberLabel; | 97 | QLabel *m_pageNumberLabel; | ||
94 | // QScrollArea* m_scrollView; | 98 | // QScrollArea* m_scrollView; | ||
95 | KGVSimplePrintPreviewScrollView *m_scrollView; | 99 | KGVSimplePrintPreviewScrollView *m_scrollView; | ||
96 | KGVSimplePrintPreviewView *m_view; | 100 | KGVSimplePrintPreviewView *m_view; | ||
97 | KActionCollection m_actions; | 101 | KActionCollection m_actions; | ||
98 | 102 | | |||
99 | friend class KGVSimplePrintPreviewView; | 103 | friend class KGVSimplePrintPreviewView; | ||
100 | }; | 104 | }; | ||
101 | 105 | | |||
102 | } | 106 | } | ||
103 | 107 | | |||
104 | #endif | 108 | #endif |