merge r1320

This commit is contained in:
Armin Köhler 2011-02-21 14:49:07 +01:00
commit b55ed9b471
23 changed files with 540 additions and 431 deletions

View File

@ -18,3 +18,4 @@ translate OpenLP, have a look at the OpenLP wiki::
http://wiki.openlp.org/ http://wiki.openlp.org/
Thanks for downloading OpenLP 2.0! Thanks for downloading OpenLP 2.0!

View File

@ -188,7 +188,8 @@ class OpenLP(QtGui.QApplication):
u'primary': (self.desktop().primaryScreen() == screen)}) u'primary': (self.desktop().primaryScreen() == screen)})
log.info(u'Screen %d found with resolution %s', screen, size) log.info(u'Screen %d found with resolution %s', screen, size)
# start the main app window # start the main app window
self.mainWindow = MainWindow(screens, app_version) self.appClipboard = self.clipboard()
self.mainWindow = MainWindow(screens, app_version, self.appClipboard)
self.mainWindow.show() self.mainWindow.show()
if show_splash: if show_splash:
# now kill the splashscreen # now kill the splashscreen

View File

@ -69,6 +69,7 @@ class ImageManager(QtCore.QObject):
log.info(u'Image Manager loaded') log.info(u'Image Manager loaded')
def __init__(self): def __init__(self):
QtCore.QObject.__init__(self)
self._cache = {} self._cache = {}
self._thread_running = False self._thread_running = False
self._cache_dirty = False self._cache_dirty = False

View File

@ -456,7 +456,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
actionList = ActionList() actionList = ActionList()
def __init__(self, screens, applicationVersion): def __init__(self, screens, applicationVersion, clipboard):
""" """
This constructor sets up the interface, the various managers, and the This constructor sets up the interface, the various managers, and the
plugins. plugins.
@ -465,6 +465,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
self.screens = screens self.screens = screens
self.actionList = ActionList() self.actionList = ActionList()
self.applicationVersion = applicationVersion self.applicationVersion = applicationVersion
self.clipboard = clipboard
# Set up settings sections for the main application # Set up settings sections for the main application
# (not for use by plugins) # (not for use by plugins)
self.uiSettingsSection = u'user interface' self.uiSettingsSection = u'user interface'

View File

@ -0,0 +1,164 @@
# -*- coding: utf-8 -*-
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
# Carsten Tinggaard, Frode Woldsund #
# --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it #
# under the terms of the GNU General Public License as published by the Free #
# Software Foundation; version 2 of the License. #
# #
# This program is distributed in the hope that it will be useful, but WITHOUT #
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
# more details. #
# #
# You should have received a copy of the GNU General Public License along #
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
###############################################################################
from PyQt4 import QtCore, QtGui
from openlp.core.lib import build_icon, translate, SpellTextEdit
from openlp.core.lib.ui import UiStrings
class ZoomSize():
"""
Type enumeration for Combo Box sizes
"""
Page = 0
Width = 1
OneHundred = 2
SeventyFive = 3
Fifty = 4
TwentyFive = 5
Sizes = [
translate('OpenLP.PrintServiceDialog', 'Fit Page'),
translate('OpenLP.PrintServiceDialog', 'Fit Width'),
u'100%', u'75%', u'50%', u'25%']
class Ui_PrintServiceDialog(object):
def setupUi(self, printServiceDialog):
printServiceDialog.setObjectName(u'printServiceDialog')
printServiceDialog.resize(664, 594)
self.mainLayout = QtGui.QVBoxLayout(printServiceDialog)
self.mainLayout.setSpacing(0)
self.mainLayout.setMargin(0)
self.mainLayout.setObjectName(u'mainLayout')
self.toolbar = QtGui.QToolBar(printServiceDialog)
self.toolbar.setIconSize(QtCore.QSize(22, 22))
self.toolbar.setToolButtonStyle(QtCore.Qt.ToolButtonTextBesideIcon)
self.printButton = self.toolbar.addAction(
build_icon(u':/general/general_print.png'), 'Print')
self.optionsButton = QtGui.QToolButton(self.toolbar)
self.optionsButton.setText(translate('OpenLP.PrintServiceForm',
'Options'))
self.optionsButton.setToolButtonStyle(
QtCore.Qt.ToolButtonTextBesideIcon)
self.optionsButton.setIcon(QtGui.QIcon(
build_icon(u':/system/system_configure.png')))
self.optionsButton.setCheckable(True)
self.toolbar.addWidget(self.optionsButton)
self.closeButton = self.toolbar.addAction(
build_icon(u':/system/system_close.png'),
translate('OpenLP.PrintServiceForm', 'Close'))
self.toolbar.addSeparator()
self.plainCopy = self.toolbar.addAction(
build_icon(u':/system/system_edit_copy.png'),
translate('OpenLP.PrintServiceForm', 'Copy'))
self.htmlCopy = self.toolbar.addAction(
build_icon(u':/system/system_edit_copy.png'),
translate('OpenLP.PrintServiceForm', 'Copy as HTML'))
self.toolbar.addSeparator()
self.zoomInButton = QtGui.QToolButton(self.toolbar)
self.zoomInButton.setIcon(QtGui.QIcon(
build_icon(u':/general/general_zoom_in.png')))
self.zoomInButton.setToolTip(translate('OpenLP.PrintServiceForm',
'Zoom In'))
self.zoomInButton.setObjectName(u'zoomInButton')
self.zoomInButton.setIconSize(QtCore.QSize(22, 22))
self.toolbar.addWidget(self.zoomInButton)
self.zoomOutButton = QtGui.QToolButton(self.toolbar)
self.zoomOutButton.setIcon(QtGui.QIcon(
build_icon(u':/general/general_zoom_out.png')))
self.zoomOutButton.setToolTip(translate('OpenLP.PrintServiceForm',
'Zoom Out'))
self.zoomOutButton.setObjectName(u'zoomOutButton')
self.zoomOutButton.setIconSize(QtCore.QSize(22, 22))
self.toolbar.addWidget(self.zoomOutButton)
self.zoomOriginalButton = QtGui.QToolButton(self.toolbar)
self.zoomOriginalButton.setIcon(QtGui.QIcon(
build_icon(u':/general/general_zoom_original.png')))
self.zoomOriginalButton.setToolTip(translate('OpenLP.PrintServiceForm',
'Zoom Original'))
self.zoomOriginalButton.setObjectName(u'zoomOriginalButton')
self.zoomOriginalButton.setIconSize(QtCore.QSize(22, 22))
self.toolbar.addWidget(self.zoomOriginalButton)
self.zoomComboBox = QtGui.QComboBox(printServiceDialog)
self.zoomComboBox.setObjectName(u'zoomComboBox')
self.toolbar.addWidget(self.zoomComboBox)
self.mainLayout.addWidget(self.toolbar)
self.previewWidget = QtGui.QPrintPreviewWidget(printServiceDialog)
self.mainLayout.addWidget(self.previewWidget)
self.optionsWidget = QtGui.QWidget(printServiceDialog)
self.optionsWidget.hide()
self.optionsWidget.resize(400, 300)
self.optionsWidget.setAutoFillBackground(True)
self.optionsLayout = QtGui.QVBoxLayout(self.optionsWidget)
self.optionsLayout.setContentsMargins(8, 8, 8, 8)
self.titleLabel = QtGui.QLabel(self.optionsWidget)
self.titleLabel.setObjectName(u'titleLabel')
self.titleLabel.setText(u'Title:')
self.optionsLayout.addWidget(self.titleLabel)
self.titleLineEdit = QtGui.QLineEdit(self.optionsWidget)
self.titleLineEdit.setObjectName(u'titleLineEdit')
self.optionsLayout.addWidget(self.titleLineEdit)
self.footerLabel = QtGui.QLabel(self.optionsWidget)
self.footerLabel.setObjectName(u'footerLabel')
self.footerLabel.setText(u'Custom Footer Text:')
self.optionsLayout.addWidget(self.footerLabel)
self.footerTextEdit = SpellTextEdit(self.optionsWidget)
self.footerTextEdit.setObjectName(u'footerTextEdit')
self.optionsLayout.addWidget(self.footerTextEdit)
self.optionsGroupBox = QtGui.QGroupBox(
translate('OpenLP.PrintServiceForm','Other Options'))
self.groupLayout = QtGui.QVBoxLayout()
self.slideTextCheckBox = QtGui.QCheckBox()
self.groupLayout.addWidget(self.slideTextCheckBox)
self.notesCheckBox = QtGui.QCheckBox()
self.groupLayout.addWidget(self.notesCheckBox)
self.metaDataCheckBox = QtGui.QCheckBox()
self.groupLayout.addWidget(self.metaDataCheckBox)
self.groupLayout.addStretch(1)
self.optionsGroupBox.setLayout(self.groupLayout)
self.optionsLayout.addWidget(self.optionsGroupBox)
self.retranslateUi(printServiceDialog)
QtCore.QMetaObject.connectSlotsByName(printServiceDialog)
QtCore.QObject.connect(self.optionsButton,
QtCore.SIGNAL(u'toggled(bool)'), self.toggleOptions)
def retranslateUi(self, printServiceDialog):
printServiceDialog.setWindowTitle(UiStrings.PrintServiceOrder)
self.slideTextCheckBox.setText(translate('OpenLP.PrintServiceForm',
'Include slide text if available'))
self.notesCheckBox.setText(translate('OpenLP.PrintServiceForm',
'Include service item notes'))
self.metaDataCheckBox.setText(translate('OpenLP.PrintServiceForm',
'Include play length of media items'))
self.titleLineEdit.setText(translate('OpenLP.PrintServiceForm',
'Service Order Sheet'))
self.zoomComboBox.addItem(ZoomSize.Sizes[ZoomSize.Page])
self.zoomComboBox.addItem(ZoomSize.Sizes[ZoomSize.Width])
self.zoomComboBox.addItem(ZoomSize.Sizes[ZoomSize.OneHundred])
self.zoomComboBox.addItem(ZoomSize.Sizes[ZoomSize.SeventyFive])
self.zoomComboBox.addItem(ZoomSize.Sizes[ZoomSize.Fifty])
self.zoomComboBox.addItem(ZoomSize.Sizes[ZoomSize.TwentyFive])

View File

@ -28,51 +28,65 @@ import datetime
from PyQt4 import QtCore, QtGui from PyQt4 import QtCore, QtGui
from openlp.core.lib import translate from openlp.core.lib import translate
from openlp.core.ui.printserviceorderdialog import Ui_PrintServiceOrderDialog from openlp.core.lib.ui import UiStrings
from openlp.core.ui.printservicedialog import Ui_PrintServiceDialog, ZoomSize
class PrintServiceForm(QtGui.QDialog, Ui_PrintServiceDialog):
class PrintServiceOrderForm(QtGui.QDialog, Ui_PrintServiceOrderDialog):
def __init__(self, parent, serviceManager): def __init__(self, parent, serviceManager):
""" """
Constructor Constructor
""" """
QtGui.QDialog.__init__(self, parent) QtGui.QDialog.__init__(self, parent)
self.parent = parent
self.serviceManager = serviceManager self.serviceManager = serviceManager
self.printer = QtGui.QPrinter() self.printer = QtGui.QPrinter()
self.printDialog = QtGui.QPrintDialog(self.printer, self) self.printDialog = QtGui.QPrintDialog(self.printer, self)
self.document = QtGui.QTextDocument() self.document = QtGui.QTextDocument()
self.zoom = 0
self.setupUi(self) self.setupUi(self)
# Load the settings for the dialog. # Load the settings for the dialog.
settings = QtCore.QSettings() settings = QtCore.QSettings()
settings.beginGroup(u'advanced') settings.beginGroup(u'advanced')
self.printSlideTextCheckBox.setChecked(settings.value( self.slideTextCheckBox.setChecked(settings.value(
u'print slide text', QtCore.QVariant(False)).toBool()) u'print slide text', QtCore.QVariant(False)).toBool())
self.printMetaDataCheckBox.setChecked(settings.value( self.metaDataCheckBox.setChecked(settings.value(
u'print file meta data', QtCore.QVariant(False)).toBool()) u'print file meta data', QtCore.QVariant(False)).toBool())
self.printNotesCheckBox.setChecked(settings.value( self.notesCheckBox.setChecked(settings.value(
u'print notes', QtCore.QVariant(False)).toBool()) u'print notes', QtCore.QVariant(False)).toBool())
self.zoomComboBox.setCurrentIndex(settings.value(
u'display size', QtCore.QVariant(0)).toInt()[0])
settings.endGroup() settings.endGroup()
# Signals # Signals
QtCore.QObject.connect(self.printButton, QtCore.QObject.connect(self.printButton,
QtCore.SIGNAL(u'clicked()'), self.printServiceOrder) QtCore.SIGNAL(u'triggered()'), self.printServiceOrder)
QtCore.QObject.connect(self.closeButton,
QtCore.SIGNAL(u'triggered()'), self.accept)
QtCore.QObject.connect(self.zoomOutButton, QtCore.QObject.connect(self.zoomOutButton,
QtCore.SIGNAL(u'clicked()'), self.zoomOut) QtCore.SIGNAL(u'clicked()'), self.zoomOut)
QtCore.QObject.connect(self.zoomInButton, QtCore.QObject.connect(self.zoomInButton,
QtCore.SIGNAL(u'clicked()'), self.zoomIn) QtCore.SIGNAL(u'clicked()'), self.zoomIn)
QtCore.QObject.connect(self.zoomOriginalButton,
QtCore.SIGNAL(u'clicked()'), self.zoomOriginal)
QtCore.QObject.connect(self.previewWidget, QtCore.QObject.connect(self.previewWidget,
QtCore.SIGNAL(u'paintRequested(QPrinter *)'), self.paintRequested) QtCore.SIGNAL(u'paintRequested(QPrinter *)'), self.paintRequested)
QtCore.QObject.connect(self.serviceTitleLineEdit, QtCore.QObject.connect(self.zoomComboBox,
QtCore.SIGNAL(u'textChanged(const QString)'), QtCore.SIGNAL(u'currentIndexChanged(int)'), self.displaySizeChanged)
self.updatePreviewText) QtCore.QObject.connect(self.plainCopy,
QtCore.QObject.connect(self.printSlideTextCheckBox, QtCore.SIGNAL(u'triggered()'), self.copyText)
QtCore.SIGNAL(u'stateChanged(int)'), self.updatePreviewText) QtCore.QObject.connect(self.htmlCopy,
QtCore.QObject.connect(self.printNotesCheckBox, QtCore.SIGNAL(u'triggered()'), self.copyHtmlText)
QtCore.SIGNAL(u'stateChanged(int)'), self.updatePreviewText) self.updatePreviewText()
QtCore.QObject.connect(self.printMetaDataCheckBox,
QtCore.SIGNAL(u'stateChanged(int)'), self.updatePreviewText) def toggleOptions(self, checked):
QtCore.QObject.connect(self.customNoteEdit, self.optionsWidget.setVisible(checked)
QtCore.SIGNAL(u'textChanged()'), self.updatePreviewText) if checked:
QtCore.QObject.connect(self.cancelButton, left = self.optionsButton.pos().x()
QtCore.SIGNAL(u'clicked()'), self.reject) top = self.toolbar.height()
self.optionsWidget.move(left, top)
self.titleLineEdit.setFocus()
else:
self.saveOptions()
self.updatePreviewText() self.updatePreviewText()
def updatePreviewText(self): def updatePreviewText(self):
@ -80,19 +94,28 @@ class PrintServiceOrderForm(QtGui.QDialog, Ui_PrintServiceOrderDialog):
Creates the html text and updates the html of *self.document*. Creates the html text and updates the html of *self.document*.
""" """
text = u'' text = u''
if self.serviceTitleLineEdit.text(): if self.titleLineEdit.text():
text += u'<h2>%s</h2>' % unicode(self.serviceTitleLineEdit.text()) text += u'<h2>%s</h2>' % unicode(self.titleLineEdit.text())
for item in self.serviceManager.serviceItems: for item in self.serviceManager.serviceItems:
item = item[u'service_item'] item = item[u'service_item']
# Add the title of the service item. # Add the title of the service item.
text += u'<h4><img src="%s" /> %s</h4>' % (item.icon, text += u'<h3><img src="%s" /> %s</h3>' % (item.icon,
item.get_display_title()) item.get_display_title())
# Add slide text of the service item. # Add slide text of the service item.
if self.printSlideTextCheckBox.isChecked(): if self.slideTextCheckBox.isChecked():
if item.is_text(): if item.is_text():
# Add the text of the service item. # Add the text of the service item.
verse = None
for slide in item.get_frames(): for slide in item.get_frames():
text += u'<p>' + slide[u'text'] + u'</p>' if not verse:
text += u'<p>' + slide[u'html']
verse = slide[u'verseTag']
elif verse != slide[u'verseTag']:
text += u'<\p><p>' + slide[u'html']
verse = slide[u'verseTag']
else:
text += u'<br/>' + slide[u'html']
text += u'</p>'
elif item.is_image(): elif item.is_image():
# Add the image names of the service item. # Add the image names of the service item.
text += u'<ol>' text += u'<ol>'
@ -104,19 +127,19 @@ class PrintServiceOrderForm(QtGui.QDialog, Ui_PrintServiceOrderDialog):
# add footer # add footer
text += u'<p>%s</p>' % item.foot_text text += u'<p>%s</p>' % item.foot_text
# Add service items' notes. # Add service items' notes.
if self.printNotesCheckBox.isChecked(): if self.notesCheckBox.isChecked():
if item.notes: if item.notes:
text += u'<p><b>%s</b></p>%s' % (translate( text += u'<p><strong>%s</strong></p>%s' % (translate(
'OpenLP.ServiceManager', 'Notes:'), 'OpenLP.ServiceManager', 'Notes:'),
item.notes.replace(u'\n', u'<br />')) item.notes.replace(u'\n', u'<br />'))
# Add play length of media files. # Add play length of media files.
if item.is_media() and self.printMetaDataCheckBox.isChecked(): if item.is_media() and self.metaDataCheckBox.isChecked():
text += u'<p><b>%s</b> %s</p>' % (translate( text += u'<p><strong>%s</strong> %s</p>' % (translate(
'OpenLP.ServiceManager', u'Playing time:'), 'OpenLP.ServiceManager', u'Playing time:'),
unicode(datetime.timedelta(seconds=item.media_length))) unicode(datetime.timedelta(seconds=item.media_length)))
if self.customNoteEdit.toPlainText(): if self.footerTextEdit.toPlainText():
text += u'<h4>%s</h4>%s' % (translate('OpenLP.ServiceManager', text += u'<h4>%s</h4>%s' % (translate('OpenLP.ServiceManager',
u'Custom Service Notes:'), self.customNoteEdit.toPlainText()) u'Custom Service Notes:'), self.footerTextEdit.toPlainText())
self.document.setHtml(text) self.document.setHtml(text)
self.previewWidget.updatePreview() self.previewWidget.updatePreview()
@ -129,6 +152,43 @@ class PrintServiceOrderForm(QtGui.QDialog, Ui_PrintServiceOrderDialog):
""" """
self.document.print_(printer) self.document.print_(printer)
def displaySizeChanged(self, display):
"""
The Zoom Combo box has changed so set up the size.
"""
if display == ZoomSize.Page:
self.previewWidget.fitInView()
elif display == ZoomSize.Width:
self.previewWidget.fitToWidth()
elif display == ZoomSize.OneHundred:
self.previewWidget.fitToWidth()
self.previewWidget.zoomIn(1)
elif display == ZoomSize.SeventyFive:
self.previewWidget.fitToWidth()
self.previewWidget.zoomIn(0.75)
elif display == ZoomSize.Fifty:
self.previewWidget.fitToWidth()
self.previewWidget.zoomIn(0.5)
elif display == ZoomSize.TwentyFive:
self.previewWidget.fitToWidth()
self.previewWidget.zoomIn(0.25)
settings = QtCore.QSettings()
settings.beginGroup(u'advanced')
settings.setValue(u'display size',QtCore.QVariant(display))
settings.endGroup()
def copyText(self):
"""
Copies the display text to the clipboard as plain text
"""
self.parent.clipboard.setText(self.document.toPlainText())
def copyHtmlText(self):
"""
Copies the display text to the clipboard as Html
"""
self.parent.clipboard.setText(self.document.toHtml())
def printServiceOrder(self): def printServiceOrder(self):
""" """
Called, when the *printButton* is clicked. Opens the *printDialog*. Called, when the *printButton* is clicked. Opens the *printDialog*.
@ -137,21 +197,38 @@ class PrintServiceOrderForm(QtGui.QDialog, Ui_PrintServiceOrderDialog):
return return
# Print the document. # Print the document.
self.document.print_(self.printer) self.document.print_(self.printer)
self.accept()
def zoomIn(self): def zoomIn(self):
""" """
Called when *zoomInButton* is clicked. Called when *zoomInButton* is clicked.
""" """
self.previewWidget.zoomIn() self.previewWidget.zoomIn()
self.zoom -= 0.1
def zoomOut(self): def zoomOut(self):
""" """
Called when *zoomOutButton* is clicked. Called when *zoomOutButton* is clicked.
""" """
self.previewWidget.zoomOut() self.previewWidget.zoomOut()
self.zoom += 0.1
def accept(self): def zoomOriginal(self):
"""
Called when *zoomOutButton* is clicked.
"""
self.previewWidget.zoomIn(1 + self.zoom)
self.zoom = 0
def updateTextFormat(self, value):
"""
Called when html copy check box is selected.
"""
if value == QtCore.Qt.Checked:
self.copyTextButton.setText(UiStrings.CopyToHtml)
else:
self.copyTextButton.setText(UiStrings.CopyToText)
def saveOptions(self):
""" """
Save the settings and close the dialog. Save the settings and close the dialog.
""" """
@ -159,17 +236,9 @@ class PrintServiceOrderForm(QtGui.QDialog, Ui_PrintServiceOrderDialog):
settings = QtCore.QSettings() settings = QtCore.QSettings()
settings.beginGroup(u'advanced') settings.beginGroup(u'advanced')
settings.setValue(u'print slide text', settings.setValue(u'print slide text',
QtCore.QVariant(self.printSlideTextCheckBox.isChecked())) QtCore.QVariant(self.slideTextCheckBox.isChecked()))
settings.setValue(u'print file meta data', settings.setValue(u'print file meta data',
QtCore.QVariant(self.printMetaDataCheckBox.isChecked())) QtCore.QVariant(self.metaDataCheckBox.isChecked()))
settings.setValue(u'print notes', settings.setValue(u'print notes',
QtCore.QVariant(self.printNotesCheckBox.isChecked())) QtCore.QVariant(self.notesCheckBox.isChecked()))
settings.endGroup() settings.endGroup()
# Close the dialog.
return QtGui.QDialog.accept(self)
def reject(self):
"""
Close the dialog, do not print the service and do not save the settings.
"""
return QtGui.QDialog.reject(self)

View File

@ -1,137 +0,0 @@
# -*- coding: utf-8 -*-
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
# Carsten Tinggaard, Frode Woldsund #
# --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it #
# under the terms of the GNU General Public License as published by the Free #
# Software Foundation; version 2 of the License. #
# #
# This program is distributed in the hope that it will be useful, but WITHOUT #
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
# more details. #
# #
# You should have received a copy of the GNU General Public License along #
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
###############################################################################
from PyQt4 import QtCore, QtGui
from openlp.core.lib import build_icon, translate, SpellTextEdit
from openlp.core.lib.ui import UiStrings
class Ui_PrintServiceOrderDialog(object):
def setupUi(self, printServiceOrderDialog):
printServiceOrderDialog.setObjectName(u'printServiceOrderDialog')
self.dialogLayout = QtGui.QGridLayout(printServiceOrderDialog)
self.dialogLayout.setObjectName(u'dialogLayout')
self.perviewLayout = QtGui.QVBoxLayout()
self.perviewLayout.setObjectName(u'perviewLayout')
self.previewLabel = QtGui.QLabel(printServiceOrderDialog)
self.previewLabel.setSizePolicy(
QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
self.previewLabel.setObjectName(u'previewLabel')
self.perviewLayout.addWidget(self.previewLabel)
self.previewWidget = QtGui.QPrintPreviewWidget(
self.printer, self, QtCore.Qt.Widget)
self.previewWidget.setEnabled(True)
self.previewWidget.setSizePolicy(
QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Expanding)
self.previewWidget.setObjectName(u'previewWidget')
# Give the previewWidget a fixed size, to prevent resizing when clicking
# the zoom buttons.
self.previewWidget.setFixedWidth(350)
self.perviewLayout.addWidget(self.previewWidget)
self.dialogLayout.addLayout(self.perviewLayout, 0, 0, 1, 1)
self.settingsLayout = QtGui.QVBoxLayout()
self.settingsLayout.setObjectName(u'settingsLayout')
self.serviceTitleLayout = QtGui.QGridLayout()
self.serviceTitleLayout.setObjectName(u'serviceTitleLayout')
self.serviceTitleLineEdit = QtGui.QLineEdit(printServiceOrderDialog)
self.serviceTitleLineEdit.setSizePolicy(
QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Preferred)
self.serviceTitleLineEdit.setObjectName(u'serviceTitleLineEdit')
self.serviceTitleLayout.addWidget(self.serviceTitleLineEdit, 1, 1, 1, 1)
self.serviceTitleLabel = QtGui.QLabel(printServiceOrderDialog)
self.serviceTitleLabel.setSizePolicy(
QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
self.serviceTitleLabel.setObjectName(u'serviceTitleLabel')
self.serviceTitleLayout.addWidget(self.serviceTitleLabel, 1, 0, 1, 1)
self.settingsLayout.addLayout(self.serviceTitleLayout)
self.printSlideTextCheckBox = QtGui.QCheckBox(printServiceOrderDialog)
self.printSlideTextCheckBox.setObjectName(u'printSlideTextCheckBox')
self.settingsLayout.addWidget(self.printSlideTextCheckBox)
self.printNotesCheckBox = QtGui.QCheckBox(printServiceOrderDialog)
self.printNotesCheckBox.setObjectName(u'printNotesCheckBox')
self.settingsLayout.addWidget(self.printNotesCheckBox)
self.printMetaDataCheckBox = QtGui.QCheckBox(printServiceOrderDialog)
self.printMetaDataCheckBox.setObjectName(u'printMetaDataCheckBox')
self.settingsLayout.addWidget(self.printMetaDataCheckBox)
spacerItem = QtGui.QSpacerItem(20, 40,
QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
self.settingsLayout.addItem(spacerItem)
self.customNotesLabel = QtGui.QLabel(self)
self.customNotesLabel.setObjectName(u'customNotesLabel')
self.settingsLayout.addWidget(self.customNotesLabel)
self.customNoteEdit = SpellTextEdit(self)
self.customNoteEdit.setObjectName(u'customNoteEdit')
self.settingsLayout.addWidget(self.customNoteEdit)
self.dialogLayout.addLayout(self.settingsLayout, 0, 3, 1, 1)
self.buttonLayout = QtGui.QHBoxLayout()
self.buttonLayout.setObjectName(u'buttonLayout')
spacerItem = QtGui.QSpacerItem(40, 20,
QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.buttonLayout.addItem(spacerItem)
self.cancelButton = QtGui.QPushButton(printServiceOrderDialog)
self.cancelButton.setObjectName(u'cancelButton')
self.buttonLayout.addWidget(self.cancelButton)
self.printButton = QtGui.QPushButton(printServiceOrderDialog)
self.printButton.setObjectName(u'printButton')
self.buttonLayout.addWidget(self.printButton)
self.dialogLayout.addLayout(self.buttonLayout, 1, 3, 1, 1)
self.zoomButtonLayout = QtGui.QHBoxLayout()
self.zoomButtonLayout.setObjectName(u'zoomButtonLayout')
spacerItem = QtGui.QSpacerItem(40, 20,
QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.zoomButtonLayout.addItem(spacerItem)
self.zoomOutButton = QtGui.QToolButton(printServiceOrderDialog)
self.zoomOutButton.setIcon(
build_icon(u':/general/general_zoom_out.png'))
self.zoomOutButton.setObjectName(u'zoomOutButton')
self.zoomButtonLayout.addWidget(self.zoomOutButton)
self.zoomInButton = QtGui.QToolButton(printServiceOrderDialog)
self.zoomInButton.setIcon(build_icon(u':/general/general_zoom_in.png'))
self.zoomInButton.setObjectName(u'zoomInButton')
self.zoomButtonLayout.addWidget(self.zoomInButton)
self.dialogLayout.addLayout(self.zoomButtonLayout, 1, 0, 1, 1)
self.retranslateUi(printServiceOrderDialog)
QtCore.QMetaObject.connectSlotsByName(printServiceOrderDialog)
def retranslateUi(self, printServiceOrderDialog):
printServiceOrderDialog.setWindowTitle(UiStrings.PrintServiceOrder)
self.previewLabel.setText(
translate('OpenLP.ServiceManager', '<b>Preview:</b>'))
self.printSlideTextCheckBox.setText(translate(
'OpenLP.PrintServiceOrderForm', 'Include slide text if available'))
self.printNotesCheckBox.setText(translate(
'OpenLP.PrintServiceOrderForm', 'Include service item notes'))
self.printMetaDataCheckBox.setText(
translate('OpenLP.PrintServiceOrderForm',
'Include play length of media items'))
self.serviceTitleLabel.setText(translate(
'OpenLP.PrintServiceOrderForm', 'Title:'))
self.serviceTitleLineEdit.setText(translate('OpenLP.ServiceManager',
'Service Order Sheet'))
self.printButton.setText(translate('OpenLP.ServiceManager', 'Print'))
self.cancelButton.setText(UiStrings.Cancel)
self.customNotesLabel.setText(
translate('OpenLP.ServiceManager', '<b>Custom Service Notes:</b>'))

View File

@ -37,7 +37,7 @@ from openlp.core.lib import OpenLPToolbar, ServiceItem, context_menu_action, \
from openlp.core.lib.theme import ThemeLevel from openlp.core.lib.theme import ThemeLevel
from openlp.core.lib.ui import UiStrings, critical_error_message_box from openlp.core.lib.ui import UiStrings, critical_error_message_box
from openlp.core.ui import ServiceNoteForm, ServiceItemEditForm, StartTimeForm from openlp.core.ui import ServiceNoteForm, ServiceItemEditForm, StartTimeForm
from openlp.core.ui.printserviceorderform import PrintServiceOrderForm from openlp.core.ui.printserviceform import PrintServiceForm
from openlp.core.utils import AppLocation, delete_file, file_is_unicode, \ from openlp.core.utils import AppLocation, delete_file, file_is_unicode, \
split_filename split_filename
@ -1207,5 +1207,5 @@ class ServiceManager(QtGui.QWidget):
""" """
Print a Service Order Sheet. Print a Service Order Sheet.
""" """
settingDialog = PrintServiceOrderForm(self.mainwindow, self) settingDialog = PrintServiceForm(self.mainwindow, self)
settingDialog.exec_() settingDialog.exec_()

View File

@ -60,8 +60,9 @@ class MediaMediaItem(MediaManagerItem):
def retranslateUi(self): def retranslateUi(self):
self.onNewPrompt = translate('MediaPlugin.MediaItem', 'Select Media') self.onNewPrompt = translate('MediaPlugin.MediaItem', 'Select Media')
self.onNewFileMasks = unicode(translate('MediaPlugin.MediaItem', self.onNewFileMasks = unicode(translate('MediaPlugin.MediaItem',
'Videos (%s);;Audio (%s);;%s (*)')) % (self.parent.video_list, 'Videos (%s);;Audio (%s);;%s (*)')) % (
self.parent.audio_list, UiStrings.AllFiles) u' '.join(self.parent.video_list),
u' '.join(self.parent.audio_list), UiStrings.AllFiles)
self.replaceAction.setText(UiStrings.ReplaceBG) self.replaceAction.setText(UiStrings.ReplaceBG)
self.replaceAction.setToolTip(UiStrings.ReplaceLiveBG) self.replaceAction.setToolTip(UiStrings.ReplaceLiveBG)
self.resetAction.setText(UiStrings.ResetBG) self.resetAction.setText(UiStrings.ResetBG)

View File

@ -45,36 +45,28 @@ class MediaPlugin(Plugin):
self.icon = build_icon(self.icon_path) self.icon = build_icon(self.icon_path)
# passed with drag and drop messages # passed with drag and drop messages
self.dnd_id = u'Media' self.dnd_id = u'Media'
self.audio_list = u'' self.audio_list = []
self.video_list = u'' self.video_list = []
mimetypes.init() mimetypes.init()
for mimetype in Phonon.BackendCapabilities.availableMimeTypes(): for mimetype in Phonon.BackendCapabilities.availableMimeTypes():
mimetype = unicode(mimetype) mimetype = unicode(mimetype)
type = mimetype.split(u'audio/x-') if mimetype.startswith(u'audio/'):
self.audio_list, mimetype = self._addToList(self.audio_list, self._addToList(self.audio_list, mimetype)
type, mimetype) elif mimetype.startswith(u'video/'):
type = mimetype.split(u'audio/') self._addToList(self.video_list, mimetype)
self.audio_list, mimetype = self._addToList(self.audio_list, log.info(u'MediaPlugin handles audio extensions: %s',
type, mimetype) u' '.join(self.audio_list))
type = mimetype.split(u'video/x-') log.info(u'MediaPlugin handles video extensions: %s',
self.video_list, mimetype = self._addToList(self.video_list, u' '.join(self.video_list))
type, mimetype)
type = mimetype.split(u'video/')
self.video_list, mimetype = self._addToList(self.video_list,
type, mimetype)
def _addToList(self, list, value, mimetype): def _addToList(self, list, mimetype):
# Is it a media type # Is it a media type
if len(value) == 2: extensions = mimetypes.guess_all_extensions(unicode(mimetype))
extensions = mimetypes.guess_all_extensions(unicode(mimetype)) for extension in extensions:
# we have an extension ext = u'*%s' % extension
if extensions: if ext not in list:
for extension in extensions: list.append(ext)
if list.find(extension) == -1: self.serviceManager.supportedSuffixes(extension[1:])
list += u'*%s ' % extension
self.serviceManager.supportedSuffixes(extension[1:])
mimetype = u''
return list, mimetype
def about(self): def about(self):
about_text = translate('MediaPlugin', '<strong>Media Plugin</strong>' about_text = translate('MediaPlugin', '<strong>Media Plugin</strong>'

View File

@ -677,8 +677,8 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
A button (QPushButton). A button (QPushButton).
""" """
log.debug(u'onPreview') log.debug(u'onPreview')
if unicode(button.objectName()) == u'previewButton' and \ if unicode(button.objectName()) == u'previewButton':
self.saveSong(True): self.saveSong(True)
Receiver.send_message(u'songs_preview') Receiver.send_message(u'songs_preview')
def clearCaches(self): def clearCaches(self):

View File

@ -254,9 +254,9 @@ class SongMediaItem(MediaManagerItem):
""" """
if self.searchAsYouType: if self.searchAsYouType:
search_length = 1 search_length = 1
if self.searchTextEdit.currentSearchType() == 1: if self.searchTextEdit.currentSearchType() == SongSearch.Entire:
search_length = 3 search_length = 3
elif self.searchTextEdit.currentSearchType() == 3: elif self.searchTextEdit.currentSearchType() == SongSearch.Lyrics:
search_length = 7 search_length = 7
if len(text) > search_length: if len(text) > search_length:
self.onSearchTextButtonClick() self.onSearchTextButtonClick()

View File

@ -245,6 +245,8 @@ class SongBeamerImport(SongImport):
self.song_number = u'' self.song_number = u''
elif tag_val[0] == u'#Speed': elif tag_val[0] == u'#Speed':
pass pass
elif tag_val[0] == u'Tempo':
pass
elif tag_val[0] == u'#TextAlign': elif tag_val[0] == u'#TextAlign':
pass pass
elif tag_val[0] == u'#Title': elif tag_val[0] == u'#Title':

View File

@ -54,6 +54,7 @@ class SongImport(QtCore.QObject):
""" """
self.manager = manager self.manager = manager
QtCore.QObject.__init__(self)
if kwargs.has_key(u'filename'): if kwargs.has_key(u'filename'):
self.import_source = kwargs[u'filename'] self.import_source = kwargs[u'filename']
elif kwargs.has_key(u'filenames'): elif kwargs.has_key(u'filenames'):

View File

@ -299,9 +299,9 @@ class OpenLyrics(object):
# Remove chords from xml. # Remove chords from xml.
xml = re.compile(u'<chord name=".*?"/>').sub(u'', xml) xml = re.compile(u'<chord name=".*?"/>').sub(u'', xml)
song_xml = objectify.fromstring(xml) song_xml = objectify.fromstring(xml)
try: if hasattr(song_xml, u'properties'):
properties = song_xml.properties properties = song_xml.properties
except AttributeError: else:
return None return None
song = Song() song = Song()
self._process_copyright(properties, song) self._process_copyright(properties, song)
@ -369,13 +369,11 @@ class OpenLyrics(object):
The song object. The song object.
""" """
authors = [] authors = []
try: if hasattr(properties, u'authors'):
for author in properties.authors.author: for author in properties.authors.author:
display_name = self._text(author) display_name = self._text(author)
if display_name: if display_name:
authors.append(display_name) authors.append(display_name)
except AttributeError:
pass
if not authors: if not authors:
authors.append(SongStrings.AuthorUnknownUnT) authors.append(SongStrings.AuthorUnknownUnT)
for display_name in authors: for display_name in authors:
@ -399,10 +397,8 @@ class OpenLyrics(object):
``song`` ``song``
The song object. The song object.
""" """
try: if hasattr(properties, u'ccliNo'):
song.ccli_number = self._text(properties.ccliNo) song.ccli_number = self._text(properties.ccliNo)
except AttributeError:
song.ccli_number = u''
def _process_comments(self, properties, song): def _process_comments(self, properties, song):
""" """
@ -414,15 +410,13 @@ class OpenLyrics(object):
``song`` ``song``
The song object. The song object.
""" """
try: if hasattr(properties, u'comments'):
comments_list = [] comments_list = []
for comment in properties.comments.comment: for comment in properties.comments.comment:
commenttext = self._text(comment) commenttext = self._text(comment)
if commenttext: if commenttext:
comments_list.append(commenttext) comments_list.append(commenttext)
song.comments = u'\n'.join(comments_list) song.comments = u'\n'.join(comments_list)
except AttributeError:
song.comments = u''
def _process_copyright(self, properties, song): def _process_copyright(self, properties, song):
""" """
@ -434,10 +428,8 @@ class OpenLyrics(object):
``song`` ``song``
The song object. The song object.
""" """
try: if hasattr(properties, u'copyright'):
song.copyright = self._text(properties.copyright) song.copyright = self._text(properties.copyright)
except AttributeError:
song.copyright = u''
def _process_lyrics(self, properties, lyrics, song): def _process_lyrics(self, properties, lyrics, song):
""" """
@ -478,9 +470,9 @@ class OpenLyrics(object):
song.search_lyrics = search_text.lower() song.search_lyrics = search_text.lower()
song.lyrics = unicode(sxml.extract_xml(), u'utf-8') song.lyrics = unicode(sxml.extract_xml(), u'utf-8')
# Process verse order # Process verse order
try: if hasattr(properties, u'verseOrder'):
song.verse_order = self._text(properties.verseOrder) song.verse_order = self._text(properties.verseOrder)
except AttributeError: else:
# We have to process the temp_verse_order, as the verseOrder # We have to process the temp_verse_order, as the verseOrder
# property is not present. # property is not present.
previous_type = u'' previous_type = u''
@ -511,7 +503,7 @@ class OpenLyrics(object):
""" """
song.song_book_id = 0 song.song_book_id = 0
song.song_number = u'' song.song_number = u''
try: if hasattr(properties, u'songbooks'):
for songbook in properties.songbooks.songbook: for songbook in properties.songbooks.songbook:
bookname = self._get(songbook, u'name') bookname = self._get(songbook, u'name')
if bookname: if bookname:
@ -522,15 +514,10 @@ class OpenLyrics(object):
book = Book.populate(name=bookname, publisher=u'') book = Book.populate(name=bookname, publisher=u'')
self.manager.save_object(book) self.manager.save_object(book)
song.song_book_id = book.id song.song_book_id = book.id
try: if hasattr(songbook, u'entry'):
if self._get(songbook, u'entry'): song.song_number = self._get(songbook, u'entry')
song.song_number = self._get(songbook, u'entry')
except AttributeError:
pass
# We only support one song book, so take the first one. # We only support one song book, so take the first one.
break break
except AttributeError:
pass
def _process_titles(self, properties, song): def _process_titles(self, properties, song):
""" """
@ -563,7 +550,7 @@ class OpenLyrics(object):
``song`` ``song``
The song object. The song object.
""" """
try: if hasattr(properties, u'themes'):
for topictext in properties.themes.theme: for topictext in properties.themes.theme:
topictext = self._text(topictext) topictext = self._text(topictext)
if topictext: if topictext:
@ -574,8 +561,6 @@ class OpenLyrics(object):
topic = Topic.populate(name=topictext) topic = Topic.populate(name=topictext)
self.manager.save_object(topic) self.manager.save_object(topic)
song.topics.append(topic) song.topics.append(topic)
except AttributeError:
pass
def _dump_xml(self, xml): def _dump_xml(self, xml):
""" """

View File

@ -7,197 +7,221 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>494</width> <width>494</width>
<height>426</height> <height>434</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>Dialog</string> <string>Dialog</string>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout_3"> <widget class="QWidget" name="">
<item> <property name="geometry">
<layout class="QGridLayout" name="dialogLayout"> <rect>
<item row="0" column="3"> <x>4</x>
<layout class="QVBoxLayout" name="settingsLayout"> <y>4</y>
<item> <width>491</width>
<layout class="QGridLayout" name="serviceTitleLayout"> <height>432</height>
<item row="1" column="1"> </rect>
<widget class="QLineEdit" name="serviceTitleLineEdit"> </property>
<property name="sizePolicy"> <layout class="QVBoxLayout" name="verticalLayout">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred"> <item>
<horstretch>0</horstretch> <layout class="QGridLayout" name="dialogLayout">
<verstretch>0</verstretch> <item row="0" column="3">
</sizepolicy> <layout class="QVBoxLayout" name="settingsLayout">
</property> <item>
</widget> <layout class="QGridLayout" name="serviceTitleLayout">
</item> <item row="1" column="1">
<item row="1" column="0"> <widget class="QLineEdit" name="serviceTitleLineEdit">
<widget class="QLabel" name="serviceTitleLabel"> <property name="sizePolicy">
<property name="sizePolicy"> <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred"> <horstretch>0</horstretch>
<horstretch>0</horstretch> <verstretch>0</verstretch>
<verstretch>0</verstretch> </sizepolicy>
</sizepolicy> </property>
</property> </widget>
<property name="text"> </item>
<string>Service Title:</string> <item row="1" column="0">
</property> <widget class="QLabel" name="serviceTitleLabel">
</widget> <property name="sizePolicy">
</item> <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
</layout> <horstretch>0</horstretch>
</item> <verstretch>0</verstretch>
<item> </sizepolicy>
<widget class="QCheckBox" name="printSlideTextCheckBox"> </property>
<property name="text"> <property name="text">
<string>Include slide text if avaialbe</string> <string>Service Title:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> </layout>
<widget class="QCheckBox" name="printNotesCheckBox"> </item>
<property name="text"> <item>
<string>Include service item notes</string> <widget class="QCheckBox" name="printSlideTextCheckBox">
</property> <property name="text">
</widget> <string>Include slide text if avaialbe</string>
</item> </property>
<item> </widget>
<widget class="QCheckBox" name="printMetaDataCheckBox"> </item>
<property name="text"> <item>
<string>Include play lenght of media items</string> <widget class="QCheckBox" name="printNotesCheckBox">
</property> <property name="text">
</widget> <string>Include service item notes</string>
</item> </property>
<item> </widget>
<spacer name="spacer_2"> </item>
<property name="orientation"> <item>
<enum>Qt::Vertical</enum> <widget class="QCheckBox" name="printMetaDataCheckBox">
</property> <property name="text">
<property name="sizeHint" stdset="0"> <string>Include play lenght of media items</string>
<size> </property>
<width>20</width> </widget>
<height>40</height> </item>
</size> <item>
</property> <spacer name="spacer_2">
</spacer> <property name="orientation">
</item> <enum>Qt::Vertical</enum>
<item> </property>
<widget class="QLabel" name="customNotesLabel"> <property name="sizeHint" stdset="0">
<property name="text"> <size>
<string>&lt;b&gt;Custom Notes:&lt;/b&gt;</string> <width>20</width>
</property> <height>40</height>
</widget> </size>
</item> </property>
<item> </spacer>
<widget class="QTextEdit" name="customNoteEdit"/> </item>
</item> <item>
</layout> <widget class="QLabel" name="customNotesLabel">
</item> <property name="text">
<item row="1" column="3"> <string>&lt;b&gt;Custom Notes:&lt;/b&gt;</string>
<layout class="QHBoxLayout" name="buttonLayout"> </property>
<item> </widget>
<spacer name="spacer_3"> </item>
<property name="orientation"> <item>
<enum>Qt::Horizontal</enum> <widget class="QTextEdit" name="customNoteEdit"/>
</property> </item>
<property name="sizeHint" stdset="0"> </layout>
<size> </item>
<width>40</width> <item row="1" column="0">
<height>20</height> <layout class="QHBoxLayout" name="zoomButtonLayout">
</size> <item>
</property> <spacer name="spacer">
</spacer> <property name="orientation">
</item> <enum>Qt::Horizontal</enum>
<item> </property>
<widget class="QPushButton" name="cancelButton"> <property name="sizeHint" stdset="0">
<property name="text"> <size>
<string>Cancel</string> <width>40</width>
</property> <height>20</height>
</widget> </size>
</item> </property>
<item> </spacer>
<widget class="QPushButton" name="printButton"> </item>
<property name="text"> <item>
<string>Print</string> <widget class="QToolButton" name="zoomOutButton">
</property> <property name="text">
</widget> <string>...</string>
</item> </property>
</layout> <property name="icon">
</item> <iconset resource="../images/openlp-2.qrc">
<item row="1" column="0"> <normaloff>:/general/general_zoom_out.png</normaloff>:/general/general_zoom_out.png</iconset>
<layout class="QHBoxLayout" name="zoomButtonLayout"> </property>
<item> </widget>
<spacer name="spacer"> </item>
<property name="orientation"> <item>
<enum>Qt::Horizontal</enum> <widget class="QToolButton" name="zoomInButton">
</property> <property name="icon">
<property name="sizeHint" stdset="0"> <iconset resource="../images/openlp-2.qrc">
<size> <normaloff>:/general/general_zoom_in.png</normaloff>:/general/general_zoom_in.png</iconset>
<width>40</width> </property>
<height>20</height> </widget>
</size> </item>
</property> </layout>
</spacer> </item>
</item> <item row="0" column="0">
<item> <layout class="QVBoxLayout" name="perviewLayout">
<widget class="QToolButton" name="zoomOutButton"> <item>
<property name="text"> <widget class="QLabel" name="previewLabel">
<string>...</string> <property name="sizePolicy">
</property> <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<property name="icon"> <horstretch>0</horstretch>
<iconset resource="../images/openlp-2.qrc"> <verstretch>0</verstretch>
<normaloff>:/general/general_zoom_out.png</normaloff>:/general/general_zoom_out.png</iconset> </sizepolicy>
</property> </property>
</widget> <property name="text">
</item> <string>Preview:</string>
<item> </property>
<widget class="QToolButton" name="zoomInButton"> </widget>
<property name="icon"> </item>
<iconset resource="../images/openlp-2.qrc"> <item>
<normaloff>:/general/general_zoom_in.png</normaloff>:/general/general_zoom_in.png</iconset> <widget class="QWidget" name="previewWidget" native="true">
</property> <property name="enabled">
</widget> <bool>true</bool>
</item> </property>
</layout> <property name="sizePolicy">
</item> <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<item row="0" column="0"> <horstretch>0</horstretch>
<layout class="QVBoxLayout" name="perviewLayout"> <verstretch>0</verstretch>
<item> </sizepolicy>
<widget class="QLabel" name="previewLabel"> </property>
<property name="sizePolicy"> <property name="minimumSize">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred"> <size>
<horstretch>0</horstretch> <width>0</width>
<verstretch>0</verstretch> <height>0</height>
</sizepolicy> </size>
</property> </property>
<property name="text"> <zorder>spacer_3</zorder>
<string>Preview:</string> </widget>
</property> </item>
</widget> </layout>
</item> </item>
<item> </layout>
<widget class="QWidget" name="previewWidget" native="true"> </item>
<property name="enabled"> <item>
<bool>true</bool> <layout class="QHBoxLayout" name="buttonLayout">
</property> <item>
<property name="sizePolicy"> <spacer name="spacer_3">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding"> <property name="orientation">
<horstretch>0</horstretch> <enum>Qt::Horizontal</enum>
<verstretch>0</verstretch> </property>
</sizepolicy> <property name="sizeHint" stdset="0">
</property> <size>
<property name="minimumSize"> <width>40</width>
<size> <height>20</height>
<width>0</width> </size>
<height>0</height> </property>
</size> </spacer>
</property> </item>
</widget> <item>
</item> <widget class="QPushButton" name="cancelButton_3">
</layout> <property name="text">
</item> <string>Cancel</string>
</layout> </property>
</item> </widget>
</layout> </item>
<zorder></zorder> <item>
<widget class="QPushButton" name="cancelButton_2">
<property name="text">
<string>Cancel</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="cancelButton">
<property name="text">
<string>Cancel</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="printButton">
<property name="text">
<string>Print</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</widget> </widget>
<resources> <resources>
<include location="../images/openlp-2.qrc"/> <include location="../images/openlp-2.qrc"/>

Binary file not shown.

After

Width:  |  Height:  |  Size: 880 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 716 B

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 662 B

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -47,6 +47,8 @@
<file>general_new.png</file> <file>general_new.png</file>
<file>general_zoom_out.png</file> <file>general_zoom_out.png</file>
<file>general_zoom_in.png</file> <file>general_zoom_in.png</file>
<file>general_zoom_original.png</file>
<file>general_print.png</file>
<file>general_open.png</file> <file>general_open.png</file>
<file>general_save.png</file> <file>general_save.png</file>
<file>general_email.png</file> <file>general_email.png</file>
@ -114,6 +116,8 @@
<file>system_exit.png</file> <file>system_exit.png</file>
<file>settings_plugin_list.png</file> <file>settings_plugin_list.png</file>
<file>system_settings.png</file> <file>system_settings.png</file>
<file>system_configure.png</file>
<file>system_edit_copy.png</file>
<file>system_configure_shortcuts.png</file> <file>system_configure_shortcuts.png</file>
</qresource> </qresource>
<qresource prefix="media"> <qresource prefix="media">

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 515 B