107 super().__init__(parent) |
107 super().__init__(parent) |
108 self.setModal(True) |
108 self.setModal(True) |
109 |
109 |
110 self.dialogType = dialogType |
110 self.dialogType = dialogType |
111 if dialogType == 0: |
111 if dialogType == 0: |
112 from .Ui_StartDebugDialog import Ui_StartDebugDialog |
112 from .Ui_StartDebugDialog import ( # __IGNORE_WARNING_I101__ |
|
113 Ui_StartDebugDialog, |
|
114 ) |
113 |
115 |
114 self.ui = Ui_StartDebugDialog() |
116 self.ui = Ui_StartDebugDialog() |
115 elif dialogType == 1: |
117 elif dialogType == 1: |
116 from .Ui_StartRunDialog import Ui_StartRunDialog |
118 from .Ui_StartRunDialog import Ui_StartRunDialog # __IGNORE_WARNING_I101__ |
117 |
119 |
118 self.ui = Ui_StartRunDialog() |
120 self.ui = Ui_StartRunDialog() |
119 elif dialogType == 2: |
121 elif dialogType == 2: |
120 from .Ui_StartCoverageDialog import Ui_StartCoverageDialog |
122 from .Ui_StartCoverageDialog import ( # __IGNORE_WARNING_I101__ |
|
123 Ui_StartCoverageDialog, |
|
124 ) |
121 |
125 |
122 self.ui = Ui_StartCoverageDialog() |
126 self.ui = Ui_StartCoverageDialog() |
123 elif dialogType == 3: |
127 elif dialogType == 3: |
124 from .Ui_StartProfileDialog import Ui_StartProfileDialog |
128 from .Ui_StartProfileDialog import ( # __IGNORE_WARNING_I101__ |
|
129 Ui_StartProfileDialog, |
|
130 ) |
125 |
131 |
126 self.ui = Ui_StartProfileDialog() |
132 self.ui = Ui_StartProfileDialog() |
127 self.ui.setupUi(self) |
133 self.ui.setupUi(self) |
128 |
134 |
129 self.ui.venvComboBox.addItem("") |
135 self.ui.venvComboBox.addItem("") |
356 |
362 |
357 def __editHistory(self): |
363 def __editHistory(self): |
358 """ |
364 """ |
359 Private slot to edit a history list. |
365 Private slot to edit a history list. |
360 """ |
366 """ |
|
367 from .StartHistoryEditDialog import StartHistoryEditDialog |
|
368 |
361 histories = [ |
369 histories = [ |
362 "", |
370 "", |
363 self.tr("Script Name"), |
371 self.tr("Script Name"), |
364 self.tr("Script Parameters"), |
372 self.tr("Script Parameters"), |
365 self.tr("Working Directory"), |
373 self.tr("Working Directory"), |
393 combo = widgets[historiesIndex] |
401 combo = widgets[historiesIndex] |
394 if combo: |
402 if combo: |
395 history = [combo.itemText(idx) for idx in range(combo.count())] |
403 history = [combo.itemText(idx) for idx in range(combo.count())] |
396 |
404 |
397 if history: |
405 if history: |
398 from .StartHistoryEditDialog import StartHistoryEditDialog |
|
399 |
|
400 dlg = StartHistoryEditDialog(history, self) |
406 dlg = StartHistoryEditDialog(history, self) |
401 if dlg.exec() == QDialog.DialogCode.Accepted: |
407 if dlg.exec() == QDialog.DialogCode.Accepted: |
402 history = dlg.getHistory() |
408 history = dlg.getHistory() |
403 combo = widgets[historiesIndex] |
409 combo = widgets[historiesIndex] |
404 if combo: |
410 if combo: |