本文整理汇总了Python中mod.session.SESSION.setupApp方法的典型用法代码示例。如果您正苦于以下问题:Python SESSION.setupApp方法的具体用法?Python SESSION.setupApp怎么用?Python SESSION.setupApp使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mod.session.SESSION
的用法示例。
在下文中一共展示了SESSION.setupApp方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from mod.session import SESSION [as 别名]
# 或者: from mod.session.SESSION import setupApp [as 别名]
#.........这里部分代码省略.........
self.ui.act_pedalboard_save_as.setEnabled(False)
self.ui.act_pedalboard_share.setEnabled(False)
self.ui.menu_Pedalboard.setEnabled(False)
# disable presets menu
self.ui.act_presets_new.setEnabled(False)
self.ui.act_presets_save.setEnabled(False)
self.ui.act_presets_save_as.setEnabled(False)
self.ui.menu_Presets.setEnabled(False)
# initial stopped state
self.slot_backendFinished(-1, -1)
# Qt needs this so it properly creates & resizes the webview
self.ui.stackedwidget.setCurrentIndex(1)
self.ui.stackedwidget.setCurrentIndex(0)
# FIXME
#self.ui.act_backend_stop.setVisible(False)
#self.ui.act_backend_restart.setVisible(False)
# ----------------------------------------------------------------------------------------------------
# Set up GUI (special stuff for Mac OS)
if MACOS:
self.ui.act_file_quit.setMenuRole(QAction.QuitRole)
self.ui.act_settings_configure.setMenuRole(QAction.PreferencesRole)
self.ui.act_help_about.setMenuRole(QAction.AboutRole)
#self.ui.menu_Settings.setTitle("Panels")
#self.ui.menu_Help.hide()
# ----------------------------------------------------------------------------------------------------
# Set up GUI (special stuff for Live-MOD ISO)
if USING_LIVE_ISO:
self.ui.menubar.hide()
self.ui.b_start.hide()
self.ui.b_configure.hide()
self.ui.b_about.hide()
# ----------------------------------------------------------------------------------------------------
# Load Settings
self.loadSettings(True)
# ----------------------------------------------------------------------------------------------------
# Connect actions to functions
self.SIGUSR1.connect(self.slot_handleSIGUSR1)
self.SIGTERM.connect(self.slot_handleSIGTERM)
self.fProccessBackend.error.connect(self.slot_backendError)
self.fProccessBackend.started.connect(self.slot_backendStarted)
self.fProccessBackend.finished.connect(self.slot_backendFinished)
self.fProccessBackend.readyRead.connect(self.slot_backendRead)
self.fWebServerThread.running.connect(self.slot_webServerRunning)
self.fWebServerThread.finished.connect(self.slot_webServerFinished)
self.ui.menu_Pedalboard.aboutToShow.connect(self.slot_pedalboardCheckOnline)
self.ui.act_file_refresh.triggered.connect(self.slot_fileRefresh)
self.ui.act_file_inspect.triggered.connect(self.slot_fileInspect)
self.ui.act_backend_information.triggered.connect(self.slot_backendInformation)
self.ui.act_backend_start.triggered.connect(self.slot_backendStart)
self.ui.act_backend_stop.triggered.connect(self.slot_backendStop)
self.ui.act_backend_restart.triggered.connect(self.slot_backendRestart)
self.ui.act_pedalboard_new.triggered.connect(self.slot_pedalboardNew)
self.ui.act_pedalboard_open.triggered.connect(self.slot_pedalboardOpen)
self.ui.act_pedalboard_save.triggered.connect(self.slot_pedalboardSave)
self.ui.act_pedalboard_save_as.triggered.connect(self.slot_pedalboardSaveAs)
self.ui.act_pedalboard_share.triggered.connect(self.slot_pedalboardShare)
self.ui.act_settings_configure.triggered.connect(self.slot_configure)
self.ui.act_help_about.triggered.connect(self.slot_about)
self.ui.act_help_project.triggered.connect(self.slot_showProject)
self.ui.act_help_website.triggered.connect(self.slot_showWebsite)
self.ui.b_start.clicked.connect(self.slot_backendStart)
self.ui.b_configure.clicked.connect(self.slot_configure)
self.ui.b_about.clicked.connect(self.slot_about)
# force our custom refresh
webReloadAction = self.ui.webpage.action(QWebPage.Reload)
webReloadAction.triggered.disconnect()
webReloadAction.triggered.connect(self.slot_fileRefresh)
# ----------------------------------------------------------------------------------------------------
# Final setup
self.setProperWindowTitle()
SESSION.setupApp(self._pedal_changed_callback)
if not "--no-autostart" in sys.argv:
QTimer.singleShot(0, self.slot_backendStart)
QTimer.singleShot(1, self.fixWebViewSize)