forked from openlp/openlp
fexes
This commit is contained in:
parent
d1f823d864
commit
957a86b11e
@ -228,11 +228,11 @@ class MainDisplay(QtGui.QGraphicsView):
|
|||||||
shrinkItem.setVisible(False)
|
shrinkItem.setVisible(False)
|
||||||
self.setGeometry(self.screen[u'size'])
|
self.setGeometry(self.screen[u'size'])
|
||||||
|
|
||||||
def directImage(self, name, path):
|
def directImage(self, name, path, background):
|
||||||
"""
|
"""
|
||||||
API for replacement backgrounds so Images are added directly to cache
|
API for replacement backgrounds so Images are added directly to cache
|
||||||
"""
|
"""
|
||||||
self.imageManager.add_image(name, path)
|
self.imageManager.add_image(name, path, u'image', background)
|
||||||
if hasattr(self, u'serviceItem'):
|
if hasattr(self, u'serviceItem'):
|
||||||
self.override[u'image'] = name
|
self.override[u'image'] = name
|
||||||
self.override[u'theme'] = self.serviceItem.themedata.theme_name
|
self.override[u'theme'] = self.serviceItem.themedata.theme_name
|
||||||
|
@ -188,9 +188,6 @@ class PrintServiceForm(QtGui.QDialog, Ui_PrintServiceDialog):
|
|||||||
html_data.body, classId=u'serviceTitle')
|
html_data.body, classId=u'serviceTitle')
|
||||||
for index, item in enumerate(self.serviceManager.serviceItems):
|
for index, item in enumerate(self.serviceManager.serviceItems):
|
||||||
self._addPreviewItem(html_data.body, item[u'service_item'], index)
|
self._addPreviewItem(html_data.body, item[u'service_item'], index)
|
||||||
# Trigger Audit requests
|
|
||||||
Receiver.send_message(u'print_service_started',
|
|
||||||
[item[u'service_item']])
|
|
||||||
# Add the custom service notes:
|
# Add the custom service notes:
|
||||||
if self.footerTextEdit.toPlainText():
|
if self.footerTextEdit.toPlainText():
|
||||||
div = self._addElement(u'div', parent=html_data.body,
|
div = self._addElement(u'div', parent=html_data.body,
|
||||||
@ -299,6 +296,7 @@ class PrintServiceForm(QtGui.QDialog, Ui_PrintServiceDialog):
|
|||||||
``printer``
|
``printer``
|
||||||
A *QPrinter* object.
|
A *QPrinter* object.
|
||||||
"""
|
"""
|
||||||
|
self.update_song_usage()
|
||||||
self.document.print_(printer)
|
self.document.print_(printer)
|
||||||
|
|
||||||
def displaySizeChanged(self, display):
|
def displaySizeChanged(self, display):
|
||||||
@ -330,12 +328,14 @@ class PrintServiceForm(QtGui.QDialog, Ui_PrintServiceDialog):
|
|||||||
"""
|
"""
|
||||||
Copies the display text to the clipboard as plain text
|
Copies the display text to the clipboard as plain text
|
||||||
"""
|
"""
|
||||||
|
self.update_song_usage()
|
||||||
self.mainWindow.clipboard.setText(self.document.toPlainText())
|
self.mainWindow.clipboard.setText(self.document.toPlainText())
|
||||||
|
|
||||||
def copyHtmlText(self):
|
def copyHtmlText(self):
|
||||||
"""
|
"""
|
||||||
Copies the display text to the clipboard as Html
|
Copies the display text to the clipboard as Html
|
||||||
"""
|
"""
|
||||||
|
self.update_song_usage()
|
||||||
self.mainWindow.clipboard.setText(self.document.toHtml())
|
self.mainWindow.clipboard.setText(self.document.toHtml())
|
||||||
|
|
||||||
def printServiceOrder(self):
|
def printServiceOrder(self):
|
||||||
@ -400,3 +400,9 @@ class PrintServiceForm(QtGui.QDialog, Ui_PrintServiceDialog):
|
|||||||
settings.setValue(u'print notes',
|
settings.setValue(u'print notes',
|
||||||
QtCore.QVariant(self.notesCheckBox.isChecked()))
|
QtCore.QVariant(self.notesCheckBox.isChecked()))
|
||||||
settings.endGroup()
|
settings.endGroup()
|
||||||
|
|
||||||
|
def update_song_usage(self):
|
||||||
|
for index, item in enumerate(self.serviceManager.serviceItems):
|
||||||
|
# Trigger Audit requests
|
||||||
|
Receiver.send_message(u'print_service_started',
|
||||||
|
[item[u'service_item']])
|
||||||
|
@ -208,13 +208,16 @@ class ImageMediaItem(MediaManagerItem):
|
|||||||
if check_item_selected(self.listView,
|
if check_item_selected(self.listView,
|
||||||
translate('ImagePlugin.MediaItem',
|
translate('ImagePlugin.MediaItem',
|
||||||
'You must select an image to replace the background with.')):
|
'You must select an image to replace the background with.')):
|
||||||
|
background = QtGui.QColor(QtCore.QSettings().value(
|
||||||
|
self.settingsSection + u'/background color',
|
||||||
|
QtCore.QVariant(u'#000000')))
|
||||||
item = self.listView.selectedIndexes()[0]
|
item = self.listView.selectedIndexes()[0]
|
||||||
bitem = self.listView.item(item.row())
|
bitem = self.listView.item(item.row())
|
||||||
filename = unicode(bitem.data(QtCore.Qt.UserRole).toString())
|
filename = unicode(bitem.data(QtCore.Qt.UserRole).toString())
|
||||||
if os.path.exists(filename):
|
if os.path.exists(filename):
|
||||||
(path, name) = os.path.split(filename)
|
(path, name) = os.path.split(filename)
|
||||||
if self.plugin.liveController.display.directImage(name,
|
if self.plugin.liveController.display.directImage(name,
|
||||||
filename):
|
filename, background):
|
||||||
self.resetAction.setVisible(True)
|
self.resetAction.setVisible(True)
|
||||||
else:
|
else:
|
||||||
critical_error_message_box(UiStrings().LiveBGError,
|
critical_error_message_box(UiStrings().LiveBGError,
|
||||||
|
Loading…
Reference in New Issue
Block a user