forked from openlp/openlp
added a field to enter custom service notes
This commit is contained in:
parent
1bcbb83144
commit
5410d8dfd1
@ -26,7 +26,7 @@
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import build_icon, translate
|
||||
from openlp.core.lib import build_icon, translate, SpellTextEdit
|
||||
|
||||
class Ui_PrintServiceOrderDialog(object):
|
||||
def setupUi(self, printServiceOrderDialog):
|
||||
@ -78,6 +78,12 @@ class Ui_PrintServiceOrderDialog(object):
|
||||
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')
|
||||
@ -127,3 +133,5 @@ class Ui_PrintServiceOrderDialog(object):
|
||||
'Service Order Sheet'))
|
||||
self.printButton.setText(translate('OpenLP.ServiceManager', 'Print'))
|
||||
self.cancelButton.setText(translate('OpenLP.ServiceManager', 'Cancel'))
|
||||
self.customNotesLabel.setText(
|
||||
translate('OpenLP.ServiceManager', '<b>Custom Service Notes:</b>'))
|
||||
|
@ -55,21 +55,24 @@ class PrintServiceOrderForm(QtGui.QDialog, Ui_PrintServiceOrderDialog):
|
||||
settings.endGroup()
|
||||
# Signals
|
||||
QtCore.QObject.connect(self.printButton,
|
||||
QtCore.SIGNAL('clicked()'), self.printServiceOrder)
|
||||
QtCore.SIGNAL(u'clicked()'), self.printServiceOrder)
|
||||
QtCore.QObject.connect(self.zoomOutButton,
|
||||
QtCore.SIGNAL('clicked()'), self.zoomOut)
|
||||
QtCore.SIGNAL(u'clicked()'), self.zoomOut)
|
||||
QtCore.QObject.connect(self.zoomInButton,
|
||||
QtCore.SIGNAL('clicked()'), self.zoomIn)
|
||||
QtCore.SIGNAL(u'clicked()'), self.zoomIn)
|
||||
QtCore.QObject.connect(self.previewWidget,
|
||||
QtCore.SIGNAL('paintRequested(QPrinter *)'), self.paintRequested)
|
||||
QtCore.SIGNAL(u'paintRequested(QPrinter *)'), self.paintRequested)
|
||||
QtCore.QObject.connect(self.serviceTitleLineEdit,
|
||||
QtCore.SIGNAL('textChanged(const QString)'), self.updatePreviewText)
|
||||
QtCore.SIGNAL(u'textChanged(const QString)'),
|
||||
self.updatePreviewText)
|
||||
QtCore.QObject.connect(self.printSlideTextCheckBox,
|
||||
QtCore.SIGNAL('stateChanged(int)'), self.updatePreviewText)
|
||||
QtCore.SIGNAL(u'stateChanged(int)'), self.updatePreviewText)
|
||||
QtCore.QObject.connect(self.printNotesCheckBox,
|
||||
QtCore.SIGNAL('stateChanged(int)'), self.updatePreviewText)
|
||||
QtCore.SIGNAL(u'stateChanged(int)'), self.updatePreviewText)
|
||||
QtCore.QObject.connect(self.printMetaDataCheckBox,
|
||||
QtCore.SIGNAL('stateChanged(int)'), self.updatePreviewText)
|
||||
QtCore.SIGNAL(u'stateChanged(int)'), self.updatePreviewText)
|
||||
QtCore.QObject.connect(self.customNoteEdit,
|
||||
QtCore.SIGNAL(u'textChanged()'), self.updatePreviewText)
|
||||
QtCore.QObject.connect(self.cancelButton,
|
||||
QtCore.SIGNAL(u'clicked()'), self.reject)
|
||||
self.updatePreviewText()
|
||||
@ -120,6 +123,9 @@ class PrintServiceOrderForm(QtGui.QDialog, Ui_PrintServiceOrderDialog):
|
||||
text += u'<p><b>%s</b> %s</p>' % (translate(
|
||||
'OpenLP.ServiceManager', u'Playing time:'),
|
||||
unicode(datetime.timedelta(seconds=length)))
|
||||
if self.customNoteEdit.toPlainText():
|
||||
text += u'<h4>%s</h4>%s' % (translate('OpenLP.ServiceManager',
|
||||
u'Custom Service Notes:'), self.customNoteEdit.toPlainText())
|
||||
self.document.setHtml(text)
|
||||
self.previewWidget.updatePreview()
|
||||
|
||||
|
@ -79,6 +79,16 @@
|
||||
</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">
|
||||
|
Loading…
Reference in New Issue
Block a user