forked from openlp/openlp
Print Dialog fixes
This commit is contained in:
parent
774f9d6cdd
commit
4c0928699d
@ -188,7 +188,8 @@ class OpenLP(QtGui.QApplication):
|
||||
u'primary': (self.desktop().primaryScreen() == screen)})
|
||||
log.info(u'Screen %d found with resolution %s', screen, size)
|
||||
# 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()
|
||||
if show_splash:
|
||||
# now kill the splashscreen
|
||||
|
@ -240,7 +240,7 @@ class Ui_MainWindow(object):
|
||||
languageItem.setChecked(True)
|
||||
add_actions(self.LanguageGroup, [languageItem])
|
||||
self.SettingsShortcutsItem = icon_action(mainWindow,
|
||||
u'SettingsShortcutsItem',
|
||||
u'SettingsShortcutsItem',
|
||||
u':/system/system_configure_shortcuts.png')
|
||||
self.SettingsConfigureItem = icon_action(mainWindow,
|
||||
u'SettingsConfigureItem', u':/system/system_settings.png')
|
||||
@ -458,7 +458,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||
|
||||
actionList = ActionList()
|
||||
|
||||
def __init__(self, screens, applicationVersion):
|
||||
def __init__(self, screens, applicationVersion, clipboard):
|
||||
"""
|
||||
This constructor sets up the interface, the various managers, and the
|
||||
plugins.
|
||||
@ -467,6 +467,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||
self.screens = screens
|
||||
self.actionList = ActionList()
|
||||
self.applicationVersion = applicationVersion
|
||||
self.clipboard = clipboard
|
||||
# Set up settings sections for the main application
|
||||
# (not for use by plugins)
|
||||
self.uiSettingsSection = u'user interface'
|
||||
|
@ -37,6 +37,7 @@ class PrintServiceOrderForm(QtGui.QDialog, Ui_PrintServiceOrderDialog):
|
||||
Constructor
|
||||
"""
|
||||
QtGui.QDialog.__init__(self, parent)
|
||||
self.parent = parent
|
||||
self.serviceManager = serviceManager
|
||||
self.printer = QtGui.QPrinter()
|
||||
self.printDialog = QtGui.QPrintDialog(self.printer, self)
|
||||
@ -86,14 +87,14 @@ class PrintServiceOrderForm(QtGui.QDialog, Ui_PrintServiceOrderDialog):
|
||||
for item in self.serviceManager.serviceItems:
|
||||
item = item[u'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())
|
||||
# Add slide text of the service item.
|
||||
if self.printSlideTextCheckBox.isChecked():
|
||||
if item.is_text():
|
||||
# Add the text of the service item.
|
||||
for slide in item.get_frames():
|
||||
text += u'<p>' + slide[u'text'] + u'</p>'
|
||||
text += u'<p>' + slide[u'html'] + u'</p>'
|
||||
elif item.is_image():
|
||||
# Add the image names of the service item.
|
||||
text += u'<ol>'
|
||||
@ -120,6 +121,7 @@ class PrintServiceOrderForm(QtGui.QDialog, Ui_PrintServiceOrderDialog):
|
||||
u'Custom Service Notes:'), self.customNoteEdit.toPlainText())
|
||||
self.document.setHtml(text)
|
||||
self.previewWidget.updatePreview()
|
||||
self.parent.clipboard.setText(text)
|
||||
|
||||
def paintRequested(self, printer):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user