mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
Debug: Add Timer window.
This commit is contained in:
1 parent
476fa81bc2
commit
1306977954
4 files changed
+212
-3
No files matched your search
+16
-1
@@ -100,7 +100,7 @@ from View.CheckList.WindowAdisTS import CheckListWindowAdisTS
|
||||
from View.Results.WindowAdisTS import ResultsWindowAdisTS
|
||||
from View.Results.ReadingResultsDialog import ReadingResultsDialog
|
||||
|
||||
from View.Debug.Window import ReplWindow
|
||||
from View.Debug.Window import ReplWindow, TimerWindow
|
||||
from View.OutputRKAdisTS.Window import OutputRKAdisTSWindow
|
||||
from View.Pollutants.Window import PollutantsWindow
|
||||
from View.D90AdisTS.Window import D90AdisTSWindow
|
||||
@@ -409,21 +409,28 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
||||
self.debug_action.setToolTip(self._trad["open_debug"])
|
||||
self.debug_action.triggered.connect(self.open_debug)
|
||||
|
||||
self.debug_timer_action = QAction("Debug timer", self)
|
||||
self.debug_timer_action.setToolTip(self._trad["open_debug_timer"])
|
||||
self.debug_timer_action.triggered.connect(self.open_debug_timer)
|
||||
|
||||
self.debug_sqlite_action = QAction("Debug SQLite", self)
|
||||
self.debug_sqlite_action.setToolTip(self._trad["open_debug_sql"])
|
||||
self.debug_sqlite_action.triggered.connect(self.open_sqlite)
|
||||
|
||||
if self.conf.debug:
|
||||
menu.addAction(self.debug_action)
|
||||
menu.addAction(self.debug_timer_action)
|
||||
menu.addAction(self.debug_sqlite_action)
|
||||
self.set_debug_lvl(debug=True)
|
||||
else:
|
||||
if self.conf.debug:
|
||||
menu.addAction(self.debug_action)
|
||||
menu.addAction(self.debug_timer_action)
|
||||
menu.addAction(self.debug_sqlite_action)
|
||||
self.set_debug_lvl(debug=True)
|
||||
else:
|
||||
menu.removeAction(self.debug_action)
|
||||
menu.removeAction(self.debug_timer_action)
|
||||
menu.removeAction(self.debug_sqlite_action)
|
||||
self.set_debug_lvl(debug=False)
|
||||
|
||||
@@ -2143,6 +2150,14 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
||||
)
|
||||
repl.show()
|
||||
|
||||
def open_debug_timer(self):
|
||||
repl = TimerWindow(
|
||||
study=self._study,
|
||||
config=self.conf,
|
||||
parent=self
|
||||
)
|
||||
repl.show()
|
||||
|
||||
def open_sqlite(self):
|
||||
if self._study is None:
|
||||
logger.debug("No study open for sql debuging...")
|
||||
|
||||
Reference in new issue
Block a user