forked from openlp/openlp
print changes
This commit is contained in:
parent
33a77b72f7
commit
e4876cd84c
@ -44,8 +44,6 @@ class UiStrings(object):
|
||||
Advanced = translate('OpenLP.Ui', 'Advanced')
|
||||
AllFiles = translate('OpenLP.Ui', 'All Files')
|
||||
Authors = translate('OpenLP.Ui', 'Authors')
|
||||
CopyToHtml = translate('OpenLP.Ui', 'Copy to HTML')
|
||||
CopyToText = translate('OpenLP.Ui', 'Copy to Text')
|
||||
CreateService = translate('OpenLP.Ui', 'Create a new service.')
|
||||
Delete = translate('OpenLP.Ui', '&Delete')
|
||||
Edit = translate('OpenLP.Ui', '&Edit')
|
||||
|
@ -32,6 +32,8 @@ from openlp.core.lib.ui import UiStrings
|
||||
class Ui_PrintServiceOrderDialog(object):
|
||||
def setupUi(self, printServiceOrderDialog):
|
||||
printServiceOrderDialog.setObjectName(u'printServiceOrderDialog')
|
||||
self.verticalLayout = QtGui.QGridLayout(printServiceOrderDialog)
|
||||
self.verticalLayout.setObjectName(u'verticalLayout')
|
||||
self.dialogLayout = QtGui.QGridLayout(printServiceOrderDialog)
|
||||
self.dialogLayout.setObjectName(u'dialogLayout')
|
||||
self.perviewLayout = QtGui.QVBoxLayout()
|
||||
@ -76,9 +78,6 @@ class Ui_PrintServiceOrderDialog(object):
|
||||
self.printMetaDataCheckBox = QtGui.QCheckBox(printServiceOrderDialog)
|
||||
self.printMetaDataCheckBox.setObjectName(u'printMetaDataCheckBox')
|
||||
self.settingsLayout.addWidget(self.printMetaDataCheckBox)
|
||||
self.copyMetaDataCheckBox = QtGui.QCheckBox(printServiceOrderDialog)
|
||||
self.copyMetaDataCheckBox.setObjectName(u'copyMetaDataCheckBox')
|
||||
self.settingsLayout.addWidget(self.copyMetaDataCheckBox)
|
||||
spacerItem = QtGui.QSpacerItem(20, 40,
|
||||
QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
|
||||
self.settingsLayout.addItem(spacerItem)
|
||||
@ -94,6 +93,9 @@ class Ui_PrintServiceOrderDialog(object):
|
||||
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)
|
||||
@ -103,7 +105,7 @@ class Ui_PrintServiceOrderDialog(object):
|
||||
self.cancelButton = QtGui.QPushButton(printServiceOrderDialog)
|
||||
self.cancelButton.setObjectName(u'cancelButton')
|
||||
self.buttonLayout.addWidget(self.cancelButton)
|
||||
self.dialogLayout.addLayout(self.buttonLayout, 1, 3, 1, 1)
|
||||
self.dialogLayout.addLayout(self.buttonLayout, 2, 2, 1, 1)
|
||||
self.zoomButtonLayout = QtGui.QHBoxLayout()
|
||||
self.zoomButtonLayout.setObjectName(u'zoomButtonLayout')
|
||||
spacerItem = QtGui.QSpacerItem(40, 20,
|
||||
@ -134,14 +136,14 @@ class Ui_PrintServiceOrderDialog(object):
|
||||
self.printMetaDataCheckBox.setText(
|
||||
translate('OpenLP.PrintServiceOrderForm',
|
||||
'Include play length of media items'))
|
||||
self.copyMetaDataCheckBox.setText(
|
||||
translate('OpenLP.PrintServiceOrderForm',
|
||||
'Copy output as HTML'))
|
||||
self.serviceTitleLabel.setText(translate(
|
||||
'OpenLP.PrintServiceOrderForm', 'Title:'))
|
||||
self.serviceTitleLineEdit.setText(translate('OpenLP.ServiceManager',
|
||||
'Service Order Sheet'))
|
||||
self.copyTextButton.setText(UiStrings.CopyToText)
|
||||
self.copyTextButton.setText(translate('OpenLP.ServiceManager',
|
||||
'Copy to Clipboard as Text'))
|
||||
self.copyHtmlButton.setText(translate('OpenLP.ServiceManager',
|
||||
'Copy to Clipboard as Html'))
|
||||
self.printButton.setText(translate('OpenLP.ServiceManager', 'Print'))
|
||||
self.cancelButton.setText(translate('OpenLP.ServiceManager', 'Cancel'))
|
||||
self.customNotesLabel.setText(
|
||||
|
@ -53,10 +53,6 @@ class PrintServiceOrderForm(QtGui.QDialog, Ui_PrintServiceOrderDialog):
|
||||
u'print file meta data', QtCore.QVariant(False)).toBool())
|
||||
self.printNotesCheckBox.setChecked(settings.value(
|
||||
u'print notes', QtCore.QVariant(False)).toBool())
|
||||
self.copyMetaDataCheckBox.setChecked(settings.value(
|
||||
u'html copy', QtCore.QVariant(False)).toBool())
|
||||
if self.copyMetaDataCheckBox.isChecked():
|
||||
self.copyTextButton.setText(UiStrings.CopyToHtml)
|
||||
settings.endGroup()
|
||||
# Signals
|
||||
QtCore.QObject.connect(self.printButton,
|
||||
@ -82,8 +78,8 @@ class PrintServiceOrderForm(QtGui.QDialog, Ui_PrintServiceOrderDialog):
|
||||
QtCore.SIGNAL(u'clicked()'), self.reject)
|
||||
QtCore.QObject.connect(self.copyTextButton,
|
||||
QtCore.SIGNAL(u'clicked()'), self.copyText)
|
||||
QtCore.QObject.connect(self.copyMetaDataCheckBox,
|
||||
QtCore.SIGNAL(u'stateChanged(int)'), self.updateTextFormat)
|
||||
QtCore.QObject.connect(self.copyHtmlButton,
|
||||
QtCore.SIGNAL(u'clicked()'), self.copyHtmlText)
|
||||
self.updatePreviewText()
|
||||
|
||||
def updatePreviewText(self):
|
||||
@ -150,11 +146,18 @@ class PrintServiceOrderForm(QtGui.QDialog, Ui_PrintServiceOrderDialog):
|
||||
self.document.print_(printer)
|
||||
|
||||
def copyText(self):
|
||||
if self.copyMetaDataCheckBox.isChecked():
|
||||
self.parent.clipboard.setText(self.document.toHtml())
|
||||
else:
|
||||
self.parent.clipboard.setText(self.document.toPlainText())
|
||||
self.accept()
|
||||
"""
|
||||
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):
|
||||
"""
|
||||
@ -200,8 +203,6 @@ class PrintServiceOrderForm(QtGui.QDialog, Ui_PrintServiceOrderDialog):
|
||||
QtCore.QVariant(self.printMetaDataCheckBox.isChecked()))
|
||||
settings.setValue(u'print notes',
|
||||
QtCore.QVariant(self.printNotesCheckBox.isChecked()))
|
||||
settings.setValue(u'html copy',
|
||||
QtCore.QVariant(self.copyMetaDataCheckBox.isChecked()))
|
||||
settings.endGroup()
|
||||
# Close the dialog.
|
||||
return QtGui.QDialog.accept(self)
|
||||
|
@ -7,197 +7,221 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>494</width>
|
||||
<height>426</height>
|
||||
<height>434</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="dialogLayout">
|
||||
<item row="0" column="3">
|
||||
<layout class="QVBoxLayout" name="settingsLayout">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="serviceTitleLayout">
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="serviceTitleLineEdit">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="serviceTitleLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Service Title:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="printSlideTextCheckBox">
|
||||
<property name="text">
|
||||
<string>Include slide text if avaialbe</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="printNotesCheckBox">
|
||||
<property name="text">
|
||||
<string>Include service item notes</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="printMetaDataCheckBox">
|
||||
<property name="text">
|
||||
<string>Include play lenght of media items</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="spacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="customNotesLabel">
|
||||
<property name="text">
|
||||
<string><b>Custom Notes:</b></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTextEdit" name="customNoteEdit"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<layout class="QHBoxLayout" name="buttonLayout">
|
||||
<item>
|
||||
<spacer name="spacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</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>
|
||||
<item row="1" column="0">
|
||||
<layout class="QHBoxLayout" name="zoomButtonLayout">
|
||||
<item>
|
||||
<spacer name="spacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="zoomOutButton">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../images/openlp-2.qrc">
|
||||
<normaloff>:/general/general_zoom_out.png</normaloff>:/general/general_zoom_out.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="zoomInButton">
|
||||
<property name="icon">
|
||||
<iconset resource="../images/openlp-2.qrc">
|
||||
<normaloff>:/general/general_zoom_in.png</normaloff>:/general/general_zoom_in.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<layout class="QVBoxLayout" name="perviewLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="previewLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Preview:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="previewWidget" native="true">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
<zorder></zorder>
|
||||
<widget class="QWidget" name="">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>4</x>
|
||||
<y>4</y>
|
||||
<width>491</width>
|
||||
<height>432</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="dialogLayout">
|
||||
<item row="0" column="3">
|
||||
<layout class="QVBoxLayout" name="settingsLayout">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="serviceTitleLayout">
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="serviceTitleLineEdit">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="serviceTitleLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Service Title:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="printSlideTextCheckBox">
|
||||
<property name="text">
|
||||
<string>Include slide text if avaialbe</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="printNotesCheckBox">
|
||||
<property name="text">
|
||||
<string>Include service item notes</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="printMetaDataCheckBox">
|
||||
<property name="text">
|
||||
<string>Include play lenght of media items</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="spacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="customNotesLabel">
|
||||
<property name="text">
|
||||
<string><b>Custom Notes:</b></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTextEdit" name="customNoteEdit"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<layout class="QHBoxLayout" name="zoomButtonLayout">
|
||||
<item>
|
||||
<spacer name="spacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="zoomOutButton">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../images/openlp-2.qrc">
|
||||
<normaloff>:/general/general_zoom_out.png</normaloff>:/general/general_zoom_out.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="zoomInButton">
|
||||
<property name="icon">
|
||||
<iconset resource="../images/openlp-2.qrc">
|
||||
<normaloff>:/general/general_zoom_in.png</normaloff>:/general/general_zoom_in.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<layout class="QVBoxLayout" name="perviewLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="previewLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Preview:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="previewWidget" native="true">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<zorder>spacer_3</zorder>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="buttonLayout">
|
||||
<item>
|
||||
<spacer name="spacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="cancelButton_3">
|
||||
<property name="text">
|
||||
<string>Cancel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<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>
|
||||
<resources>
|
||||
<include location="../images/openlp-2.qrc"/>
|
||||
|
Loading…
Reference in New Issue
Block a user