Build Dynamic Icons for SlideController
@ -105,9 +105,25 @@ def build_icon(icon):
|
|||||||
ButtonIcon.addPixmap(
|
ButtonIcon.addPixmap(
|
||||||
QtGui.QPixmap(icon), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
QtGui.QPixmap(icon), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||||
else:
|
else:
|
||||||
if len(icon) < 5:
|
if len(icon) > 2:
|
||||||
ButtonIcon.addPixmap(QtGui.QPixmap.fromImage(QtGui.QImage(icon)),
|
ButtonIcon.addPixmap(QtGui.QPixmap.fromImage(QtGui.QImage(icon)),
|
||||||
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||||
|
else:
|
||||||
|
#lets build a Icon from text
|
||||||
|
pmap = QtGui.QPixmap(u':/pages/slide.png')
|
||||||
|
painter = QtGui.QPainter(pmap)
|
||||||
|
painter.setPen(QtGui.QColor(QtGui.QColor.black))
|
||||||
|
font = QtGui.QFont()
|
||||||
|
font.setFamily(u'Arial')
|
||||||
|
font.setBold(True)
|
||||||
|
font.setPointSize(12)
|
||||||
|
painter.setFont(font)
|
||||||
|
metrics = QtGui.QFontMetrics(font)
|
||||||
|
painter.drawText(5, 3 + metrics.ascent(), icon)
|
||||||
|
painter.end()
|
||||||
|
ButtonIcon.addPixmap(
|
||||||
|
pmap, QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||||
|
|
||||||
elif type(icon) is QtGui.QImage:
|
elif type(icon) is QtGui.QImage:
|
||||||
ButtonIcon = QtGui.QIcon()
|
ButtonIcon = QtGui.QIcon()
|
||||||
ButtonIcon.addPixmap(
|
ButtonIcon.addPixmap(
|
||||||
|
@ -269,7 +269,7 @@ class MediaManagerItem(QtGui.QWidget):
|
|||||||
if self.hasEditIcon:
|
if self.hasEditIcon:
|
||||||
self.ListView.addAction(
|
self.ListView.addAction(
|
||||||
contextMenuAction(
|
contextMenuAction(
|
||||||
self.ListView, u':%s_new.png' % self.IconPath,
|
self.ListView, u':/%s_new.png' % self.IconPath,
|
||||||
u'%s %s' % (self.trUtf8('&Edit'), self.PluginNameVisible),
|
u'%s %s' % (self.trUtf8('&Edit'), self.PluginNameVisible),
|
||||||
self.onEditClick))
|
self.onEditClick))
|
||||||
self.ListView.addAction(contextMenuSeparator(self.ListView))
|
self.ListView.addAction(contextMenuSeparator(self.ListView))
|
||||||
|
@ -173,7 +173,7 @@ class SlideController(QtGui.QWidget):
|
|||||||
self.trUtf8('Move to live'), self.onGoLive)
|
self.trUtf8('Move to live'), self.onGoLive)
|
||||||
self.Toolbar.addToolbarSeparator(u'Close Separator')
|
self.Toolbar.addToolbarSeparator(u'Close Separator')
|
||||||
self.Toolbar.addToolbarButton(
|
self.Toolbar.addToolbarButton(
|
||||||
u'Edit Song', u':songs/song_edit.png',
|
u'Edit Song', u':/songs/song_edit.png',
|
||||||
self.trUtf8('Edit and re-preview Song'), self.onEditSong)
|
self.trUtf8('Edit and re-preview Song'), self.onEditSong)
|
||||||
if isLive:
|
if isLive:
|
||||||
self.Toolbar.addToolbarSeparator(u'Loop Separator')
|
self.Toolbar.addToolbarSeparator(u'Loop Separator')
|
||||||
@ -210,16 +210,16 @@ class SlideController(QtGui.QWidget):
|
|||||||
if isLive:
|
if isLive:
|
||||||
self.Songbar = OpenLPToolbar(self)
|
self.Songbar = OpenLPToolbar(self)
|
||||||
self.Songbar.addToolbarButton(
|
self.Songbar.addToolbarButton(
|
||||||
u'Bridge:1', u':/pages/page_bridge.png',
|
u'Bridge:1', u'B',
|
||||||
self.trUtf8('Bridge'),
|
self.trUtf8('Bridge'),
|
||||||
self.onSongBarHandler)
|
self.onSongBarHandler)
|
||||||
self.Songbar.addToolbarButton(
|
self.Songbar.addToolbarButton(
|
||||||
u'Chorus:1', u':/pages/page_chorus.png',
|
u'Chorus:1', u'C',
|
||||||
self.trUtf8('Chorus'),
|
self.trUtf8('Chorus'),
|
||||||
self.onSongBarHandler)
|
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':/pages/page_%s.png' % 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.ControllerLayout.addWidget(self.Songbar)
|
self.ControllerLayout.addWidget(self.Songbar)
|
||||||
@ -488,7 +488,6 @@ class SlideController(QtGui.QWidget):
|
|||||||
if self.isLive:
|
if self.isLive:
|
||||||
self.serviceItem.request_audit()
|
self.serviceItem.request_audit()
|
||||||
log.debug(u'displayServiceManagerItems End')
|
log.debug(u'displayServiceManagerItems End')
|
||||||
print self.slideList
|
|
||||||
|
|
||||||
#Screen event methods
|
#Screen event methods
|
||||||
def onSlideSelectedFirst(self):
|
def onSlideSelectedFirst(self):
|
||||||
|
@ -126,19 +126,6 @@
|
|||||||
<file>theme_import.png</file>
|
<file>theme_import.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
<qresource prefix="pages" >
|
<qresource prefix="pages" >
|
||||||
<file>page_chorus.png</file>
|
<file>slide.png</file>
|
||||||
<file>page_bridge.png</file>
|
|
||||||
<file>page_1.png</file>
|
|
||||||
<file>page_2.png</file>
|
|
||||||
<file>page_3.png</file>
|
|
||||||
<file>page_4.png</file>
|
|
||||||
<file>page_5.png</file>
|
|
||||||
<file>page_6.png</file>
|
|
||||||
<file>page_7.png</file>
|
|
||||||
<file>page_8.png</file>
|
|
||||||
<file>page_9.png</file>
|
|
||||||
<file>page_10.png</file>
|
|
||||||
<file>page_11.png</file>
|
|
||||||
<file>page_12.png</file>
|
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
Before Width: | Height: | Size: 409 B |
Before Width: | Height: | Size: 357 B |
Before Width: | Height: | Size: 357 B |
Before Width: | Height: | Size: 357 B |
Before Width: | Height: | Size: 396 B |
Before Width: | Height: | Size: 388 B |
Before Width: | Height: | Size: 390 B |
Before Width: | Height: | Size: 400 B |
Before Width: | Height: | Size: 357 B |
Before Width: | Height: | Size: 357 B |
Before Width: | Height: | Size: 357 B |
Before Width: | Height: | Size: 357 B |
Before Width: | Height: | Size: 406 B |
Before Width: | Height: | Size: 402 B |