src/eric7/Project/NewDialogClassDialog.py

branch
eric7
changeset 10430
e440aaf179ce
parent 10069
435cc5875135
child 10439
21c28b0f9e41
equal deleted inserted replaced
10429:643989a1e2bd 10430:e440aaf179ce
24 24
25 def __init__(self, defaultClassName, defaultFile, defaultPath, parent=None): 25 def __init__(self, defaultClassName, defaultFile, defaultPath, parent=None):
26 """ 26 """
27 Constructor 27 Constructor
28 28
29 @param defaultClassName proposed name for the new class (string) 29 @param defaultClassName proposed name for the new class
30 @param defaultFile proposed name for the source file (string) 30 @type str
31 @param defaultPath default path for the new file (string) 31 @param defaultFile proposed name for the source file
32 @param parent parent widget if the dialog (QWidget) 32 @type str
33 @param defaultPath default path for the new file
34 @type str
35 @param parent parent widget if the dialog
36 @type QWidget
33 """ 37 """
34 super().__init__(parent) 38 super().__init__(parent)
35 self.setupUi(self) 39 self.setupUi(self)
36 40
37 self.pathnamePicker.setMode(EricPathPickerModes.DIRECTORY_MODE) 41 self.pathnamePicker.setMode(EricPathPickerModes.DIRECTORY_MODE)
59 @pyqtSlot(str) 63 @pyqtSlot(str)
60 def on_classnameEdit_textChanged(self, text): 64 def on_classnameEdit_textChanged(self, text):
61 """ 65 """
62 Private slot called, when thext of the classname edit has changed. 66 Private slot called, when thext of the classname edit has changed.
63 67
64 @param text changed text (string) 68 @param text changed text
69 @type str
65 """ 70 """
66 self.__enableOkButton() 71 self.__enableOkButton()
67 72
68 @pyqtSlot(str) 73 @pyqtSlot(str)
69 def on_filenameEdit_textChanged(self, text): 74 def on_filenameEdit_textChanged(self, text):
70 """ 75 """
71 Private slot called, when thext of the filename edit has changed. 76 Private slot called, when thext of the filename edit has changed.
72 77
73 @param text changed text (string) 78 @param text changed text
79 @type str
74 """ 80 """
75 self.__enableOkButton() 81 self.__enableOkButton()
76 82
77 @pyqtSlot(str) 83 @pyqtSlot(str)
78 def on_pathnamePicker_textChanged(self, text): 84 def on_pathnamePicker_textChanged(self, text):
79 """ 85 """
80 Private slot called, when the text of the path name has changed. 86 Private slot called, when the text of the path name has changed.
81 87
82 @param text changed text (string) 88 @param text changed text
89 @type str
83 """ 90 """
84 self.__enableOkButton() 91 self.__enableOkButton()
85 92
86 def getData(self): 93 def getData(self):
87 """ 94 """
88 Public method to retrieve the data entered into the dialog. 95 Public method to retrieve the data entered into the dialog.
89 96
90 @return tuple giving the classname (string) and the file name (string) 97 @return tuple giving the classname and the file name
98 @rtype tuple of (str, str)
91 """ 99 """
92 return ( 100 return (
93 self.classnameEdit.text(), 101 self.classnameEdit.text(),
94 os.path.join(self.pathnamePicker.text(), self.filenameEdit.text()), 102 os.path.join(self.pathnamePicker.text(), self.filenameEdit.text()),
95 ) 103 )

eric ide

mercurial