src/eric7/Debugger/StartDialog.py

branch
eric7-maintenance
changeset 9549
67295777d9fe
parent 9442
906485dcd210
parent 9482
a2bc06a54d9d
child 9654
7328efba128b
equal deleted inserted replaced
9451:24c847222774 9549:67295777d9fe
7 Module implementing the Start Program dialog. 7 Module implementing the Start Program dialog.
8 """ 8 """
9 9
10 import os 10 import os
11 11
12 from PyQt6.QtWidgets import QDialog, QDialogButtonBox, QComboBox, QInputDialog 12 from PyQt6.QtWidgets import QComboBox, QDialog, QDialogButtonBox, QInputDialog
13 13
14 from eric7 import Preferences
15 from eric7.EricWidgets.EricApplication import ericApp
14 from eric7.EricWidgets.EricPathPicker import EricPathPickerModes 16 from eric7.EricWidgets.EricPathPicker import EricPathPickerModes
15 from eric7.EricWidgets.EricApplication import ericApp
16
17 from eric7 import Preferences
18 17
19 18
20 class StartDialog(QDialog): 19 class StartDialog(QDialog):
21 """ 20 """
22 Class implementing the Start Program dialog. 21 Class implementing the Start Program dialog.
108 super().__init__(parent) 107 super().__init__(parent)
109 self.setModal(True) 108 self.setModal(True)
110 109
111 self.dialogType = dialogType 110 self.dialogType = dialogType
112 if dialogType == 0: 111 if dialogType == 0:
113 from .Ui_StartDebugDialog import Ui_StartDebugDialog 112 from .Ui_StartDebugDialog import ( # __IGNORE_WARNING_I101__
113 Ui_StartDebugDialog,
114 )
114 115
115 self.ui = Ui_StartDebugDialog() 116 self.ui = Ui_StartDebugDialog()
116 elif dialogType == 1: 117 elif dialogType == 1:
117 from .Ui_StartRunDialog import Ui_StartRunDialog 118 from .Ui_StartRunDialog import Ui_StartRunDialog # __IGNORE_WARNING_I101__
118 119
119 self.ui = Ui_StartRunDialog() 120 self.ui = Ui_StartRunDialog()
120 elif dialogType == 2: 121 elif dialogType == 2:
121 from .Ui_StartCoverageDialog import Ui_StartCoverageDialog 122 from .Ui_StartCoverageDialog import ( # __IGNORE_WARNING_I101__
123 Ui_StartCoverageDialog,
124 )
122 125
123 self.ui = Ui_StartCoverageDialog() 126 self.ui = Ui_StartCoverageDialog()
124 elif dialogType == 3: 127 elif dialogType == 3:
125 from .Ui_StartProfileDialog import Ui_StartProfileDialog 128 from .Ui_StartProfileDialog import ( # __IGNORE_WARNING_I101__
129 Ui_StartProfileDialog,
130 )
126 131
127 self.ui = Ui_StartProfileDialog() 132 self.ui = Ui_StartProfileDialog()
128 self.ui.setupUi(self) 133 self.ui.setupUi(self)
129 134
130 self.ui.venvComboBox.addItem("") 135 self.ui.venvComboBox.addItem("")
357 362
358 def __editHistory(self): 363 def __editHistory(self):
359 """ 364 """
360 Private slot to edit a history list. 365 Private slot to edit a history list.
361 """ 366 """
367 from .StartHistoryEditDialog import StartHistoryEditDialog
368
362 histories = [ 369 histories = [
363 "", 370 "",
364 self.tr("Script Name"), 371 self.tr("Script Name"),
365 self.tr("Script Parameters"), 372 self.tr("Script Parameters"),
366 self.tr("Working Directory"), 373 self.tr("Working Directory"),
394 combo = widgets[historiesIndex] 401 combo = widgets[historiesIndex]
395 if combo: 402 if combo:
396 history = [combo.itemText(idx) for idx in range(combo.count())] 403 history = [combo.itemText(idx) for idx in range(combo.count())]
397 404
398 if history: 405 if history:
399 from .StartHistoryEditDialog import StartHistoryEditDialog
400
401 dlg = StartHistoryEditDialog(history, self) 406 dlg = StartHistoryEditDialog(history, self)
402 if dlg.exec() == QDialog.DialogCode.Accepted: 407 if dlg.exec() == QDialog.DialogCode.Accepted:
403 history = dlg.getHistory() 408 history = dlg.getHistory()
404 combo = widgets[historiesIndex] 409 combo = widgets[historiesIndex]
405 if combo: 410 if combo:

eric ide

mercurial