DtkWidget
DTK Widget module
载入中...
搜索中...
未找到
dprintpreviewsettinginfo.h
1// SPDX-FileCopyrightText: 2019 - 2022 UnionTech Software Technology Co., Ltd.
2//
3// SPDX-License-Identifier: LGPL-3.0-or-later
4
5#ifndef DPRINTPREVIEWSETTINGS_H
6#define DPRINTPREVIEWSETTINGS_H
7
8#include <dtkwidget_global.h>
9
10#include "dprintpreviewwidget.h"
11
12DWIDGET_BEGIN_NAMESPACE
13
15{
16public:
17 enum SettingType {
18 PS_Printer,
19 PS_Copies,
20 PS_PageRange,
21 PS_Orientation,
22 PS_PaperSize,
23 PS_PrintDuplex,
24 PS_NUpPrinting,
25 PS_PageOrder,
26 PS_ColorMode,
27 PS_PaperMargins,
28 PS_Scaling,
29 PS_Watermark,
30 PS_SettingsCount = 65535
31 };
32
33 explicit DPrintPreviewSettingInfo(SettingType type);
35
36 inline SettingType type() const {
37 return static_cast<SettingType>(t);
38 }
39
40private:
41 ushort t;
42};
43
45{
46public:
48 : DPrintPreviewSettingInfo(PS_Printer)
49 {
50
51 }
52
53 QStringList printers;
54};
55
57{
58public:
60 : DPrintPreviewSettingInfo(PS_Copies)
61 {
62
63 }
64
65 int copies;
66};
67
69{
70public:
72 : DPrintPreviewSettingInfo(PS_PageRange)
73 {
74
75 }
76
77 DPrintPreviewWidget::PageRange rangeType;
78 QString selectPages;
79};
80
82{
83public:
85 : DPrintPreviewSettingInfo(PS_Orientation)
86 {
87
88 }
89
90 DPrinter::Orientation orientationMode;
91};
92
94{
95public:
97 : DPrintPreviewSettingInfo(PS_PaperSize)
98 {
99
100 }
101
102 QStringList pageSize;
103};
104
106{
107public:
109 : DPrintPreviewSettingInfo(PS_PrintDuplex)
110 {
111
112 }
113
114 bool enable;
115 DPrinter::DuplexMode duplex;
116};
117
119{
120public:
122 : DPrintPreviewSettingInfo(PS_NUpPrinting)
123 {
124
125 }
126
127 bool enable;
128 DPrintPreviewWidget::Imposition imposition;
129 DPrintPreviewWidget::Order order;
130};
131
133{
134public:
135 enum PageOrder {
136 CollatePage,
137 InOrderPage
138 };
139 enum OrderType {
140 FrontToBack,
141 BackToFront
142 };
144 : DPrintPreviewSettingInfo(PS_PageOrder)
145 {
146
147 }
148
149 PageOrder pageOrder;
150 OrderType inOrdertype;
151};
152
154{
155public:
157 : DPrintPreviewSettingInfo(PS_ColorMode)
158 {
159
160 }
161
162 QStringList colorMode;
163};
164
166{
167public:
168 enum MarginType {
169 Narrow,
170 Normal,
171 Moderate,
172 Customize
173 };
175 : DPrintPreviewSettingInfo(PS_PaperMargins)
176 {
177
178 }
179
180 MarginType marginType;
181 qreal topMargin;
182 qreal bottomMargin;
183 qreal leftMargin;
184 qreal rightMargin;
185};
186
188{
189public:
190 enum ScalingType {
191 ActualSize,
192 ScaleSize
193 };
195 : DPrintPreviewSettingInfo(PS_Scaling)
196 {
197
198 }
199
200 ScalingType scalingType;
201 int scaleRatio;
202};
203
205{
206public:
207 enum WatermarkType {
208 TextWatermark,
209 ImageWatermark
210 };
211 enum Layout {
212 Tiled,
213 Center
214 };
215 enum TextType {
216 Confidential,
217 Draft,
218 Sample,
219 Custom
220 };
221
223 : DPrintPreviewSettingInfo(PS_Watermark)
224 {
225
226 }
227
228 bool opened;
229 int angle;
230 int size;
231 int transparency;
232 qreal rowSpacing;
233 qreal columnSpacing;
234 Layout layout;
235 WatermarkType currentWatermarkType;
236 TextType textType;
237 QString customText;
238 QStringList fontList;
239 QColor textColor;
240 QString imagePath;
241};
242
243DWIDGET_END_NAMESPACE
244#endif // DPRINTPREVIEWSETTINGS_H
Definition dprintpreviewsettinginfo.h:154
Definition dprintpreviewsettinginfo.h:57
Definition dprintpreviewsettinginfo.h:119
Definition dprintpreviewsettinginfo.h:82
Definition dprintpreviewsettinginfo.h:133
Definition dprintpreviewsettinginfo.h:69
Definition dprintpreviewsettinginfo.h:166
Definition dprintpreviewsettinginfo.h:94
Definition dprintpreviewsettinginfo.h:106
Definition dprintpreviewsettinginfo.h:45
Definition dprintpreviewsettinginfo.h:188
Definition dprintpreviewsettinginfo.h:15
Definition dprintpreviewsettinginfo.h:205