-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathm.ui
364 lines (364 loc) · 12.7 KB
/
m.ui
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>904</width>
<height>437</height>
</rect>
</property>
<property name="windowTitle">
<string>数据合并</string>
</property>
<widget class="QWidget" name="centralWidget">
<widget class="QWidget" name="gridLayoutWidget">
<property name="geometry">
<rect>
<x>10</x>
<y>20</y>
<width>431</width>
<height>411</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="4">
<widget class="QLabel" name="docNameLabel">
<property name="text">
<string>请选择 .Docx 文件</string>
</property>
</widget>
</item>
<item row="1" column="6">
<widget class="QToolButton" name="toolButton">
<property name="text">
<string>...</string>
</property>
</widget>
</item>
<item row="2" column="6">
<widget class="QToolButton" name="toolButton_3">
<property name="text">
<string>...</string>
</property>
</widget>
</item>
<item row="2" column="1" alignment="Qt::AlignRight">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Excel 数据</string>
</property>
</widget>
</item>
<item row="2" column="4">
<widget class="QLabel" name="excelNameLabel">
<property name="text">
<string>请选择 .csv 文件</string>
</property>
</widget>
</item>
<item row="3" column="4">
<widget class="QTreeWidget" name="treeWidget">
<property name="maximumSize">
<size>
<width>400</width>
<height>300</height>
</size>
</property>
<column>
<property name="text">
<string>模板变量</string>
</property>
</column>
<column>
<property name="text">
<string>数据源</string>
</property>
</column>
</widget>
</item>
<item row="3" column="6">
<layout class="QVBoxLayout" name="verticalLayout_9">
<item>
<widget class="QPushButton" name="pushButton_4">
<property name="maximumSize">
<size>
<width>37</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>填充</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_2">
<property name="maximumSize">
<size>
<width>37</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>测试</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="runButton">
<property name="enabled">
<bool>false</bool>
</property>
<property name="maximumSize">
<size>
<width>37</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>运行</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="1" alignment="Qt::AlignRight|Qt::AlignVCenter">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Word 模板</string>
</property>
</widget>
</item>
<item row="3" column="1" alignment="Qt::AlignRight">
<widget class="QLabel" name="label_3">
<property name="text">
<string>规则</string>
</property>
</widget>
</item>
<item row="4" column="1" alignment="Qt::AlignRight">
<widget class="QLabel" name="label">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>25</height>
</size>
</property>
<property name="text">
<string>生成模式</string>
</property>
</widget>
</item>
<item row="4" column="4">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QRadioButton" name="radioButtonMultiple">
<property name="text">
<string>生成不同的文档</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radioButtonSingle">
<property name="text">
<string>合并为一个文档</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="0" rowspan="4">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="3" rowspan="4">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>13</width>
<height>86</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="5" rowspan="4">
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>13</width>
<height>86</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<widget class="QTextBrowser" name="logBrowser">
<property name="geometry">
<rect>
<x>460</x>
<y>20</y>
<width>431</width>
<height>401</height>
</rect>
</property>
<property name="html">
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
p, li { white-space: pre-wrap; }
</style></head><body style=" font-family:'SimSun'; font-size:9pt; font-weight:400; font-style:normal;">
<p style=" margin-top:16px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:x-large; font-weight:600;">Word数据合并</span></p>
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New'; color:#505050;">操作说明:</span></p>
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New'; color:#505050;">1. 将Word中需要更改的数据改为</span><span style=" font-family:'Courier New'; font-weight:600; color:#505050;">模板变量</span><span style=" font-family:'Courier New'; color:#505050;">,模板变量就是用两个大括号&quot;</span><span style=" font-family:'Courier New'; font-size:12pt; font-weight:600; color:#505050;">{{</span><span style=" font-family:'Courier New'; color:#505050;">&quot; &quot;</span><span style=" font-family:'Courier New'; font-size:12pt; font-weight:600; color:#505050;">}}</span><span style=" font-family:'Courier New'; color:#505050;">&quot;包裹的变量,比如{{name}},名称自定义,多个数据一样,可以用同一个名字。注意:Word需为docx后缀文件,如不是,请另存为.docx格式。</span></p>
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#505050;">2. Excel另存为.csv文件,为了方便处理数据。注:如果需要处理的数据本身中含有英文逗号&quot;</span><span style=" font-size:12pt; font-weight:600; color:#505050;">,</span><span style=" color:#505050;">&quot;,则可能会有未知错误。</span></p>
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#505050;">3. 选择两个文件,点【填充】按钮,填充对应的数据,点击【测试】,如果测试成功则可运行。否则,请修改数据。</span></p>
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#505050;">4. 生成模式:【默认】分为生成不同的文档(拆分为多个文件);合并为一个文档(只生成一个文件),注意如果有特殊字体,此方法样式会使用基本字体,请注意样式问题。文件生成在运行目录下的 docxdata 文件夹内。</span></p>
<p align="right" style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#505050;"> © 姜小豆 </span><span style=" font-size:10pt; color:#505050;">[email protected]</span><span style=" color:#505050;"> 2019-1-30</span></p>
<hr />
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">运行日志</span>:</p></body></html></string>
</property>
</widget>
<widget class="Line" name="line">
<property name="geometry">
<rect>
<x>440</x>
<y>20</y>
<width>20</width>
<height>401</height>
</rect>
</property>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
</widget>
</widget>
</widget>
<resources/>
<connections>
<connection>
<sender>toolButton</sender>
<signal>clicked()</signal>
<receiver>MainWindow</receiver>
<slot>slot_open_word_file()</slot>
<hints>
<hint type="sourcelabel">
<x>437</x>
<y>44</y>
</hint>
<hint type="destinationlabel">
<x>455</x>
<y>32</y>
</hint>
</hints>
</connection>
<connection>
<sender>pushButton_2</sender>
<signal>clicked()</signal>
<receiver>MainWindow</receiver>
<slot>slot_test_rule()</slot>
<hints>
<hint type="sourcelabel">
<x>438</x>
<y>247</y>
</hint>
<hint type="destinationlabel">
<x>483</x>
<y>176</y>
</hint>
</hints>
</connection>
<connection>
<sender>runButton</sender>
<signal>clicked()</signal>
<receiver>MainWindow</receiver>
<slot>slot_run()</slot>
<hints>
<hint type="sourcelabel">
<x>438</x>
<y>330</y>
</hint>
<hint type="destinationlabel">
<x>478</x>
<y>293</y>
</hint>
</hints>
</connection>
<connection>
<sender>toolButton_3</sender>
<signal>clicked()</signal>
<receiver>MainWindow</receiver>
<slot>slot_open_excel_file()</slot>
<hints>
<hint type="sourcelabel">
<x>437</x>
<y>74</y>
</hint>
<hint type="destinationlabel">
<x>424</x>
<y>88</y>
</hint>
</hints>
</connection>
<connection>
<sender>pushButton_4</sender>
<signal>clicked()</signal>
<receiver>MainWindow</receiver>
<slot>slot_fill_data()</slot>
<hints>
<hint type="sourcelabel">
<x>438</x>
<y>164</y>
</hint>
<hint type="destinationlabel">
<x>417</x>
<y>161</y>
</hint>
</hints>
</connection>
<connection>
<sender>radioButtonMultiple</sender>
<signal>toggled(bool)</signal>
<receiver>MainWindow</receiver>
<slot>slot_build_type()</slot>
<hints>
<hint type="sourcelabel">
<x>178</x>
<y>414</y>
</hint>
<hint type="destinationlabel">
<x>179</x>
<y>425</y>
</hint>
</hints>
</connection>
</connections>
<slots>
<slot>slot_open_word_file()</slot>
<slot>slot_open_excel_file()</slot>
<slot>slot_test_rule()</slot>
<slot>slot_run()</slot>
<slot>slot_fill_data()</slot>
<slot>slot_build_type()</slot>
</slots>
</ui>