79 def start(self, arguments): |
79 def start(self, arguments): |
80 """ |
80 """ |
81 Public slot to start the virtualenv command. |
81 Public slot to start the virtualenv command. |
82 |
82 |
83 @param arguments commandline arguments for virtualenv/pyvenv program |
83 @param arguments commandline arguments for virtualenv/pyvenv program |
84 (list of strings) |
84 @type list of str |
85 """ |
85 """ |
86 if self.__callIndex == 0: |
86 if self.__callIndex == 0: |
87 # first attempt, add a given python interpreter and do |
87 # first attempt, add a given python interpreter and do |
88 # some other setup |
88 # some other setup |
89 self.errorGroup.hide() |
89 self.errorGroup.hide() |
115 |
115 |
116 def on_buttonBox_clicked(self, button): |
116 def on_buttonBox_clicked(self, button): |
117 """ |
117 """ |
118 Private slot called by a button of the button box clicked. |
118 Private slot called by a button of the button box clicked. |
119 |
119 |
120 @param button button that was clicked (QAbstractButton) |
120 @param button button that was clicked |
|
121 @type QAbstractButton |
121 """ |
122 """ |
122 if button == self.buttonBox.button(QDialogButtonBox.StandardButton.Close): |
123 if button == self.buttonBox.button(QDialogButtonBox.StandardButton.Close): |
123 self.accept() |
124 self.accept() |
124 elif button == self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel): |
125 elif button == self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel): |
125 self.__finish(0, 0, giveUp=True) |
126 self.__finish(0, 0, giveUp=True) |
129 """ |
130 """ |
130 Private slot called when the process finished. |
131 Private slot called when the process finished. |
131 |
132 |
132 It is called when the process finished or the user pressed the button. |
133 It is called when the process finished or the user pressed the button. |
133 |
134 |
134 @param exitCode exit code of the process (integer) |
135 @param exitCode exit code of the process |
135 @param exitStatus exit status of the process (QProcess.ExitStatus) |
136 @type int |
136 @param giveUp flag indicating to not start another attempt (boolean) |
137 @param exitStatus exit status of the process |
|
138 @type QProcess.ExitStatus |
|
139 @param giveUp flag indicating to not start another attempt |
|
140 @type bool |
137 """ |
141 """ |
138 if ( |
142 if ( |
139 self.__process is not None |
143 self.__process is not None |
140 and self.__process.state() != QProcess.ProcessState.NotRunning |
144 and self.__process.state() != QProcess.ProcessState.NotRunning |
141 ): |
145 ): |
234 |
238 |
235 def __logOutput(self, s): |
239 def __logOutput(self, s): |
236 """ |
240 """ |
237 Private method to log some output. |
241 Private method to log some output. |
238 |
242 |
239 @param s output string to log (string) |
243 @param s output string to log |
|
244 @type str |
240 """ |
245 """ |
241 self.contents.insertPlainText(s) |
246 self.contents.insertPlainText(s) |
242 self.contents.ensureCursorVisible() |
247 self.contents.ensureCursorVisible() |
243 |
248 |
244 def __logError(self, s): |
249 def __logError(self, s): |
245 """ |
250 """ |
246 Private method to log an error. |
251 Private method to log an error. |
247 |
252 |
248 @param s error string to log (string) |
253 @param s error string to log |
|
254 @type str |
249 """ |
255 """ |
250 self.errorGroup.show() |
256 self.errorGroup.show() |
251 self.errors.insertPlainText(s) |
257 self.errors.insertPlainText(s) |
252 self.errors.ensureCursorVisible() |
258 self.errors.ensureCursorVisible() |
253 |
259 |