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 ) |
98 |
101 |
99 def on_layoutCheckBox_toggled(self, checked): |
102 def on_layoutCheckBox_toggled(self, checked): |
100 """ |
103 """ |
101 Private slot to handle the change of the layout checkbox. |
104 Private slot to handle the change of the layout checkbox. |
102 |
105 |
103 @param checked flag indicating the state of the checkbox (boolean) |
106 @param checked flag indicating the state of the checkbox |
|
107 @type bool |
104 """ |
108 """ |
105 self.vcsTagLabel.setEnabled(checked) |
109 self.vcsTagLabel.setEnabled(checked) |
106 self.vcsTagEdit.setEnabled(checked) |
110 self.vcsTagEdit.setEnabled(checked) |
107 if not checked: |
111 if not checked: |
108 self.vcsTagEdit.clear() |
112 self.vcsTagEdit.clear() |
133 @pyqtSlot(str) |
137 @pyqtSlot(str) |
134 def on_vcsUrlPicker_textChanged(self, txt): |
138 def on_vcsUrlPicker_textChanged(self, txt): |
135 """ |
139 """ |
136 Private slot to handle changes of the URL. |
140 Private slot to handle changes of the URL. |
137 |
141 |
138 @param txt current text of the line edit (string) |
142 @param txt current text of the line edit |
|
143 @type str |
139 """ |
144 """ |
140 enable = "://" not in txt |
145 enable = "://" not in txt |
141 self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled(enable) |
146 self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled(enable) |
142 |
147 |
143 def getData(self): |
148 def getData(self): |
144 """ |
149 """ |
145 Public slot to retrieve the data entered into the dialog. |
150 Public slot to retrieve the data entered into the dialog. |
146 |
151 |
147 @return a tuple of a string (project directory) and a dictionary |
152 @return tuple containing the (project directory and a dictionary containing |
148 containing the data entered. |
153 the data entered. |
|
154 @rtype tuple of (str, dict) |
149 """ |
155 """ |
150 scheme = self.protocolCombo.currentText() |
156 scheme = self.protocolCombo.currentText() |
151 url = self.vcsUrlPicker.text() |
157 url = self.vcsUrlPicker.text() |
152 vcsdatadict = { |
158 vcsdatadict = { |
153 "url": "{0}{1}".format(scheme, url), |
159 "url": "{0}{1}".format(scheme, url), |