src/eric7/Plugins/VcsPlugins/vcsPySvn/SvnNewProjectOptionsDialog.py

branch
eric7
changeset 10438
4cd7e5a8b3cf
parent 9653
e67609152c5e
child 10439
21c28b0f9e41
equal deleted inserted replaced
10437:2f70ca07f0af 10438:4cd7e5a8b3cf
30 def __init__(self, vcs, parent=None): 30 def __init__(self, vcs, parent=None):
31 """ 31 """
32 Constructor 32 Constructor
33 33
34 @param vcs reference to the version control object 34 @param vcs reference to the version control object
35 @param parent parent widget (QWidget) 35 @type Subversion
36 @param parent parent widget
37 @type QWidget
36 """ 38 """
37 super().__init__(parent) 39 super().__init__(parent)
38 self.setupUi(self) 40 self.setupUi(self)
39 41
40 self.vcsProjectDirPicker.setMode(EricPathPickerModes.DIRECTORY_MODE) 42 self.vcsProjectDirPicker.setMode(EricPathPickerModes.DIRECTORY_MODE)
69 @pyqtSlot(str) 71 @pyqtSlot(str)
70 def on_vcsProjectDirPicker_textChanged(self, txt): 72 def on_vcsProjectDirPicker_textChanged(self, txt):
71 """ 73 """
72 Private slot to handle a change of the project directory. 74 Private slot to handle a change of the project directory.
73 75
74 @param txt name of the project directory (string) 76 @param txt name of the project directory
77 @type str
75 """ 78 """
76 self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled( 79 self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled(
77 bool(txt) 80 bool(txt)
78 and FileSystemUtilities.fromNativeSeparators(txt) not in self.__initPaths 81 and FileSystemUtilities.fromNativeSeparators(txt) not in self.__initPaths
79 ) 82 )
99 102
100 def on_layoutCheckBox_toggled(self, checked): 103 def on_layoutCheckBox_toggled(self, checked):
101 """ 104 """
102 Private slot to handle the change of the layout checkbox. 105 Private slot to handle the change of the layout checkbox.
103 106
104 @param checked flag indicating the state of the checkbox (boolean) 107 @param checked flag indicating the state of the checkbox
108 @type bool
105 """ 109 """
106 self.vcsTagLabel.setEnabled(checked) 110 self.vcsTagLabel.setEnabled(checked)
107 self.vcsTagEdit.setEnabled(checked) 111 self.vcsTagEdit.setEnabled(checked)
108 if not checked: 112 if not checked:
109 self.vcsTagEdit.clear() 113 self.vcsTagEdit.clear()
134 @pyqtSlot(str) 138 @pyqtSlot(str)
135 def on_vcsUrlPicker_textChanged(self, txt): 139 def on_vcsUrlPicker_textChanged(self, txt):
136 """ 140 """
137 Private slot to handle changes of the URL. 141 Private slot to handle changes of the URL.
138 142
139 @param txt current text of the line edit (string) 143 @param txt current text of the line edit
144 @type str
140 """ 145 """
141 enable = "://" not in txt 146 enable = "://" not in txt
142 self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled(enable) 147 self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled(enable)
143 148
144 def getData(self): 149 def getData(self):
145 """ 150 """
146 Public slot to retrieve the data entered into the dialog. 151 Public slot to retrieve the data entered into the dialog.
147 152
148 @return a tuple of a string (project directory) and a dictionary 153 @return a tuple containing the project directory and a dictionary
149 containing the data entered. 154 containing the data entered.
155 @rtype tuple of (str, dict)
150 """ 156 """
151 scheme = self.protocolCombo.currentText() 157 scheme = self.protocolCombo.currentText()
152 url = self.vcsUrlPicker.text() 158 url = self.vcsUrlPicker.text()
153 vcsdatadict = { 159 vcsdatadict = {
154 "url": "{0}{1}".format(scheme, url), 160 "url": "{0}{1}".format(scheme, url),

eric ide

mercurial