src/eric7/Plugins/WizardPlugins/DotDesktopWizard/DotDesktopWizardDialog.py

branch
eric7
changeset 10437
2f70ca07f0af
parent 9653
e67609152c5e
child 10439
21c28b0f9e41
equal deleted inserted replaced
10436:f6881d10e995 10437:2f70ca07f0af
27 27
28 def __init__(self, parent=None): 28 def __init__(self, parent=None):
29 """ 29 """
30 Constructor 30 Constructor
31 31
32 @param parent reference to the parent widget (QWidget) 32 @param parent reference to the parent widget
33 @type QWidget
33 """ 34 """
34 super().__init__(parent) 35 super().__init__(parent)
35 self.setupUi(self) 36 self.setupUi(self)
36 37
37 self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled(False) 38 self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled(False)
250 251
251 def getCode(self): 252 def getCode(self):
252 """ 253 """
253 Public method to get the source code. 254 Public method to get the source code.
254 255
255 @return generated code (string) 256 @return generated code
257 @rtype str
256 """ 258 """
257 # step 1: standard desktop entries 259 # step 1: standard desktop entries
258 code = [ 260 code = [
259 "[Desktop Entry]", 261 "[Desktop Entry]",
260 "Type=" + self.typeEdit.text(), 262 "Type=" + self.typeEdit.text(),
349 @pyqtSlot(int) 351 @pyqtSlot(int)
350 def on_typeComboBox_currentIndexChanged(self, index): 352 def on_typeComboBox_currentIndexChanged(self, index):
351 """ 353 """
352 Private slot to handle a change of the .desktop type. 354 Private slot to handle a change of the .desktop type.
353 355
354 @param index index of the selected entry (integer) 356 @param index index of the selected entry
357 @type int
355 """ 358 """
356 self.dataTabWidget.setTabEnabled(1, index == 1) 359 self.dataTabWidget.setTabEnabled(1, index == 1)
357 self.dataTabWidget.setTabEnabled(2, index == 2) 360 self.dataTabWidget.setTabEnabled(2, index == 2)
358 361
359 @pyqtSlot() 362 @pyqtSlot()
405 @pyqtSlot(str) 408 @pyqtSlot(str)
406 def on_onlyShowEdit_textChanged(self, txt): 409 def on_onlyShowEdit_textChanged(self, txt):
407 """ 410 """
408 Private slot to check the contents of the onlyShowEdit field. 411 Private slot to check the contents of the onlyShowEdit field.
409 412
410 @param txt text of the entry field (string) 413 @param txt text of the entry field
414 @type str
411 """ 415 """
412 self.__checkOK() 416 self.__checkOK()
413 if bool(self.onlyShowEdit.text()) and bool(self.notShowEdit.text()): 417 if bool(self.onlyShowEdit.text()) and bool(self.notShowEdit.text()):
414 EricMessageBox.critical( 418 EricMessageBox.critical(
415 self, 419 self,
434 @pyqtSlot(str) 438 @pyqtSlot(str)
435 def on_notShowEdit_textChanged(self, txt): 439 def on_notShowEdit_textChanged(self, txt):
436 """ 440 """
437 Private slot to check the contents of the notShowEdit field. 441 Private slot to check the contents of the notShowEdit field.
438 442
439 @param txt text of the entry field (string) 443 @param txt text of the entry field
444 @type str
440 """ 445 """
441 self.__checkOK() 446 self.__checkOK()
442 if bool(self.onlyShowEdit.text()) and bool(self.notShowEdit.text()): 447 if bool(self.onlyShowEdit.text()) and bool(self.notShowEdit.text()):
443 EricMessageBox.critical( 448 EricMessageBox.critical(
444 self, 449 self,
463 @pyqtSlot(str) 468 @pyqtSlot(str)
464 def on_typeEdit_textChanged(self, txt): 469 def on_typeEdit_textChanged(self, txt):
465 """ 470 """
466 Private slot to check, if the typeEdit field is empty. 471 Private slot to check, if the typeEdit field is empty.
467 472
468 @param txt text of the entry field (string) 473 @param txt text of the entry field
474 @type str
469 """ 475 """
470 self.__checkOK() 476 self.__checkOK()
471 477
472 @pyqtSlot(str) 478 @pyqtSlot(str)
473 def on_nameEdit_textChanged(self, txt): 479 def on_nameEdit_textChanged(self, txt):
474 """ 480 """
475 Private slot to check, if the nameEdit field is empty. 481 Private slot to check, if the nameEdit field is empty.
476 482
477 @param txt text of the entry field (string) 483 @param txt text of the entry field
484 @type str
478 """ 485 """
479 self.__checkOK() 486 self.__checkOK()

eric ide

mercurial