forked from openlp/openlp
Easyworship importer: improved recognition of slide divisions
merged with trunk
This commit is contained in:
commit
5df77e4ed6
|
@ -32,6 +32,7 @@ to wait for the conversion to happen.
|
||||||
"""
|
"""
|
||||||
import logging
|
import logging
|
||||||
import time
|
import time
|
||||||
|
import Queue
|
||||||
|
|
||||||
from PyQt4 import QtCore
|
from PyQt4 import QtCore
|
||||||
|
|
||||||
|
@ -42,8 +43,8 @@ log = logging.getLogger(__name__)
|
||||||
|
|
||||||
class ImageThread(QtCore.QThread):
|
class ImageThread(QtCore.QThread):
|
||||||
"""
|
"""
|
||||||
A special Qt thread class to speed up the display of text based frames.
|
A special Qt thread class to speed up the display of images. This is
|
||||||
This is threaded so it loads the frames in background
|
threaded so it loads the frames and generates byte stream in background.
|
||||||
"""
|
"""
|
||||||
def __init__(self, manager):
|
def __init__(self, manager):
|
||||||
QtCore.QThread.__init__(self, None)
|
QtCore.QThread.__init__(self, None)
|
||||||
|
@ -53,15 +54,75 @@ class ImageThread(QtCore.QThread):
|
||||||
"""
|
"""
|
||||||
Run the thread.
|
Run the thread.
|
||||||
"""
|
"""
|
||||||
self.imageManager.process()
|
self.imageManager._process()
|
||||||
|
|
||||||
|
|
||||||
|
class Priority(object):
|
||||||
|
"""
|
||||||
|
Enumeration class for different priorities.
|
||||||
|
|
||||||
|
``Lowest``
|
||||||
|
Only the image's byte stream has to be generated. But neither the
|
||||||
|
``QImage`` nor the byte stream has been requested yet.
|
||||||
|
|
||||||
|
``Low``
|
||||||
|
Only the image's byte stream has to be generated. Because the image's
|
||||||
|
``QImage`` has been requested previously it is reasonable to assume that
|
||||||
|
the byte stream will be needed before the byte stream of other images
|
||||||
|
whose ``QImage`` were not generated due to a request.
|
||||||
|
|
||||||
|
``Normal``
|
||||||
|
The image's byte stream as well as the image has to be generated.
|
||||||
|
Neither the ``QImage`` nor the byte stream has been requested yet.
|
||||||
|
|
||||||
|
``High``
|
||||||
|
The image's byte stream as well as the image has to be generated. The
|
||||||
|
``QImage`` for this image has been requested.
|
||||||
|
**Note**, this priority is only set when the ``QImage`` has not been
|
||||||
|
generated yet.
|
||||||
|
|
||||||
|
``Urgent``
|
||||||
|
The image's byte stream as well as the image has to be generated. The
|
||||||
|
byte stream for this image has been requested.
|
||||||
|
**Note**, this priority is only set when the byte stream has not been
|
||||||
|
generated yet.
|
||||||
|
"""
|
||||||
|
Lowest = 4
|
||||||
|
Low = 3
|
||||||
|
Normal = 2
|
||||||
|
High = 1
|
||||||
|
Urgent = 0
|
||||||
|
|
||||||
|
|
||||||
class Image(object):
|
class Image(object):
|
||||||
name = ''
|
"""
|
||||||
path = ''
|
This class represents an image. To mark an image as *dirty* set the instance
|
||||||
dirty = True
|
variables ``image`` and ``image_bytes`` to ``None`` and add the image object
|
||||||
image = None
|
to the queue of images to process.
|
||||||
image_bytes = None
|
"""
|
||||||
|
def __init__(self, name='', path=''):
|
||||||
|
self.name = name
|
||||||
|
self.path = path
|
||||||
|
self.image = None
|
||||||
|
self.image_bytes = None
|
||||||
|
self.priority = Priority.Normal
|
||||||
|
|
||||||
|
|
||||||
|
class PriorityQueue(Queue.PriorityQueue):
|
||||||
|
"""
|
||||||
|
Customised ``Queue.PriorityQueue``.
|
||||||
|
"""
|
||||||
|
def remove(self, item):
|
||||||
|
"""
|
||||||
|
Removes the given ``item`` from the queue.
|
||||||
|
|
||||||
|
``item``
|
||||||
|
The item to remove. This should be a tuple::
|
||||||
|
|
||||||
|
``(Priority, Image)``
|
||||||
|
"""
|
||||||
|
if item in self.queue:
|
||||||
|
self.queue.remove(item)
|
||||||
|
|
||||||
|
|
||||||
class ImageManager(QtCore.QObject):
|
class ImageManager(QtCore.QObject):
|
||||||
|
@ -76,96 +137,120 @@ class ImageManager(QtCore.QObject):
|
||||||
self.width = current_screen[u'size'].width()
|
self.width = current_screen[u'size'].width()
|
||||||
self.height = current_screen[u'size'].height()
|
self.height = current_screen[u'size'].height()
|
||||||
self._cache = {}
|
self._cache = {}
|
||||||
self._thread_running = False
|
self._imageThread = ImageThread(self)
|
||||||
self._cache_dirty = False
|
self._conversion_queue = PriorityQueue()
|
||||||
self.image_thread = ImageThread(self)
|
|
||||||
|
|
||||||
def update_display(self):
|
def update_display(self):
|
||||||
"""
|
"""
|
||||||
Screen has changed size so rebuild the cache to new size
|
Screen has changed size so rebuild the cache to new size.
|
||||||
"""
|
"""
|
||||||
log.debug(u'update_display')
|
log.debug(u'update_display')
|
||||||
current_screen = ScreenList.get_instance().current
|
current_screen = ScreenList.get_instance().current
|
||||||
self.width = current_screen[u'size'].width()
|
self.width = current_screen[u'size'].width()
|
||||||
self.height = current_screen[u'size'].height()
|
self.height = current_screen[u'size'].height()
|
||||||
# mark the images as dirty for a rebuild
|
# Mark the images as dirty for a rebuild by setting the image and byte
|
||||||
for key in self._cache.keys():
|
# stream to None.
|
||||||
image = self._cache[key]
|
self._conversion_queue = PriorityQueue()
|
||||||
image.dirty = True
|
for key, image in self._cache.iteritems():
|
||||||
image.image = resize_image(image.path, self.width, self.height)
|
image.priority = Priority.Normal
|
||||||
self._cache_dirty = True
|
image.image = None
|
||||||
# only one thread please
|
image.image_bytes = None
|
||||||
if not self._thread_running:
|
self._conversion_queue.put((image.priority, image))
|
||||||
self.image_thread.start()
|
# We want only one thread.
|
||||||
|
if not self._imageThread.isRunning():
|
||||||
|
self._imageThread.start()
|
||||||
|
|
||||||
def get_image(self, name):
|
def get_image(self, name):
|
||||||
"""
|
"""
|
||||||
Return the Qimage from the cache
|
Return the ``QImage`` from the cache. If not present wait for the
|
||||||
|
background thread to process it.
|
||||||
"""
|
"""
|
||||||
log.debug(u'get_image %s' % name)
|
log.debug(u'get_image %s' % name)
|
||||||
return self._cache[name].image
|
image = self._cache[name]
|
||||||
|
if image.image is None:
|
||||||
|
self._conversion_queue.remove((image.priority, image))
|
||||||
|
image.priority = Priority.High
|
||||||
|
self._conversion_queue.put((image.priority, image))
|
||||||
|
while image.image is None:
|
||||||
|
log.debug(u'get_image - waiting')
|
||||||
|
time.sleep(0.1)
|
||||||
|
return image.image
|
||||||
|
|
||||||
def get_image_bytes(self, name):
|
def get_image_bytes(self, name):
|
||||||
"""
|
"""
|
||||||
Returns the byte string for an image
|
Returns the byte string for an image. If not present wait for the
|
||||||
If not present wait for the background thread to process it.
|
background thread to process it.
|
||||||
"""
|
"""
|
||||||
log.debug(u'get_image_bytes %s' % name)
|
log.debug(u'get_image_bytes %s' % name)
|
||||||
if not self._cache[name].image_bytes:
|
image = self._cache[name]
|
||||||
while self._cache[name].dirty:
|
if image.image_bytes is None:
|
||||||
|
self._conversion_queue.remove((image.priority, image))
|
||||||
|
image.priority = Priority.Urgent
|
||||||
|
self._conversion_queue.put((image.priority, image))
|
||||||
|
while image.image_bytes is None:
|
||||||
log.debug(u'get_image_bytes - waiting')
|
log.debug(u'get_image_bytes - waiting')
|
||||||
time.sleep(0.1)
|
time.sleep(0.1)
|
||||||
return self._cache[name].image_bytes
|
return image.image_bytes
|
||||||
|
|
||||||
def del_image(self, name):
|
def del_image(self, name):
|
||||||
"""
|
"""
|
||||||
Delete the Image from the Cache
|
Delete the Image from the cache.
|
||||||
"""
|
"""
|
||||||
log.debug(u'del_image %s' % name)
|
log.debug(u'del_image %s' % name)
|
||||||
if name in self._cache:
|
if name in self._cache:
|
||||||
|
self._conversion_queue.remove(
|
||||||
|
(self._cache[name].priority, self._cache[name]))
|
||||||
del self._cache[name]
|
del self._cache[name]
|
||||||
|
|
||||||
def add_image(self, name, path):
|
def add_image(self, name, path):
|
||||||
"""
|
"""
|
||||||
Add image to cache if it is not already there
|
Add image to cache if it is not already there.
|
||||||
"""
|
"""
|
||||||
log.debug(u'add_image %s:%s' % (name, path))
|
log.debug(u'add_image %s:%s' % (name, path))
|
||||||
if not name in self._cache:
|
if not name in self._cache:
|
||||||
image = Image()
|
image = Image(name, path)
|
||||||
image.name = name
|
|
||||||
image.path = path
|
|
||||||
image.image = resize_image(path, self.width, self.height)
|
|
||||||
self._cache[name] = image
|
self._cache[name] = image
|
||||||
|
self._conversion_queue.put((image.priority, image))
|
||||||
else:
|
else:
|
||||||
log.debug(u'Image in cache %s:%s' % (name, path))
|
log.debug(u'Image in cache %s:%s' % (name, path))
|
||||||
self._cache_dirty = True
|
# We want only one thread.
|
||||||
# only one thread please
|
if not self._imageThread.isRunning():
|
||||||
if not self._thread_running:
|
self._imageThread.start()
|
||||||
self.image_thread.start()
|
|
||||||
|
|
||||||
def process(self):
|
def _process(self):
|
||||||
"""
|
"""
|
||||||
Controls the processing called from a QThread
|
Controls the processing called from a ``QtCore.QThread``.
|
||||||
"""
|
"""
|
||||||
log.debug(u'process - started')
|
log.debug(u'_process - started')
|
||||||
self._thread_running = True
|
while not self._conversion_queue.empty():
|
||||||
self.clean_cache()
|
self._process_cache()
|
||||||
# data loaded since we started ?
|
log.debug(u'_process - ended')
|
||||||
while self._cache_dirty:
|
|
||||||
log.debug(u'process - recycle')
|
|
||||||
self.clean_cache()
|
|
||||||
self._thread_running = False
|
|
||||||
log.debug(u'process - ended')
|
|
||||||
|
|
||||||
def clean_cache(self):
|
def _process_cache(self):
|
||||||
"""
|
"""
|
||||||
Actually does the work.
|
Actually does the work.
|
||||||
"""
|
"""
|
||||||
log.debug(u'clean_cache')
|
log.debug(u'_process_cache')
|
||||||
# we will clean the cache now
|
image = self._conversion_queue.get()[1]
|
||||||
self._cache_dirty = False
|
# Generate the QImage for the image.
|
||||||
for key in self._cache.keys():
|
if image.image is None:
|
||||||
image = self._cache[key]
|
image.image = resize_image(image.path, self.width, self.height)
|
||||||
if image.dirty:
|
# Set the priority to Lowest and stop here as we need to process
|
||||||
image.image_bytes = image_to_byte(image.image)
|
# more important images first.
|
||||||
image.dirty = False
|
if image.priority == Priority.Normal:
|
||||||
|
self._conversion_queue.remove((image.priority, image))
|
||||||
|
image.priority = Priority.Lowest
|
||||||
|
self._conversion_queue.put((image.priority, image))
|
||||||
|
return
|
||||||
|
# For image with high priority we set the priority to Low, as the
|
||||||
|
# byte stream might be needed earlier the byte stream of image with
|
||||||
|
# Normal priority. We stop here as we need to process more important
|
||||||
|
# images first.
|
||||||
|
elif image.priority == Priority.High:
|
||||||
|
self._conversion_queue.remove((image.priority, image))
|
||||||
|
image.priority = Priority.Low
|
||||||
|
self._conversion_queue.put((image.priority, image))
|
||||||
|
return
|
||||||
|
# Generate the byte stream for the image.
|
||||||
|
if image.image_bytes is None:
|
||||||
|
image.image_bytes = image_to_byte(image.image)
|
||||||
|
|
|
@ -29,6 +29,7 @@ import re
|
||||||
try:
|
try:
|
||||||
import enchant
|
import enchant
|
||||||
from enchant import DictNotFoundError
|
from enchant import DictNotFoundError
|
||||||
|
from enchant.errors import Error
|
||||||
ENCHANT_AVAILABLE = True
|
ENCHANT_AVAILABLE = True
|
||||||
except ImportError:
|
except ImportError:
|
||||||
ENCHANT_AVAILABLE = False
|
ENCHANT_AVAILABLE = False
|
||||||
|
@ -56,7 +57,7 @@ class SpellTextEdit(QtGui.QPlainTextEdit):
|
||||||
self.dictionary = enchant.Dict()
|
self.dictionary = enchant.Dict()
|
||||||
self.highlighter = Highlighter(self.document())
|
self.highlighter = Highlighter(self.document())
|
||||||
self.highlighter.spellingDictionary = self.dictionary
|
self.highlighter.spellingDictionary = self.dictionary
|
||||||
except DictNotFoundError:
|
except Error, DictNotFoundError:
|
||||||
ENCHANT_AVAILABLE = False
|
ENCHANT_AVAILABLE = False
|
||||||
log.debug(u'Could not load default dictionary')
|
log.debug(u'Could not load default dictionary')
|
||||||
|
|
||||||
|
|
|
@ -178,10 +178,6 @@ class HorizontalType(object):
|
||||||
Center = 2
|
Center = 2
|
||||||
|
|
||||||
Names = [u'left', u'right', u'center']
|
Names = [u'left', u'right', u'center']
|
||||||
TranslatedNames = [
|
|
||||||
translate('OpenLP.ThemeWizard', 'Left'),
|
|
||||||
translate('OpenLP.ThemeWizard', 'Right'),
|
|
||||||
translate('OpenLP.ThemeWizard', 'Center')]
|
|
||||||
|
|
||||||
|
|
||||||
class VerticalType(object):
|
class VerticalType(object):
|
||||||
|
@ -193,7 +189,6 @@ class VerticalType(object):
|
||||||
Bottom = 2
|
Bottom = 2
|
||||||
|
|
||||||
Names = [u'top', u'middle', u'bottom']
|
Names = [u'top', u'middle', u'bottom']
|
||||||
TranslatedNames = [UiStrings().Top, UiStrings().Middle, UiStrings().Bottom]
|
|
||||||
|
|
||||||
|
|
||||||
BOOLEAN_LIST = [u'bold', u'italics', u'override', u'outline', u'shadow',
|
BOOLEAN_LIST = [u'bold', u'italics', u'override', u'outline', u'shadow',
|
||||||
|
|
|
@ -323,8 +323,9 @@ def shortcut_action(parent, name, shortcuts, function, icon=None, checked=None,
|
||||||
if checked is not None:
|
if checked is not None:
|
||||||
action.setCheckable(True)
|
action.setCheckable(True)
|
||||||
action.setChecked(checked)
|
action.setChecked(checked)
|
||||||
action.setShortcuts(shortcuts)
|
if shortcuts:
|
||||||
action.setShortcutContext(context)
|
action.setShortcuts(shortcuts)
|
||||||
|
action.setShortcutContext(context)
|
||||||
action_list = ActionList.get_instance()
|
action_list = ActionList.get_instance()
|
||||||
action_list.add_action(action, category)
|
action_list.add_action(action, category)
|
||||||
QtCore.QObject.connect(action, QtCore.SIGNAL(u'triggered(bool)'), function)
|
QtCore.QObject.connect(action, QtCore.SIGNAL(u'triggered(bool)'), function)
|
||||||
|
|
|
@ -35,13 +35,10 @@ class Ui_DisplayTagDialog(object):
|
||||||
def setupUi(self, displayTagDialog):
|
def setupUi(self, displayTagDialog):
|
||||||
displayTagDialog.setObjectName(u'displayTagDialog')
|
displayTagDialog.setObjectName(u'displayTagDialog')
|
||||||
displayTagDialog.resize(725, 548)
|
displayTagDialog.resize(725, 548)
|
||||||
self.widget = QtGui.QWidget(displayTagDialog)
|
self.listdataGridLayout = QtGui.QGridLayout(displayTagDialog)
|
||||||
self.widget.setGeometry(QtCore.QRect(10, 10, 701, 521))
|
self.listdataGridLayout.setMargin(8)
|
||||||
self.widget.setObjectName(u'widget')
|
|
||||||
self.listdataGridLayout = QtGui.QGridLayout(self.widget)
|
|
||||||
self.listdataGridLayout.setMargin(0)
|
|
||||||
self.listdataGridLayout.setObjectName(u'listdataGridLayout')
|
self.listdataGridLayout.setObjectName(u'listdataGridLayout')
|
||||||
self.tagTableWidget = QtGui.QTableWidget(self.widget)
|
self.tagTableWidget = QtGui.QTableWidget(displayTagDialog)
|
||||||
self.tagTableWidget.setHorizontalScrollBarPolicy(
|
self.tagTableWidget.setHorizontalScrollBarPolicy(
|
||||||
QtCore.Qt.ScrollBarAlwaysOff)
|
QtCore.Qt.ScrollBarAlwaysOff)
|
||||||
self.tagTableWidget.setEditTriggers(
|
self.tagTableWidget.setEditTriggers(
|
||||||
|
@ -55,6 +52,7 @@ class Ui_DisplayTagDialog(object):
|
||||||
self.tagTableWidget.setObjectName(u'tagTableWidget')
|
self.tagTableWidget.setObjectName(u'tagTableWidget')
|
||||||
self.tagTableWidget.setColumnCount(4)
|
self.tagTableWidget.setColumnCount(4)
|
||||||
self.tagTableWidget.setRowCount(0)
|
self.tagTableWidget.setRowCount(0)
|
||||||
|
self.tagTableWidget.horizontalHeader().setStretchLastSection(True)
|
||||||
item = QtGui.QTableWidgetItem()
|
item = QtGui.QTableWidgetItem()
|
||||||
self.tagTableWidget.setHorizontalHeaderItem(0, item)
|
self.tagTableWidget.setHorizontalHeaderItem(0, item)
|
||||||
item = QtGui.QTableWidgetItem()
|
item = QtGui.QTableWidgetItem()
|
||||||
|
@ -69,11 +67,11 @@ class Ui_DisplayTagDialog(object):
|
||||||
spacerItem = QtGui.QSpacerItem(40, 20,
|
spacerItem = QtGui.QSpacerItem(40, 20,
|
||||||
QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
|
QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
|
||||||
self.horizontalLayout.addItem(spacerItem)
|
self.horizontalLayout.addItem(spacerItem)
|
||||||
self.deletePushButton = QtGui.QPushButton(self.widget)
|
self.deletePushButton = QtGui.QPushButton(displayTagDialog)
|
||||||
self.deletePushButton.setObjectName(u'deletePushButton')
|
self.deletePushButton.setObjectName(u'deletePushButton')
|
||||||
self.horizontalLayout.addWidget(self.deletePushButton)
|
self.horizontalLayout.addWidget(self.deletePushButton)
|
||||||
self.listdataGridLayout.addLayout(self.horizontalLayout, 1, 0, 1, 1)
|
self.listdataGridLayout.addLayout(self.horizontalLayout, 1, 0, 1, 1)
|
||||||
self.editGroupBox = QtGui.QGroupBox(self.widget)
|
self.editGroupBox = QtGui.QGroupBox(displayTagDialog)
|
||||||
self.editGroupBox.setObjectName(u'editGroupBox')
|
self.editGroupBox.setObjectName(u'editGroupBox')
|
||||||
self.dataGridLayout = QtGui.QGridLayout(self.editGroupBox)
|
self.dataGridLayout = QtGui.QGridLayout(self.editGroupBox)
|
||||||
self.dataGridLayout.setObjectName(u'dataGridLayout')
|
self.dataGridLayout.setObjectName(u'dataGridLayout')
|
||||||
|
@ -115,9 +113,8 @@ class Ui_DisplayTagDialog(object):
|
||||||
self.dataGridLayout.addWidget(self.savePushButton, 4, 2, 1, 1)
|
self.dataGridLayout.addWidget(self.savePushButton, 4, 2, 1, 1)
|
||||||
self.listdataGridLayout.addWidget(self.editGroupBox, 2, 0, 1, 1)
|
self.listdataGridLayout.addWidget(self.editGroupBox, 2, 0, 1, 1)
|
||||||
self.buttonBox = QtGui.QDialogButtonBox(displayTagDialog)
|
self.buttonBox = QtGui.QDialogButtonBox(displayTagDialog)
|
||||||
closeButton = QtGui.QDialogButtonBox.Close
|
|
||||||
self.buttonBox.setObjectName('displayTagDialogButtonBox')
|
self.buttonBox.setObjectName('displayTagDialogButtonBox')
|
||||||
self.buttonBox.setStandardButtons(closeButton)
|
self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Close)
|
||||||
self.listdataGridLayout.addWidget(self.buttonBox, 3, 0, 1, 1)
|
self.listdataGridLayout.addWidget(self.buttonBox, 3, 0, 1, 1)
|
||||||
|
|
||||||
self.retranslateUi(displayTagDialog)
|
self.retranslateUi(displayTagDialog)
|
||||||
|
@ -148,6 +145,5 @@ class Ui_DisplayTagDialog(object):
|
||||||
self.tagTableWidget.horizontalHeaderItem(3).setText(
|
self.tagTableWidget.horizontalHeaderItem(3).setText(
|
||||||
translate('OpenLP.DisplayTagDialog', 'End HTML'))
|
translate('OpenLP.DisplayTagDialog', 'End HTML'))
|
||||||
self.tagTableWidget.setColumnWidth(0, 120)
|
self.tagTableWidget.setColumnWidth(0, 120)
|
||||||
self.tagTableWidget.setColumnWidth(1, 40)
|
self.tagTableWidget.setColumnWidth(1, 80)
|
||||||
self.tagTableWidget.setColumnWidth(2, 240)
|
self.tagTableWidget.setColumnWidth(2, 330)
|
||||||
self.tagTableWidget.setColumnWidth(3, 240)
|
|
||||||
|
|
|
@ -138,6 +138,7 @@ class DisplayTagForm(QtGui.QDialog, Ui_DisplayTagDialog):
|
||||||
# Highlight new row
|
# Highlight new row
|
||||||
self.tagTableWidget.selectRow(self.tagTableWidget.rowCount() - 1)
|
self.tagTableWidget.selectRow(self.tagTableWidget.rowCount() - 1)
|
||||||
self.onRowSelected()
|
self.onRowSelected()
|
||||||
|
self.tagTableWidget.scrollToBottom()
|
||||||
|
|
||||||
def onDeletePushed(self):
|
def onDeletePushed(self):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -49,7 +49,10 @@ class MainDisplay(QtGui.QGraphicsView):
|
||||||
This is the display screen.
|
This is the display screen.
|
||||||
"""
|
"""
|
||||||
def __init__(self, parent, image_manager, live):
|
def __init__(self, parent, image_manager, live):
|
||||||
QtGui.QGraphicsView.__init__(self, parent)
|
if live:
|
||||||
|
QtGui.QGraphicsView.__init__(self)
|
||||||
|
else:
|
||||||
|
QtGui.QGraphicsView.__init__(self, parent)
|
||||||
self.isLive = live
|
self.isLive = live
|
||||||
self.image_manager = image_manager
|
self.image_manager = image_manager
|
||||||
self.screens = ScreenList.get_instance()
|
self.screens = ScreenList.get_instance()
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
from tempfile import gettempdir
|
from tempfile import gettempdir
|
||||||
|
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
@ -92,6 +93,8 @@ class Ui_MainWindow(object):
|
||||||
self.previewController.panel.setVisible(previewVisible)
|
self.previewController.panel.setVisible(previewVisible)
|
||||||
liveVisible = QtCore.QSettings().value(u'user interface/live panel',
|
liveVisible = QtCore.QSettings().value(u'user interface/live panel',
|
||||||
QtCore.QVariant(True)).toBool()
|
QtCore.QVariant(True)).toBool()
|
||||||
|
panelLocked = QtCore.QSettings().value(u'user interface/lock panel',
|
||||||
|
QtCore.QVariant(False)).toBool()
|
||||||
self.liveController.panel.setVisible(liveVisible)
|
self.liveController.panel.setVisible(liveVisible)
|
||||||
# Create menu
|
# Create menu
|
||||||
self.menuBar = QtGui.QMenuBar(mainWindow)
|
self.menuBar = QtGui.QMenuBar(mainWindow)
|
||||||
|
@ -212,11 +215,15 @@ class Ui_MainWindow(object):
|
||||||
self.viewLivePanel = shortcut_action(mainWindow, u'viewLivePanel',
|
self.viewLivePanel = shortcut_action(mainWindow, u'viewLivePanel',
|
||||||
[QtGui.QKeySequence(u'F12')], self.setLivePanelVisibility,
|
[QtGui.QKeySequence(u'F12')], self.setLivePanelVisibility,
|
||||||
checked=liveVisible, category=UiStrings().View)
|
checked=liveVisible, category=UiStrings().View)
|
||||||
action_list.add_category(UiStrings().ViewMode, CategoryOrder.standardMenu)
|
self.lockPanel = shortcut_action(mainWindow, u'lockPanel',
|
||||||
|
None, self.setLockPanel,
|
||||||
|
checked=panelLocked, category=None)
|
||||||
|
action_list.add_category(UiStrings().ViewMode,
|
||||||
|
CategoryOrder.standardMenu)
|
||||||
self.modeDefaultItem = checkable_action(
|
self.modeDefaultItem = checkable_action(
|
||||||
mainWindow, u'modeDefaultItem', category=UiStrings().ViewMode)
|
mainWindow, u'modeDefaultItem', category=UiStrings().ViewMode)
|
||||||
self.modeSetupItem = checkable_action(
|
self.modeSetupItem = checkable_action(
|
||||||
mainWindow, u'modeLiveItem', category=UiStrings().ViewMode)
|
mainWindow, u'modeSetupItem', category=UiStrings().ViewMode)
|
||||||
self.modeLiveItem = checkable_action(
|
self.modeLiveItem = checkable_action(
|
||||||
mainWindow, u'modeLiveItem', True, UiStrings().ViewMode)
|
mainWindow, u'modeLiveItem', True, UiStrings().ViewMode)
|
||||||
self.modeGroup = QtGui.QActionGroup(mainWindow)
|
self.modeGroup = QtGui.QActionGroup(mainWindow)
|
||||||
|
@ -232,7 +239,8 @@ class Ui_MainWindow(object):
|
||||||
category=UiStrings().Tools)
|
category=UiStrings().Tools)
|
||||||
self.updateThemeImages = base_action(mainWindow,
|
self.updateThemeImages = base_action(mainWindow,
|
||||||
u'updateThemeImages', category=UiStrings().Tools)
|
u'updateThemeImages', category=UiStrings().Tools)
|
||||||
action_list.add_category(UiStrings().Settings, CategoryOrder.standardMenu)
|
action_list.add_category(UiStrings().Settings,
|
||||||
|
CategoryOrder.standardMenu)
|
||||||
self.settingsPluginListItem = shortcut_action(mainWindow,
|
self.settingsPluginListItem = shortcut_action(mainWindow,
|
||||||
u'settingsPluginListItem', [QtGui.QKeySequence(u'Alt+F7')],
|
u'settingsPluginListItem', [QtGui.QKeySequence(u'Alt+F7')],
|
||||||
self.onPluginItemClicked, u':/system/settings_plugin_list.png',
|
self.onPluginItemClicked, u':/system/settings_plugin_list.png',
|
||||||
|
@ -287,14 +295,22 @@ class Ui_MainWindow(object):
|
||||||
add_actions(self.viewMenu, (self.viewModeMenu.menuAction(),
|
add_actions(self.viewMenu, (self.viewModeMenu.menuAction(),
|
||||||
None, self.viewMediaManagerItem, self.viewServiceManagerItem,
|
None, self.viewMediaManagerItem, self.viewServiceManagerItem,
|
||||||
self.viewThemeManagerItem, None, self.viewPreviewPanel,
|
self.viewThemeManagerItem, None, self.viewPreviewPanel,
|
||||||
self.viewLivePanel))
|
self.viewLivePanel, None, self.lockPanel))
|
||||||
# i18n add Language Actions
|
# i18n add Language Actions
|
||||||
add_actions(self.settingsLanguageMenu, (self.autoLanguageItem, None))
|
add_actions(self.settingsLanguageMenu, (self.autoLanguageItem, None))
|
||||||
add_actions(self.settingsLanguageMenu, self.languageGroup.actions())
|
add_actions(self.settingsLanguageMenu, self.languageGroup.actions())
|
||||||
add_actions(self.settingsMenu, (self.settingsPluginListItem,
|
# Order things differently in OS X so that Preferences menu item in the
|
||||||
self.settingsLanguageMenu.menuAction(), None,
|
# app menu is correct (this gets picked up automatically by Qt).
|
||||||
self.displayTagItem, self.settingsShortcutsItem,
|
if sys.platform == u'darwin':
|
||||||
self.settingsConfigureItem))
|
add_actions(self.settingsMenu, (self.settingsPluginListItem,
|
||||||
|
self.settingsLanguageMenu.menuAction(), None,
|
||||||
|
self.settingsConfigureItem, self.settingsShortcutsItem,
|
||||||
|
self.displayTagItem))
|
||||||
|
else:
|
||||||
|
add_actions(self.settingsMenu, (self.settingsPluginListItem,
|
||||||
|
self.settingsLanguageMenu.menuAction(), None,
|
||||||
|
self.displayTagItem, self.settingsShortcutsItem,
|
||||||
|
self.settingsConfigureItem))
|
||||||
add_actions(self.toolsMenu, (self.toolsAddToolItem, None))
|
add_actions(self.toolsMenu, (self.toolsAddToolItem, None))
|
||||||
add_actions(self.toolsMenu, (self.toolsOpenDataFolder, None))
|
add_actions(self.toolsMenu, (self.toolsOpenDataFolder, None))
|
||||||
add_actions(self.toolsMenu, [self.updateThemeImages])
|
add_actions(self.toolsMenu, [self.updateThemeImages])
|
||||||
|
@ -316,6 +332,7 @@ class Ui_MainWindow(object):
|
||||||
self.importLanguageItem.setVisible(False)
|
self.importLanguageItem.setVisible(False)
|
||||||
self.exportLanguageItem.setVisible(False)
|
self.exportLanguageItem.setVisible(False)
|
||||||
self.helpDocumentationItem.setVisible(False)
|
self.helpDocumentationItem.setVisible(False)
|
||||||
|
self.setLockPanel(panelLocked)
|
||||||
|
|
||||||
def retranslateUi(self, mainWindow):
|
def retranslateUi(self, mainWindow):
|
||||||
"""
|
"""
|
||||||
|
@ -405,6 +422,10 @@ class Ui_MainWindow(object):
|
||||||
translate('OpenLP.MainWindow', '&Live Panel'))
|
translate('OpenLP.MainWindow', '&Live Panel'))
|
||||||
self.viewLivePanel.setToolTip(
|
self.viewLivePanel.setToolTip(
|
||||||
translate('OpenLP.MainWindow', 'Toggle Live Panel'))
|
translate('OpenLP.MainWindow', 'Toggle Live Panel'))
|
||||||
|
self.lockPanel.setText(
|
||||||
|
translate('OpenLP.MainWindow', 'L&ock Panels'))
|
||||||
|
self.lockPanel.setStatusTip(
|
||||||
|
translate('OpenLP.MainWindow', 'Prevent the panels being moved.'))
|
||||||
self.viewLivePanel.setStatusTip(translate('OpenLP.MainWindow',
|
self.viewLivePanel.setStatusTip(translate('OpenLP.MainWindow',
|
||||||
'Toggle the visibility of the live panel.'))
|
'Toggle the visibility of the live panel.'))
|
||||||
self.settingsPluginListItem.setText(translate('OpenLP.MainWindow',
|
self.settingsPluginListItem.setText(translate('OpenLP.MainWindow',
|
||||||
|
@ -644,7 +665,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||||
QtCore.QVariant(False)).toBool():
|
QtCore.QVariant(False)).toBool():
|
||||||
self.serviceManagerContents.loadLastFile()
|
self.serviceManagerContents.loadLastFile()
|
||||||
view_mode = QtCore.QSettings().value(u'%s/view mode' % \
|
view_mode = QtCore.QSettings().value(u'%s/view mode' % \
|
||||||
self.generalSettingsSection, u'default')
|
self.generalSettingsSection, u'default').toString()
|
||||||
if view_mode == u'default':
|
if view_mode == u'default':
|
||||||
self.modeDefaultItem.setChecked(True)
|
self.modeDefaultItem.setChecked(True)
|
||||||
elif view_mode == u'setup':
|
elif view_mode == u'setup':
|
||||||
|
@ -927,7 +948,8 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||||
self.mediaManagerDock.setVisible(not self.mediaManagerDock.isVisible())
|
self.mediaManagerDock.setVisible(not self.mediaManagerDock.isVisible())
|
||||||
|
|
||||||
def toggleServiceManager(self):
|
def toggleServiceManager(self):
|
||||||
self.serviceManagerDock.setVisible(not self.serviceManagerDock.isVisible())
|
self.serviceManagerDock.setVisible(
|
||||||
|
not self.serviceManagerDock.isVisible())
|
||||||
|
|
||||||
def toggleThemeManager(self):
|
def toggleThemeManager(self):
|
||||||
self.themeManagerDock.setVisible(not self.themeManagerDock.isVisible())
|
self.themeManagerDock.setVisible(not self.themeManagerDock.isVisible())
|
||||||
|
@ -947,6 +969,37 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||||
QtCore.QVariant(visible))
|
QtCore.QVariant(visible))
|
||||||
self.viewPreviewPanel.setChecked(visible)
|
self.viewPreviewPanel.setChecked(visible)
|
||||||
|
|
||||||
|
def setLockPanel(self, lock):
|
||||||
|
"""
|
||||||
|
Sets the ability to stop the toolbars being changed.
|
||||||
|
"""
|
||||||
|
if lock:
|
||||||
|
self.themeManagerDock.setFeatures(
|
||||||
|
QtGui.QDockWidget.NoDockWidgetFeatures)
|
||||||
|
self.serviceManagerDock.setFeatures(
|
||||||
|
QtGui.QDockWidget.NoDockWidgetFeatures)
|
||||||
|
self.mediaManagerDock.setFeatures(
|
||||||
|
QtGui.QDockWidget.NoDockWidgetFeatures)
|
||||||
|
self.viewMediaManagerItem.setEnabled(False)
|
||||||
|
self.viewServiceManagerItem.setEnabled(False)
|
||||||
|
self.viewThemeManagerItem.setEnabled(False)
|
||||||
|
self.viewPreviewPanel.setEnabled(False)
|
||||||
|
self.viewLivePanel.setEnabled(False)
|
||||||
|
else:
|
||||||
|
self.themeManagerDock.setFeatures(
|
||||||
|
QtGui.QDockWidget.AllDockWidgetFeatures)
|
||||||
|
self.serviceManagerDock.setFeatures(
|
||||||
|
QtGui.QDockWidget.AllDockWidgetFeatures)
|
||||||
|
self.mediaManagerDock.setFeatures(
|
||||||
|
QtGui.QDockWidget.AllDockWidgetFeatures)
|
||||||
|
self.viewMediaManagerItem.setEnabled(True)
|
||||||
|
self.viewServiceManagerItem.setEnabled(True)
|
||||||
|
self.viewThemeManagerItem.setEnabled(True)
|
||||||
|
self.viewPreviewPanel.setEnabled(True)
|
||||||
|
self.viewLivePanel.setEnabled(True)
|
||||||
|
QtCore.QSettings().setValue(u'user interface/lock panel',
|
||||||
|
QtCore.QVariant(lock))
|
||||||
|
|
||||||
def setLivePanelVisibility(self, visible):
|
def setLivePanelVisibility(self, visible):
|
||||||
"""
|
"""
|
||||||
Sets the visibility of the live panel including saving the setting and
|
Sets the visibility of the live panel including saving the setting and
|
||||||
|
|
|
@ -41,11 +41,6 @@ class ZoomSize(object):
|
||||||
Fifty = 4
|
Fifty = 4
|
||||||
TwentyFive = 5
|
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):
|
class Ui_PrintServiceDialog(object):
|
||||||
def setupUi(self, printServiceDialog):
|
def setupUi(self, printServiceDialog):
|
||||||
|
@ -59,18 +54,14 @@ class Ui_PrintServiceDialog(object):
|
||||||
self.toolbar.setIconSize(QtCore.QSize(22, 22))
|
self.toolbar.setIconSize(QtCore.QSize(22, 22))
|
||||||
self.toolbar.setToolButtonStyle(QtCore.Qt.ToolButtonTextBesideIcon)
|
self.toolbar.setToolButtonStyle(QtCore.Qt.ToolButtonTextBesideIcon)
|
||||||
self.printButton = self.toolbar.addAction(
|
self.printButton = self.toolbar.addAction(
|
||||||
build_icon(u':/general/general_print.png'), 'Print')
|
build_icon(u':/general/general_print.png'),
|
||||||
|
translate('OpenLP.PrintServiceForm', 'Print'))
|
||||||
self.optionsButton = QtGui.QToolButton(self.toolbar)
|
self.optionsButton = QtGui.QToolButton(self.toolbar)
|
||||||
self.optionsButton.setText(translate('OpenLP.PrintServiceForm',
|
|
||||||
'Options'))
|
|
||||||
self.optionsButton.setToolButtonStyle(
|
self.optionsButton.setToolButtonStyle(
|
||||||
QtCore.Qt.ToolButtonTextBesideIcon)
|
QtCore.Qt.ToolButtonTextBesideIcon)
|
||||||
self.optionsButton.setIcon(build_icon(u':/system/system_configure.png'))
|
self.optionsButton.setIcon(build_icon(u':/system/system_configure.png'))
|
||||||
self.optionsButton.setCheckable(True)
|
self.optionsButton.setCheckable(True)
|
||||||
self.toolbar.addWidget(self.optionsButton)
|
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.toolbar.addSeparator()
|
||||||
self.plainCopy = self.toolbar.addAction(
|
self.plainCopy = self.toolbar.addAction(
|
||||||
build_icon(u':/system/system_edit_copy.png'),
|
build_icon(u':/system/system_edit_copy.png'),
|
||||||
|
@ -81,24 +72,18 @@ class Ui_PrintServiceDialog(object):
|
||||||
self.toolbar.addSeparator()
|
self.toolbar.addSeparator()
|
||||||
self.zoomInButton = QtGui.QToolButton(self.toolbar)
|
self.zoomInButton = QtGui.QToolButton(self.toolbar)
|
||||||
self.zoomInButton.setIcon(build_icon(u':/general/general_zoom_in.png'))
|
self.zoomInButton.setIcon(build_icon(u':/general/general_zoom_in.png'))
|
||||||
self.zoomInButton.setToolTip(translate('OpenLP.PrintServiceForm',
|
|
||||||
'Zoom In'))
|
|
||||||
self.zoomInButton.setObjectName(u'zoomInButton')
|
self.zoomInButton.setObjectName(u'zoomInButton')
|
||||||
self.zoomInButton.setIconSize(QtCore.QSize(22, 22))
|
self.zoomInButton.setIconSize(QtCore.QSize(22, 22))
|
||||||
self.toolbar.addWidget(self.zoomInButton)
|
self.toolbar.addWidget(self.zoomInButton)
|
||||||
self.zoomOutButton = QtGui.QToolButton(self.toolbar)
|
self.zoomOutButton = QtGui.QToolButton(self.toolbar)
|
||||||
self.zoomOutButton.setIcon(
|
self.zoomOutButton.setIcon(
|
||||||
build_icon(u':/general/general_zoom_out.png'))
|
build_icon(u':/general/general_zoom_out.png'))
|
||||||
self.zoomOutButton.setToolTip(translate('OpenLP.PrintServiceForm',
|
|
||||||
'Zoom Out'))
|
|
||||||
self.zoomOutButton.setObjectName(u'zoomOutButton')
|
self.zoomOutButton.setObjectName(u'zoomOutButton')
|
||||||
self.zoomOutButton.setIconSize(QtCore.QSize(22, 22))
|
self.zoomOutButton.setIconSize(QtCore.QSize(22, 22))
|
||||||
self.toolbar.addWidget(self.zoomOutButton)
|
self.toolbar.addWidget(self.zoomOutButton)
|
||||||
self.zoomOriginalButton = QtGui.QToolButton(self.toolbar)
|
self.zoomOriginalButton = QtGui.QToolButton(self.toolbar)
|
||||||
self.zoomOriginalButton.setIcon(
|
self.zoomOriginalButton.setIcon(
|
||||||
build_icon(u':/general/general_zoom_original.png'))
|
build_icon(u':/general/general_zoom_original.png'))
|
||||||
self.zoomOriginalButton.setToolTip(translate('OpenLP.PrintServiceForm',
|
|
||||||
'Zoom Original'))
|
|
||||||
self.zoomOriginalButton.setObjectName(u'zoomOriginalButton')
|
self.zoomOriginalButton.setObjectName(u'zoomOriginalButton')
|
||||||
self.zoomOriginalButton.setIconSize(QtCore.QSize(22, 22))
|
self.zoomOriginalButton.setIconSize(QtCore.QSize(22, 22))
|
||||||
self.toolbar.addWidget(self.zoomOriginalButton)
|
self.toolbar.addWidget(self.zoomOriginalButton)
|
||||||
|
@ -116,20 +101,17 @@ class Ui_PrintServiceDialog(object):
|
||||||
self.optionsLayout.setContentsMargins(8, 8, 8, 8)
|
self.optionsLayout.setContentsMargins(8, 8, 8, 8)
|
||||||
self.titleLabel = QtGui.QLabel(self.optionsWidget)
|
self.titleLabel = QtGui.QLabel(self.optionsWidget)
|
||||||
self.titleLabel.setObjectName(u'titleLabel')
|
self.titleLabel.setObjectName(u'titleLabel')
|
||||||
self.titleLabel.setText(u'Title:')
|
|
||||||
self.optionsLayout.addWidget(self.titleLabel)
|
self.optionsLayout.addWidget(self.titleLabel)
|
||||||
self.titleLineEdit = QtGui.QLineEdit(self.optionsWidget)
|
self.titleLineEdit = QtGui.QLineEdit(self.optionsWidget)
|
||||||
self.titleLineEdit.setObjectName(u'titleLineEdit')
|
self.titleLineEdit.setObjectName(u'titleLineEdit')
|
||||||
self.optionsLayout.addWidget(self.titleLineEdit)
|
self.optionsLayout.addWidget(self.titleLineEdit)
|
||||||
self.footerLabel = QtGui.QLabel(self.optionsWidget)
|
self.footerLabel = QtGui.QLabel(self.optionsWidget)
|
||||||
self.footerLabel.setObjectName(u'footerLabel')
|
self.footerLabel.setObjectName(u'footerLabel')
|
||||||
self.footerLabel.setText(u'Custom Footer Text:')
|
|
||||||
self.optionsLayout.addWidget(self.footerLabel)
|
self.optionsLayout.addWidget(self.footerLabel)
|
||||||
self.footerTextEdit = SpellTextEdit(self.optionsWidget)
|
self.footerTextEdit = SpellTextEdit(self.optionsWidget)
|
||||||
self.footerTextEdit.setObjectName(u'footerTextEdit')
|
self.footerTextEdit.setObjectName(u'footerTextEdit')
|
||||||
self.optionsLayout.addWidget(self.footerTextEdit)
|
self.optionsLayout.addWidget(self.footerTextEdit)
|
||||||
self.optionsGroupBox = QtGui.QGroupBox(
|
self.optionsGroupBox = QtGui.QGroupBox()
|
||||||
translate('OpenLP.PrintServiceForm','Other Options'))
|
|
||||||
self.groupLayout = QtGui.QVBoxLayout()
|
self.groupLayout = QtGui.QVBoxLayout()
|
||||||
self.slideTextCheckBox = QtGui.QCheckBox()
|
self.slideTextCheckBox = QtGui.QCheckBox()
|
||||||
self.groupLayout.addWidget(self.slideTextCheckBox)
|
self.groupLayout.addWidget(self.slideTextCheckBox)
|
||||||
|
@ -150,6 +132,19 @@ class Ui_PrintServiceDialog(object):
|
||||||
|
|
||||||
def retranslateUi(self, printServiceDialog):
|
def retranslateUi(self, printServiceDialog):
|
||||||
printServiceDialog.setWindowTitle(UiStrings().PrintService)
|
printServiceDialog.setWindowTitle(UiStrings().PrintService)
|
||||||
|
self.zoomOutButton.setToolTip(translate('OpenLP.PrintServiceForm',
|
||||||
|
'Zoom Out'))
|
||||||
|
self.zoomOriginalButton.setToolTip(translate('OpenLP.PrintServiceForm',
|
||||||
|
'Zoom Original'))
|
||||||
|
self.zoomInButton.setToolTip(translate('OpenLP.PrintServiceForm',
|
||||||
|
'Zoom In'))
|
||||||
|
self.optionsButton.setText(translate('OpenLP.PrintServiceForm',
|
||||||
|
'Options'))
|
||||||
|
self.titleLabel.setText(translate('OpenLP.PrintServiceForm', 'Title:'))
|
||||||
|
self.footerLabel.setText(translate('OpenLP.PrintServiceForm',
|
||||||
|
'Custom Footer Text:'))
|
||||||
|
self.optionsGroupBox.setTitle(
|
||||||
|
translate('OpenLP.PrintServiceForm','Other Options'))
|
||||||
self.slideTextCheckBox.setText(translate('OpenLP.PrintServiceForm',
|
self.slideTextCheckBox.setText(translate('OpenLP.PrintServiceForm',
|
||||||
'Include slide text if available'))
|
'Include slide text if available'))
|
||||||
self.pageBreakAfterText.setText(translate('OpenLP.PrintServiceForm',
|
self.pageBreakAfterText.setText(translate('OpenLP.PrintServiceForm',
|
||||||
|
@ -160,10 +155,13 @@ class Ui_PrintServiceDialog(object):
|
||||||
'Include play length of media items'))
|
'Include play length of media items'))
|
||||||
self.titleLineEdit.setText(translate('OpenLP.PrintServiceForm',
|
self.titleLineEdit.setText(translate('OpenLP.PrintServiceForm',
|
||||||
'Service Sheet'))
|
'Service Sheet'))
|
||||||
self.zoomComboBox.addItem(ZoomSize.Sizes[ZoomSize.Page])
|
# Do not change the order.
|
||||||
self.zoomComboBox.addItem(ZoomSize.Sizes[ZoomSize.Width])
|
self.zoomComboBox.addItems([
|
||||||
self.zoomComboBox.addItem(ZoomSize.Sizes[ZoomSize.OneHundred])
|
translate('OpenLP.PrintServiceDialog', 'Fit Page'),
|
||||||
self.zoomComboBox.addItem(ZoomSize.Sizes[ZoomSize.SeventyFive])
|
translate('OpenLP.PrintServiceDialog', 'Fit Width'),
|
||||||
self.zoomComboBox.addItem(ZoomSize.Sizes[ZoomSize.Fifty])
|
u'100%',
|
||||||
self.zoomComboBox.addItem(ZoomSize.Sizes[ZoomSize.TwentyFive])
|
u'75%',
|
||||||
|
u'50%',
|
||||||
|
u'25%']
|
||||||
|
)
|
||||||
|
|
||||||
|
|
|
@ -137,8 +137,6 @@ class PrintServiceForm(QtGui.QDialog, Ui_PrintServiceDialog):
|
||||||
# Signals
|
# Signals
|
||||||
QtCore.QObject.connect(self.printButton,
|
QtCore.QObject.connect(self.printButton,
|
||||||
QtCore.SIGNAL(u'triggered()'), 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,
|
||||||
|
@ -326,8 +324,7 @@ class PrintServiceForm(QtGui.QDialog, Ui_PrintServiceDialog):
|
||||||
"""
|
"""
|
||||||
Copies the display text to the clipboard as plain text
|
Copies the display text to the clipboard as plain text
|
||||||
"""
|
"""
|
||||||
self.mainWindow.clipboard.setText(
|
self.mainWindow.clipboard.setText(self.document.toPlainText())
|
||||||
self.document.toPlainText())
|
|
||||||
|
|
||||||
def copyHtmlText(self):
|
def copyHtmlText(self):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -98,6 +98,9 @@ class ShortcutListForm(QtGui.QDialog, Ui_ShortcutListDialog):
|
||||||
if event.modifiers() & QtCore.Qt.ShiftModifier == \
|
if event.modifiers() & QtCore.Qt.ShiftModifier == \
|
||||||
QtCore.Qt.ShiftModifier:
|
QtCore.Qt.ShiftModifier:
|
||||||
key_string = u'Shift+' + key_string
|
key_string = u'Shift+' + key_string
|
||||||
|
if event.modifiers() & QtCore.Qt.MetaModifier == \
|
||||||
|
QtCore.Qt.MetaModifier:
|
||||||
|
key_string = u'Meta+' + key_string
|
||||||
key_sequence = QtGui.QKeySequence(key_string)
|
key_sequence = QtGui.QKeySequence(key_string)
|
||||||
if self._validiate_shortcut(self._currentItemAction(), key_sequence):
|
if self._validiate_shortcut(self._currentItemAction(), key_sequence):
|
||||||
if self.primaryPushButton.isChecked():
|
if self.primaryPushButton.isChecked():
|
||||||
|
|
|
@ -500,7 +500,9 @@ class SlideController(QtGui.QWidget):
|
||||||
"""
|
"""
|
||||||
Allows the live toolbar to be customised
|
Allows the live toolbar to be customised
|
||||||
"""
|
"""
|
||||||
self.toolbar.setVisible(True)
|
# Work-around for OS X, hide and then show the toolbar
|
||||||
|
# See bug #791050
|
||||||
|
self.toolbar.hide()
|
||||||
self.mediabar.setVisible(False)
|
self.mediabar.setVisible(False)
|
||||||
self.toolbar.makeWidgetsInvisible([u'Song Menu'])
|
self.toolbar.makeWidgetsInvisible([u'Song Menu'])
|
||||||
self.toolbar.makeWidgetsInvisible(self.loopList)
|
self.toolbar.makeWidgetsInvisible(self.loopList)
|
||||||
|
@ -515,12 +517,18 @@ class SlideController(QtGui.QWidget):
|
||||||
if item.is_media():
|
if item.is_media():
|
||||||
self.toolbar.setVisible(False)
|
self.toolbar.setVisible(False)
|
||||||
self.mediabar.setVisible(True)
|
self.mediabar.setVisible(True)
|
||||||
|
else:
|
||||||
|
# Work-around for OS X, hide and then show the toolbar
|
||||||
|
# See bug #791050
|
||||||
|
self.toolbar.show()
|
||||||
|
|
||||||
def enablePreviewToolBar(self, item):
|
def enablePreviewToolBar(self, item):
|
||||||
"""
|
"""
|
||||||
Allows the Preview toolbar to be customised
|
Allows the Preview toolbar to be customised
|
||||||
"""
|
"""
|
||||||
self.toolbar.setVisible(True)
|
# Work-around for OS X, hide and then show the toolbar
|
||||||
|
# See bug #791050
|
||||||
|
self.toolbar.hide()
|
||||||
self.mediabar.setVisible(False)
|
self.mediabar.setVisible(False)
|
||||||
self.toolbar.makeWidgetsInvisible(self.songEditList)
|
self.toolbar.makeWidgetsInvisible(self.songEditList)
|
||||||
if item.is_capable(ItemCapabilities.AllowsEdit) and item.from_plugin:
|
if item.is_capable(ItemCapabilities.AllowsEdit) and item.from_plugin:
|
||||||
|
@ -529,6 +537,10 @@ class SlideController(QtGui.QWidget):
|
||||||
self.toolbar.setVisible(False)
|
self.toolbar.setVisible(False)
|
||||||
self.mediabar.setVisible(True)
|
self.mediabar.setVisible(True)
|
||||||
self.volumeSlider.setAudioOutput(self.audio)
|
self.volumeSlider.setAudioOutput(self.audio)
|
||||||
|
if not item.is_media():
|
||||||
|
# Work-around for OS X, hide and then show the toolbar
|
||||||
|
# See bug #791050
|
||||||
|
self.toolbar.show()
|
||||||
|
|
||||||
def refreshServiceItem(self):
|
def refreshServiceItem(self):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -298,7 +298,10 @@ class ThemeManager(QtGui.QWidget):
|
||||||
Copies an existing theme to a new name
|
Copies an existing theme to a new name
|
||||||
"""
|
"""
|
||||||
item = self.themeListWidget.currentItem()
|
item = self.themeListWidget.currentItem()
|
||||||
oldThemeName = unicode(item.data(QtCore.Qt.UserRole).toString())
|
oldThemeName = unicode(
|
||||||
|
translate('OpenLP.ThemeManager', 'Copy of %s',
|
||||||
|
'Copy of <theme name>')) % unicode(
|
||||||
|
item.data(QtCore.Qt.UserRole).toString())
|
||||||
self.fileRenameForm.fileNameEdit.setText(oldThemeName)
|
self.fileRenameForm.fileNameEdit.setText(oldThemeName)
|
||||||
if self.fileRenameForm.exec_(True):
|
if self.fileRenameForm.exec_(True):
|
||||||
newThemeName = unicode(self.fileRenameForm.fileNameEdit.text())
|
newThemeName = unicode(self.fileRenameForm.fileNameEdit.text())
|
||||||
|
|
|
@ -190,6 +190,14 @@ class OpenLPWizard(QtGui.QWizard):
|
||||||
self.preWizard()
|
self.preWizard()
|
||||||
self.performWizard()
|
self.performWizard()
|
||||||
self.postWizard()
|
self.postWizard()
|
||||||
|
else:
|
||||||
|
self.customPageChanged(pageId)
|
||||||
|
|
||||||
|
def customPageChanged(self, pageId):
|
||||||
|
"""
|
||||||
|
Called when changing to a page other than the progress page
|
||||||
|
"""
|
||||||
|
pass
|
||||||
|
|
||||||
def onErrorCopyToButtonClicked(self):
|
def onErrorCopyToButtonClicked(self):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -68,6 +68,8 @@ class Ui_EditSongDialog(object):
|
||||||
QtCore.Qt.AlignTop)
|
QtCore.Qt.AlignTop)
|
||||||
self.verseListWidget = QtGui.QTableWidget(self.lyricsTab)
|
self.verseListWidget = QtGui.QTableWidget(self.lyricsTab)
|
||||||
self.verseListWidget.horizontalHeader().setVisible(False)
|
self.verseListWidget.horizontalHeader().setVisible(False)
|
||||||
|
self.verseListWidget.horizontalHeader().setStretchLastSection(True)
|
||||||
|
self.verseListWidget.horizontalHeader().setMinimumSectionSize(16)
|
||||||
self.verseListWidget.setAlternatingRowColors(True)
|
self.verseListWidget.setAlternatingRowColors(True)
|
||||||
self.verseListWidget.setColumnCount(1)
|
self.verseListWidget.setColumnCount(1)
|
||||||
self.verseListWidget.setSelectionBehavior(
|
self.verseListWidget.setSelectionBehavior(
|
||||||
|
|
|
@ -233,7 +233,6 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
|
||||||
# lazy xml migration for now
|
# lazy xml migration for now
|
||||||
self.verseListWidget.clear()
|
self.verseListWidget.clear()
|
||||||
self.verseListWidget.setRowCount(0)
|
self.verseListWidget.setRowCount(0)
|
||||||
self.verseListWidget.setColumnWidth(0, self.width)
|
|
||||||
# This is just because occasionally the lyrics come back as a "buffer"
|
# This is just because occasionally the lyrics come back as a "buffer"
|
||||||
if isinstance(self.song.lyrics, buffer):
|
if isinstance(self.song.lyrics, buffer):
|
||||||
self.song.lyrics = unicode(self.song.lyrics)
|
self.song.lyrics = unicode(self.song.lyrics)
|
||||||
|
|
|
@ -343,6 +343,13 @@ class SongImportForm(OpenLPWizard):
|
||||||
self.formatSpacer.changeSize(width, 0, QtGui.QSizePolicy.Fixed,
|
self.formatSpacer.changeSize(width, 0, QtGui.QSizePolicy.Fixed,
|
||||||
QtGui.QSizePolicy.Fixed)
|
QtGui.QSizePolicy.Fixed)
|
||||||
|
|
||||||
|
def customPageChanged(self, pageId):
|
||||||
|
"""
|
||||||
|
Called when changing to a page other than the progress page
|
||||||
|
"""
|
||||||
|
if self.page(pageId) == self.sourcePage:
|
||||||
|
self.onCurrentIndexChanged(self.formatStack.currentIndex())
|
||||||
|
|
||||||
def validateCurrentPage(self):
|
def validateCurrentPage(self):
|
||||||
"""
|
"""
|
||||||
Validate the current page before moving on to the next page.
|
Validate the current page before moving on to the next page.
|
||||||
|
|
|
@ -73,15 +73,21 @@ class EasiSlidesImport(SongImport):
|
||||||
def _parse_song(self, song):
|
def _parse_song(self, song):
|
||||||
self._success = True
|
self._success = True
|
||||||
self._add_unicode_attribute(u'title', song.Title1, True)
|
self._add_unicode_attribute(u'title', song.Title1, True)
|
||||||
self._add_unicode_attribute(u'alternate_title', song.Title2)
|
if hasattr(song, u'Title2'):
|
||||||
self._add_unicode_attribute(u'song_number', song.SongNumber)
|
self._add_unicode_attribute(u'alternate_title', song.Title2)
|
||||||
|
if hasattr(song, u'SongNumber'):
|
||||||
|
self._add_unicode_attribute(u'song_number', song.SongNumber)
|
||||||
if self.song_number == u'0':
|
if self.song_number == u'0':
|
||||||
self.song_number = u''
|
self.song_number = u''
|
||||||
self._add_authors(song)
|
self._add_authors(song)
|
||||||
self._add_copyright(song.Copyright)
|
if hasattr(song, u'Copyright'):
|
||||||
self._add_copyright(song.LicenceAdmin1)
|
self._add_copyright(song.Copyright)
|
||||||
self._add_copyright(song.LicenceAdmin2)
|
if hasattr(song, u'LicenceAdmin1'):
|
||||||
self._add_unicode_attribute(u'song_book_name', song.BookReference)
|
self._add_copyright(song.LicenceAdmin1)
|
||||||
|
if hasattr(song, u'LicenceAdmin2'):
|
||||||
|
self._add_copyright(song.LicenceAdmin2)
|
||||||
|
if hasattr(song, u'BookReference'):
|
||||||
|
self._add_unicode_attribute(u'song_book_name', song.BookReference)
|
||||||
self._parse_and_add_lyrics(song)
|
self._parse_and_add_lyrics(song)
|
||||||
if self._success:
|
if self._success:
|
||||||
if not self.finish():
|
if not self.finish():
|
||||||
|
|
|
@ -259,11 +259,15 @@ class EasyWorshipSongImport(SongImport):
|
||||||
self.add_author(author_name.strip())
|
self.add_author(author_name.strip())
|
||||||
if words:
|
if words:
|
||||||
# Format the lyrics
|
# Format the lyrics
|
||||||
words = strip_rtf(words, self.encoding)
|
words = strip_rtf(words, self.encoding) # TODO: convert rtf instead of stripping?
|
||||||
for verse in words.split(u'\n\n'):
|
p = re.compile(r'\n *?\n[\n ]*') # at least two newlines, with zero or more space characters between them
|
||||||
# TODO: recognize note-part as well and put into comments-section
|
for verse in p.split(words):
|
||||||
|
#for verse in words.split(u'\n\n'):
|
||||||
# ew tags: verse, chorus, pre-chorus, bridge, tag, intro, ending, slide
|
# ew tags: verse, chorus, pre-chorus, bridge, tag, intro, ending, slide
|
||||||
verse_split = verse.strip().split(u'\n', 1)
|
verse = verse.strip()
|
||||||
|
if len(verse) == 0:
|
||||||
|
continue
|
||||||
|
verse_split = verse.split(u'\n', 1)
|
||||||
verse_type = VerseType.Tags[VerseType.Verse]
|
verse_type = VerseType.Tags[VerseType.Verse]
|
||||||
first_line_is_tag = False
|
first_line_is_tag = False
|
||||||
for type in VerseType.Names+['tag', 'slide']: # doesnt cover tag, slide
|
for type in VerseType.Names+['tag', 'slide']: # doesnt cover tag, slide
|
||||||
|
@ -288,7 +292,7 @@ class EasyWorshipSongImport(SongImport):
|
||||||
self.comments += ew_tag+'\n'
|
self.comments += ew_tag+'\n'
|
||||||
break
|
break
|
||||||
self.add_verse(
|
self.add_verse(
|
||||||
verse_split[-1].strip() if first_line_is_tag else verse.strip(), # TODO: hacky: -1
|
verse_split[-1].strip() if first_line_is_tag else verse, # TODO: hacky: -1
|
||||||
verse_type)
|
verse_type)
|
||||||
if len(self.comments) > 5:
|
if len(self.comments) > 5:
|
||||||
self.comments += unicode(translate('SongsPlugin.EasyWorshipSongImport',
|
self.comments += unicode(translate('SongsPlugin.EasyWorshipSongImport',
|
||||||
|
|
|
@ -467,23 +467,20 @@ class SongMediaItem(MediaManagerItem):
|
||||||
search_results = self.plugin.manager.get_all_objects(Song,
|
search_results = self.plugin.manager.get_all_objects(Song,
|
||||||
Song.search_title == item.data_string[u'title'],
|
Song.search_title == item.data_string[u'title'],
|
||||||
Song.search_title.asc())
|
Song.search_title.asc())
|
||||||
author_list = item.data_string[u'authors'].split(u', ')
|
|
||||||
editId = 0
|
editId = 0
|
||||||
add_song = True
|
add_song = True
|
||||||
if search_results:
|
if search_results:
|
||||||
for song in search_results:
|
for song in search_results:
|
||||||
|
author_list = item.data_string[u'authors']
|
||||||
same_authors = True
|
same_authors = True
|
||||||
# If the author counts are different, we do not have to do any
|
for author in song.authors:
|
||||||
# further checking.
|
if author.display_name in author_list:
|
||||||
if len(song.authors) == len(author_list):
|
author_list = author_list.replace(author.display_name,
|
||||||
for author in song.authors:
|
u'', 1)
|
||||||
if author.display_name not in author_list:
|
else:
|
||||||
same_authors = False
|
same_authors = False
|
||||||
else:
|
break
|
||||||
same_authors = False
|
if same_authors and author_list.strip(u', ') == u'':
|
||||||
# All authors are the same, so we can stop here and the song
|
|
||||||
# does not have to be saved.
|
|
||||||
if same_authors:
|
|
||||||
add_song = False
|
add_song = False
|
||||||
editId = song.id
|
editId = song.id
|
||||||
break
|
break
|
||||||
|
|
|
@ -37,14 +37,16 @@ log = logging.getLogger(__name__)
|
||||||
|
|
||||||
if os.name == u'nt':
|
if os.name == u'nt':
|
||||||
from win32com.client import Dispatch
|
from win32com.client import Dispatch
|
||||||
PAGE_BEFORE = 4
|
|
||||||
PAGE_AFTER = 5
|
|
||||||
PAGE_BOTH = 6
|
|
||||||
NoConnectException = Exception
|
NoConnectException = Exception
|
||||||
else:
|
else:
|
||||||
import uno
|
import uno
|
||||||
from com.sun.star.connection import NoConnectException
|
from com.sun.star.connection import NoConnectException
|
||||||
|
try:
|
||||||
from com.sun.star.style.BreakType import PAGE_BEFORE, PAGE_AFTER, PAGE_BOTH
|
from com.sun.star.style.BreakType import PAGE_BEFORE, PAGE_AFTER, PAGE_BOTH
|
||||||
|
except ImportError:
|
||||||
|
PAGE_BEFORE = 4
|
||||||
|
PAGE_AFTER = 5
|
||||||
|
PAGE_BOTH = 6
|
||||||
|
|
||||||
class OooImport(SongImport):
|
class OooImport(SongImport):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -70,10 +70,12 @@ class OpenLyricsExport(object):
|
||||||
song.title)
|
song.title)
|
||||||
xml = openLyrics.song_to_xml(song)
|
xml = openLyrics.song_to_xml(song)
|
||||||
tree = etree.ElementTree(etree.fromstring(xml))
|
tree = etree.ElementTree(etree.fromstring(xml))
|
||||||
filename = u'%s (%s).xml' % (song.title,
|
filename = u'%s (%s)' % (song.title,
|
||||||
u', '.join([author.display_name for author in song.authors]))
|
u', '.join([author.display_name for author in song.authors]))
|
||||||
filename = re.sub(
|
filename = re.sub(
|
||||||
r'[/\\?*|<>\[\]":<>+%]+', u'_', filename).strip(u'_')
|
r'[/\\?*|<>\[\]":<>+%]+', u'_', filename).strip(u'_')
|
||||||
|
# Ensure the filename isn't too long for some filesystems
|
||||||
|
filename = u'%s.xml' % filename[0:250 - len(self.save_path)]
|
||||||
# Pass a file object, because lxml does not cope with some special
|
# Pass a file object, because lxml does not cope with some special
|
||||||
# characters in the path (see lp:757673 and lp:744337).
|
# characters in the path (see lp:757673 and lp:744337).
|
||||||
tree.write(open(os.path.join(self.save_path, filename), u'w'),
|
tree.write(open(os.path.join(self.save_path, filename), u'w'),
|
||||||
|
|
|
@ -41,20 +41,23 @@ from oooimport import OooImport
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
if os.name == u'nt':
|
if os.name == u'nt':
|
||||||
BOLD = 150.0
|
|
||||||
ITALIC = 2
|
|
||||||
from oooimport import PAGE_BEFORE, PAGE_AFTER, PAGE_BOTH
|
from oooimport import PAGE_BEFORE, PAGE_AFTER, PAGE_BOTH
|
||||||
RuntimeException = Exception
|
RuntimeException = Exception
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
from com.sun.star.awt.FontWeight import BOLD
|
|
||||||
from com.sun.star.awt.FontSlant import ITALIC
|
|
||||||
from com.sun.star.style.BreakType import PAGE_BEFORE, PAGE_AFTER, \
|
from com.sun.star.style.BreakType import PAGE_BEFORE, PAGE_AFTER, \
|
||||||
PAGE_BOTH
|
PAGE_BOTH
|
||||||
from com.sun.star.uno import RuntimeException
|
from com.sun.star.uno import RuntimeException
|
||||||
except ImportError:
|
except ImportError:
|
||||||
pass
|
pass
|
||||||
|
try:
|
||||||
|
from com.sun.star.awt.FontWeight import BOLD
|
||||||
|
except ImportError:
|
||||||
|
BOLD = 150.0
|
||||||
|
try:
|
||||||
|
from com.sun.star.awt.FontSlant import ITALIC
|
||||||
|
except ImportError:
|
||||||
|
ITALIC = 2
|
||||||
|
|
||||||
class SofImport(OooImport):
|
class SofImport(OooImport):
|
||||||
"""
|
"""
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,295 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>DisplaysDialog</class>
|
|
||||||
<widget class="QWidget" name="DisplaysDialog">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>620</width>
|
|
||||||
<height>716</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string>Amend Display Settings</string>
|
|
||||||
</property>
|
|
||||||
<widget class="QWidget" name="layoutWidget">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>40</y>
|
|
||||||
<width>241</width>
|
|
||||||
<height>79</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="CurrentGroupBox">
|
|
||||||
<property name="title">
|
|
||||||
<string>Default Settings</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
|
||||||
<item>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_6">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="XLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>X</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="Xpos">
|
|
||||||
<property name="text">
|
|
||||||
<string>0</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_7">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="YLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Y</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="Ypos">
|
|
||||||
<property name="text">
|
|
||||||
<string>0</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_9">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="HeightLabel">
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>100</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Height</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="Height">
|
|
||||||
<property name="text">
|
|
||||||
<string>0</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_8">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="WidthLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Width</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="Width">
|
|
||||||
<property name="text">
|
|
||||||
<string>0</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<widget class="QGroupBox" name="CurrentGroupBox_2">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>130</y>
|
|
||||||
<width>248</width>
|
|
||||||
<height>87</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>500</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
|
||||||
<string>Amend Settings</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
|
||||||
<item>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="XAmendLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>X</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="XposEdit">
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>50</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maxLength">
|
|
||||||
<number>4</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="YAmendLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Y</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="YposEdit">
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>50</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maxLength">
|
|
||||||
<number>4</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="HeightAmendLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Height</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="HeightEdit">
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>50</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maxLength">
|
|
||||||
<number>4</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
|
||||||
<property name="sizeConstraint">
|
|
||||||
<enum>QLayout::SetMinimumSize</enum>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="WidthAmendLabel">
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>100</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Width</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="WidthEdit">
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>60</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
<zorder>layoutWidget</zorder>
|
|
||||||
<zorder>YAmendLabel</zorder>
|
|
||||||
<zorder>HeightAmendLabel</zorder>
|
|
||||||
<zorder>WidthAmendLabel</zorder>
|
|
||||||
<zorder>YAmendLabel</zorder>
|
|
||||||
</widget>
|
|
||||||
<widget class="QCheckBox" name="OverrideCheckBox">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>10</y>
|
|
||||||
<width>191</width>
|
|
||||||
<height>23</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Override Output Display</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
|
||||||
<resources/>
|
|
||||||
<connections/>
|
|
||||||
</ui>
|
|
Binary file not shown.
Before Width: | Height: | Size: 151 KiB After Width: | Height: | Size: 199 KiB |
Binary file not shown.
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 12 KiB |
Loading…
Reference in New Issue