Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qcupsjobwidget_p.h
Go to the documentation of this file.
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
23QT_REQUIRE_CONFIG(cupsjobwidget);
24
25#include <ui_qcupsjobwidget.h>
26
28
29class QString;
30class QTime;
31class QPrinter;
32class QPrintDevice;
33
34class QCupsJobWidget : public QWidget
35{
37
38public:
39 explicit QCupsJobWidget(QPrinter *printer, QPrintDevice *printDevice, QWidget *parent = nullptr);
41 void setupPrinter();
42 void updateSavedValues();
44
45private Q_SLOTS:
46 void toggleJobHoldTime();
47
48private:
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
84
85#endif // QCUPSJOBWIDGET_P_H
QCupsJobWidget(QPrinter *printer, QPrintDevice *printDevice, QWidget *parent=nullptr)
QObject * parent() const
Returns a pointer to the parent object.
Definition qobject.h:346
\reentrant
Definition qprinter.h:28
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\inmodule QtCore \reentrant
Definition qdatetime.h:215
The QWidget class is the base class of all user interface objects.
Definition qwidget.h:99
Combined button and popup list for selecting options.
#define QT_REQUIRE_CONFIG(feature)
#define Q_OBJECT
#define Q_SLOTS