59 void initleft(QVBoxLayout *layout);
60 void initright(QVBoxLayout *layout);
63 void initWaterMarkui();
64 void initWaterSettings();
65 void marginsLayout(
bool adapted);
67 void initconnections();
68 void setfrmaeback(
DFrame *frame);
69 void showadvancesetting();
71 void setScaling(
int index);
72 void judgeSupportedAttributes(
const QString &lastPaperSize);
73 void setMininumMargins();
74 void marginsUpdate(
bool isPrinterChanged);
76 void themeTypeChange(DGuiApplicationHelper::ColorType themeType);
77 void setPageIsLegal(
bool islegal);
78 void tipSelected(TipsNum tipNum);
79 QVector<int> checkDuplication(QVector<int> data);
81 void updateSubControlSettings(DPrintPreviewSettingInfo::SettingType setting);
82 void updateAllControlSettings();
83 void updateAllContentSettings_impl();
84 void updateAllControlStatus();
86 void setEnable(
const int &value,
DComboBox *combox);
87 void setTurnPageBtnStatus();
88 void watermarkTypeChoosed(
int index);
89 void customPictureWatermarkChoosed(
const QString &filename);
90 void waterMarkBtnClicked(
bool checked);
91 void disablePrintSettings();
92 void setPageLayoutEnable(
const bool &checked);
93 void matchFitablePageSize();
94 bool isActualPrinter(
const QString &name);
96 void _q_printerChanged(
int index);
97 void _q_pageRangeChanged(
int index);
98 void _q_pageMarginChanged(
int index);
99 void _q_ColorModeChange(
int index);
100 void _q_startPrint(
bool clicked);
101 void _q_orientationChanged(
int index);
102 void _q_customPagesFinished();
103 void _q_marginspinChanged(
double);
104 void _q_marginEditFinished();
105 void _q_currentPageSpinChanged(
int value);
106 void _q_checkStateChanged(
int state);
107 void _q_textWaterMarkModeChanged(
int index);
108 void _q_customTextWatermarkFinished();
109 void _q_colorButtonCliked(
bool cliked);
110 void _q_selectColorButton(QColor color);
111 void _q_pagePersheetComboIndexChanged(
int index);
112 void _q_printOrderComboIndexChanged(
int index);
113 void _q_spinboxValueEmptyChecked(
const QString &);
115 void pageRangeError(TipsNum tipNum);
120 bool fontSizeMore =
false;
121 QString lastPageRange =
"";
122 bool supportedDuplexFlag =
false;
123 bool supportedColorMode =
false;
124 bool isInited =
false;
126 bool isOnFocus =
false;
127 QString lastCusWatermarkText =
"";
128 bool isChecked =
false;
129 bool isEventHide =
false;
130 bool isInitBtnColor =
false;
133 int directChoice = 0;
138 DWidget *basicsettingwdg =
nullptr;
139 DWidget *advancesettingwdg =
nullptr;
140 DWidget *watermarksettingwdg =
nullptr;
141 DWidget *textWatermarkWdg =
nullptr;
142 DWidget *picWatermarkWdg =
nullptr;
146 DLabel *totalPageLabel =
nullptr;
147 DLabel *originTotalPageLabel =
nullptr;
150 DPushButton *cancelBtn =
nullptr;
152 DPushButton *advanceBtn =
nullptr;
153 DScrollArea *scrollarea =
nullptr;
155 DSpinBox *copycountspinbox =
nullptr;
158 QButtonGroup *orientationgroup =
nullptr;
165 QButtonGroup *scaleGroup =
nullptr;
168 DCheckBox *duplexCheckBox =
nullptr;
171 DCheckBox *sidebysideCheckBox =
nullptr;
172 QButtonGroup *directGroup =
nullptr;
173 QButtonGroup *printOrderGroup =
nullptr;
181 QButtonGroup *waterTypeGroup =
nullptr;
184 DSlider *waterSizeSlider =
nullptr;
186 DSlider *wmOpaSlider =
nullptr;
188 QVector<qreal> marginOldValue;
189 QList<qreal> minnumMargins;
190 QSpacerItem *spacer =
nullptr;
191 QSpacerItem *wmSpacer =
nullptr;
193 DRadioButton *printInOrderRadio =
nullptr;
194 DWidget *inorderwdg =
nullptr;
196 QHash<QWidget *, QString> spinboxTextCaches;
198 QBasicTimer settingUpdateTimer;
208 void setSubControlVisible(DPrintPreviewSettingInterface::SettingSubControl subControlType,
bool visible);
209 void setSubControlEnabled(DPrintPreviewSettingInterface::SettingSubControl subControlType,
bool enabled);
212 void updateSettingStatus(DPrintPreviewSettingInterface::SettingSubControl subControlType);
214 static void loadPlugin();
215 static void setPluginMimeData(
const QVariant &data);
216 static QVariant pluginMimeData();
218 static QString currentPlugin();
219 static bool setCurrentPlugin(
const QString &pluginName);
221 static QStringList availablePlugins();
223 void doUpdateStatus(QWidget *source, DPrintPreviewSettingInterface::SettingSubControl subControlType,
bool visible,
bool enabled);
224 QWidgetList subControl(DPrintPreviewSettingInterface::SettingSubControl subControlType)
const;
225 static QString pluginPath();
229 static QVariant m_printSettingData;
231 static QList<DPrintPreviewSettingInterface *> m_availablePlugins;