26 Class implementing the color dialog wizard dialog. |
26 Class implementing the color dialog wizard dialog. |
27 |
27 |
28 It displays a dialog for entering the parameters |
28 It displays a dialog for entering the parameters |
29 for the QFileDialog code generator. |
29 for the QFileDialog code generator. |
30 """ |
30 """ |
31 def __init__(self, parent=None): |
31 def __init__(self, pyqtVariant, parent=None): |
32 """ |
32 """ |
33 Constructor |
33 Constructor |
34 |
34 |
|
35 @param pyqtVariant variant of PyQt (integer; 0, 4 or 5) |
35 @param parent parent widget (QWidget) |
36 @param parent parent widget (QWidget) |
36 """ |
37 """ |
37 super(FileDialogWizardDialog, self).__init__(parent) |
38 super(FileDialogWizardDialog, self).__init__(parent) |
38 self.setupUi(self) |
39 self.setupUi(self) |
39 |
40 |
40 self.eStartWithCompleter = E5FileCompleter(self.eStartWith) |
41 self.eStartWithCompleter = E5FileCompleter(self.eStartWith) |
41 self.eWorkDirCompleter = E5DirCompleter(self.eWorkDir) |
42 self.eWorkDirCompleter = E5DirCompleter(self.eWorkDir) |
|
43 |
|
44 self.__pyqtVariant = pyqtVariant |
|
45 |
|
46 self.__typeButtonsGroup = QButtonGroup(self) |
|
47 self.__typeButtonsGroup.setExclusive(True) |
|
48 self.__typeButtonsGroup.addButton(self.rOpenFile, 1) |
|
49 self.__typeButtonsGroup.addButton(self.rOpenFiles, 2) |
|
50 self.__typeButtonsGroup.addButton(self.rSaveFile, 3) |
|
51 self.__typeButtonsGroup.addButton(self.rfOpenFile, 11) |
|
52 self.__typeButtonsGroup.addButton(self.rfOpenFiles, 12) |
|
53 self.__typeButtonsGroup.addButton(self.rfSaveFile, 13) |
|
54 self.__typeButtonsGroup.addButton(self.rDirectory, 20) |
|
55 self.__typeButtonsGroup.buttonClicked[int].connect( |
|
56 self.__toggleInitialFilterAndResult) |
|
57 self.__toggleInitialFilterAndResult(1) |
|
58 |
|
59 self.pyqtComboBox.addItems(["PyQt4", "PyQt5"]) |
|
60 if self.__pyqtVariant == 5: |
|
61 self.pyqtComboBox.setCurrentIndex(1) |
|
62 else: |
|
63 self.pyqtComboBox.setCurrentIndex(0) |
42 |
64 |
43 self.rSaveFile.toggled[bool].connect(self.__toggleConfirmCheckBox) |
65 self.rSaveFile.toggled[bool].connect(self.__toggleConfirmCheckBox) |
44 self.rfSaveFile.toggled[bool].connect(self.__toggleConfirmCheckBox) |
66 self.rfSaveFile.toggled[bool].connect(self.__toggleConfirmCheckBox) |
45 self.rDirectory.toggled[bool].connect(self.__toggleGroupsAndTest) |
67 self.rDirectory.toggled[bool].connect(self.__toggleGroupsAndTest) |
46 self.cStartWith.toggled[bool].connect(self.__toggleGroupsAndTest) |
68 self.cStartWith.toggled[bool].connect(self.__toggleGroupsAndTest) |
47 self.cWorkDir.toggled[bool].connect(self.__toggleGroupsAndTest) |
69 self.cWorkDir.toggled[bool].connect(self.__toggleGroupsAndTest) |
48 self.cFilters.toggled[bool].connect(self.__toggleGroupsAndTest) |
70 self.cFilters.toggled[bool].connect(self.__toggleGroupsAndTest) |
49 |
71 |
50 self.bTest = self.buttonBox.addButton( |
72 self.bTest = self.buttonBox.addButton( |
51 self.trUtf8("Test"), QDialogButtonBox.ActionRole) |
73 self.trUtf8("Test"), QDialogButtonBox.ActionRole) |
52 |
74 |
53 def __adjustOptions(self, options): |
75 def __adjustOptions(self, options): |
54 """ |
76 """ |
55 Private method to adjust the file dialog options. |
77 Private method to adjust the file dialog options. |
56 |
78 |
57 @param options file dialog options (QFileDialog.Options) |
79 @param options file dialog options (QFileDialog.Options) |
58 @return modified options (QFileDialog.Options) |
80 @return modified options (QFileDialog.Options) |
59 """ |
81 """ |
60 if Globals.isLinuxPlatform(): |
82 if Globals.isLinuxPlatform(): |
61 options |= QFileDialog.DontUseNativeDialog |
83 options |= QFileDialog.DontUseNativeDialog |
62 return options |
84 return options |
63 |
85 |
|
86 @pyqtSlot(str) |
|
87 def on_pyqtComboBox_currentIndexChanged(self, txt): |
|
88 """ |
|
89 Private slot to setup the dialog for the selected PyQt variant. |
|
90 |
|
91 @param txt text of the selected combo box entry (string) |
|
92 """ |
|
93 self.rfOpenFile.setEnabled(txt == "PyQt4") |
|
94 self.rfOpenFiles.setEnabled(txt == "PyQt4") |
|
95 self.rfSaveFile.setEnabled(txt == "PyQt4") |
|
96 |
|
97 if txt == "PyQt5": |
|
98 if self.rfOpenFile.isChecked(): |
|
99 self.rOpenFile.setChecked(True) |
|
100 elif self.rfOpenFiles.isChecked(): |
|
101 self.rOpenFiles.setChecked(True) |
|
102 elif self.rfSaveFile.isChecked(): |
|
103 self.rSaveFile.setChecked(True) |
|
104 |
|
105 self.__pyqtVariant = 5 if txt == "PyQt5" else 4 |
|
106 |
|
107 self.__toggleInitialFilterAndResult(self.__typeButtonsGroup.checkedId()) |
|
108 |
64 def on_buttonBox_clicked(self, button): |
109 def on_buttonBox_clicked(self, button): |
65 """ |
110 """ |
66 Private slot called by a button of the button box clicked. |
111 Private slot called by a button of the button box clicked. |
67 |
112 |
68 @param button button that was clicked (QAbstractButton) |
113 @param button button that was clicked (QAbstractButton) |
79 if not self.cSymlinks.isChecked(): |
124 if not self.cSymlinks.isChecked(): |
80 options = QFileDialog.Options(QFileDialog.DontResolveSymlinks) |
125 options = QFileDialog.Options(QFileDialog.DontResolveSymlinks) |
81 else: |
126 else: |
82 options = QFileDialog.Options() |
127 options = QFileDialog.Options() |
83 options = self.__adjustOptions(options) |
128 options = self.__adjustOptions(options) |
84 QFileDialog.getOpenFileName( |
129 if self.rOpenFile.isChecked() and self.__pyqtVariant == 4: |
85 None, |
130 QFileDialog.getOpenFileName( |
86 self.eCaption.text(), |
131 None, |
87 self.eStartWith.text(), |
132 self.eCaption.text(), |
88 self.eFilters.text(), |
133 self.eStartWith.text(), |
89 options) |
134 self.eFilters.text(), |
|
135 options) |
|
136 else: |
|
137 QFileDialog.getOpenFileNameAndFilter( |
|
138 None, |
|
139 self.eCaption.text(), |
|
140 self.eStartWith.text(), |
|
141 self.eFilters.text(), |
|
142 self.eInitialFilter.text(), |
|
143 options) |
90 elif self.rOpenFiles.isChecked() or self.rfOpenFiles.isChecked(): |
144 elif self.rOpenFiles.isChecked() or self.rfOpenFiles.isChecked(): |
91 if not self.cSymlinks.isChecked(): |
145 if not self.cSymlinks.isChecked(): |
92 options = QFileDialog.Options(QFileDialog.DontResolveSymlinks) |
146 options = QFileDialog.Options(QFileDialog.DontResolveSymlinks) |
93 else: |
147 else: |
94 options = QFileDialog.Options() |
148 options = QFileDialog.Options() |
95 options = self.__adjustOptions(options) |
149 options = self.__adjustOptions(options) |
96 QFileDialog.getOpenFileNames( |
150 if self.rOpenFiles.isChecked() and self.__pyqtVariant == 4: |
97 None, |
151 QFileDialog.getOpenFileNames( |
98 self.eCaption.text(), |
152 None, |
99 self.eStartWith.text(), |
153 self.eCaption.text(), |
100 self.eFilters.text(), |
154 self.eStartWith.text(), |
101 options) |
155 self.eFilters.text(), |
|
156 options) |
|
157 else: |
|
158 QFileDialog.getOpenFileNamesAndFilter( |
|
159 None, |
|
160 self.eCaption.text(), |
|
161 self.eStartWith.text(), |
|
162 self.eFilters.text(), |
|
163 self.eInitialFilter.text(), |
|
164 options) |
102 elif self.rSaveFile.isChecked() or self.rfSaveFile.isChecked(): |
165 elif self.rSaveFile.isChecked() or self.rfSaveFile.isChecked(): |
103 if not self.cSymlinks.isChecked(): |
166 if not self.cSymlinks.isChecked(): |
104 options = QFileDialog.Options(QFileDialog.DontResolveSymlinks) |
167 options = QFileDialog.Options(QFileDialog.DontResolveSymlinks) |
105 else: |
168 else: |
106 options = QFileDialog.Options() |
169 options = QFileDialog.Options() |
107 options = self.__adjustOptions(options) |
170 options = self.__adjustOptions(options) |
108 QFileDialog.getSaveFileName( |
171 if self.rSaveFile.isChecked() and self.__pyqtVariant == 4: |
109 None, |
172 QFileDialog.getSaveFileName( |
110 self.eCaption.text(), |
173 None, |
111 self.eStartWith.text(), |
174 self.eCaption.text(), |
112 self.eFilters.text(), |
175 self.eStartWith.text(), |
113 options) |
176 self.eFilters.text(), |
|
177 options) |
|
178 else: |
|
179 QFileDialog.getSaveFileNameAndFilter( |
|
180 None, |
|
181 self.eCaption.text(), |
|
182 self.eStartWith.text(), |
|
183 self.eFilters.text(), |
|
184 self.eInitialFilter.text(), |
|
185 options) |
114 elif self.rDirectory.isChecked(): |
186 elif self.rDirectory.isChecked(): |
115 options = QFileDialog.Options() |
187 options = QFileDialog.Options() |
116 if not self.cSymlinks.isChecked(): |
188 if not self.cSymlinks.isChecked(): |
117 options |= QFileDialog.Options(QFileDialog.DontResolveSymlinks) |
189 options |= QFileDialog.Options(QFileDialog.DontResolveSymlinks) |
118 if self.cDirOnly.isChecked(): |
190 if self.cDirOnly.isChecked(): |
123 QFileDialog.getExistingDirectory( |
195 QFileDialog.getExistingDirectory( |
124 None, |
196 None, |
125 self.eCaption.text(), |
197 self.eCaption.text(), |
126 self.eWorkDir.text(), |
198 self.eWorkDir.text(), |
127 options) |
199 options) |
128 |
200 |
129 def __toggleConfirmCheckBox(self): |
201 def __toggleConfirmCheckBox(self): |
130 """ |
202 """ |
131 Private slot to enable/disable the confirmation check box. |
203 Private slot to enable/disable the confirmation check box. |
132 """ |
204 """ |
133 self.cConfirmOverwrite.setEnabled( |
205 self.cConfirmOverwrite.setEnabled( |
134 self.rSaveFile.isChecked() or self.rfSaveFile.isChecked()) |
206 self.rSaveFile.isChecked() or self.rfSaveFile.isChecked()) |
135 |
207 |
136 def __toggleGroupsAndTest(self): |
208 def __toggleGroupsAndTest(self): |
137 """ |
209 """ |
138 Private slot to enable/disable certain groups and the test button. |
210 Private slot to enable/disable certain groups and the test button. |
139 """ |
211 """ |
140 if self.rDirectory.isChecked(): |
212 if self.rDirectory.isChecked(): |
144 else: |
216 else: |
145 self.filePropertiesGroup.setEnabled(True) |
217 self.filePropertiesGroup.setEnabled(True) |
146 self.dirPropertiesGroup.setEnabled(False) |
218 self.dirPropertiesGroup.setEnabled(False) |
147 self.bTest.setDisabled( |
219 self.bTest.setDisabled( |
148 self.cStartWith.isChecked() or self.cFilters.isChecked()) |
220 self.cStartWith.isChecked() or self.cFilters.isChecked()) |
149 |
221 |
150 def __getCode4(self, indLevel, indString): |
222 def __toggleInitialFilterAndResult(self, id): |
151 """ |
223 """ |
152 Private method to get the source code for Qt4/Qt5. |
224 Private slot to enable/disable the initial filter elements and the |
|
225 results entries. |
|
226 |
|
227 @param id id of the clicked button (integer) |
|
228 """ |
|
229 if (self.__pyqtVariant == 4 and id in [11, 12, 13]) or \ |
|
230 (self.__pyqtVariant == 5 and id in [1, 2, 3]): |
|
231 enable = True |
|
232 else: |
|
233 enable = False |
|
234 self.lInitialFilter.setEnabled(enable) |
|
235 self.eInitialFilter.setEnabled(enable) |
|
236 self.cInitialFilter.setEnabled(enable) |
|
237 |
|
238 self.lFilterVariable.setEnabled(enable) |
|
239 self.eFilterVariable.setEnabled(enable) |
|
240 |
|
241 def getCode(self, indLevel, indString): |
|
242 """ |
|
243 Public method to get the source code for Qt4 and Qt5. |
153 |
244 |
154 @param indLevel indentation level (int) |
245 @param indLevel indentation level (int) |
155 @param indString string used for indentation (space or tab) (string) |
246 @param indString string used for indentation (space or tab) (string) |
156 @return generated code (string) |
247 @return generated code (string) |
157 """ |
248 """ |
159 il = indLevel + 1 |
250 il = indLevel + 1 |
160 istring = il * indString |
251 istring = il * indString |
161 estring = os.linesep + indLevel * indString |
252 estring = os.linesep + indLevel * indString |
162 |
253 |
163 # now generate the code |
254 # now generate the code |
164 code = 'QFileDialog.' |
255 if self.parentSelf.isChecked(): |
|
256 parent = "self" |
|
257 elif self.parentNone.isChecked(): |
|
258 parent = "None" |
|
259 elif self.parentOther.isChecked(): |
|
260 parent = self.parentEdit.text() |
|
261 if parent == "": |
|
262 parent = "None" |
|
263 |
|
264 # prepare the result variables |
|
265 nameVariable = self.eNameVariable.text() |
|
266 if not nameVariable: |
|
267 if self.__typeButtonsGroup.checkedButton() in [ |
|
268 self.rOpenFile, self.rfOpenFile, |
|
269 self.rSaveFile, self.rfSaveFile]: |
|
270 nameVariable = "fileName" |
|
271 elif self.__typeButtonsGroup.checkedButton() in [ |
|
272 self.rOpenFiles, self.rfOpenFiles]: |
|
273 nameVariable = "fileNames" |
|
274 elif self.__typeButtonsGroup.checkedButton() == self.rDirectory: |
|
275 nameVariable = "dirName" |
|
276 else: |
|
277 nameVariable = "res" |
|
278 filterVariable = self.eFilterVariable.text() |
|
279 if not filterVariable: |
|
280 if (self.__pyqtVariant == 4 and |
|
281 self.__typeButtonsGroup.checkedButton() in [ |
|
282 self.rfOpenFile, self.rfOpenFiles, self.rfSaveFile]) or \ |
|
283 (self.__pyqtVariant == 5 and |
|
284 self.__typeButtonsGroup.checkedButton() in [ |
|
285 self.rOpenFile, self.rOpenFiles, self.rSaveFile]): |
|
286 filterVariable = ", selectedFilter" |
|
287 else: |
|
288 filterVariable = "" |
|
289 |
|
290 code = '{0}{1} = QFileDialog.'.format(nameVariable, filterVariable) |
165 if self.rOpenFile.isChecked() or self.rfOpenFile.isChecked(): |
291 if self.rOpenFile.isChecked() or self.rfOpenFile.isChecked(): |
166 if self.rOpenFile.isChecked(): |
292 if self.rOpenFile.isChecked(): |
167 code += 'getOpenFileName({0}{1}'.format(os.linesep, istring) |
293 code += 'getOpenFileName({0}{1}'.format(os.linesep, istring) |
168 else: |
294 else: |
169 code += 'getOpenFileNameAndFilter({0}{1}'.format( |
295 code += 'getOpenFileNameAndFilter({0}{1}'.format( |
170 os.linesep, istring) |
296 os.linesep, istring) |
171 code += 'None,{0}{1}'.format(os.linesep, istring) |
297 code += '{0},{1}{2}'.format(parent, os.linesep, istring) |
172 if not self.eCaption.text(): |
298 if not self.eCaption.text(): |
173 code += '"",{0}{1}'.format(os.linesep, istring) |
299 code += '"",{0}{1}'.format(os.linesep, istring) |
174 else: |
300 else: |
175 code += 'self.trUtf8("{0}"),{1}{2}'.format( |
301 code += 'self.trUtf8("{0}"),{1}{2}'.format( |
176 self.eCaption.text(), os.linesep, istring) |
302 self.eCaption.text(), os.linesep, istring) |
188 if self.cFilters.isChecked(): |
314 if self.cFilters.isChecked(): |
189 fmt = '{0}' |
315 fmt = '{0}' |
190 else: |
316 else: |
191 fmt = 'self.trUtf8("{0}")' |
317 fmt = 'self.trUtf8("{0}")' |
192 code += fmt.format(self.eFilters.text()) |
318 code += fmt.format(self.eFilters.text()) |
193 if self.rfOpenFile.isChecked(): |
319 if self.rfOpenFile.isChecked() or self.__pyqtVariant == 5: |
194 code += ',{0}{1}None'.format(os.linesep, istring) |
320 if self.eInitialFilter.text() == "": |
|
321 filter = "None" |
|
322 else: |
|
323 if self.cInitialFilter.isChecked(): |
|
324 fmt = '{0}' |
|
325 else: |
|
326 fmt = 'self.trUtf8("{0}")' |
|
327 filter = fmt.format(self.eInitialFilter.text()) |
|
328 code += ',{0}{1}{2}'.format(os.linesep, istring, filter) |
195 if not self.cSymlinks.isChecked(): |
329 if not self.cSymlinks.isChecked(): |
196 code += \ |
330 code += \ |
197 ',{0}{1}QFileDialog.Options(' \ |
331 ',{0}{1}QFileDialog.Options(' \ |
198 'QFileDialog.DontResolveSymlinks)' \ |
332 'QFileDialog.DontResolveSymlinks)' \ |
199 .format(os.linesep, istring) |
333 .format(os.linesep, istring) |
202 if self.rOpenFiles.isChecked(): |
336 if self.rOpenFiles.isChecked(): |
203 code += 'getOpenFileNames({0}{1}'.format(os.linesep, istring) |
337 code += 'getOpenFileNames({0}{1}'.format(os.linesep, istring) |
204 else: |
338 else: |
205 code += 'getOpenFileNamesAndFilter({0}{1}'.format( |
339 code += 'getOpenFileNamesAndFilter({0}{1}'.format( |
206 os.linesep, istring) |
340 os.linesep, istring) |
207 code += 'None,{0}{1}'.format(os.linesep, istring) |
341 code += '{0},{1}{2}'.format(parent, os.linesep, istring) |
208 if not self.eCaption.text(): |
342 if not self.eCaption.text(): |
209 code += '"",{0}{1}'.format(os.linesep, istring) |
343 code += '"",{0}{1}'.format(os.linesep, istring) |
210 else: |
344 else: |
211 code += 'self.trUtf8("{0}"),{1}{2}'.format( |
345 code += 'self.trUtf8("{0}"),{1}{2}'.format( |
212 self.eCaption.text(), os.linesep, istring) |
346 self.eCaption.text(), os.linesep, istring) |
224 if self.cFilters.isChecked(): |
358 if self.cFilters.isChecked(): |
225 fmt = '{0}' |
359 fmt = '{0}' |
226 else: |
360 else: |
227 fmt = 'self.trUtf8("{0}")' |
361 fmt = 'self.trUtf8("{0}")' |
228 code += fmt.format(self.eFilters.text()) |
362 code += fmt.format(self.eFilters.text()) |
229 if self.rfOpenFiles.isChecked(): |
363 if self.rfOpenFiles.isChecked() or self.__pyqtVariant == 5: |
230 code += ',{0}{1}None'.format(os.linesep, istring) |
364 if self.eInitialFilter.text() == "": |
|
365 filter = "None" |
|
366 else: |
|
367 if self.cInitialFilter.isChecked(): |
|
368 fmt = '{0}' |
|
369 else: |
|
370 fmt = 'self.trUtf8("{0}")' |
|
371 filter = fmt.format(self.eInitialFilter.text()) |
|
372 code += ',{0}{1}{2}'.format(os.linesep, istring, filter) |
231 if not self.cSymlinks.isChecked(): |
373 if not self.cSymlinks.isChecked(): |
232 code += \ |
374 code += \ |
233 ',{0}{1}QFileDialog.Options(' \ |
375 ',{0}{1}QFileDialog.Options(' \ |
234 'QFileDialog.DontResolveSymlinks)' \ |
376 'QFileDialog.DontResolveSymlinks)' \ |
235 .format(os.linesep, istring) |
377 .format(os.linesep, istring) |
238 if self.rSaveFile.isChecked(): |
380 if self.rSaveFile.isChecked(): |
239 code += 'getSaveFileName({0}{1}'.format(os.linesep, istring) |
381 code += 'getSaveFileName({0}{1}'.format(os.linesep, istring) |
240 else: |
382 else: |
241 code += 'getSaveFileNameAndFilter({0}{1}'.format( |
383 code += 'getSaveFileNameAndFilter({0}{1}'.format( |
242 os.linesep, istring) |
384 os.linesep, istring) |
243 code += 'None,{0}{1}'.format(os.linesep, istring) |
385 code += '{0},{1}{2}'.format(parent, os.linesep, istring) |
244 if not self.eCaption.text(): |
386 if not self.eCaption.text(): |
245 code += '"",{0}{1}'.format(os.linesep, istring) |
387 code += '"",{0}{1}'.format(os.linesep, istring) |
246 else: |
388 else: |
247 code += 'self.trUtf8("{0}"),{1}{2}'.format( |
389 code += 'self.trUtf8("{0}"),{1}{2}'.format( |
248 self.eCaption.text(), os.linesep, istring) |
390 self.eCaption.text(), os.linesep, istring) |
260 if self.cFilters.isChecked(): |
402 if self.cFilters.isChecked(): |
261 fmt = '{0}' |
403 fmt = '{0}' |
262 else: |
404 else: |
263 fmt = 'self.trUtf8("{0}")' |
405 fmt = 'self.trUtf8("{0}")' |
264 code += fmt.format(self.eFilters.text()) |
406 code += fmt.format(self.eFilters.text()) |
265 if self.rfSaveFile.isChecked(): |
407 if self.rfSaveFile.isChecked() or self.__pyqtVariant == 5: |
266 code += ',{0}{1}None'.format(os.linesep, istring) |
408 if self.eInitialFilter.text() == "": |
|
409 filter = "None" |
|
410 else: |
|
411 if self.cInitialFilter.isChecked(): |
|
412 fmt = '{0}' |
|
413 else: |
|
414 fmt = 'self.trUtf8("{0}")' |
|
415 filter = fmt.format(self.eInitialFilter.text()) |
|
416 code += ',{0}{1}{2}'.format(os.linesep, istring, filter) |
267 if (not self.cSymlinks.isChecked()) or \ |
417 if (not self.cSymlinks.isChecked()) or \ |
268 (not self.cConfirmOverwrite.isChecked()): |
418 (not self.cConfirmOverwrite.isChecked()): |
269 code += ',{0}{1}QFileDialog.Options('.format( |
419 code += ',{0}{1}QFileDialog.Options('.format( |
270 os.linesep, istring) |
420 os.linesep, istring) |
271 if not self.cSymlinks.isChecked(): |
421 if not self.cSymlinks.isChecked(): |
277 code += 'QFileDialog.DontConfirmOverwrite' |
427 code += 'QFileDialog.DontConfirmOverwrite' |
278 code += ')' |
428 code += ')' |
279 code += '){0}'.format(estring) |
429 code += '){0}'.format(estring) |
280 elif self.rDirectory.isChecked(): |
430 elif self.rDirectory.isChecked(): |
281 code += 'getExistingDirectory({0}{1}'.format(os.linesep, istring) |
431 code += 'getExistingDirectory({0}{1}'.format(os.linesep, istring) |
282 code += 'None,{0}{1}'.format(os.linesep, istring) |
432 code += '{0},{1}{2}'.format(parent, os.linesep, istring) |
283 if not self.eCaption.text(): |
433 if not self.eCaption.text(): |
284 code += '"",{0}{1}'.format(os.linesep, istring) |
434 code += '"",{0}{1}'.format(os.linesep, istring) |
285 else: |
435 else: |
286 code += 'self.trUtf8("{0}"),{1}{2}'.format( |
436 code += 'self.trUtf8("{0}"),{1}{2}'.format( |
287 self.eCaption.text(), os.linesep, istring) |
437 self.eCaption.text(), os.linesep, istring) |