1 | // Copyright (C) 2016 The Qt Company Ltd. |
---|---|
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
3 | |
4 | |
5 | #ifndef QCUPSJOBWIDGET_P_H |
6 | #define QCUPSJOBWIDGET_P_H |
7 | |
8 | // |
9 | // W A R N I N G |
10 | // ------------- |
11 | // |
12 | // This file is not part of the Qt API. It exists purely as an |
13 | // implementation detail. This header file may change from version to |
14 | // to version without notice, or even be removed. |
15 | // |
16 | // We mean it. |
17 | // |
18 | // |
19 | |
20 | #include <QtPrintSupport/private/qtprintsupportglobal_p.h> |
21 | #include <private/qcups_p.h> |
22 | |
23 | QT_REQUIRE_CONFIG(cupsjobwidget); |
24 | |
25 | #include <ui_qcupsjobwidget.h> |
26 | |
27 | QT_BEGIN_NAMESPACE |
28 | |
29 | class QString; |
30 | class QTime; |
31 | class QPrinter; |
32 | class QPrintDevice; |
33 | |
34 | class QCupsJobWidget : public QWidget |
35 | { |
36 | Q_OBJECT |
37 | |
38 | public: |
39 | explicit QCupsJobWidget(QPrinter *printer, QPrintDevice *printDevice, QWidget *parent = nullptr); |
40 | ~QCupsJobWidget(); |
41 | void setupPrinter(); |
42 | void updateSavedValues(); |
43 | void revertToSavedValues(); |
44 | |
45 | private Q_SLOTS: |
46 | void toggleJobHoldTime(); |
47 | |
48 | private: |
49 | |
50 | void setJobHold(QCUPSSupport::JobHoldUntil jobHold = QCUPSSupport::NoHold, QTime holdUntilTime = QTime()); |
51 | QCUPSSupport::JobHoldUntil jobHold() const; |
52 | QTime jobHoldTime() const; |
53 | |
54 | void setJobBilling(const QString &jobBilling = QString()); |
55 | QString jobBilling() const; |
56 | |
57 | void setJobPriority(int priority = 50); |
58 | int jobPriority() const; |
59 | |
60 | void setStartBannerPage(const QCUPSSupport::BannerPage bannerPage = QCUPSSupport::NoBanner); |
61 | QCUPSSupport::BannerPage startBannerPage() const; |
62 | |
63 | void setEndBannerPage(const QCUPSSupport::BannerPage bannerPage = QCUPSSupport::NoBanner); |
64 | QCUPSSupport::BannerPage endBannerPage() const; |
65 | |
66 | void initJobHold(); |
67 | void initJobBilling(); |
68 | void initJobPriority(); |
69 | void initBannerPages(); |
70 | |
71 | QPrinter *m_printer; |
72 | QPrintDevice *m_printDevice; |
73 | Ui::QCupsJobWidget m_ui; |
74 | |
75 | QCUPSSupport::JobHoldUntilWithTime m_savedJobHoldWithTime; |
76 | QString m_savedJobBilling; |
77 | int m_savedPriority; |
78 | QCUPSSupport::JobSheets m_savedJobSheets; |
79 | |
80 | Q_DISABLE_COPY_MOVE(QCupsJobWidget) |
81 | }; |
82 | |
83 | QT_END_NAMESPACE |
84 | |
85 | #endif // QCUPSJOBWIDGET_P_H |
86 |