Krita Source Code Documentation
Loading...
Searching...
No Matches
debuggerwidget.py
Go to the documentation of this file.
1"""
2SPDX-FileCopyrightText: 2017 Eliakin Costa <eliakim170@gmail.com>
3
4SPDX-License-Identifier: GPL-2.0-or-later
5"""
6try:
7 from PyQt6.QtWidgets import QWidget, QVBoxLayout, QToolBar
8except:
9 from PyQt5.QtWidgets import QWidget, QVBoxLayout, QToolBar
10from builtins import i18n
11from . import stepaction, stopaction, debuggertable
12
13class DebuggerWidget(QWidget):
14
15 def __init__(self, scripter, parent=None):
16 super(DebuggerWidget, self).__init__(parent)
17
18 self.scripter = scripter
19 self.setObjectName(i18n('Debugger'))
20 self.layout = QVBoxLayout()
21
23 self.toolbar = QToolBar()
25 self.toolbar.addAction(self.stopAction)
26 self.toolbar.addAction(self.stepAction)
27 self.disableToolbar(True)
28
30
31 self.layout.addWidget(self.toolbar)
32 self.layout.addWidget(self.table)
33 self.setLayout(self.layout)
34
35 def startDebugger(self):
36 self.disableToolbar(False)
37
38 def disableToolbar(self, status):
39 for action in self.toolbar.actions():
40 action.setDisabled(status)
41
42 def updateWidget(self):
43 data = self.scripter.debugcontroller.debuggerData
44 self.table.updateTable(data)