forked from openlp/openlp
Cleanups and screen fixes
This commit is contained in:
parent
492389b715
commit
adb757cd2f
@ -390,26 +390,16 @@ class GeneralTab(SettingsTab):
|
|||||||
unicode(self.screens.current[u'size'].width()))
|
unicode(self.screens.current[u'size'].width()))
|
||||||
self.overrideCheckBox.setChecked(settings.value(u'override position',
|
self.overrideCheckBox.setChecked(settings.value(u'override position',
|
||||||
QtCore.QVariant(False)).toBool())
|
QtCore.QVariant(False)).toBool())
|
||||||
if self.overrideCheckBox.isChecked():
|
self.customXValueEdit.setText(settings.value(u'x position',
|
||||||
self.customXValueEdit.setText(settings.value(u'x position',
|
QtCore.QVariant(self.screens.current[u'size'].x())).toString())
|
||||||
QtCore.QVariant(self.screens.current[u'size'].x())).toString())
|
self.customYValueEdit.setText(settings.value(u'y position',
|
||||||
self.customYValueEdit.setText(settings.value(u'y position',
|
QtCore.QVariant(self.screens.current[u'size'].y())).toString())
|
||||||
QtCore.QVariant(self.screens.current[u'size'].y())).toString())
|
self.customHeightValueEdit.setText(
|
||||||
self.customHeightValueEdit.setText(
|
settings.value(u'height', QtCore.QVariant(
|
||||||
settings.value(u'height', QtCore.QVariant(
|
self.screens.current[u'size'].height())).toString())
|
||||||
self.screens.current[u'size'].height())).toString())
|
self.customWidthValueEdit.setText(
|
||||||
self.customWidthValueEdit.setText(
|
settings.value(u'width', QtCore.QVariant(
|
||||||
settings.value(u'width', QtCore.QVariant(
|
self.screens.current[u'size'].width())).toString())
|
||||||
self.screens.current[u'size'].width())).toString())
|
|
||||||
else:
|
|
||||||
self.customXValueEdit.setText(
|
|
||||||
unicode(self.screens.current[u'size'].x()))
|
|
||||||
self.customYValueEdit.setText(
|
|
||||||
unicode(self.screens.current[u'size'].y()))
|
|
||||||
self.customHeightValueEdit.setText(
|
|
||||||
unicode(self.screens.current[u'size'].height()))
|
|
||||||
self.customWidthValueEdit.setText(
|
|
||||||
unicode(self.screens.current[u'size'].width()))
|
|
||||||
settings.endGroup()
|
settings.endGroup()
|
||||||
self.customXValueEdit.setEnabled(self.overrideCheckBox.isChecked())
|
self.customXValueEdit.setEnabled(self.overrideCheckBox.isChecked())
|
||||||
self.customYValueEdit.setEnabled(self.overrideCheckBox.isChecked())
|
self.customYValueEdit.setEnabled(self.overrideCheckBox.isChecked())
|
||||||
@ -438,8 +428,6 @@ class GeneralTab(SettingsTab):
|
|||||||
QtCore.QVariant(self.autoPreviewCheckBox.isChecked()))
|
QtCore.QVariant(self.autoPreviewCheckBox.isChecked()))
|
||||||
settings.setValue(u'loop delay',
|
settings.setValue(u'loop delay',
|
||||||
QtCore.QVariant(self.timeoutSpinBox.value()))
|
QtCore.QVariant(self.timeoutSpinBox.value()))
|
||||||
Receiver.send_message(u'slidecontroller_live_spin_delay',
|
|
||||||
self.timeoutSpinBox.value())
|
|
||||||
settings.setValue(u'ccli number',
|
settings.setValue(u'ccli number',
|
||||||
QtCore.QVariant(self.numberEdit.displayText()))
|
QtCore.QVariant(self.numberEdit.displayText()))
|
||||||
settings.setValue(u'songselect username',
|
settings.setValue(u'songselect username',
|
||||||
@ -459,15 +447,15 @@ class GeneralTab(SettingsTab):
|
|||||||
settings.endGroup()
|
settings.endGroup()
|
||||||
self.screens.display = self.displayOnMonitorCheck.isChecked()
|
self.screens.display = self.displayOnMonitorCheck.isChecked()
|
||||||
# Monitor Number has changed.
|
# Monitor Number has changed.
|
||||||
|
postUpdate = False
|
||||||
if self.screens.monitor_number != self.monitorNumber:
|
if self.screens.monitor_number != self.monitorNumber:
|
||||||
self.screens.monitor_number = self.monitorNumber
|
self.screens.monitor_number = self.monitorNumber
|
||||||
self.screens.set_current_display(self.monitorNumber)
|
self.screens.set_current_display(self.monitorNumber)
|
||||||
Receiver.send_message(u'config_screen_changed')
|
postUpdate = True
|
||||||
Receiver.send_message(u'config_updated')
|
|
||||||
# On save update the screens as well
|
# On save update the screens as well
|
||||||
self.postSetUp()
|
self.postSetUp(postUpdate)
|
||||||
|
|
||||||
def postSetUp(self):
|
def postSetUp(self, postUpdate=False):
|
||||||
"""
|
"""
|
||||||
Apply settings after settings tab has loaded
|
Apply settings after settings tab has loaded
|
||||||
"""
|
"""
|
||||||
@ -480,12 +468,15 @@ class GeneralTab(SettingsTab):
|
|||||||
int(self.customYValueEdit.text()),
|
int(self.customYValueEdit.text()),
|
||||||
int(self.customWidthValueEdit.text()),
|
int(self.customWidthValueEdit.text()),
|
||||||
int(self.customHeightValueEdit.text()))
|
int(self.customHeightValueEdit.text()))
|
||||||
if self.overrideCheckBox.isChecked():
|
if self.overrideCheckBox.isChecked():
|
||||||
self.screens.set_override_display()
|
self.screens.set_override_display()
|
||||||
Receiver.send_message(u'config_screen_changed')
|
else:
|
||||||
else:
|
self.screens.reset_current_display()
|
||||||
self.screens.reset_current_display()
|
# Order is important so be carefull if you change
|
||||||
Receiver.send_message(u'config_screen_changed')
|
if self.overrideChanged:
|
||||||
|
Receiver.send_message(u'config_screen_changed')
|
||||||
|
if postUpdate:
|
||||||
|
Receiver.send_message(u'config_updated')
|
||||||
self.overrideChanged = False
|
self.overrideChanged = False
|
||||||
|
|
||||||
def onOverrideCheckBoxToggled(self, checked):
|
def onOverrideCheckBoxToggled(self, checked):
|
||||||
|
@ -80,6 +80,7 @@ class DisplayWidget(QtGui.QGraphicsView):
|
|||||||
event.accept()
|
event.accept()
|
||||||
elif event.key() == QtCore.Qt.Key_Escape:
|
elif event.key() == QtCore.Qt.Key_Escape:
|
||||||
self.setVisible(False)
|
self.setVisible(False)
|
||||||
|
self.videoStop()
|
||||||
event.accept()
|
event.accept()
|
||||||
event.ignore()
|
event.ignore()
|
||||||
else:
|
else:
|
||||||
@ -103,7 +104,7 @@ class MainDisplay(DisplayWidget):
|
|||||||
QtCore.SIGNAL(u'maindisplay_show'), self.showDisplay)
|
QtCore.SIGNAL(u'maindisplay_show'), self.showDisplay)
|
||||||
|
|
||||||
def setup(self):
|
def setup(self):
|
||||||
log.debug(u'Setup %s for %s ' % (
|
log.debug(u'Setup %s %s for %s ' % (self.isLive,
|
||||||
self.screens, self.screens.monitor_number))
|
self.screens, self.screens.monitor_number))
|
||||||
self.screen = self.screens.current
|
self.screen = self.screens.current
|
||||||
self.setVisible(False)
|
self.setVisible(False)
|
||||||
@ -205,6 +206,9 @@ class MainDisplay(DisplayWidget):
|
|||||||
self.screen[u'size'].height())
|
self.screen[u'size'].height())
|
||||||
self.resetVideo()
|
self.resetVideo()
|
||||||
self.displayImage(image)
|
self.displayImage(image)
|
||||||
|
# show screen
|
||||||
|
if self.isLive:
|
||||||
|
self.setVisible(True)
|
||||||
|
|
||||||
def displayImage(self, image):
|
def displayImage(self, image):
|
||||||
"""
|
"""
|
||||||
@ -238,6 +242,9 @@ class MainDisplay(DisplayWidget):
|
|||||||
"""
|
"""
|
||||||
log.debug(u'videoPlay')
|
log.debug(u'videoPlay')
|
||||||
self.frame.evaluateJavaScript(u'show_video("play");')
|
self.frame.evaluateJavaScript(u'show_video("play");')
|
||||||
|
# show screen
|
||||||
|
if self.isLive:
|
||||||
|
self.setVisible(True)
|
||||||
|
|
||||||
def videoPause(self):
|
def videoPause(self):
|
||||||
"""
|
"""
|
||||||
@ -283,7 +290,7 @@ class MainDisplay(DisplayWidget):
|
|||||||
"""
|
"""
|
||||||
Generates a preview of the image displayed.
|
Generates a preview of the image displayed.
|
||||||
"""
|
"""
|
||||||
log.debug(u'preview')
|
log.debug(u'preview for %s', self.isLive)
|
||||||
# Wait for the fade to finish before geting the preview.
|
# Wait for the fade to finish before geting the preview.
|
||||||
# Important otherwise preview will have incorrect text if at all !
|
# Important otherwise preview will have incorrect text if at all !
|
||||||
if self.serviceItem.themedata and \
|
if self.serviceItem.themedata and \
|
||||||
@ -302,6 +309,9 @@ class MainDisplay(DisplayWidget):
|
|||||||
painter.setRenderHint(QtGui.QPainter.Antialiasing)
|
painter.setRenderHint(QtGui.QPainter.Antialiasing)
|
||||||
self.frame.render(painter)
|
self.frame.render(painter)
|
||||||
painter.end()
|
painter.end()
|
||||||
|
# Make display show up if in single screen mode
|
||||||
|
if self.isLive:
|
||||||
|
self.setVisible(True)
|
||||||
# save preview for debugging
|
# save preview for debugging
|
||||||
if log.isEnabledFor(logging.DEBUG):
|
if log.isEnabledFor(logging.DEBUG):
|
||||||
preview.save(u'temp.png', u'png')
|
preview.save(u'temp.png', u'png')
|
||||||
|
@ -44,9 +44,9 @@ class ScreenList(object):
|
|||||||
self.override = None
|
self.override = None
|
||||||
self.screen_list = []
|
self.screen_list = []
|
||||||
self.display_count = 0
|
self.display_count = 0
|
||||||
#actual display number
|
# actual display number
|
||||||
self.current_display = 0
|
self.current_display = 0
|
||||||
#save config display number
|
# save config display number
|
||||||
self.monitor_number = 0
|
self.monitor_number = 0
|
||||||
|
|
||||||
def add_screen(self, screen):
|
def add_screen(self, screen):
|
||||||
|
@ -779,7 +779,7 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
Rebuild the service list as things have changed and a
|
Rebuild the service list as things have changed and a
|
||||||
repaint is the easiest way to do this.
|
repaint is the easiest way to do this.
|
||||||
"""
|
"""
|
||||||
#force reset of renderer as theme data has changed
|
# force reset of renderer as theme data has changed
|
||||||
self.parent.RenderManager.themedata = None
|
self.parent.RenderManager.themedata = None
|
||||||
if self.serviceItems:
|
if self.serviceItems:
|
||||||
tempServiceItems = self.serviceItems
|
tempServiceItems = self.serviceItems
|
||||||
@ -789,8 +789,8 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
for item in tempServiceItems:
|
for item in tempServiceItems:
|
||||||
self.addServiceItem(
|
self.addServiceItem(
|
||||||
item[u'service_item'], False, item[u'expanded'])
|
item[u'service_item'], False, item[u'expanded'])
|
||||||
#Set to False as items may have changed rendering
|
# Set to False as items may have changed rendering
|
||||||
#does not impact the saved song so True may also be valid
|
# does not impact the saved song so True may also be valid
|
||||||
self.parent.serviceChanged(False, self.serviceName)
|
self.parent.serviceChanged(False, self.serviceName)
|
||||||
|
|
||||||
def addServiceItem(self, item, rebuild=False, expand=True, replace=False):
|
def addServiceItem(self, item, rebuild=False, expand=True, replace=False):
|
||||||
|
@ -386,8 +386,6 @@ class SlideController(QtGui.QWidget):
|
|||||||
QtCore.SIGNAL(u'config_updated'), self.refreshServiceItem)
|
QtCore.SIGNAL(u'config_updated'), self.refreshServiceItem)
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||||
QtCore.SIGNAL(u'config_screen_changed'), self.screenSizeChanged)
|
QtCore.SIGNAL(u'config_screen_changed'), self.screenSizeChanged)
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
|
||||||
QtCore.SIGNAL(u'%s_slide_cache' % self.typePrefix), self.slideCache)
|
|
||||||
if self.isLive:
|
if self.isLive:
|
||||||
QtCore.QObject.connect(self.volumeSlider,
|
QtCore.QObject.connect(self.volumeSlider,
|
||||||
QtCore.SIGNAL(u'sliderReleased()'), self.mediaVolume)
|
QtCore.SIGNAL(u'sliderReleased()'), self.mediaVolume)
|
||||||
@ -494,7 +492,7 @@ class SlideController(QtGui.QWidget):
|
|||||||
if self.serviceItem.is_text() or self.serviceItem.is_image():
|
if self.serviceItem.is_text() or self.serviceItem.is_image():
|
||||||
item = self.serviceItem
|
item = self.serviceItem
|
||||||
item.render()
|
item.render()
|
||||||
self.addServiceManagerItem(item, self.selectedRow)
|
self._processItem(item, self.selectedRow)
|
||||||
|
|
||||||
def addServiceItem(self, item):
|
def addServiceItem(self, item):
|
||||||
"""
|
"""
|
||||||
@ -766,13 +764,6 @@ class SlideController(QtGui.QWidget):
|
|||||||
% self.serviceItem.name.lower(),
|
% self.serviceItem.name.lower(),
|
||||||
[self.serviceItem, self.isLive])
|
[self.serviceItem, self.isLive])
|
||||||
|
|
||||||
def slideCache(self, slide):
|
|
||||||
"""
|
|
||||||
Generate a slide cache item rendered and ready for use
|
|
||||||
in the background.
|
|
||||||
"""
|
|
||||||
self.serviceItem.get_rendered_frame(int(slide))
|
|
||||||
|
|
||||||
def onSlideSelected(self):
|
def onSlideSelected(self):
|
||||||
"""
|
"""
|
||||||
Generate the preview when you click on a slide.
|
Generate the preview when you click on a slide.
|
||||||
@ -817,7 +808,8 @@ class SlideController(QtGui.QWidget):
|
|||||||
else:
|
else:
|
||||||
label = self.PreviewListWidget.cellWidget(
|
label = self.PreviewListWidget.cellWidget(
|
||||||
self.PreviewListWidget.currentRow(), 1)
|
self.PreviewListWidget.currentRow(), 1)
|
||||||
self.SlidePreview.setPixmap(label.pixmap())
|
if label:
|
||||||
|
self.SlidePreview.setPixmap(label.pixmap())
|
||||||
|
|
||||||
def grabMainDisplay(self):
|
def grabMainDisplay(self):
|
||||||
winid = QtGui.QApplication.desktop().winId()
|
winid = QtGui.QApplication.desktop().winId()
|
||||||
|
@ -26,7 +26,7 @@ Requires: hicolor-icon-theme
|
|||||||
|
|
||||||
%description
|
%description
|
||||||
OpenLP is a church presentation software, for lyrics projection software,
|
OpenLP is a church presentation software, for lyrics projection software,
|
||||||
used to display slides of Songs, Bible verses, videos, images, and
|
used to display slides of Songs, Bible verses, videos, images, and
|
||||||
presentations (if OpenOffice.org is installed) using a computer and projector.
|
presentations (if OpenOffice.org is installed) using a computer and projector.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
|
Loading…
Reference in New Issue
Block a user