DtkWidget
DTK Widget module
载入中...
搜索中...
未找到
dprintpreviewsettinginterface.h
1// SPDX-FileCopyrightText: 2019 - 2022 UnionTech Software Technology Co., Ltd.
2//
3// SPDX-License-Identifier: LGPL-3.0-or-later
4
5#ifndef DPRINTPREVIEWSETTINGINTERFACE_H
6#define DPRINTPREVIEWSETTINGINTERFACE_H
7
8#include <dtkwidget_global.h>
9#include <QtPlugin>
10
11#include "dprintpreviewsettinginfo.h"
12
13DWIDGET_BEGIN_NAMESPACE
14
16{
17public:
18 enum SettingStatus {
19 Default,
20 Disabled,
21 Hidden
22 };
23
24 enum SettingSubControl {
25 SC_PrinterWidget,
26 SC_CopiesWidget,
27 SC_PageRangeWidget,
28 SC_PageRange_TypeControl,
29 SC_PageRange_SelectEdit,
30 SC_OrientationWidget,
31 SC_PaperSizeWidget,
32 SC_DuplexWidget,
33 SC_Duplex_TypeControl,
34 SC_NPrintWidget,
35 SC_NPrint_Numbers,
36 SC_NPrint_Layout,
37 SC_PageOrderWidget,
38 SC_PageOrder_SequentialPrint,
39 SC_PageOrder_TypeControl,
40 SC_ColorModeWidget,
41 SC_MarginWidget,
42 SC_Margin_TypeControl,
43 SC_Margin_AdjustContol,
44 SC_ScalingWidget,
45 SC_WatermarkWidget,
46 SC_WatermarkContentWidget,
47 SC_Watermark_TypeGroup,
48 SC_Watermark_TextType,
49 SC_Watermark_CustomText,
50 SC_Watermark_TextFont,
51 SC_Watermark_TextColor,
52 SC_Watermark_ImageEdit,
53 SC_Watermark_Layout,
54 SC_Watermark_Angle,
55 SC_Watermark_Size,
56 SC_Watermark_Transparency,
57
58 SC_ControlCount
59 };
60
62
63 virtual QString name() const = 0;
64 inline virtual bool settingFilter(const QVariant &mimeData, DPrintPreviewSettingInfo *info)
65 {
66 Q_UNUSED(mimeData);
67 Q_UNUSED(info);
68 return false;
69 }
70 inline virtual SettingStatus settingStatus(const QVariant &mimeData, SettingSubControl control)
71 {
72 Q_UNUSED(mimeData);
73 Q_UNUSED(control);
74 return SettingStatus::Default;
75 }
76};
77
78
79DWIDGET_END_NAMESPACE
80
81QT_BEGIN_NAMESPACE
82#define SettingInterface_iid "org.deepin.dtk.printpreview.SettingInterface/1.0"
83Q_DECLARE_INTERFACE(DTK_WIDGET_NAMESPACE::DPrintPreviewSettingInterface, SettingInterface_iid)
84QT_END_NAMESPACE
85#endif // DPRINTPREVIEWSETTINGINTERFACE_H
Definition dprintpreviewsettinginfo.h:15
Definition dprintpreviewsettinginterface.h:16