forked from openlp/openlp
Replaceable Backgound images now work
This commit is contained in:
parent
56e4e38b99
commit
7198148a48
@ -211,7 +211,7 @@ class MainDisplay(DisplayWidget):
|
||||
#Sort out screen locations and sizes
|
||||
self.setGeometry(self.screen[u'size'])
|
||||
self.scene.setSceneRect(0,0,self.size().width(), self.size().height())
|
||||
self.imageDisplay.setGeometry(0, 0, self.size().width(), self.size().height())
|
||||
self.webView.setGeometry(0, 0, self.size().width(), self.size().height())
|
||||
#Build a custom splash screen
|
||||
self.InitialFrame = QtGui.QImage(
|
||||
self.screen[u'size'].width(),
|
||||
@ -255,12 +255,13 @@ class MainDisplay(DisplayWidget):
|
||||
self.setScene(self.scene)
|
||||
|
||||
def setupImage(self):
|
||||
# self.display_image = QtGui.QGraphmaindisplay.pyicsPixmapItem()
|
||||
# self.display_image.setZValue(2)
|
||||
# self.scene.addItem(self.display_image)
|
||||
self.imageDisplay = QtWebKit.QWebView()
|
||||
self.webView = QtWebKit.QWebView()
|
||||
self.page = self.webView.page()
|
||||
self.imageDisplay = self.page.mainFrame()
|
||||
self.imageDisplay.setScrollBarPolicy(QtCore.Qt.Vertical, QtCore.Qt.ScrollBarAlwaysOff)
|
||||
self.imageDisplay.setScrollBarPolicy(QtCore.Qt.Horizontal, QtCore.Qt.ScrollBarAlwaysOff)
|
||||
self.proxy = QtGui.QGraphicsProxyWidget()
|
||||
self.proxy.setWidget(self.imageDisplay)
|
||||
self.proxy.setWidget(self.webView)
|
||||
self.proxy.setWindowFlags(QtCore.Qt.Window | QtCore.Qt.FramelessWindowHint)
|
||||
self.proxy.setZValue(2)
|
||||
self.scene.addItem(self.proxy)
|
||||
|
@ -175,12 +175,12 @@ class ImageMediaItem(MediaManagerItem):
|
||||
translate('ImagePlugin.MediaItem', 'No item selected'),
|
||||
translate('ImagePlugin.MediaItem',
|
||||
'You must select one item'))
|
||||
items = self.ListView.selectedIndexes()
|
||||
for item in items:
|
||||
bitem = self.ListView.item(item.row())
|
||||
filename = unicode(bitem.data(QtCore.Qt.UserRole).toString())
|
||||
frame = QtGui.QImage(unicode(filename))
|
||||
self.parent.maindisplay.addImageWithText(frame)
|
||||
return
|
||||
item = self.buildServiceItem()
|
||||
item.render()
|
||||
self.parent.live_controller.displayManager. \
|
||||
displayImage(item.get_rendered_frame(0)[u'display'])
|
||||
|
||||
|
||||
def onPreviewClick(self):
|
||||
MediaManagerItem.onPreviewClick(self)
|
||||
|
Loading…
Reference in New Issue
Block a user