This commit is contained in:
Jon Tibble 2010-08-29 00:52:10 +01:00
parent 0abf1597eb
commit 9a1ed78fd5
6 changed files with 33 additions and 23 deletions

View File

@ -343,10 +343,10 @@ def build_lyrics(item):
shadow = u'display: none;'
if theme:
lyricscommon = u'width: %spx; height: %spx; word-wrap: break-word; ' \
u'font-family: %s; font-size: %spx; color: %s; line-height: %d%%;' % \
(item.main.width(), item.main.height(),
theme.font_main_name, theme.font_main_proportion,
theme.font_main_color, 100 + int(theme.font_main_line_adjustment))
u'font-family: %s; font-size: %spx; color: %s; line-height: %d%%;' \
% (item.main.width(), item.main.height(), theme.font_main_name,
theme.font_main_proportion, theme.font_main_color,
100 + int(theme.font_main_line_adjustment))
lyricstable = u'left: %spx; top: %spx;' % \
(item.main.x(), item.main.y())
outlinetable = u'left: %spx; top: %spx;' % \
@ -375,7 +375,7 @@ def build_lyrics(item):
theme.display_outline_color)
if theme.display_shadow:
shadow = u'-webkit-text-stroke: %sem %s; ' \
u'-webkit-text-fill-color: %s; '% \
u'-webkit-text-fill-color: %s; ' % \
(float(theme.display_outline_size) / 16,
theme.display_shadow_color, theme.display_shadow_color)
else:

View File

@ -200,7 +200,7 @@ class RenderManager(object):
serviceItem.raw_footer = footer
serviceItem.render(True)
self.display.buildHtml(serviceItem)
frame, raw_html = serviceItem.get_rendered_frame(0)
raw_html = serviceItem.get_rendered_frame(0)[1]
preview = self.display.text(raw_html)
# Reset the real screen size for subsequent render requests
self.calculate_default(self.screens.current[u'size'])

View File

@ -53,8 +53,9 @@ class SpellTextEdit(QtGui.QPlainTextEdit):
if event.button() == QtCore.Qt.RightButton:
# Rewrite the mouse event to a left button event so the cursor is
# moved to the location of the pointer.
event = QtGui.QMouseEvent(QtCore.QEvent.MouseButtonPress, event.pos(),
QtCore.Qt.LeftButton, QtCore.Qt.LeftButton, QtCore.Qt.NoModifier)
event = QtGui.QMouseEvent(QtCore.QEvent.MouseButtonPress,
event.pos(), QtCore.Qt.LeftButton, QtCore.Qt.LeftButton,
QtCore.Qt.NoModifier)
QtGui.QPlainTextEdit.mousePressEvent(self, event)
def contextMenuEvent(self, event):

View File

@ -94,8 +94,10 @@ class Ui_MainWindow(object):
self.ControlSplitter.setObjectName(u'ControlSplitter')
self.MainContentLayout.addWidget(self.ControlSplitter)
# Create slide controllers
self.PreviewController = SlideController(self, self.settingsmanager, self.screens)
self.LiveController = SlideController(self, self.settingsmanager, self.screens, True)
self.PreviewController = SlideController(self, self.settingsmanager,
self.screens)
self.LiveController = SlideController(self, self.settingsmanager,
self.screens, True)
# Create menu
self.MenuBar = QtGui.QMenuBar(MainWindow)
self.MenuBar.setGeometry(QtCore.QRect(0, 0, 1087, 27))

View File

@ -117,7 +117,8 @@ class SlideController(QtGui.QWidget):
self.split = 1
self.typePrefix = u'live'
else:
self.TypeLabel.setText(translate('OpenLP.SlideController', 'Preview'))
self.TypeLabel.setText(translate('OpenLP.SlideController',
'Preview'))
self.split = 0
self.typePrefix = u'preview'
self.TypeLabel.setStyleSheet(u'font-weight: bold; font-size: 12pt;')
@ -199,7 +200,8 @@ class SlideController(QtGui.QWidget):
QtCore.SIGNAL("triggered(bool)"), self.onThemeDisplay)
if self.screens.display_count > 1:
self.DesktopScreen = QtGui.QAction(QtGui.QIcon(
u':/slides/slide_desktop.png'), u'Show Desktop', self.HideMenu)
u':/slides/slide_desktop.png'), u'Show Desktop',
self.HideMenu)
self.DesktopScreen.setCheckable(True)
QtCore.QObject.connect(self.DesktopScreen,
QtCore.SIGNAL("triggered(bool)"), self.onHideDisplay)
@ -212,7 +214,8 @@ class SlideController(QtGui.QWidget):
self.Toolbar.addToolbarSeparator(u'Close Separator')
self.Toolbar.addToolbarButton(
u'Go Live', u':/general/general_live.png',
translate('OpenLP.SlideController', 'Move to live'), self.onGoLive)
translate('OpenLP.SlideController', 'Move to live'),
self.onGoLive)
self.Toolbar.addToolbarSeparator(u'Close Separator')
self.Toolbar.addToolbarButton(
u'Edit Song', u':/general/general_edit.png',
@ -233,7 +236,8 @@ class SlideController(QtGui.QWidget):
self.DelaySpinBox.setMaximum(180)
self.Toolbar.addToolbarWidget(
u'Image SpinBox', self.DelaySpinBox)
self.DelaySpinBox.setSuffix(translate('OpenLP.SlideController', 's'))
self.DelaySpinBox.setSuffix(translate('OpenLP.SlideController',
's'))
self.DelaySpinBox.setToolTip(translate('OpenLP.SlideController',
'Delay between slides in seconds'))
self.ControllerLayout.addWidget(self.Toolbar)
@ -274,11 +278,13 @@ class SlideController(QtGui.QWidget):
# Build the Song Toolbar
if isLive:
self.SongMenu = QtGui.QToolButton(self.Toolbar)
self.SongMenu.setText(translate('OpenLP.SlideController', 'Go to Verse'))
self.SongMenu.setText(translate('OpenLP.SlideController',
'Go to Verse'))
self.SongMenu.setPopupMode(QtGui.QToolButton.InstantPopup)
self.Toolbar.addToolbarWidget(u'Song Menu', self.SongMenu)
self.SongMenu.setMenu(QtGui.QMenu(
translate('OpenLP.SlideController', 'Go to Verse'), self.Toolbar))
translate('OpenLP.SlideController', 'Go to Verse'),
self.Toolbar))
self.Toolbar.makeWidgetsInvisible([u'Song Menu'])
# Screen preview area
self.PreviewFrame = QtGui.QFrame(self.Splitter)

View File

@ -465,9 +465,9 @@ class BibleMediaItem(MediaManagerItem):
self.displayResults(bible, dual_bible)
def generateSlideData(self, service_item, item=None):
'''
"""
Generates and formats the slides for the service item.
'''
"""
log.debug(u'generating slide data')
items = self.listView.selectedIndexes()
if len(items) == 0:
@ -551,7 +551,8 @@ class BibleMediaItem(MediaManagerItem):
if isinstance(reference, QtCore.QVariant):
reference = reference.toPyObject()
bible_new = self._decodeQtObject(reference, 'bible')
dual_bible_new = self._decodeQtObject(reference, 'dual_bible')
dual_bible_new = self._decodeQtObject(reference,
'dual_bible')
if dual_bible_new:
raw_slides.append(bible_text)
bible_text = u''
@ -639,10 +640,10 @@ class BibleMediaItem(MediaManagerItem):
combo.addItem(unicode(i))
def displayResults(self, bible, dual_bible=None):
'''
Displays the search results in the media manager. All data needed for further
action is saved for/in each row.
'''
"""
Displays the search results in the media manager. All data needed for
further action is saved for/in each row.
"""
version = self.parent.manager.get_meta_data(bible, u'Version')
copyright = self.parent.manager.get_meta_data(bible, u'Copyright')
#permission = self.parent.manager.get_meta_data(bible, u'Permissions')