1 | /* |
---|
2 | |
---|
3 | Copyright 2012-2013 Adam Reichold |
---|
4 | |
---|
5 | This file is part of qpdfview. |
---|
6 | |
---|
7 | qpdfview is free software: you can redistribute it and/or modify |
---|
8 | it under the terms of the GNU General Public License as published by |
---|
9 | the Free Software Foundation, either version 2 of the License, or |
---|
10 | (at your option) any later version. |
---|
11 | |
---|
12 | qpdfview is distributed in the hope that it will be useful, |
---|
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
15 | GNU General Public License for more details. |
---|
16 | |
---|
17 | You should have received a copy of the GNU General Public License |
---|
18 | along with qpdfview. If not, see <http://www.gnu.org/licenses/>. |
---|
19 | |
---|
20 | */ |
---|
21 | |
---|
22 | #ifndef PRINTDIALOG_H |
---|
23 | #define PRINTDIALOG_H |
---|
24 | |
---|
25 | #include <QPrintDialog> |
---|
26 | |
---|
27 | class QCheckBox; |
---|
28 | class QComboBox; |
---|
29 | class QFormLayout; |
---|
30 | class QLineEdit; |
---|
31 | class QPrinter; |
---|
32 | |
---|
33 | namespace qpdfview |
---|
34 | { |
---|
35 | |
---|
36 | struct PrintOptions; |
---|
37 | class Settings; |
---|
38 | |
---|
39 | class PrintDialog : public QPrintDialog |
---|
40 | { |
---|
41 | Q_OBJECT |
---|
42 | |
---|
43 | public: |
---|
44 | static QPrinter* createPrinter(); |
---|
45 | |
---|
46 | PrintDialog(QPrinter* printer, QWidget* parent = 0); |
---|
47 | |
---|
48 | PrintOptions printOptions() const; |
---|
49 | |
---|
50 | public slots: |
---|
51 | void accept(); |
---|
52 | |
---|
53 | private: |
---|
54 | Q_DISABLE_COPY(PrintDialog) |
---|
55 | |
---|
56 | static Settings* s_settings; |
---|
57 | |
---|
58 | QWidget* m_printOptionsWidget; |
---|
59 | QFormLayout* m_printOptionsLayout; |
---|
60 | |
---|
61 | QCheckBox* m_fitToPageCheckBox; |
---|
62 | |
---|
63 | QLineEdit* m_pageRangesLineEdit; |
---|
64 | |
---|
65 | #if QT_VERSION < QT_VERSION_CHECK(5,2,0) |
---|
66 | |
---|
67 | QComboBox* m_pageSetComboBox; |
---|
68 | |
---|
69 | QComboBox* m_numberUpComboBox; |
---|
70 | QComboBox* m_numberUpLayoutComboBox; |
---|
71 | |
---|
72 | #endif // QT_VERSION |
---|
73 | |
---|
74 | }; |
---|
75 | |
---|
76 | } // qpdfview |
---|
77 | |
---|
78 | #endif // PRINTDIALOG_H |
---|