forked from openlp/openlp
Added View Modes.
This commit is contained in:
parent
08293786c7
commit
4c291bbed0
@ -57,15 +57,33 @@ class SettingsManager(object):
|
|||||||
self.mainwindow_left + self.mainwindow_right) - 100 ) / 2
|
self.mainwindow_left + self.mainwindow_right) - 100 ) / 2
|
||||||
self.slidecontroller_image = self.slidecontroller - 50
|
self.slidecontroller_image = self.slidecontroller - 50
|
||||||
|
|
||||||
self.showPreviewPanel = QtCore.QSettings().value(
|
def get_preview_visibility(self):
|
||||||
u'user interface/preview panel', QtCore.QVariant(True)).toBool()
|
|
||||||
|
|
||||||
def togglePreviewPanel(self, isVisible):
|
|
||||||
"""
|
"""
|
||||||
Toggle the preview panel visibility.
|
Return the preview panel's visibility.
|
||||||
|
"""
|
||||||
|
return QtCore.QSettings().value(u'user interface/preview panel',
|
||||||
|
QtCore.QVariant(True)).toBool()
|
||||||
|
|
||||||
|
def set_preview_visibility(self, visible):
|
||||||
|
"""
|
||||||
|
Set the preview panel's visibility.
|
||||||
"""
|
"""
|
||||||
QtCore.QSettings().setValue(u'user interface/preview panel',
|
QtCore.QSettings().setValue(u'user interface/preview panel',
|
||||||
QtCore.QVariant(isVisible))
|
QtCore.QVariant(visible))
|
||||||
|
|
||||||
|
def get_live_visibility(self):
|
||||||
|
"""
|
||||||
|
Return the live panel's visibility.
|
||||||
|
"""
|
||||||
|
return QtCore.QSettings().value(u'user interface/live panel',
|
||||||
|
QtCore.QVariant(True)).toBool()
|
||||||
|
|
||||||
|
def set_live_visibility(self, visible):
|
||||||
|
"""
|
||||||
|
Set the live panel's visibility.
|
||||||
|
"""
|
||||||
|
QtCore.QSettings().setValue(u'user interface/live panel',
|
||||||
|
QtCore.QVariant(visible))
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_last_dir(section, num=None):
|
def get_last_dir(section, num=None):
|
||||||
|
@ -172,8 +172,8 @@ class Ui_MainWindow(object):
|
|||||||
self.StatusBar.addPermanentWidget(self.DefaultThemeLabel)
|
self.StatusBar.addPermanentWidget(self.DefaultThemeLabel)
|
||||||
# Create the MediaManager
|
# Create the MediaManager
|
||||||
self.MediaManagerDock = OpenLPDockWidget(MainWindow)
|
self.MediaManagerDock = OpenLPDockWidget(MainWindow)
|
||||||
MediaManagerIcon = build_icon(u':/system/system_mediamanager.png')
|
self.MediaManagerDock.setWindowIcon(
|
||||||
self.MediaManagerDock.setWindowIcon(MediaManagerIcon)
|
build_icon(u':/system/system_mediamanager.png'))
|
||||||
self.MediaManagerDock.setStyleSheet(media_manager_style)
|
self.MediaManagerDock.setStyleSheet(media_manager_style)
|
||||||
self.MediaManagerDock.setMinimumWidth(
|
self.MediaManagerDock.setMinimumWidth(
|
||||||
self.settingsmanager.mainwindow_left)
|
self.settingsmanager.mainwindow_left)
|
||||||
@ -192,8 +192,8 @@ class Ui_MainWindow(object):
|
|||||||
QtCore.Qt.DockWidgetArea(1), self.MediaManagerDock)
|
QtCore.Qt.DockWidgetArea(1), self.MediaManagerDock)
|
||||||
# Create the service manager
|
# Create the service manager
|
||||||
self.ServiceManagerDock = OpenLPDockWidget(MainWindow)
|
self.ServiceManagerDock = OpenLPDockWidget(MainWindow)
|
||||||
ServiceManagerIcon = build_icon(u':/system/system_servicemanager.png')
|
self.ServiceManagerDock.setWindowIcon(
|
||||||
self.ServiceManagerDock.setWindowIcon(ServiceManagerIcon)
|
build_icon(u':/system/system_servicemanager.png'))
|
||||||
self.ServiceManagerDock.setObjectName(u'ServiceManagerDock')
|
self.ServiceManagerDock.setObjectName(u'ServiceManagerDock')
|
||||||
self.ServiceManagerDock.setMinimumWidth(
|
self.ServiceManagerDock.setMinimumWidth(
|
||||||
self.settingsmanager.mainwindow_right)
|
self.settingsmanager.mainwindow_right)
|
||||||
@ -203,8 +203,8 @@ class Ui_MainWindow(object):
|
|||||||
QtCore.Qt.DockWidgetArea(2), self.ServiceManagerDock)
|
QtCore.Qt.DockWidgetArea(2), self.ServiceManagerDock)
|
||||||
# Create the theme manager
|
# Create the theme manager
|
||||||
self.ThemeManagerDock = OpenLPDockWidget(MainWindow)
|
self.ThemeManagerDock = OpenLPDockWidget(MainWindow)
|
||||||
ThemeManagerIcon = build_icon(u':/system/system_thememanager.png')
|
self.ThemeManagerDock.setWindowIcon(
|
||||||
self.ThemeManagerDock.setWindowIcon(ThemeManagerIcon)
|
build_icon(u':/system/system_thememanager.png'))
|
||||||
self.ThemeManagerDock.setObjectName(u'ThemeManagerDock')
|
self.ThemeManagerDock.setObjectName(u'ThemeManagerDock')
|
||||||
self.ThemeManagerDock.setMinimumWidth(
|
self.ThemeManagerDock.setMinimumWidth(
|
||||||
self.settingsmanager.mainwindow_right)
|
self.settingsmanager.mainwindow_right)
|
||||||
@ -231,8 +231,7 @@ class Ui_MainWindow(object):
|
|||||||
self.FileSaveAsItem = QtGui.QAction(MainWindow)
|
self.FileSaveAsItem = QtGui.QAction(MainWindow)
|
||||||
self.FileSaveAsItem.setObjectName(u'FileSaveAsItem')
|
self.FileSaveAsItem.setObjectName(u'FileSaveAsItem')
|
||||||
self.FileExitItem = QtGui.QAction(MainWindow)
|
self.FileExitItem = QtGui.QAction(MainWindow)
|
||||||
ExitIcon = build_icon(u':/system/system_exit.png')
|
self.FileExitItem.setIcon(build_icon(u':/system/system_exit.png'))
|
||||||
self.FileExitItem.setIcon(ExitIcon)
|
|
||||||
self.FileExitItem.setObjectName(u'FileExitItem')
|
self.FileExitItem.setObjectName(u'FileExitItem')
|
||||||
self.ImportThemeItem = QtGui.QAction(MainWindow)
|
self.ImportThemeItem = QtGui.QAction(MainWindow)
|
||||||
self.ImportThemeItem.setObjectName(u'ImportThemeItem')
|
self.ImportThemeItem.setObjectName(u'ImportThemeItem')
|
||||||
@ -242,40 +241,41 @@ class Ui_MainWindow(object):
|
|||||||
self.ExportThemeItem.setObjectName(u'ExportThemeItem')
|
self.ExportThemeItem.setObjectName(u'ExportThemeItem')
|
||||||
self.ExportLanguageItem = QtGui.QAction(MainWindow)
|
self.ExportLanguageItem = QtGui.QAction(MainWindow)
|
||||||
self.ExportLanguageItem.setObjectName(u'ExportLanguageItem')
|
self.ExportLanguageItem.setObjectName(u'ExportLanguageItem')
|
||||||
self.actionLook_Feel = QtGui.QAction(MainWindow)
|
|
||||||
self.actionLook_Feel.setObjectName(u'actionLook_Feel')
|
|
||||||
self.SettingsConfigureItem = QtGui.QAction(MainWindow)
|
self.SettingsConfigureItem = QtGui.QAction(MainWindow)
|
||||||
SettingsIcon = build_icon(u':/system/system_settings.png')
|
self.SettingsConfigureItem.setIcon(
|
||||||
self.SettingsConfigureItem.setIcon(SettingsIcon)
|
build_icon(u':/system/system_settings.png'))
|
||||||
self.SettingsConfigureItem.setObjectName(u'SettingsConfigureItem')
|
self.SettingsConfigureItem.setObjectName(u'SettingsConfigureItem')
|
||||||
self.ViewMediaManagerItem = QtGui.QAction(MainWindow)
|
self.ViewMediaManagerItem = QtGui.QAction(MainWindow)
|
||||||
self.ViewMediaManagerItem.setCheckable(True)
|
self.ViewMediaManagerItem.setCheckable(True)
|
||||||
self.ViewMediaManagerItem.setChecked(self.MediaManagerDock.isVisible())
|
self.ViewMediaManagerItem.setChecked(self.MediaManagerDock.isVisible())
|
||||||
self.ViewMediaManagerItem.setIcon(MediaManagerIcon)
|
self.ViewMediaManagerItem.setIcon(
|
||||||
|
build_icon(u':/system/system_mediamanager.png'))
|
||||||
self.ViewMediaManagerItem.setObjectName(u'ViewMediaManagerItem')
|
self.ViewMediaManagerItem.setObjectName(u'ViewMediaManagerItem')
|
||||||
self.ViewThemeManagerItem = QtGui.QAction(MainWindow)
|
self.ViewThemeManagerItem = QtGui.QAction(MainWindow)
|
||||||
self.ViewThemeManagerItem.setCheckable(True)
|
self.ViewThemeManagerItem.setCheckable(True)
|
||||||
self.ViewThemeManagerItem.setChecked(self.ThemeManagerDock.isVisible())
|
self.ViewThemeManagerItem.setChecked(self.ThemeManagerDock.isVisible())
|
||||||
self.ViewThemeManagerItem.setIcon(ThemeManagerIcon)
|
self.ViewThemeManagerItem.setIcon(
|
||||||
|
build_icon(u':/system/system_thememanager.png'))
|
||||||
self.ViewThemeManagerItem.setObjectName(u'ViewThemeManagerItem')
|
self.ViewThemeManagerItem.setObjectName(u'ViewThemeManagerItem')
|
||||||
self.ViewServiceManagerItem = QtGui.QAction(MainWindow)
|
self.ViewServiceManagerItem = QtGui.QAction(MainWindow)
|
||||||
self.ViewServiceManagerItem.setCheckable(True)
|
self.ViewServiceManagerItem.setCheckable(True)
|
||||||
self.ViewServiceManagerItem.setChecked(
|
self.ViewServiceManagerItem.setChecked(
|
||||||
self.ServiceManagerDock.isVisible())
|
self.ServiceManagerDock.isVisible())
|
||||||
self.ViewServiceManagerItem.setIcon(ServiceManagerIcon)
|
self.ViewServiceManagerItem.setIcon(
|
||||||
|
build_icon(u':/system/system_servicemanager.png'))
|
||||||
self.ViewServiceManagerItem.setObjectName(u'ViewServiceManagerItem')
|
self.ViewServiceManagerItem.setObjectName(u'ViewServiceManagerItem')
|
||||||
self.SettingsPluginListItem = QtGui.QAction(MainWindow)
|
self.SettingsPluginListItem = QtGui.QAction(MainWindow)
|
||||||
PluginListIcon = build_icon(u':/system/settings_plugin_list.png')
|
self.SettingsPluginListItem.setIcon(
|
||||||
self.SettingsPluginListItem.setIcon(PluginListIcon)
|
build_icon(u':/system/settings_plugin_list.png'))
|
||||||
self.SettingsPluginListItem.setObjectName(u'SettingsPluginListItem')
|
self.SettingsPluginListItem.setObjectName(u'SettingsPluginListItem')
|
||||||
self.HelpDocumentationItem = QtGui.QAction(MainWindow)
|
self.HelpDocumentationItem = QtGui.QAction(MainWindow)
|
||||||
ContentsIcon = build_icon(u':/system/system_help_contents.png')
|
self.HelpDocumentationItem.setIcon(
|
||||||
self.HelpDocumentationItem.setIcon(ContentsIcon)
|
build_icon(u':/system/system_help_contents.png'))
|
||||||
self.HelpDocumentationItem.setObjectName(u'HelpDocumentationItem')
|
self.HelpDocumentationItem.setObjectName(u'HelpDocumentationItem')
|
||||||
self.HelpDocumentationItem.setEnabled(False)
|
self.HelpDocumentationItem.setEnabled(False)
|
||||||
self.HelpAboutItem = QtGui.QAction(MainWindow)
|
self.HelpAboutItem = QtGui.QAction(MainWindow)
|
||||||
AboutIcon = build_icon(u':/system/system_about.png')
|
self.HelpAboutItem.setIcon(
|
||||||
self.HelpAboutItem.setIcon(AboutIcon)
|
build_icon(u':/system/system_about.png'))
|
||||||
self.HelpAboutItem.setObjectName(u'HelpAboutItem')
|
self.HelpAboutItem.setObjectName(u'HelpAboutItem')
|
||||||
self.HelpOnlineHelpItem = QtGui.QAction(MainWindow)
|
self.HelpOnlineHelpItem = QtGui.QAction(MainWindow)
|
||||||
self.HelpOnlineHelpItem.setObjectName(u'HelpOnlineHelpItem')
|
self.HelpOnlineHelpItem.setObjectName(u'HelpOnlineHelpItem')
|
||||||
@ -299,18 +299,36 @@ class Ui_MainWindow(object):
|
|||||||
add_actions(self.LanguageGroup, [languageItem])
|
add_actions(self.LanguageGroup, [languageItem])
|
||||||
self.LanguageGroup.setDisabled(LanguageManager.AutoLanguage)
|
self.LanguageGroup.setDisabled(LanguageManager.AutoLanguage)
|
||||||
self.ToolsAddToolItem = QtGui.QAction(MainWindow)
|
self.ToolsAddToolItem = QtGui.QAction(MainWindow)
|
||||||
AddToolIcon = build_icon(u':/tools/tools_add.png')
|
self.ToolsAddToolItem.setIcon(build_icon(u':/tools/tools_add.png'))
|
||||||
self.ToolsAddToolItem.setIcon(AddToolIcon)
|
|
||||||
self.ToolsAddToolItem.setObjectName(u'ToolsAddToolItem')
|
self.ToolsAddToolItem.setObjectName(u'ToolsAddToolItem')
|
||||||
self.ViewPreviewPanel = QtGui.QAction(MainWindow)
|
self.ViewPreviewPanel = QtGui.QAction(MainWindow)
|
||||||
self.ViewPreviewPanel.setCheckable(True)
|
self.ViewPreviewPanel.setCheckable(True)
|
||||||
self.ViewPreviewPanel.setChecked(
|
self.ViewPreviewPanel.setChecked(
|
||||||
self.settingsmanager.showPreviewPanel)
|
self.settingsmanager.get_preview_visibility())
|
||||||
self.ViewPreviewPanel.setObjectName(u'ViewPreviewPanel')
|
self.ViewPreviewPanel.setObjectName(u'ViewPreviewPanel')
|
||||||
self.PreviewController.Panel.setVisible(
|
self.PreviewController.Panel.setVisible(
|
||||||
self.settingsmanager.showPreviewPanel)
|
self.settingsmanager.get_preview_visibility())
|
||||||
|
self.ViewLivePanel = QtGui.QAction(MainWindow)
|
||||||
|
self.ViewLivePanel.setCheckable(True)
|
||||||
|
self.ViewLivePanel.setChecked(
|
||||||
|
self.settingsmanager.get_live_visibility())
|
||||||
|
self.ViewLivePanel.setObjectName(u'ViewLivePanel')
|
||||||
|
self.LiveController.Panel.setVisible(
|
||||||
|
self.settingsmanager.get_live_visibility())
|
||||||
|
self.ModeDefaultItem = QtGui.QAction(MainWindow)
|
||||||
|
self.ModeDefaultItem.setCheckable(True)
|
||||||
|
self.ModeDefaultItem.setObjectName(u'ModeDefaultItem')
|
||||||
|
self.ModeSetupItem = QtGui.QAction(MainWindow)
|
||||||
|
self.ModeSetupItem.setCheckable(True)
|
||||||
|
self.ModeSetupItem.setObjectName(u'ModeLiveItem')
|
||||||
self.ModeLiveItem = QtGui.QAction(MainWindow)
|
self.ModeLiveItem = QtGui.QAction(MainWindow)
|
||||||
|
self.ModeLiveItem.setCheckable(True)
|
||||||
self.ModeLiveItem.setObjectName(u'ModeLiveItem')
|
self.ModeLiveItem.setObjectName(u'ModeLiveItem')
|
||||||
|
self.ModeGroup = QtGui.QActionGroup(MainWindow)
|
||||||
|
self.ModeGroup.addAction(self.ModeDefaultItem)
|
||||||
|
self.ModeGroup.addAction(self.ModeSetupItem)
|
||||||
|
self.ModeGroup.addAction(self.ModeLiveItem)
|
||||||
|
self.ModeDefaultItem.setChecked(True)
|
||||||
add_actions(self.FileImportMenu,
|
add_actions(self.FileImportMenu,
|
||||||
(self.ImportThemeItem, self.ImportLanguageItem))
|
(self.ImportThemeItem, self.ImportLanguageItem))
|
||||||
add_actions(self.FileExportMenu,
|
add_actions(self.FileExportMenu,
|
||||||
@ -319,10 +337,12 @@ class Ui_MainWindow(object):
|
|||||||
self.FileSaveItem, self.FileSaveAsItem, None,
|
self.FileSaveItem, self.FileSaveAsItem, None,
|
||||||
self.FileImportMenu.menuAction(), self.FileExportMenu.menuAction(),
|
self.FileImportMenu.menuAction(), self.FileExportMenu.menuAction(),
|
||||||
self.FileExitItem)
|
self.FileExitItem)
|
||||||
add_actions(self.ViewModeMenu, [self.ModeLiveItem])
|
add_actions(self.ViewModeMenu, (self.ModeDefaultItem,
|
||||||
|
self.ModeSetupItem, self.ModeLiveItem))
|
||||||
add_actions(self.ViewMenu, (self.ViewModeMenu.menuAction(),
|
add_actions(self.ViewMenu, (self.ViewModeMenu.menuAction(),
|
||||||
None, self.ViewMediaManagerItem, self.ViewServiceManagerItem,
|
None, self.ViewMediaManagerItem, self.ViewServiceManagerItem,
|
||||||
self.ViewThemeManagerItem, None, self.ViewPreviewPanel))
|
self.ViewThemeManagerItem, None, self.ViewPreviewPanel,
|
||||||
|
self.ViewLivePanel))
|
||||||
#i18n add Language Actions
|
#i18n add Language Actions
|
||||||
add_actions(self.SettingsLanguageMenu, (self.AutoLanguageItem, None))
|
add_actions(self.SettingsLanguageMenu, (self.AutoLanguageItem, None))
|
||||||
add_actions(self.SettingsLanguageMenu, self.LanguageGroup.actions())
|
add_actions(self.SettingsLanguageMenu, self.LanguageGroup.actions())
|
||||||
@ -400,7 +420,7 @@ class Ui_MainWindow(object):
|
|||||||
translate('MainWindow', 'Save Service As'))
|
translate('MainWindow', 'Save Service As'))
|
||||||
self.FileSaveAsItem.setStatusTip(translate('MainWindow',
|
self.FileSaveAsItem.setStatusTip(translate('MainWindow',
|
||||||
'Save the current service under a new name.'))
|
'Save the current service under a new name.'))
|
||||||
self.FileSaveAsItem.setShortcut(translate('MainWindow', 'F12'))
|
self.FileSaveAsItem.setShortcut(translate('MainWindow', 'Ctrl+Shift+S'))
|
||||||
self.FileExitItem.setText(translate('MainWindow', 'E&xit'))
|
self.FileExitItem.setText(translate('MainWindow', 'E&xit'))
|
||||||
self.FileExitItem.setStatusTip(translate('MainWindow', 'Quit OpenLP'))
|
self.FileExitItem.setStatusTip(translate('MainWindow', 'Quit OpenLP'))
|
||||||
self.FileExitItem.setShortcut(translate('MainWindow', 'Alt+F4'))
|
self.FileExitItem.setShortcut(translate('MainWindow', 'Alt+F4'))
|
||||||
@ -408,7 +428,6 @@ class Ui_MainWindow(object):
|
|||||||
self.ImportLanguageItem.setText(translate('MainWindow', '&Language'))
|
self.ImportLanguageItem.setText(translate('MainWindow', '&Language'))
|
||||||
self.ExportThemeItem.setText(translate('MainWindow', '&Theme'))
|
self.ExportThemeItem.setText(translate('MainWindow', '&Theme'))
|
||||||
self.ExportLanguageItem.setText(translate('MainWindow', '&Language'))
|
self.ExportLanguageItem.setText(translate('MainWindow', '&Language'))
|
||||||
self.actionLook_Feel.setText(translate('MainWindow', 'Look && &Feel'))
|
|
||||||
self.SettingsConfigureItem.setText(translate('MainWindow',
|
self.SettingsConfigureItem.setText(translate('MainWindow',
|
||||||
'&Configure OpenLP...'))
|
'&Configure OpenLP...'))
|
||||||
self.ViewMediaManagerItem.setText(
|
self.ViewMediaManagerItem.setText(
|
||||||
@ -439,6 +458,13 @@ class Ui_MainWindow(object):
|
|||||||
self.ViewPreviewPanel.setStatusTip(translate('MainWindow',
|
self.ViewPreviewPanel.setStatusTip(translate('MainWindow',
|
||||||
'Toggle the visibility of the preview panel.'))
|
'Toggle the visibility of the preview panel.'))
|
||||||
self.ViewPreviewPanel.setShortcut(translate('MainWindow', 'F11'))
|
self.ViewPreviewPanel.setShortcut(translate('MainWindow', 'F11'))
|
||||||
|
self.ViewLivePanel.setText(
|
||||||
|
translate('MainWindow', '&Live Panel'))
|
||||||
|
self.ViewLivePanel.setToolTip(
|
||||||
|
translate('MainWindow', 'Toggle Live Panel'))
|
||||||
|
self.ViewLivePanel.setStatusTip(translate('MainWindow',
|
||||||
|
'Toggle the visibility of the live panel.'))
|
||||||
|
self.ViewLivePanel.setShortcut(translate('MainWindow', 'F12'))
|
||||||
self.SettingsPluginListItem.setText(translate('MainWindow',
|
self.SettingsPluginListItem.setText(translate('MainWindow',
|
||||||
'&Plugin List'))
|
'&Plugin List'))
|
||||||
self.SettingsPluginListItem.setStatusTip(
|
self.SettingsPluginListItem.setStatusTip(
|
||||||
@ -453,10 +479,9 @@ class Ui_MainWindow(object):
|
|||||||
self.HelpOnlineHelpItem.setText(
|
self.HelpOnlineHelpItem.setText(
|
||||||
translate('MainWindow', '&Online Help'))
|
translate('MainWindow', '&Online Help'))
|
||||||
self.HelpWebSiteItem.setText(translate('MainWindow', '&Web Site'))
|
self.HelpWebSiteItem.setText(translate('MainWindow', '&Web Site'))
|
||||||
#i18n
|
|
||||||
self.AutoLanguageItem.setText(translate('MainWindow', '&Auto Detect'))
|
self.AutoLanguageItem.setText(translate('MainWindow', '&Auto Detect'))
|
||||||
self.AutoLanguageItem.setStatusTip(
|
self.AutoLanguageItem.setStatusTip(
|
||||||
translate('MainWindow', 'Choose System language, if available'))
|
translate('MainWindow', 'Use the system language, if available.'))
|
||||||
for item in self.LanguageGroup.actions():
|
for item in self.LanguageGroup.actions():
|
||||||
item.setText(item.objectName())
|
item.setText(item.objectName())
|
||||||
item.setStatusTip(unicode(translate('MainWindow',
|
item.setStatusTip(unicode(translate('MainWindow',
|
||||||
@ -464,8 +489,19 @@ class Ui_MainWindow(object):
|
|||||||
self.ToolsAddToolItem.setText(translate('MainWindow', 'Add &Tool...'))
|
self.ToolsAddToolItem.setText(translate('MainWindow', 'Add &Tool...'))
|
||||||
self.ToolsAddToolItem.setStatusTip(
|
self.ToolsAddToolItem.setStatusTip(
|
||||||
translate('MainWindow',
|
translate('MainWindow',
|
||||||
'Add an application to the list of tools'))
|
'Add an application to the list of tools.'))
|
||||||
|
self.ModeDefaultItem.setText(translate('MainWindow', '&Default'))
|
||||||
|
self.ModeDefaultItem.setStatusTip(
|
||||||
|
translate('MainWindow',
|
||||||
|
'Set the view mode back to the default.'))
|
||||||
|
self.ModeSetupItem.setText(translate('MainWindow', '&Setup'))
|
||||||
|
self.ModeSetupItem.setStatusTip(
|
||||||
|
translate('MainWindow',
|
||||||
|
'Set the view mode to Setup.'))
|
||||||
self.ModeLiveItem.setText(translate('MainWindow', '&Live'))
|
self.ModeLiveItem.setText(translate('MainWindow', '&Live'))
|
||||||
|
self.ModeLiveItem.setStatusTip(
|
||||||
|
translate('MainWindow',
|
||||||
|
'Set the view mode to Live.'))
|
||||||
|
|
||||||
|
|
||||||
class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||||
@ -524,6 +560,9 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||||||
QtCore.QObject.connect(self.ViewPreviewPanel,
|
QtCore.QObject.connect(self.ViewPreviewPanel,
|
||||||
QtCore.SIGNAL(u'toggled(bool)'),
|
QtCore.SIGNAL(u'toggled(bool)'),
|
||||||
self.togglePreviewPanel)
|
self.togglePreviewPanel)
|
||||||
|
QtCore.QObject.connect(self.ViewLivePanel,
|
||||||
|
QtCore.SIGNAL(u'toggled(bool)'),
|
||||||
|
self.toggleLivePanel)
|
||||||
QtCore.QObject.connect(self.MediaManagerDock,
|
QtCore.QObject.connect(self.MediaManagerDock,
|
||||||
QtCore.SIGNAL(u'visibilityChanged(bool)'),
|
QtCore.SIGNAL(u'visibilityChanged(bool)'),
|
||||||
self.ViewMediaManagerItem.setChecked)
|
self.ViewMediaManagerItem.setChecked)
|
||||||
@ -533,9 +572,6 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||||||
QtCore.QObject.connect(self.ThemeManagerDock,
|
QtCore.QObject.connect(self.ThemeManagerDock,
|
||||||
QtCore.SIGNAL(u'visibilityChanged(bool)'),
|
QtCore.SIGNAL(u'visibilityChanged(bool)'),
|
||||||
self.ViewThemeManagerItem.setChecked)
|
self.ViewThemeManagerItem.setChecked)
|
||||||
QtCore.QObject.connect(self.PreviewController.Panel,
|
|
||||||
QtCore.SIGNAL(u'visibilityChanged(bool)'),
|
|
||||||
self.ViewPreviewPanel.setChecked)
|
|
||||||
QtCore.QObject.connect(self.HelpWebSiteItem,
|
QtCore.QObject.connect(self.HelpWebSiteItem,
|
||||||
QtCore.SIGNAL(u'triggered()'), self.onHelpWebSiteClicked)
|
QtCore.SIGNAL(u'triggered()'), self.onHelpWebSiteClicked)
|
||||||
QtCore.QObject.connect(self.HelpAboutItem,
|
QtCore.QObject.connect(self.HelpAboutItem,
|
||||||
@ -544,16 +580,6 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||||||
QtCore.SIGNAL(u'triggered()'), self.onPluginItemClicked)
|
QtCore.SIGNAL(u'triggered()'), self.onPluginItemClicked)
|
||||||
QtCore.QObject.connect(self.SettingsConfigureItem,
|
QtCore.QObject.connect(self.SettingsConfigureItem,
|
||||||
QtCore.SIGNAL(u'triggered()'), self.onOptionsSettingsItemClicked)
|
QtCore.SIGNAL(u'triggered()'), self.onOptionsSettingsItemClicked)
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
|
||||||
QtCore.SIGNAL(u'theme_update_global'), self.defaultThemeChanged)
|
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
|
||||||
QtCore.SIGNAL(u'openlp_version_check'), self.versionCheck)
|
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
|
||||||
QtCore.SIGNAL(u'maindisplay_blank_check'), self.blankCheck)
|
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
|
||||||
QtCore.SIGNAL(u'config_screen_changed'), self.screenChanged)
|
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
|
||||||
QtCore.SIGNAL(u'maindisplay_status_text'), self.showStatusMessage)
|
|
||||||
QtCore.QObject.connect(self.FileNewItem,
|
QtCore.QObject.connect(self.FileNewItem,
|
||||||
QtCore.SIGNAL(u'triggered()'),
|
QtCore.SIGNAL(u'triggered()'),
|
||||||
self.ServiceManagerContents.onNewService)
|
self.ServiceManagerContents.onNewService)
|
||||||
@ -571,6 +597,25 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||||||
QtCore.SIGNAL(u'toggled(bool)'),
|
QtCore.SIGNAL(u'toggled(bool)'),
|
||||||
self.setAutoLanguage)
|
self.setAutoLanguage)
|
||||||
self.LanguageGroup.triggered.connect(LanguageManager.set_language)
|
self.LanguageGroup.triggered.connect(LanguageManager.set_language)
|
||||||
|
QtCore.QObject.connect(self.ModeDefaultItem,
|
||||||
|
QtCore.SIGNAL(u'triggered()'),
|
||||||
|
self.onModeDefaultItemClicked)
|
||||||
|
QtCore.QObject.connect(self.ModeSetupItem,
|
||||||
|
QtCore.SIGNAL(u'triggered()'),
|
||||||
|
self.onModeSetupItemClicked)
|
||||||
|
QtCore.QObject.connect(self.ModeLiveItem,
|
||||||
|
QtCore.SIGNAL(u'triggered()'),
|
||||||
|
self.onModeLiveItemClicked)
|
||||||
|
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||||
|
QtCore.SIGNAL(u'theme_update_global'), self.defaultThemeChanged)
|
||||||
|
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||||
|
QtCore.SIGNAL(u'openlp_version_check'), self.versionCheck)
|
||||||
|
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||||
|
QtCore.SIGNAL(u'maindisplay_blank_check'), self.blankCheck)
|
||||||
|
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||||
|
QtCore.SIGNAL(u'config_screen_changed'), self.screenChanged)
|
||||||
|
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||||
|
QtCore.SIGNAL(u'maindisplay_status_text'), self.showStatusMessage)
|
||||||
#warning cyclic dependency
|
#warning cyclic dependency
|
||||||
#RenderManager needs to call ThemeManager and
|
#RenderManager needs to call ThemeManager and
|
||||||
#ThemeManager needs to call RenderManager
|
#ThemeManager needs to call RenderManager
|
||||||
@ -614,7 +659,6 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||||||
log.info(u'Load data from Settings')
|
log.info(u'Load data from Settings')
|
||||||
self.settingsForm.postSetUp()
|
self.settingsForm.postSetUp()
|
||||||
|
|
||||||
#i18n
|
|
||||||
def setAutoLanguage(self, value):
|
def setAutoLanguage(self, value):
|
||||||
self.LanguageGroup.setDisabled(value)
|
self.LanguageGroup.setDisabled(value)
|
||||||
LanguageManager.AutoLanguage = value
|
LanguageManager.AutoLanguage = value
|
||||||
@ -702,6 +746,48 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||||||
"""
|
"""
|
||||||
self.settingsForm.exec_()
|
self.settingsForm.exec_()
|
||||||
|
|
||||||
|
def onModeDefaultItemClicked(self):
|
||||||
|
"""
|
||||||
|
Put OpenLP into "Default" view mode.
|
||||||
|
"""
|
||||||
|
self.MediaManagerDock.setVisible(True)
|
||||||
|
self.ServiceManagerDock.setVisible(True)
|
||||||
|
self.ThemeManagerDock.setVisible(True)
|
||||||
|
self.PreviewController.Panel.setVisible(True)
|
||||||
|
self.LiveController.Panel.setVisible(True)
|
||||||
|
self.settingsmanager.set_preview_visibility(True)
|
||||||
|
self.settingsmanager.set_live_visibility(True)
|
||||||
|
self.ViewPreviewPanel.setChecked(True)
|
||||||
|
self.ViewLivePanel.setChecked(True)
|
||||||
|
|
||||||
|
def onModeSetupItemClicked(self):
|
||||||
|
"""
|
||||||
|
Put OpenLP into "Setup" view mode.
|
||||||
|
"""
|
||||||
|
self.MediaManagerDock.setVisible(True)
|
||||||
|
self.ServiceManagerDock.setVisible(True)
|
||||||
|
self.ThemeManagerDock.setVisible(False)
|
||||||
|
self.PreviewController.Panel.setVisible(True)
|
||||||
|
self.LiveController.Panel.setVisible(False)
|
||||||
|
self.settingsmanager.set_preview_visibility(True)
|
||||||
|
self.settingsmanager.set_live_visibility(False)
|
||||||
|
self.ViewPreviewPanel.setChecked(True)
|
||||||
|
self.ViewLivePanel.setChecked(False)
|
||||||
|
|
||||||
|
def onModeLiveItemClicked(self):
|
||||||
|
"""
|
||||||
|
Put OpenLP into "Live" view mode.
|
||||||
|
"""
|
||||||
|
self.MediaManagerDock.setVisible(False)
|
||||||
|
self.ServiceManagerDock.setVisible(True)
|
||||||
|
self.ThemeManagerDock.setVisible(False)
|
||||||
|
self.PreviewController.Panel.setVisible(False)
|
||||||
|
self.LiveController.Panel.setVisible(True)
|
||||||
|
self.settingsmanager.set_preview_visibility(False)
|
||||||
|
self.settingsmanager.set_live_visibility(True)
|
||||||
|
self.ViewPreviewPanel.setChecked(True)
|
||||||
|
self.ViewLivePanel.setChecked(True)
|
||||||
|
|
||||||
def screenChanged(self):
|
def screenChanged(self):
|
||||||
"""
|
"""
|
||||||
The screen has changed to so tell the displays to update_display
|
The screen has changed to so tell the displays to update_display
|
||||||
@ -794,10 +880,15 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||||||
if self.ThemeManagerDock.isVisible() != visible:
|
if self.ThemeManagerDock.isVisible() != visible:
|
||||||
self.ThemeManagerDock.setVisible(visible)
|
self.ThemeManagerDock.setVisible(visible)
|
||||||
|
|
||||||
def togglePreviewPanel(self):
|
def togglePreviewPanel(self, visible):
|
||||||
previewBool = self.PreviewController.Panel.isVisible()
|
self.PreviewController.Panel.setVisible(visible)
|
||||||
self.PreviewController.Panel.setVisible(not previewBool)
|
self.settingsmanager.set_preview_visibility(visible)
|
||||||
self.settingsmanager.togglePreviewPanel(not previewBool)
|
self.ViewPreviewPanel.setChecked(visible)
|
||||||
|
|
||||||
|
def toggleLivePanel(self, visible):
|
||||||
|
self.LiveController.Panel.setVisible(visible)
|
||||||
|
self.settingsmanager.set_live_visibility(visible)
|
||||||
|
self.ViewLivePanel.setChecked(visible)
|
||||||
|
|
||||||
def loadSettings(self):
|
def loadSettings(self):
|
||||||
log.debug(u'Loading QSettings')
|
log.debug(u'Loading QSettings')
|
||||||
|
Loading…
Reference in New Issue
Block a user