forked from openlp/openlp
Head924
This commit is contained in:
commit
13fe15ee9d
@ -42,7 +42,7 @@ class OpenLPToolbar(QtGui.QToolBar):
|
||||
"""
|
||||
Initialise the toolbar.
|
||||
"""
|
||||
QtGui.QToolBar.__init__(self, None)
|
||||
QtGui.QToolBar.__init__(self, parent)
|
||||
# useful to be able to reuse button icons...
|
||||
self.icons = {}
|
||||
self.setIconSize(QtCore.QSize(20, 20))
|
||||
|
@ -596,15 +596,15 @@ class Ui_AmendThemeDialog(object):
|
||||
self.TransitionGroupBox.setObjectName(u'TransitionGroupBox')
|
||||
self.gridLayout_5 = QtGui.QGridLayout(self.TransitionGroupBox)
|
||||
self.gridLayout_5.setObjectName(u'gridLayout_5')
|
||||
self.SlideTransitionCheckedBoxLabel = QtGui.QLabel(
|
||||
self.SlideTransitionCheckBoxLabel = QtGui.QLabel(
|
||||
self.TransitionGroupBox)
|
||||
self.SlideTransitionCheckedBoxLabel.setObjectName(
|
||||
u'SlideTransitionCheckedBoxLabel')
|
||||
self.SlideTransitionCheckBoxLabel.setObjectName(
|
||||
u'SlideTransitionCheckBoxLabel')
|
||||
self.gridLayout_5.addWidget(
|
||||
self.SlideTransitionCheckedBoxLabel, 0, 0, 1, 1)
|
||||
self.SlideTransitionCheckedBox = QtGui.QCheckBox(self.AlignmentGroupBox)
|
||||
self.SlideTransitionCheckedBox.setTristate(False)
|
||||
self.gridLayout_5.addWidget(self.SlideTransitionCheckedBox, 0, 1, 1, 1)
|
||||
self.SlideTransitionCheckBoxLabel, 0, 0, 1, 1)
|
||||
self.SlideTransitionCheckBox = QtGui.QCheckBox(self.AlignmentGroupBox)
|
||||
self.SlideTransitionCheckBox.setTristate(False)
|
||||
self.gridLayout_5.addWidget(self.SlideTransitionCheckBox, 0, 1, 1, 1)
|
||||
self.OptionsRightLayout.addWidget(self.TransitionGroupBox)
|
||||
spacerItem6 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum,
|
||||
QtGui.QSizePolicy.Expanding)
|
||||
@ -864,7 +864,7 @@ class Ui_AmendThemeDialog(object):
|
||||
translate('AmendThemeForm', 'Bottom'))
|
||||
self.TransitionGroupBox.setTitle(
|
||||
translate('AmendThemeForm', 'Slide Transition'))
|
||||
self.SlideTransitionCheckedBoxLabel.setText(
|
||||
self.SlideTransitionCheckBoxLabel.setText(
|
||||
translate('AmendThemeForm', 'Transition active:'))
|
||||
self.ThemeTabWidget.setTabText(
|
||||
self.ThemeTabWidget.indexOf(self.OtherOptionsTab),
|
||||
|
@ -133,9 +133,9 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
|
||||
QtCore.QObject.connect(self.OutlineSpinBox,
|
||||
QtCore.SIGNAL(u'editingFinished()'),
|
||||
self.onOutlineSpinBoxChanged)
|
||||
QtCore.QObject.connect(self.SlideTransitionCheckedBox,
|
||||
QtCore.QObject.connect(self.SlideTransitionCheckBox,
|
||||
QtCore.SIGNAL(u'stateChanged(int)'),
|
||||
self.onSlideTransitionCheckedBoxChanged)
|
||||
self.onSlideTransitionCheckBoxChanged)
|
||||
|
||||
def accept(self):
|
||||
new_theme = ThemeXML()
|
||||
@ -500,7 +500,7 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
|
||||
self.stateChanging(self.theme)
|
||||
self.previewTheme()
|
||||
|
||||
def onSlideTransitionCheckedBoxChanged(self, value):
|
||||
def onSlideTransitionCheckBoxChanged(self, value):
|
||||
if value == 2: # checked
|
||||
self.theme.display_slideTransition = True
|
||||
else:
|
||||
@ -624,9 +624,9 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
|
||||
self.ShadowColorPushButton.setEnabled(False)
|
||||
self.ShadowSpinBox.setValue(int(self.theme.display_shadow_size))
|
||||
if self.theme.display_slideTransition:
|
||||
self.SlideTransitionCheckedBox.setCheckState(QtCore.Qt.Checked)
|
||||
self.SlideTransitionCheckBox.setCheckState(QtCore.Qt.Checked)
|
||||
else:
|
||||
self.SlideTransitionCheckedBox.setCheckState(QtCore.Qt.Unchecked)
|
||||
self.SlideTransitionCheckBox.setCheckState(QtCore.Qt.Unchecked)
|
||||
self.HorizontalComboBox.setCurrentIndex(
|
||||
self.theme.display_horizontalAlign)
|
||||
self.VerticalComboBox.setCurrentIndex(self.theme.display_verticalAlign)
|
||||
|
@ -210,7 +210,6 @@ class MainDisplay(DisplayWidget):
|
||||
self.setWindowFlags(QtCore.Qt.Window | QtCore.Qt.FramelessWindowHint)
|
||||
self.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
|
||||
self.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
|
||||
self.parent = parent
|
||||
# WA_TranslucentBackground is not available in QT4.4
|
||||
try:
|
||||
self.setAttribute(QtCore.Qt.WA_TranslucentBackground)
|
||||
@ -616,7 +615,7 @@ class VideoDisplay(Phonon.VideoWidget):
|
||||
|
||||
def mediaShow(self, message=''):
|
||||
"""
|
||||
Show the video disaply if it was already hidden
|
||||
Show the video display if it was already hidden
|
||||
"""
|
||||
if self.hidden:
|
||||
self.hidden = False
|
||||
@ -625,7 +624,7 @@ class VideoDisplay(Phonon.VideoWidget):
|
||||
|
||||
class AudioPlayer(QtCore.QObject):
|
||||
"""
|
||||
This Class will play audio only allowing components to work witn a
|
||||
This Class will play audio only allowing components to work with a
|
||||
soundtrack which does not take over the user interface.
|
||||
"""
|
||||
log.info(u'AudioPlayer Loaded')
|
||||
@ -641,8 +640,7 @@ class AudioPlayer(QtCore.QObject):
|
||||
The list of screens.
|
||||
"""
|
||||
log.debug(u'AudioPlayer Initialisation started')
|
||||
QtCore.QObject.__init__(self)
|
||||
self.parent = parent
|
||||
QtCore.QObject.__init__(self, parent)
|
||||
self.message = None
|
||||
self.mediaObject = Phonon.MediaObject()
|
||||
self.audioObject = Phonon.AudioOutput(Phonon.VideoCategory)
|
||||
|
@ -559,10 +559,10 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||
self.toggleThemeManager)
|
||||
QtCore.QObject.connect(self.ViewPreviewPanel,
|
||||
QtCore.SIGNAL(u'toggled(bool)'),
|
||||
self.togglePreviewPanel)
|
||||
self.setPreviewPanelVisibility)
|
||||
QtCore.QObject.connect(self.ViewLivePanel,
|
||||
QtCore.SIGNAL(u'toggled(bool)'),
|
||||
self.toggleLivePanel)
|
||||
self.setLivePanelVisibility)
|
||||
QtCore.QObject.connect(self.MediaManagerDock,
|
||||
QtCore.SIGNAL(u'visibilityChanged(bool)'),
|
||||
self.ViewMediaManagerItem.setChecked)
|
||||
@ -753,12 +753,8 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||
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)
|
||||
self.setPreviewPanelVisibility(True)
|
||||
self.setLivePanelVisibility(True)
|
||||
|
||||
def onModeSetupItemClicked(self):
|
||||
"""
|
||||
@ -767,12 +763,8 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||
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)
|
||||
self.setPreviewPanelVisibility(True)
|
||||
self.setLivePanelVisibility(False)
|
||||
|
||||
def onModeLiveItemClicked(self):
|
||||
"""
|
||||
@ -781,12 +773,8 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||
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)
|
||||
self.setPreviewPanelVisibility(False)
|
||||
self.setLivePanelVisibility(True)
|
||||
|
||||
def screenChanged(self):
|
||||
"""
|
||||
@ -880,12 +868,30 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||
if self.ThemeManagerDock.isVisible() != visible:
|
||||
self.ThemeManagerDock.setVisible(visible)
|
||||
|
||||
def togglePreviewPanel(self, visible):
|
||||
def setPreviewPanelVisibility(self, visible):
|
||||
"""
|
||||
Sets the visibility of the preview panel including saving the setting
|
||||
and updating the menu.
|
||||
|
||||
``visible``
|
||||
A bool giving the state to set the panel to
|
||||
True - Visible
|
||||
False - Hidden
|
||||
"""
|
||||
self.PreviewController.Panel.setVisible(visible)
|
||||
self.settingsmanager.set_preview_visibility(visible)
|
||||
self.ViewPreviewPanel.setChecked(visible)
|
||||
|
||||
def toggleLivePanel(self, visible):
|
||||
def setLivePanelVisibility(self, visible):
|
||||
"""
|
||||
Sets the visibility of the live panel including saving the setting and
|
||||
updating the menu.
|
||||
|
||||
``visible``
|
||||
A bool giving the state to set the panel to
|
||||
True - Visible
|
||||
False - Hidden
|
||||
"""
|
||||
self.LiveController.Panel.setVisible(visible)
|
||||
self.settingsmanager.set_live_visibility(visible)
|
||||
self.ViewLivePanel.setChecked(visible)
|
||||
|
Loading…
Reference in New Issue
Block a user