Print Dialog updates
@ -30,121 +30,136 @@ from openlp.core.lib import build_icon, translate, SpellTextEdit
|
|||||||
from openlp.core.lib.ui import UiStrings
|
from openlp.core.lib.ui import UiStrings
|
||||||
|
|
||||||
class Ui_PrintServiceOrderDialog(object):
|
class Ui_PrintServiceOrderDialog(object):
|
||||||
def setupUi(self, printServiceOrderDialog):
|
def setupUi(self, printServiceDialog):
|
||||||
printServiceOrderDialog.setObjectName(u'printServiceOrderDialog')
|
printServiceDialog.setObjectName(u'printServiceDialog')
|
||||||
self.verticalLayout = QtGui.QGridLayout(printServiceOrderDialog)
|
printServiceDialog.resize(664, 594)
|
||||||
self.verticalLayout.setObjectName(u'verticalLayout')
|
self.mainLayout = QtGui.QVBoxLayout(printServiceDialog)
|
||||||
self.dialogLayout = QtGui.QGridLayout(printServiceOrderDialog)
|
self.mainLayout.setSpacing(0)
|
||||||
self.dialogLayout.setObjectName(u'dialogLayout')
|
self.mainLayout.setMargin(0)
|
||||||
self.perviewLayout = QtGui.QVBoxLayout()
|
self.mainLayout.setObjectName(u'mainLayout')
|
||||||
self.perviewLayout.setObjectName(u'perviewLayout')
|
self.toolbar = QtGui.QToolBar(printServiceDialog)
|
||||||
self.previewLabel = QtGui.QLabel(printServiceOrderDialog)
|
self.toolbar.setIconSize(QtCore.QSize(22, 22))
|
||||||
self.previewLabel.setSizePolicy(
|
self.toolbar.setToolButtonStyle(QtCore.Qt.ToolButtonTextBesideIcon)
|
||||||
QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
|
self.toolbar.addAction(
|
||||||
self.previewLabel.setObjectName(u'previewLabel')
|
QtGui.QIcon(build_icon(u':/general/general_print.png')), 'Print')
|
||||||
self.perviewLayout.addWidget(self.previewLabel)
|
self.optionsButton = QtGui.QToolButton(self.toolbar)
|
||||||
self.previewWidget = QtGui.QPrintPreviewWidget(
|
self.optionsButton.setText(u'Options')
|
||||||
self.printer, self, QtCore.Qt.Widget)
|
self.optionsButton.setToolButtonStyle(QtCore.Qt.ToolButtonTextBesideIcon)
|
||||||
self.previewWidget.setEnabled(True)
|
self.optionsButton.setIcon(QtGui.QIcon(
|
||||||
self.previewWidget.setSizePolicy(
|
build_icon(u':/system/system_configure.png')))
|
||||||
QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Expanding)
|
self.optionsButton.setCheckable(True)
|
||||||
self.previewWidget.setObjectName(u'previewWidget')
|
self.toolbar.addWidget(self.optionsButton)
|
||||||
# Give the previewWidget a fixed size, to prevent resizing when clicking
|
self.toolbar.addAction(
|
||||||
# the zoom buttons.
|
QtGui.QIcon(build_icon(u':/system/system_close.png')),
|
||||||
self.previewWidget.setFixedWidth(350)
|
'Close')
|
||||||
self.perviewLayout.addWidget(self.previewWidget)
|
self.toolbar.addSeparator()
|
||||||
self.dialogLayout.addLayout(self.perviewLayout, 0, 0, 1, 1)
|
self.toolbar.addAction(
|
||||||
self.settingsLayout = QtGui.QVBoxLayout()
|
QtGui.QIcon(build_icon(u':/system/system_edit_copy.png')),
|
||||||
self.settingsLayout.setObjectName(u'settingsLayout')
|
'Copy')
|
||||||
self.serviceTitleLayout = QtGui.QGridLayout()
|
self.toolbar.addAction(
|
||||||
self.serviceTitleLayout.setObjectName(u'serviceTitleLayout')
|
QtGui.QIcon(build_icon(u':/system/system_edit_copy.png')),
|
||||||
self.serviceTitleLineEdit = QtGui.QLineEdit(printServiceOrderDialog)
|
'Copy as HTML')
|
||||||
self.serviceTitleLineEdit.setSizePolicy(
|
self.toolbar.addSeparator()
|
||||||
QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Preferred)
|
self.zoomInButton = QtGui.QToolButton(self.toolbar)
|
||||||
self.serviceTitleLineEdit.setObjectName(u'serviceTitleLineEdit')
|
self.zoomInButton.setIcon(QtGui.QIcon(
|
||||||
self.serviceTitleLayout.addWidget(self.serviceTitleLineEdit, 1, 1, 1, 1)
|
build_icon(u':/general/general_zoom_in.png')))
|
||||||
self.serviceTitleLabel = QtGui.QLabel(printServiceOrderDialog)
|
self.zoomInButton.setToolTip(u'Zoom In')
|
||||||
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.copyHtmlButton = QtGui.QPushButton(printServiceOrderDialog)
|
|
||||||
self.copyHtmlButton.setObjectName(u'copyHtmlButton')
|
|
||||||
self.buttonLayout.addWidget(self.copyHtmlButton)
|
|
||||||
self.copyTextButton = QtGui.QPushButton(printServiceOrderDialog)
|
|
||||||
self.copyTextButton.setObjectName(u'copyTextButton')
|
|
||||||
self.buttonLayout.addWidget(self.copyTextButton)
|
|
||||||
self.printButton = QtGui.QPushButton(printServiceOrderDialog)
|
|
||||||
self.printButton.setObjectName(u'printButton')
|
|
||||||
self.buttonLayout.addWidget(self.printButton)
|
|
||||||
self.cancelButton = QtGui.QPushButton(printServiceOrderDialog)
|
|
||||||
self.cancelButton.setObjectName(u'cancelButton')
|
|
||||||
self.buttonLayout.addWidget(self.cancelButton)
|
|
||||||
self.dialogLayout.addLayout(self.buttonLayout, 2, 2, 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.zoomInButton.setObjectName(u'zoomInButton')
|
||||||
self.zoomButtonLayout.addWidget(self.zoomInButton)
|
self.zoomInButton.setIconSize(QtCore.QSize(22, 22))
|
||||||
self.dialogLayout.addLayout(self.zoomButtonLayout, 1, 0, 1, 1)
|
self.toolbar.addWidget(self.zoomInButton)
|
||||||
self.retranslateUi(printServiceOrderDialog)
|
self.zoomOutButton = QtGui.QToolButton(self.toolbar)
|
||||||
QtCore.QMetaObject.connectSlotsByName(printServiceOrderDialog)
|
self.zoomOutButton.setIcon(QtGui.QIcon(
|
||||||
|
build_icon(u':/general/general_zoom_out.png')))
|
||||||
|
self.zoomOutButton.setToolTip(u'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(u'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.zoomComboBox.addItem(u'Fit Page')
|
||||||
|
self.zoomComboBox.addItem(u'Fit Width')
|
||||||
|
self.zoomComboBox.addItem(u'100%')
|
||||||
|
self.zoomComboBox.addItem(u'75%')
|
||||||
|
self.zoomComboBox.addItem(u'50%')
|
||||||
|
self.zoomComboBox.addItem(u'25%')
|
||||||
|
self.toolbar.addWidget(self.zoomComboBox)
|
||||||
|
self.mainLayout.addWidget(self.toolbar)
|
||||||
|
self.scrollArea = QtGui.QScrollArea(printServiceDialog)
|
||||||
|
self.scrollArea.setWidgetResizable(True)
|
||||||
|
self.scrollArea.setObjectName(u'scrollArea')
|
||||||
|
self.scrollAreaWidgetContents = QtGui.QWidget()
|
||||||
|
self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 227, 473))
|
||||||
|
self.scrollAreaWidgetContents.setObjectName(u'scrollAreaWidgetContents')
|
||||||
|
self.scrollArea.setWidget(self.scrollAreaWidgetContents)
|
||||||
|
self.mainLayout.addWidget(self.scrollArea)
|
||||||
|
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 = QtGui.QTextEdit(self.optionsWidget)
|
||||||
|
self.footerTextEdit.setObjectName(u'footerTextEdit')
|
||||||
|
self.optionsLayout.addWidget(self.footerTextEdit)
|
||||||
|
self.optionsGroupBox = QtGui.QGroupBox(u'Other Options')
|
||||||
|
self.groupLayout = QtGui.QVBoxLayout()
|
||||||
|
self.slideTextCheckBox = QtGui.QCheckBox()
|
||||||
|
self.groupLayout.addWidget(self.slideTextCheckBox)
|
||||||
|
self.notesCheckBox = QtGui.QCheckBox('Include service item notes')
|
||||||
|
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)
|
||||||
|
|
||||||
def retranslateUi(self, printServiceOrderDialog):
|
self.retranslateUi(printServiceDialog)
|
||||||
printServiceOrderDialog.setWindowTitle(
|
QtCore.QMetaObject.connectSlotsByName(printServiceDialog)
|
||||||
|
QtCore.QObject.connect(self.optionsButton,
|
||||||
|
QtCore.SIGNAL(u'toggled(bool)'), self.toggleOptions)
|
||||||
|
|
||||||
|
self.retranslateUi(printServiceDialog)
|
||||||
|
QtCore.QMetaObject.connectSlotsByName(printServiceDialog)
|
||||||
|
|
||||||
|
def retranslateUi(self, printServiceDialog):
|
||||||
|
printServiceDialog.setWindowTitle(
|
||||||
translate('OpenLP.PrintServiceOrderForm', 'Print Service Order'))
|
translate('OpenLP.PrintServiceOrderForm', 'Print Service Order'))
|
||||||
self.previewLabel.setText(
|
# self.previewLabel.setText(
|
||||||
translate('OpenLP.PrintServiceOrderForm', '<b>Preview:</b>'))
|
# translate('OpenLP.PrintServiceOrderForm', '<b>Preview:</b>'))
|
||||||
self.printSlideTextCheckBox.setText(translate(
|
self.slideTextCheckBox.setText(translate(
|
||||||
'OpenLP.PrintServiceOrderForm', 'Include slide text if available'))
|
'OpenLP.PrintServiceOrderForm', 'Include slide text if available'))
|
||||||
self.printNotesCheckBox.setText(translate(
|
self.notesCheckBox.setText(translate(
|
||||||
'OpenLP.PrintServiceOrderForm', 'Include service item notes'))
|
'OpenLP.PrintServiceOrderForm', 'Include service item notes'))
|
||||||
self.printMetaDataCheckBox.setText(
|
self.metaDataCheckBox.setText(
|
||||||
translate('OpenLP.PrintServiceOrderForm',
|
translate('OpenLP.PrintServiceOrderForm',
|
||||||
'Include play length of media items'))
|
'Include play length of media items'))
|
||||||
self.serviceTitleLabel.setText(translate(
|
# self.serviceTitleLabel.setText(translate(
|
||||||
'OpenLP.PrintServiceOrderForm', 'Title:'))
|
# 'OpenLP.PrintServiceOrderForm', 'Title:'))
|
||||||
self.serviceTitleLineEdit.setText(translate('OpenLP.ServiceManager',
|
# self.serviceTitleLineEdit.setText(translate('OpenLP.ServiceManager',
|
||||||
'Service Order Sheet'))
|
# 'Service Order Sheet'))
|
||||||
self.copyTextButton.setText(translate('OpenLP.ServiceManager',
|
# self.copyTextButton.setText(translate('OpenLP.ServiceManager',
|
||||||
'Copy to Clipboard as Text'))
|
# 'Copy to Clipboard as Text'))
|
||||||
self.copyHtmlButton.setText(translate('OpenLP.ServiceManager',
|
# self.copyHtmlButton.setText(translate('OpenLP.ServiceManager',
|
||||||
'Copy to Clipboard as Html'))
|
# 'Copy to Clipboard as Html'))
|
||||||
self.printButton.setText(translate('OpenLP.ServiceManager', 'Print'))
|
# self.printButton.setText(translate('OpenLP.ServiceManager', 'Print'))
|
||||||
self.cancelButton.setText(translate('OpenLP.ServiceManager', 'Cancel'))
|
# self.cancelButton.setText(translate('OpenLP.ServiceManager', 'Cancel'))
|
||||||
self.customNotesLabel.setText(
|
# self.customNotesLabel.setText(
|
||||||
translate('OpenLP.ServiceManager', '<b>Custom Service Notes:</b>'))
|
# translate('OpenLP.ServiceManager', '<b>Custom Service Notes:</b>'))
|
||||||
|
@ -47,40 +47,50 @@ class PrintServiceOrderForm(QtGui.QDialog, Ui_PrintServiceOrderDialog):
|
|||||||
# 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())
|
||||||
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'clicked()'), self.printServiceOrder)
|
||||||
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.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.serviceTitleLineEdit,
|
||||||
QtCore.SIGNAL(u'textChanged(const QString)'),
|
# QtCore.SIGNAL(u'textChanged(const QString)'),
|
||||||
self.updatePreviewText)
|
# self.updatePreviewText)
|
||||||
QtCore.QObject.connect(self.printSlideTextCheckBox,
|
# QtCore.QObject.connect(self.slideTextCheckBox,
|
||||||
QtCore.SIGNAL(u'stateChanged(int)'), self.updatePreviewText)
|
# QtCore.SIGNAL(u'stateChanged(int)'), self.updatePreviewText)
|
||||||
QtCore.QObject.connect(self.printNotesCheckBox,
|
# QtCore.QObject.connect(self.notesCheckBox,
|
||||||
QtCore.SIGNAL(u'stateChanged(int)'), self.updatePreviewText)
|
# QtCore.SIGNAL(u'stateChanged(int)'), self.updatePreviewText)
|
||||||
QtCore.QObject.connect(self.printMetaDataCheckBox,
|
# QtCore.QObject.connect(self.metaDataCheckBox,
|
||||||
QtCore.SIGNAL(u'stateChanged(int)'), self.updatePreviewText)
|
# QtCore.SIGNAL(u'stateChanged(int)'), self.updatePreviewText)
|
||||||
QtCore.QObject.connect(self.customNoteEdit,
|
# QtCore.QObject.connect(self.customNoteEdit,
|
||||||
QtCore.SIGNAL(u'textChanged()'), self.updatePreviewText)
|
# QtCore.SIGNAL(u'textChanged()'), self.updatePreviewText)
|
||||||
QtCore.QObject.connect(self.cancelButton,
|
# QtCore.QObject.connect(self.cancelButton,
|
||||||
QtCore.SIGNAL(u'clicked()'), self.reject)
|
# QtCore.SIGNAL(u'clicked()'), self.reject)
|
||||||
QtCore.QObject.connect(self.copyTextButton,
|
# QtCore.QObject.connect(self.copyTextButton,
|
||||||
QtCore.SIGNAL(u'clicked()'), self.copyText)
|
# QtCore.SIGNAL(u'clicked()'), self.copyText)
|
||||||
QtCore.QObject.connect(self.copyHtmlButton,
|
# QtCore.QObject.connect(self.copyHtmlButton,
|
||||||
QtCore.SIGNAL(u'clicked()'), self.copyHtmlText)
|
# QtCore.SIGNAL(u'clicked()'), self.copyHtmlText)
|
||||||
self.updatePreviewText()
|
# self.updatePreviewText()
|
||||||
|
|
||||||
|
def toggleOptions(self, checked):
|
||||||
|
self.optionsWidget.setVisible(checked)
|
||||||
|
if checked:
|
||||||
|
left = self.optionsButton.pos().x()
|
||||||
|
top = self.toolbar.height()
|
||||||
|
self.optionsWidget.move(left, top)
|
||||||
|
self.titleLineEdit.setFocus()
|
||||||
|
else:
|
||||||
|
self.saveOptions()
|
||||||
|
|
||||||
def updatePreviewText(self):
|
def updatePreviewText(self):
|
||||||
"""
|
"""
|
||||||
@ -95,7 +105,7 @@ class PrintServiceOrderForm(QtGui.QDialog, Ui_PrintServiceOrderDialog):
|
|||||||
text += u'<h3><img src="%s" /> %s</h3>' % (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
|
verse = None
|
||||||
@ -120,13 +130,13 @@ 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><b>%s</b></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><b>%s</b> %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)))
|
||||||
@ -167,7 +177,6 @@ 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):
|
||||||
"""
|
"""
|
||||||
@ -190,7 +199,7 @@ class PrintServiceOrderForm(QtGui.QDialog, Ui_PrintServiceOrderDialog):
|
|||||||
else:
|
else:
|
||||||
self.copyTextButton.setText(UiStrings.CopyToText)
|
self.copyTextButton.setText(UiStrings.CopyToText)
|
||||||
|
|
||||||
def accept(self):
|
def saveOptions(self):
|
||||||
"""
|
"""
|
||||||
Save the settings and close the dialog.
|
Save the settings and close the dialog.
|
||||||
"""
|
"""
|
||||||
@ -198,17 +207,14 @@ 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()
|
||||||
|
|
||||||
|
def close(self):
|
||||||
# Close the dialog.
|
# Close the dialog.
|
||||||
return QtGui.QDialog.accept(self)
|
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)
|
|
||||||
|
BIN
resources/images/general_print.png
Normal file
After Width: | Height: | Size: 880 B |
Before Width: | Height: | Size: 716 B After Width: | Height: | Size: 1.2 KiB |
BIN
resources/images/general_zoom_original.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 662 B After Width: | Height: | Size: 1.1 KiB |
@ -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">
|
||||||
|
BIN
resources/images/system_configure.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
resources/images/system_edit_copy.png
Normal file
After Width: | Height: | Size: 515 B |