File opening working.

(Only the popup that sets the variable.)
This commit is contained in:
The Wobbler 2024-11-17 18:54:51 +01:00
commit 2797c3ca44
5 changed files with 129 additions and 0 deletions

55
gui/raw_ui/main_window.ui Normal file
View file

@ -0,0 +1,55 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<height>600</height>
</rect>
</property>
<property name="windowTitle">
<string>MainWindow</string>
</property>
<widget class="QWidget" name="centralwidget"/>
<widget class="QMenuBar" name="menubar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<height>20</height>
</rect>
</property>
<widget class="QMenu" name="fileMenu">
<property name="title">
<string>File</string>
</property>
<addaction name="openFile"/>
</widget>
<addaction name="fileMenu"/>
</widget>
<widget class="QStatusBar" name="statusbar"/>
<action name="openFile">
<property name="checkable">
<bool>false</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
<property name="text">
<string>Open</string>
</property>
<property name="shortcut">
<string>Ctrl+O</string>
</property>
<property name="visible">
<bool>true</bool>
</property>
</action>
</widget>
<resources/>
<connections/>
</ui>

18
gui/raw_ui/ui_to_py.py Normal file
View file

@ -0,0 +1,18 @@
#!/usr/bin/python3
import os
input_debug = input("Do you want to debug the gui scripts? (Make gui scripts executable.) (y/n): ")
debug = input_debug == "y"
params = "-o"
if debug:
params = "-xo"
paths = {
"main_window.ui": "main_window.py"
}
for ui_file, script_out in paths.items():
os.system(f"pyuic6 {ui_file} {params} ../{script_out}")