Differential D4136 Diff 10170 plugins/extensions/pykrita/plugin/plugins/scripter/ui_scripter/stackwidgets/debuggerwidget/stepaction.py
Changeset View
Changeset View
Standalone View
Standalone View
plugins/extensions/pykrita/plugin/plugins/scripter/ui_scripter/stackwidgets/debuggerwidget/stepaction.py
1 | from PyQt5.QtWidgets import QAction | 1 | from PyQt5.QtWidgets import QAction | ||
---|---|---|---|---|---|
2 | from PyQt5.QtGui import QIcon | 2 | from PyQt5.QtGui import QIcon | ||
3 | 3 | | |||
4 | 4 | | |||
5 | class StepAction(QAction): | 5 | class StepAction(QAction): | ||
6 | 6 | | |||
7 | def __init__(self, scripter, toolbar, parent=None): | 7 | def __init__(self, scripter, toolbar, parent=None): | ||
8 | super(StepAction, self).__init__(parent) | 8 | super(StepAction, self).__init__(parent) | ||
9 | self.scripter = scripter | 9 | self.scripter = scripter | ||
10 | self.toolbar = toolbar | 10 | self.toolbar = toolbar | ||
11 | 11 | | |||
12 | self.triggered.connect(self.step) | 12 | self.triggered.connect(self.step) | ||
13 | 13 | | |||
14 | self.setText('Step Over') | 14 | self.setText('Step Over') | ||
15 | # path to the icon | 15 | # path to the icon | ||
16 | self.setIcon(QIcon('/home/eliakincosta/Pictures/step.svg')) | 16 | #self.setIcon(QIcon('/home/eliakincosta/Pictures/step.svg')) | ||
17 | 17 | | |||
18 | def step(self): | 18 | def step(self): | ||
19 | status = self.scripter.debugcontroller.isActive | 19 | status = self.scripter.debugcontroller.isActive | ||
20 | if status: | 20 | if status: | ||
21 | self.scripter.debugcontroller.step() | 21 | self.scripter.debugcontroller.step() | ||
22 | else: | 22 | else: | ||
23 | self.toolbar.disableToolbar(True) | 23 | self.toolbar.disableToolbar(True) |