Verse Tagging complete

This commit is contained in:
Tim Bentley 2009-12-02 11:22:48 +00:00
parent a2ff6433ba
commit 1b6ad5814b

View File

@ -209,19 +209,25 @@ class SlideController(QtGui.QWidget):
# Build the Song Toolbar # Build the Song Toolbar
if isLive: if isLive:
self.Songbar = OpenLPToolbar(self) self.Songbar = OpenLPToolbar(self)
self.Songbar.addToolbarButton( self.Songbar.addToolbarButton(u'Intro:1', u'I',
u'Bridge:1', u'B', self.trUtf8('Intro'),self.onSongBarHandler)
self.trUtf8('Bridge'), self.Songbar.addToolbarButton(u'Bridge:1', u'B',
self.onSongBarHandler) self.trUtf8('Bridge'),self.onSongBarHandler)
self.Songbar.addToolbarButton( self.Songbar.addToolbarButton(u'PreChorus:1', u'P',
u'Chorus:1', u'C', self.trUtf8('PreChorus'), self.onSongBarHandler)
self.trUtf8('Chorus'), self.Songbar.addToolbarButton(u'Chorus:1', u'C',
self.onSongBarHandler) self.trUtf8('Chorus'), self.onSongBarHandler)
self.Songbar.addToolbarButton(u'Tag:1', u'T',
self.trUtf8('Tag'), self.onSongBarHandler)
for verse in range(1, 12): for verse in range(1, 12):
self.Songbar.addToolbarButton( self.Songbar.addToolbarButton(
unicode(u'Verse:%s'% verse), u'%s' % verse, unicode(u'Verse:%s'% verse), u'%s' % verse,
unicode(self.trUtf8('Verse %s'))% verse, unicode(self.trUtf8('Verse %s'))% verse,
self.onSongBarHandler) self.onSongBarHandler)
self.Songbar.addToolbarButton(u'Other:1', u'O',
self.trUtf8('Other'), self.onSongBarHandler)
self.Songbar.addToolbarButton(u'Ending:1', u'E',
self.trUtf8('Ending'), self.onSongBarHandler)
self.ControllerLayout.addWidget(self.Songbar) self.ControllerLayout.addWidget(self.Songbar)
self.Songbar.setVisible(False) self.Songbar.setVisible(False)
# Screen preview area # Screen preview area
@ -313,11 +319,6 @@ class SlideController(QtGui.QWidget):
def onSongBarHandler(self): def onSongBarHandler(self):
request = unicode(self.sender().text()) request = unicode(self.sender().text())
if request == u'Bridge':
a=c
elif request == u'Chorus':
a=c
else:
#Remember list is 1 out! #Remember list is 1 out!
slideno = self.slideList[request] slideno = self.slideList[request]
if slideno > self.PreviewListWidget.rowCount(): if slideno > self.PreviewListWidget.rowCount():
@ -354,20 +355,8 @@ class SlideController(QtGui.QWidget):
for action in self.Songbar.actions: for action in self.Songbar.actions:
self.Songbar.actions[action].setVisible(False) self.Songbar.actions[action].setVisible(False)
if item.verse_order: if item.verse_order:
verses = item.verse_order.split(u' ') for slide in self.slideList:
for verse in verses: self.Songbar.actions[slide].setVisible(True)
if verse is not u' ':
pass
try:
if verse == u'C':
self.Songbar.actions[u'Chorus:1'].setVisible(True)
elif verse == u'B':
self.Songbar.actions[u'Bridge:1'].setVisible(True)
else:
vse = u'Verse:%s' % verse
self.Songbar.actions[vse].setVisible(True)
except:
pass
self.Songbar.setVisible(True) self.Songbar.setVisible(True)
elif item.is_image(): elif item.is_image():
#Not sensible to allow loops with 1 frame #Not sensible to allow loops with 1 frame