[docs]classVideoEditorWindow(QMainWindow):"""Main window for the video editor application."""styleSheetUpdated=Signal(str)@logger.catchdef__init__(self,parent=None):"""Initializer"""super().__init__(parent)self.central_widget=QWidget(self)self.ui=Ui_VideoEditor()self.ui.setupUi(self.central_widget)self.setCentralWidget(self.central_widget)# Set the central widget of QMainWindowself.customStyleSheet=""self.settings=load_settings()self.themes=load_themes()self.current_theme=load_current_theme()apply_stylesheet(self,self.ui,self.settings,self.current_theme)self.create_menubar()
[docs]@logger.catchdefcreate_menubar(self):"""Create the menubar for the main window."""settings_action=QAction("Settings",self)settings_action.triggered.connect(self.open_settings)self.menuBar().addAction(settings_action)
[docs]@logger.catchdefopen_settings(self):"""Open the settings dialog."""open_settings_dialog(self,self.settings,self.themes,self.current_theme)