forked from openlp/openlp
Renderer replacement- text now output and pages
This commit is contained in:
parent
3d9fca212f
commit
19400843d4
@ -181,7 +181,7 @@ class ServiceItem(object):
|
||||
else:
|
||||
frame = self.render_manager.generate_slide(raw_html, u'')
|
||||
self.cache[row] = frame
|
||||
return frame
|
||||
return frame, raw_html[0]
|
||||
|
||||
def add_from_image(self, path, title, image):
|
||||
"""
|
||||
|
@ -251,7 +251,7 @@ class WebViewer(DisplayWidget):
|
||||
self.currslide = not self.currslide
|
||||
|
||||
def text(self, slide):
|
||||
self.frame.findFirstElement('div#lyrics').setInnerXml(self.slides(slide))
|
||||
self.frame.findFirstElement('div#lyrics').setInnerXml(slide)
|
||||
|
||||
def alert(self):
|
||||
self.frame.findFirstElement('div#alert').setInnerXml(self.alerttext)
|
||||
|
@ -769,24 +769,18 @@ class SlideController(QtGui.QWidget):
|
||||
self.updatePreview()
|
||||
else:
|
||||
before = time.time()
|
||||
frame = self.serviceItem.get_rendered_frame(row)
|
||||
frame, raw_html = self.serviceItem.get_rendered_frame(row)
|
||||
if isinstance(frame, QtGui.QImage):
|
||||
self.SlidePreview.setPixmap(QtGui.QPixmap.fromImage(frame))
|
||||
else:
|
||||
if isinstance(frame[u'main'], basestring):
|
||||
self.SlidePreview.setPixmap(
|
||||
QtGui.QPixmap(frame[u'main']))
|
||||
else:
|
||||
self.SlidePreview.setPixmap(
|
||||
QtGui.QPixmap.fromImage(frame[u'main']))
|
||||
self.SlidePreview.setPixmap(QtGui.QPixmap(frame))
|
||||
log.log(
|
||||
15, u'Slide Rendering took %4s' % (time.time() - before))
|
||||
if self.isLive:
|
||||
if self.serviceItem.is_text():
|
||||
pass
|
||||
#self.mainDisplay.frameView(frame, True)
|
||||
self.mainDisplay.text(raw_html)
|
||||
else:
|
||||
self.displayManager.displayImage(frame[u'main'])
|
||||
self.displayManager.displayImage(frame)
|
||||
self.selectedRow = row
|
||||
Receiver.send_message(u'slidecontroller_%s_changed' % self.typePrefix,
|
||||
row)
|
||||
|
@ -521,16 +521,16 @@ class BibleMediaItem(MediaManagerItem):
|
||||
permission = self._decodeQtObject(reference, 'permission')
|
||||
if self.parent.settings_tab.display_style == 1:
|
||||
verse_text = self.formatVerse(old_chapter, chapter, verse,
|
||||
u'(u', u')')
|
||||
u'<sup>(u', u')</sup>')
|
||||
elif self.parent.settings_tab.display_style == 2:
|
||||
verse_text = self.formatVerse(old_chapter, chapter, verse,
|
||||
u'{', u'}')
|
||||
u'<sup>{', u'}</sup>')
|
||||
elif self.parent.settings_tab.display_style == 3:
|
||||
verse_text = self.formatVerse(old_chapter, chapter, verse,
|
||||
u'[', u']')
|
||||
u'<sup>[', u']</sup>')
|
||||
else:
|
||||
verse_text = self.formatVerse(old_chapter, chapter, verse,
|
||||
u'', u'')
|
||||
u'<sup>', u'</sup>')
|
||||
old_chapter = chapter
|
||||
footer = u'%s (%s %s)' % (book, version, copyright)
|
||||
#If not found add to footer
|
||||
|
Loading…
Reference in New Issue
Block a user