blob: a8d54e8aa24542a84de824a0f3cbe5abe801ec73 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef PRINTDIALOGPANEL_H
#define PRINTDIALOGPANEL_H
#ifndef QT_NO_PRINTER
#include "ui_printdialogpanel.h"
#include <QPageLayout>
#include <QPrinter>
#include <QWidget>
QT_BEGIN_NAMESPACE
class QPrinter;
class QComboBox;
class QGroupBox;
class QPushButton;
class QCheckBox;
QT_END_NAMESPACE
class PageSizeControl;
class OptionsControl;
class PrintDialogPanel : public QWidget
{
Q_OBJECT
public:
explicit PrintDialogPanel(QWidget *parent = nullptr);
~PrintDialogPanel();
private slots:
void createPrinter();
void deletePrinter();
void showPrintDialog();
void showPreviewDialog();
void showPageSetupDialog();
void directPrint();
void unitsChanged();
void pageSizeChanged();
void pageDimensionsChanged();
void orientationChanged();
void marginsChanged();
void layoutModeChanged();
void printerChanged();
private:
QSizeF customPageSize() const;
void applySettings(QPrinter *printer) const;
void retrieveSettings(const QPrinter *printer);
void updatePageLayoutWidgets();
void enablePanels();
bool m_blockSignals;
Ui::PrintDialogPanel m_panel;
QPageLayout m_pageLayout;
QScopedPointer<QPrinter> m_printer;
};
#endif // !QT_NO_PRINTER
#endif // PRINTDIALOGPANEL_H
|