33 lines
940 B
Python
33 lines
940 B
Python
#!/usr/bin/python3
|
|
|
|
import sys
|
|
from PyQt6.QtWidgets import QApplication, QMainWindow
|
|
from PyQt6.QtGui import QFont
|
|
from gui.main_window import Ui_MainWindow
|
|
from connect_gui import connect_gui
|
|
|
|
|
|
class GUI:
|
|
def __init__(self, app):
|
|
self.app = app
|
|
|
|
self.qt_app = QApplication(sys.argv)
|
|
self.QTMainWindow = QMainWindow()
|
|
|
|
self.main_window = Ui_MainWindow()
|
|
|
|
self.setup_gui()
|
|
|
|
self.connect_gui = connect_gui
|
|
|
|
def setup_gui(self):
|
|
self.main_window.setupUi(self.QTMainWindow)
|
|
self.main_window.settingsDock.hide()
|
|
|
|
def post_setup(self):
|
|
self.main_window.bitsAreSquaresSetting.setChecked(self.app.settings.square_bits)
|
|
|
|
spacing = 200 if self.app.settings.square_bits else 100 # add spacing when setting is checked
|
|
print(self.app.settings.square_bits)
|
|
|
|
self.app.BitEditor.font.setLetterSpacing(QFont.SpacingType.PercentageSpacing, spacing)
|