Debugger/StartDialog.py

changeset 5374
c18d759b6b86
parent 5373
7826884089fd
child 5389
9b1c800daff3
equal deleted inserted replaced
5373:7826884089fd 5374:c18d759b6b86
134 """ 134 """
135 Public method to retrieve the data entered into this dialog. 135 Public method to retrieve the data entered into this dialog.
136 136
137 @return a tuple of argv (string), workdir (string), environment 137 @return a tuple of argv (string), workdir (string), environment
138 (string), exceptions flag (boolean), clear interpreter flag 138 (string), exceptions flag (boolean), clear interpreter flag
139 (boolean), clear histories flag (boolean) and run in console 139 (boolean) and run in console flag (boolean)
140 flag (boolean) 140 """
141 """
142 # TODO: add the complete histories
143 cmdLine = self.ui.cmdlineCombo.currentText() 141 cmdLine = self.ui.cmdlineCombo.currentText()
144 workdir = self.ui.workdirPicker.currentText() 142 workdir = self.ui.workdirPicker.currentText()
145 environment = self.ui.environmentCombo.currentText() 143 environment = self.ui.environmentCombo.currentText()
146 144
147 return (cmdLine, 145 return (cmdLine,
148 workdir, 146 workdir,
149 environment, 147 environment,
150 self.ui.exceptionCheckBox.isChecked(), 148 self.ui.exceptionCheckBox.isChecked(),
151 self.ui.clearShellCheckBox.isChecked(), 149 self.ui.clearShellCheckBox.isChecked(),
152 self.__clearHistoryLists,
153 self.ui.consoleCheckBox.isChecked()) 150 self.ui.consoleCheckBox.isChecked())
154 151
155 def getDebugData(self): 152 def getDebugData(self):
156 """ 153 """
157 Public method to retrieve the debug related data entered into this 154 Public method to retrieve the debug related data entered into this
208 """ 205 """
209 Private slot to clear the combo boxes lists and record a flag to 206 Private slot to clear the combo boxes lists and record a flag to
210 clear the lists. 207 clear the lists.
211 """ 208 """
212 self.__clearHistoryLists = True 209 self.__clearHistoryLists = True
210 self.__historiesModified = False # clear catches it all
213 211
214 cmdLine = self.ui.cmdlineCombo.currentText() 212 cmdLine = self.ui.cmdlineCombo.currentText()
215 workdir = self.ui.workdirPicker.currentText() 213 workdir = self.ui.workdirPicker.currentText()
216 environment = self.ui.environmentCombo.currentText() 214 environment = self.ui.environmentCombo.currentText()
217 215
264 combo = self.ui.environmentCombo 262 combo = self.ui.environmentCombo
265 combo.clear() 263 combo.clear()
266 combo.addItems(history) 264 combo.addItems(history)
267 265
268 self.__historiesModified = True 266 self.__historiesModified = True
269 267
268 def historiesModified(self):
269 """
270 Public method to test for modified histories.
271
272 @return flag indicating modified histories
273 @rtype bool
274 """
275 return self.__historiesModified
276
277 def clearHistories(self):
278 """
279 Public method to test, if histories shall be cleared.
280
281 @return flag indicating histories shall be cleared
282 @rtype bool
283 """
284 return self.__clearHistoryLists
285
286 def getHistories(self):
287 """
288 Public method to get the lists of histories.
289
290 @return tuple containing the histories of command line arguments,
291 working directories and environment settings
292 @rtype tuple of three list of str
293 """
294 return (
295 [self.ui.cmdlineCombo.itemText(index) for index in range(
296 self.ui.cmdlineCombo.count())],
297 self.ui.workdirPicker.getPathItems(),
298 [self.ui.environmentCombo.itemText(index) for index in range(
299 self.ui.environmentCombo.count())],
300 )
301
270 def on_buttonBox_clicked(self, button): 302 def on_buttonBox_clicked(self, button):
271 """ 303 """
272 Private slot called by a button of the button box clicked. 304 Private slot called by a button of the button box clicked.
273 305
274 @param button button that was clicked (QAbstractButton) 306 @param button button that was clicked (QAbstractButton)

eric ide

mercurial