Skip to content
Snippets Groups Projects
Commit aec7f034 authored by Andreas Bolin's avatar Andreas Bolin
Browse files

cleanup

parent b1d3c9ef
No related branches found
No related tags found
1 merge request!78Add scheduler GUI
Pipeline #72854 passed
......@@ -69,19 +69,13 @@ if __debug__:
# Autocompile the .ui form to a python file.
try: # PyQt5, try autocompile
from qtpy.uic import compileUiDir
# def _map_func(dir: str, file: str) -> tuple[str, str]:
# file_base,_ = os.path.splitext(file)
# return (dir+'/ui/', file_base+'_ui.py')
# uic.compileUiDir('.', map=_map_func)
uic.compileUiDir('.', map=(lambda dir,file: (dir, 'ui_' + file)))
except:
try: # PySide2, try manual compile
import subprocess
os_ = sys.platform
if os_.startswith('linux'):
cmds = ["mkdir -p ui",
"pyside2-uic -o ui_main_window.py main_window.ui"]
cmds = ['pyside2-uic -o ui_main_window.py main_window.ui']
for cmd in cmds:
subprocess.call(cmd.split())
else:
......@@ -262,11 +256,10 @@ class MainWindow(QMainWindow, Ui_MainWindow):
self.splitter_center.moveSplitter(range[1], 1)
@Slot(bool)
def toggle_exit_dialog(self, checked: bool):
def toggle_exit_dialog(self, checked: bool) -> None:
s = QSettings()
s.setValue("mainwindow/hide_exit_dialog", checked)
@Slot(int, int)
def _splitter_center_moved(self, pos: int, index: int) -> None:
"""Callback method used to check if the right widget (info window)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment