forked from openlp/openlp
Add verse expansion from song plugin
bzr-revno: 680
This commit is contained in:
commit
fbfd9413c9
@ -577,7 +577,7 @@ class Renderer(object):
|
|||||||
painter = QtGui.QPainter()
|
painter = QtGui.QPainter()
|
||||||
painter.begin(self._frameOp)
|
painter.begin(self._frameOp)
|
||||||
painter.setRenderHint(QtGui.QPainter.Antialiasing);
|
painter.setRenderHint(QtGui.QPainter.Antialiasing);
|
||||||
painter.setOpacity(0.5)
|
painter.setOpacity(0.7)
|
||||||
painter.setFont(font)
|
painter.setFont(font)
|
||||||
if color is None:
|
if color is None:
|
||||||
if footer:
|
if footer:
|
||||||
|
@ -198,13 +198,10 @@ class MainDisplay(DisplayWidget):
|
|||||||
elif not self.displayBlank:
|
elif not self.displayBlank:
|
||||||
if transition:
|
if transition:
|
||||||
if self.hasTransition:
|
if self.hasTransition:
|
||||||
delay = 0.01
|
|
||||||
self.display.setPixmap(QtGui.QPixmap.fromImage(self.frame[u'trans']))
|
self.display.setPixmap(QtGui.QPixmap.fromImage(self.frame[u'trans']))
|
||||||
self.repaint()
|
self.repaint()
|
||||||
time.sleep(delay)
|
|
||||||
self.display.setPixmap(QtGui.QPixmap.fromImage(frame[u'trans']))
|
self.display.setPixmap(QtGui.QPixmap.fromImage(frame[u'trans']))
|
||||||
self.repaint()
|
self.repaint()
|
||||||
time.sleep(delay)
|
|
||||||
self.hasTransition = True
|
self.hasTransition = True
|
||||||
self.display.setPixmap(QtGui.QPixmap.fromImage(frame[u'main']))
|
self.display.setPixmap(QtGui.QPixmap.fromImage(frame[u'main']))
|
||||||
self.repaint()
|
self.repaint()
|
||||||
|
@ -226,7 +226,7 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
|
|||||||
verses = self.song.lyrics.split(u'\n\n')
|
verses = self.song.lyrics.split(u'\n\n')
|
||||||
for count, verse in enumerate(verses):
|
for count, verse in enumerate(verses):
|
||||||
item = QtGui.QListWidgetItem(verse)
|
item = QtGui.QListWidgetItem(verse)
|
||||||
variant = u'Verse:%s' % count + 1
|
variant = u'Verse:%s' % unicode(count + 1)
|
||||||
item.setData(QtCore.Qt.UserRole, QtCore.QVariant(variant))
|
item.setData(QtCore.Qt.UserRole, QtCore.QVariant(variant))
|
||||||
self.VerseListWidget.addItem(item)
|
self.VerseListWidget.addItem(item)
|
||||||
# clear the results
|
# clear the results
|
||||||
|
@ -293,10 +293,25 @@ class SongMediaItem(MediaManagerItem):
|
|||||||
if song.lyrics.startswith(u'<?xml version='):
|
if song.lyrics.startswith(u'<?xml version='):
|
||||||
songXML = SongXMLParser(song.lyrics)
|
songXML = SongXMLParser(song.lyrics)
|
||||||
verseList = songXML.get_verses()
|
verseList = songXML.get_verses()
|
||||||
for verse in verseList:
|
if service_item.verse_order is None or service_item.verse_order == u'':
|
||||||
if verse[1]:
|
for verse in verseList:
|
||||||
verseTag = u'%s:%s' % (verse[0][u'type'], verse[0][u'label'])
|
service_item.add_from_text(verse[1][:30], unicode(verse[1]))
|
||||||
service_item.add_from_text(verse[1][:30], verse[1], verseTag)
|
else:
|
||||||
|
for order in service_item.verse_order:
|
||||||
|
for verse in verseList:
|
||||||
|
if verse[1]:
|
||||||
|
if verse[0][u'type'] == "Verse" and \
|
||||||
|
verse[0][u'label'][0] == order[0]:
|
||||||
|
verseTag = u'%s:%s' % \
|
||||||
|
(verse[0][u'type'], verse[0][u'label'])
|
||||||
|
service_item.add_from_text\
|
||||||
|
(verse[1][:30], verse[1], verseTag)
|
||||||
|
else:
|
||||||
|
if verse[0][u'type'][0] == order[0]:
|
||||||
|
verseTag = u'%s:%s' % \
|
||||||
|
(verse[0][u'type'], verse[0][u'label'])
|
||||||
|
service_item.add_from_text\
|
||||||
|
(verse[1][:30], verse[1], verseTag)
|
||||||
else:
|
else:
|
||||||
verses = song.lyrics.split(u'\n\n')
|
verses = song.lyrics.split(u'\n\n')
|
||||||
for slide in verses:
|
for slide in verses:
|
||||||
|
@ -1 +1 @@
|
|||||||
1.9.0-679
|
1.9.0-670
|
||||||
|
Loading…
Reference in New Issue
Block a user