Differential D4666 Diff 11492 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 | from scripter import resources_rc | ||||
3 | 4 | | |||
4 | 5 | | |||
5 | class StepAction(QAction): | 6 | class StepAction(QAction): | ||
6 | 7 | | |||
7 | def __init__(self, scripter, toolbar, parent=None): | 8 | def __init__(self, scripter, toolbar, parent=None): | ||
8 | super(StepAction, self).__init__(parent) | 9 | super(StepAction, self).__init__(parent) | ||
9 | self.scripter = scripter | 10 | self.scripter = scripter | ||
10 | self.toolbar = toolbar | 11 | self.toolbar = toolbar | ||
11 | 12 | | |||
12 | self.triggered.connect(self.step) | 13 | self.triggered.connect(self.step) | ||
13 | 14 | | |||
14 | self.setText('Step Over') | 15 | self.setText('Step Over') | ||
15 | # path to the icon | 16 | # path to the icon | ||
16 | #self.setIcon(QIcon('/home/eliakincosta/Pictures/step.svg')) | 17 | self.setIcon(QIcon(':/icons/step.svg')) | ||
17 | 18 | | |||
18 | def step(self): | 19 | def step(self): | ||
19 | status = self.scripter.debugcontroller.isActive | 20 | status = self.scripter.debugcontroller.isActive | ||
20 | if status: | 21 | if status: | ||
21 | self.scripter.debugcontroller.step() | 22 | self.scripter.debugcontroller.step() | ||
22 | else: | 23 | else: | ||
23 | self.toolbar.disableToolbar(True) | 24 | self.toolbar.disableToolbar(True) |