#!/usr/bin/python3 from PyQt6.QtCore import Qt from PyQt6.QtWidgets import QDockWidget from .ui.main_window import MainWindow class GUI: def __init__(self, app): self.app = app self.window = MainWindow() self.window.addDockWidget(Qt.DockWidgetArea.RightDockWidgetArea, self.app.library.main_library_dock) self.app.library.main_library_dock.setFeatures( QDockWidget.DockWidgetFeature.DockWidgetMovable | QDockWidget.DockWidgetFeature.DockWidgetFloatable ) if self.app.settings.window_maximized: self.window.showMaximized() elif not self.app.settings.window_size is None: self.window.resize(*self.app.settings.window_size) self.connect() self.window.show() def connect(self): self.window.closeEvent = self.app.utils.on_close