DtkWidget
DTK Widget module
载入中...
搜索中...
未找到
dprintpreviewdialog.h
1// SPDX-FileCopyrightText: 2019 - 2023 UnionTech Software Technology Co., Ltd.
2//
3// SPDX-License-Identifier: LGPL-3.0-or-later
4
5#ifndef DPRINTPREVIEWDIALOG_H
6#define DPRINTPREVIEWDIALOG_H
7#ifndef DTK_PRINTSUPPORT_PLUGIN
8#define DTK_PRINTSUPPORT_PLUGIN
9#endif
10
11#include <DDialog>
12#include <dprintpreviewsettinginfo.h>
13#include <dprintpreviewwidget.h>
14
15DWIDGET_BEGIN_NAMESPACE
16class DPrintPreviewDialogPrivate;
18{
19 Q_OBJECT
20public:
21 explicit DPrintPreviewDialog(QWidget *parent = nullptr);
22 ~DPrintPreviewDialog() override;
23
24 static void setPluginMimeData(const QVariant &mimeData);
25 static QVariant pluginMimeData();
26
27 static bool setCurrentPlugin(const QString &pluginName);
28 static QString currentPlugin();
29
30 static QStringList availablePlugins();
31Q_SIGNALS:
32 void paintRequested(DPrinter *printer);
33 void paintRequested(DPrinter *printer, const QVector<int> &pageRange);
34
35private:
36 D_DECLARE_PRIVATE(DPrintPreviewDialog)
37 D_PRIVATE_SLOT(void _q_printerChanged(int))
38 D_PRIVATE_SLOT(void _q_pageRangeChanged(int))
39 D_PRIVATE_SLOT(void _q_pageMarginChanged(int))
40 D_PRIVATE_SLOT(void _q_ColorModeChange(int))
41 D_PRIVATE_SLOT(void _q_startPrint(bool))
42 D_PRIVATE_SLOT(void _q_orientationChanged(int))
43 D_PRIVATE_SLOT(void _q_customPagesFinished())
44 D_PRIVATE_SLOT(void _q_marginspinChanged(double))
45 D_PRIVATE_SLOT(void _q_marginEditFinished())
46 D_PRIVATE_SLOT(void _q_currentPageSpinChanged(int))
47 D_PRIVATE_SLOT(void _q_checkStateChanged(int))
48 D_PRIVATE_SLOT(void _q_textWaterMarkModeChanged(int))
49 D_PRIVATE_SLOT(void _q_customTextWatermarkFinished())
50 D_PRIVATE_SLOT(void _q_colorButtonCliked(bool))
51 D_PRIVATE_SLOT(void _q_selectColorButton(QColor))
52 D_PRIVATE_SLOT(void _q_pagePersheetComboIndexChanged(int))
53 D_PRIVATE_SLOT(void _q_printOrderComboIndexChanged(int))
54 D_PRIVATE_SLOT(void _q_spinboxValueEmptyChecked(const QString &))
55public:
56 virtual bool event(QEvent *event) override;
57 bool eventFilter(QObject *watched, QEvent *event) override;
58 void setDocName(const QString &);
59 QString docName() const;
60
61 bool setPrintFromPath(const QString &path = QString());
62 QString printFromPath() const;
63
64 bool setAsynPreview(int totalPage);
65 bool isAsynPreview() const;
66
67 DPrintPreviewSettingInfo *createDialogSettingInfo(DPrintPreviewSettingInfo::SettingType type);
68 void updateDialogSettingInfo(DPrintPreviewSettingInfo *info);
69
70 // QWidget interface
71protected:
72 virtual void resizeEvent(QResizeEvent *event) override;
73 void timerEvent(QTimerEvent *event) override;
74};
75
76DWIDGET_END_NAMESPACE
77
78#endif // DPRINTPREVIEWDIALOG_H
DDialog 旨在提供简要的讯问式对话框的快速实现。提供了包含标题,对话框内容,默认图标,用以添加按钮的布局和一个可以自由添加内容的内容布局。
Definition ddialog.h:22
Dtk 风格的打印预览页面.
Definition dprintpreviewdialog.h:18
Definition dprintpreviewsettinginfo.h:15
Definition dprintpreviewwidget.h:30