forked from openlp/openlp
r1132
This commit is contained in:
commit
80d704dc0b
@ -306,8 +306,8 @@ def expand_tags(text):
|
||||
text = text.replace(tag[u'end tag'], tag[u'end html'])
|
||||
return text
|
||||
|
||||
from theme import ThemeLevel, ThemeXML, BackgroundGradientType, BackgroundType, \
|
||||
HorizontalType, VerticalType
|
||||
from theme import ThemeLevel, ThemeXML, BackgroundGradientType, \
|
||||
BackgroundType, HorizontalType, VerticalType
|
||||
from spelltextedit import SpellTextEdit
|
||||
from eventreceiver import Receiver
|
||||
from imagemanager import ImageManager
|
||||
|
@ -371,7 +371,8 @@ def build_background_css(item, width, height):
|
||||
theme = item.themedata
|
||||
background = u'background-color: black'
|
||||
if theme:
|
||||
if theme.background_type == BackgroundType.to_string(BackgroundType.Solid):
|
||||
if theme.background_type == \
|
||||
BackgroundType.to_string(BackgroundType.Solid):
|
||||
background = u'background-color: %s' % theme.background_color
|
||||
else:
|
||||
if theme.background_direction == BackgroundGradientType.to_string \
|
||||
@ -381,21 +382,24 @@ def build_background_css(item, width, height):
|
||||
u'-webkit-gradient(linear, left top, left bottom, ' \
|
||||
'from(%s), to(%s))' % (theme.background_start_color,
|
||||
theme.background_end_color)
|
||||
elif theme.background_direction == BackgroundGradientType.to_string \
|
||||
(BackgroundGradientType.LeftTop):
|
||||
elif theme.background_direction == \
|
||||
BackgroundGradientType.to_string( \
|
||||
BackgroundGradientType.LeftTop):
|
||||
background = \
|
||||
u'background: ' \
|
||||
u'-webkit-gradient(linear, left top, right bottom, ' \
|
||||
'from(%s), to(%s))' % (theme.background_start_color,
|
||||
theme.background_end_color)
|
||||
elif theme.background_direction == BackgroundGradientType.to_string \
|
||||
elif theme.background_direction == \
|
||||
BackgroundGradientType.to_string \
|
||||
(BackgroundGradientType.LeftBottom):
|
||||
background = \
|
||||
u'background: ' \
|
||||
u'-webkit-gradient(linear, left bottom, right top, ' \
|
||||
'from(%s), to(%s))' % (theme.background_start_color,
|
||||
theme.background_end_color)
|
||||
elif theme.background_direction == BackgroundGradientType.to_string \
|
||||
elif theme.background_direction == \
|
||||
BackgroundGradientType.to_string \
|
||||
(BackgroundGradientType.Vertical):
|
||||
background = \
|
||||
u'background: -webkit-gradient(linear, left top, ' \
|
||||
|
@ -46,13 +46,13 @@ class ImageThread(QtCore.QThread):
|
||||
"""
|
||||
def __init__(self, manager):
|
||||
QtCore.QThread.__init__(self, None)
|
||||
self.image_mamager = manager
|
||||
self.imageManager = manager
|
||||
|
||||
def run(self):
|
||||
"""
|
||||
Run the thread.
|
||||
"""
|
||||
self.image_mamager.process()
|
||||
self.imageManager.process()
|
||||
|
||||
|
||||
class Image(object):
|
||||
|
@ -508,7 +508,7 @@ class MediaManagerItem(QtGui.QWidget):
|
||||
log.debug(self.plugin.name + u' Add requested')
|
||||
serviceItem = self.parent.serviceManager.getServiceItem()
|
||||
if not serviceItem:
|
||||
QtGui.QMessageBox.information(self,
|
||||
QtGui.QMessageBox.information(self,
|
||||
translate('OpenLP.MediaManagerItem',
|
||||
'No Service Item Selected'),
|
||||
translate('OpenLP.MediaManagerItem',
|
||||
|
@ -87,8 +87,12 @@ class SettingsTab(QtGui.QWidget):
|
||||
"""
|
||||
pass
|
||||
|
||||
def postSetUp(self):
|
||||
def postSetUp(self, postUpdate=False):
|
||||
"""
|
||||
Changes which need to be made after setup of application
|
||||
|
||||
``postUpdate``
|
||||
Indicates if called before or after updates.
|
||||
|
||||
"""
|
||||
pass
|
||||
|
@ -33,12 +33,15 @@ except ImportError:
|
||||
enchant_available = False
|
||||
|
||||
# based on code from
|
||||
# http://john.nachtimwald.com/2009/08/22/qplaintextedit-with-in-line-spell-check/
|
||||
# http://john.nachtimwald.com/2009/08/22/qplaintextedit-with-in-line-spell-check
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
from openlp.core.lib import html_expands, translate
|
||||
|
||||
class SpellTextEdit(QtGui.QPlainTextEdit):
|
||||
"""
|
||||
Spell checking widget based on QPlanTextEdit.
|
||||
"""
|
||||
def __init__(self, *args):
|
||||
QtGui.QPlainTextEdit.__init__(self, *args)
|
||||
# Default dictionary based on the current locale.
|
||||
@ -60,7 +63,7 @@ class SpellTextEdit(QtGui.QPlainTextEdit):
|
||||
QtGui.QPlainTextEdit.mousePressEvent(self, event)
|
||||
|
||||
def contextMenuEvent(self, event):
|
||||
popup_menu = self.createStandardContextMenu()
|
||||
popupMenu = self.createStandardContextMenu()
|
||||
# Select the word under the cursor.
|
||||
cursor = self.textCursor()
|
||||
# only select text if not already selected
|
||||
@ -81,17 +84,17 @@ class SpellTextEdit(QtGui.QPlainTextEdit):
|
||||
# Only add the spelling suggests to the menu if there are
|
||||
# suggestions.
|
||||
if len(spell_menu.actions()) != 0:
|
||||
popup_menu.insertSeparator(popup_menu.actions()[0])
|
||||
popup_menu.insertMenu(popup_menu.actions()[0], spell_menu)
|
||||
tag_menu = QtGui.QMenu(translate('OpenLP.SpellTextEdit',
|
||||
popupMenu.insertSeparator(popupMenu.actions()[0])
|
||||
popupMenu.insertMenu(popupMenu.actions()[0], spell_menu)
|
||||
tagMenu = QtGui.QMenu(translate('OpenLP.SpellTextEdit',
|
||||
'Formatting Tags'))
|
||||
for html in html_expands:
|
||||
action = SpellAction( html[u'desc'], tag_menu)
|
||||
action = SpellAction( html[u'desc'], tagMenu)
|
||||
action.correct.connect(self.htmlTag)
|
||||
tag_menu.addAction(action)
|
||||
popup_menu.insertSeparator(popup_menu.actions()[0])
|
||||
popup_menu.insertMenu(popup_menu.actions()[0], tag_menu)
|
||||
popup_menu.exec_(event.globalPos())
|
||||
tagMenu.addAction(action)
|
||||
popupMenu.insertSeparator(popupMenu.actions()[0])
|
||||
popupMenu.insertMenu(popupMenu.actions()[0], tagMenu)
|
||||
popupMenu.exec_(event.globalPos())
|
||||
|
||||
def correctWord(self, word):
|
||||
"""
|
||||
|
@ -31,7 +31,6 @@ import re
|
||||
import logging
|
||||
|
||||
from xml.dom.minidom import Document
|
||||
from xml.etree.ElementTree import ElementTree, XML
|
||||
from lxml import etree, objectify
|
||||
|
||||
from openlp.core.lib import str_to_bool
|
||||
@ -56,7 +55,7 @@ BLANK_THEME_XML = \
|
||||
<font type="main">
|
||||
<name>Arial</name>
|
||||
<color>#FFFFFF</color>
|
||||
<size>30</size>
|
||||
<size>40</size>
|
||||
<bold>False</bold>
|
||||
<italics>False</italics>
|
||||
<line_adjustment>0</line_adjustment>
|
||||
@ -261,8 +260,9 @@ class ThemeXML(object):
|
||||
|
||||
def add_font(self, name, color, size, override, fonttype=u'main',
|
||||
bold=u'False', italics=u'False', line_adjustment=0,
|
||||
xpos=0, ypos=0, width=0, height=0 , outline=u'False', outline_color=u'#ffffff',
|
||||
outline_pixel=2, shadow=u'False', shadow_color=u'#ffffff', shadow_pixel=5):
|
||||
xpos=0, ypos=0, width=0, height=0 , outline=u'False',
|
||||
outline_color=u'#ffffff', outline_pixel=2, shadow=u'False',
|
||||
shadow_color=u'#ffffff', shadow_pixel=5):
|
||||
"""
|
||||
Add a Font.
|
||||
|
||||
@ -317,7 +317,6 @@ class ThemeXML(object):
|
||||
``shadow_size``
|
||||
How big the Shadow is
|
||||
|
||||
|
||||
"""
|
||||
background = self.theme_xml.createElement(u'font')
|
||||
background.setAttribute(u'type', fonttype)
|
||||
@ -441,7 +440,7 @@ class ThemeXML(object):
|
||||
if line:
|
||||
xml = xml[line + 2:]
|
||||
try:
|
||||
theme_xml = objectify.fromstring(xml)
|
||||
theme_xml = objectify.fromstring(xml)
|
||||
except etree.XMLSyntaxError:
|
||||
log.exception(u'Invalid xml %s', xml)
|
||||
return
|
||||
@ -457,7 +456,8 @@ class ThemeXML(object):
|
||||
if element.getparent().tag == u'display':
|
||||
if element.tag.startswith(u'shadow') or \
|
||||
element.tag.startswith(u'outline'):
|
||||
self._create_attr(u'font_main', element.tag, element.text)
|
||||
self._create_attr(u'font_main', element.tag,
|
||||
element.text)
|
||||
master = element.getparent().tag
|
||||
if element.getparent().tag == u'background':
|
||||
master = element.getparent().tag
|
||||
@ -471,7 +471,8 @@ class ThemeXML(object):
|
||||
for attr in element.attrib:
|
||||
base_element = attr
|
||||
# correction for the shadow and outline tags
|
||||
if element.tag == u'shadow' or element.tag == u'outline':
|
||||
if element.tag == u'shadow' or \
|
||||
element.tag == u'outline':
|
||||
if not attr.startswith(element.tag):
|
||||
base_element = element.tag + u'_' + attr
|
||||
self._create_attr(master, base_element,
|
||||
@ -540,8 +541,8 @@ class ThemeXML(object):
|
||||
"""
|
||||
Change Camel Case string to python string
|
||||
"""
|
||||
s1 = re.sub(u'(.)([A-Z][a-z]+)', r'\1_\2', name)
|
||||
return re.sub(u'([a-z0-9])([A-Z])', r'\1_\2', s1).lower()
|
||||
sub_name = re.sub(u'(.)([A-Z][a-z]+)', r'\1_\2', name)
|
||||
return re.sub(u'([a-z0-9])([A-Z])', r'\1_\2', sub_name).lower()
|
||||
|
||||
def _build_xml_from_attrs(self):
|
||||
"""
|
||||
|
@ -82,7 +82,8 @@ class AdvancedTab(SettingsTab):
|
||||
self.doubleClickLiveCheckBox.setObjectName(u'doubleClickLiveCheckBox')
|
||||
self.uiLayout.addWidget(self.doubleClickLiveCheckBox)
|
||||
# self.expandServiceItemCheckBox = QtGui.QCheckBox(self.uiGroupBox)
|
||||
# self.expandServiceItemCheckBox.setObjectName(u'expandServiceItemCheckBox')
|
||||
# self.expandServiceItemCheckBox.setObjectName(
|
||||
# u'expandServiceItemCheckBox')
|
||||
# self.uiLayout.addWidget(self.expandServiceItemCheckBox)
|
||||
self.leftLayout.addWidget(self.uiGroupBox)
|
||||
self.expandServiceItemCheckBox = QtGui.QCheckBox(self.uiGroupBox)
|
||||
|
@ -1,799 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
|
||||
|
||||
###############################################################################
|
||||
# OpenLP - Open Source Lyrics Projection #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
# Software Foundation; version 2 of the License. #
|
||||
# #
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT #
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
|
||||
# more details. #
|
||||
# #
|
||||
# You should have received a copy of the GNU General Public License along #
|
||||
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||
###############################################################################
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import build_icon, translate
|
||||
|
||||
class Ui_AmendThemeDialog(object):
|
||||
def setupUi(self, amendThemeDialog):
|
||||
amendThemeDialog.setObjectName(u'amendThemeDialog')
|
||||
amendThemeDialog.setWindowModality(QtCore.Qt.ApplicationModal)
|
||||
amendThemeDialog.resize(586, 651)
|
||||
icon = build_icon(u':/icon/openlp-logo-16x16.png')
|
||||
amendThemeDialog.setWindowIcon(icon)
|
||||
amendThemeDialog.setModal(True)
|
||||
self.amendThemeLayout = QtGui.QVBoxLayout(amendThemeDialog)
|
||||
self.amendThemeLayout.setSpacing(8)
|
||||
self.amendThemeLayout.setMargin(8)
|
||||
self.amendThemeLayout.setObjectName(u'amendThemeLayout')
|
||||
self.themeNameWidget = QtGui.QWidget(amendThemeDialog)
|
||||
self.themeNameWidget.setObjectName(u'themeNameWidget')
|
||||
self.themeNameLayout = QtGui.QHBoxLayout(self.themeNameWidget)
|
||||
self.themeNameLayout.setSpacing(8)
|
||||
self.themeNameLayout.setMargin(0)
|
||||
self.themeNameLayout.setObjectName(u'themeNameLayout')
|
||||
self.themeNameLabel = QtGui.QLabel(self.themeNameWidget)
|
||||
self.themeNameLabel.setObjectName(u'themeNameLabel')
|
||||
self.themeNameLayout.addWidget(self.themeNameLabel)
|
||||
self.themeNameEdit = QtGui.QLineEdit(self.themeNameWidget)
|
||||
self.themeNameEdit.setObjectName(u'themeNameEdit')
|
||||
self.themeNameLabel.setBuddy(self.themeNameEdit)
|
||||
self.themeNameLayout.addWidget(self.themeNameEdit)
|
||||
self.amendThemeLayout.addWidget(self.themeNameWidget)
|
||||
self.contentWidget = QtGui.QWidget(amendThemeDialog)
|
||||
self.contentWidget.setObjectName(u'contentWidget')
|
||||
self.contentLayout = QtGui.QHBoxLayout(self.contentWidget)
|
||||
self.contentLayout.setSpacing(8)
|
||||
self.contentLayout.setMargin(0)
|
||||
self.contentLayout.setObjectName(u'contentLayout')
|
||||
self.themeTabWidget = QtGui.QTabWidget(self.contentWidget)
|
||||
self.themeTabWidget.setObjectName(u'themeTabWidget')
|
||||
self.backgroundTab = QtGui.QWidget()
|
||||
self.backgroundTab.setObjectName(u'backgroundTab')
|
||||
self.backgroundLayout = QtGui.QFormLayout(self.backgroundTab)
|
||||
self.backgroundLayout.setMargin(8)
|
||||
self.backgroundLayout.setSpacing(8)
|
||||
self.backgroundLayout.setObjectName(u'backgroundLayout')
|
||||
self.backgroundTypeLabel = QtGui.QLabel(self.backgroundTab)
|
||||
self.backgroundTypeLabel.setObjectName(u'backgroundTypeLabel')
|
||||
self.backgroundLayout.setWidget(1, QtGui.QFormLayout.LabelRole,
|
||||
self.backgroundTypeLabel)
|
||||
self.backgroundTypeComboBox = QtGui.QComboBox(self.backgroundTab)
|
||||
self.backgroundTypeComboBox.setObjectName(u'backgroundTypeComboBox')
|
||||
self.backgroundTypeComboBox.addItem(QtCore.QString())
|
||||
self.backgroundTypeComboBox.addItem(QtCore.QString())
|
||||
self.backgroundTypeComboBox.addItem(QtCore.QString())
|
||||
self.backgroundLayout.setWidget(1, QtGui.QFormLayout.FieldRole,
|
||||
self.backgroundTypeComboBox)
|
||||
self.color1Label = QtGui.QLabel(self.backgroundTab)
|
||||
self.color1Label.setObjectName(u'color1Label')
|
||||
self.backgroundLayout.setWidget(2, QtGui.QFormLayout.LabelRole,
|
||||
self.color1Label)
|
||||
self.color1PushButton = QtGui.QPushButton(self.backgroundTab)
|
||||
self.color1PushButton.setObjectName(u'color1PushButton')
|
||||
self.backgroundLayout.setWidget(2, QtGui.QFormLayout.FieldRole,
|
||||
self.color1PushButton)
|
||||
self.color2Label = QtGui.QLabel(self.backgroundTab)
|
||||
self.color2Label.setObjectName(u'color2Label')
|
||||
self.backgroundLayout.setWidget(3, QtGui.QFormLayout.LabelRole,
|
||||
self.color2Label)
|
||||
self.color2PushButton = QtGui.QPushButton(self.backgroundTab)
|
||||
self.color2PushButton.setObjectName(u'color2PushButton')
|
||||
self.backgroundLayout.setWidget(3, QtGui.QFormLayout.FieldRole,
|
||||
self.color2PushButton)
|
||||
self.imageLabel = QtGui.QLabel(self.backgroundTab)
|
||||
self.imageLabel.setObjectName(u'imageLabel')
|
||||
self.backgroundLayout.setWidget(4, QtGui.QFormLayout.LabelRole,
|
||||
self.imageLabel)
|
||||
self.gradientLabel = QtGui.QLabel(self.backgroundTab)
|
||||
self.gradientLabel.setObjectName(u'gradientLabel')
|
||||
self.backgroundLayout.setWidget(6, QtGui.QFormLayout.LabelRole,
|
||||
self.gradientLabel)
|
||||
self.gradientComboBox = QtGui.QComboBox(self.backgroundTab)
|
||||
self.gradientComboBox.setObjectName(u'gradientComboBox')
|
||||
self.gradientComboBox.addItem(QtCore.QString())
|
||||
self.gradientComboBox.addItem(QtCore.QString())
|
||||
self.gradientComboBox.addItem(QtCore.QString())
|
||||
self.backgroundLayout.setWidget(6, QtGui.QFormLayout.FieldRole,
|
||||
self.gradientComboBox)
|
||||
self.imageFilenameWidget = QtGui.QWidget(self.backgroundTab)
|
||||
self.imageFilenameWidget.setObjectName(u'imageFilenameWidget')
|
||||
self.horizontalLayout2 = QtGui.QHBoxLayout(self.imageFilenameWidget)
|
||||
self.horizontalLayout2.setSpacing(0)
|
||||
self.horizontalLayout2.setMargin(0)
|
||||
self.horizontalLayout2.setObjectName(u'horizontalLayout2')
|
||||
self.imageLineEdit = QtGui.QLineEdit(self.imageFilenameWidget)
|
||||
self.imageLineEdit.setObjectName(u'imageLineEdit')
|
||||
self.horizontalLayout2.addWidget(self.imageLineEdit)
|
||||
self.imageToolButton = QtGui.QToolButton(self.imageFilenameWidget)
|
||||
self.imageToolButton.setIcon(build_icon(u':/general/general_open.png'))
|
||||
self.imageToolButton.setObjectName(u'imageToolButton')
|
||||
self.imageToolButton.setAutoRaise(True)
|
||||
self.horizontalLayout2.addWidget(self.imageToolButton)
|
||||
self.backgroundLayout.setWidget(4, QtGui.QFormLayout.FieldRole,
|
||||
self.imageFilenameWidget)
|
||||
self.themeTabWidget.addTab(self.backgroundTab, u'')
|
||||
self.fontMainTab = QtGui.QWidget()
|
||||
self.fontMainTab.setObjectName(u'fontMainTab')
|
||||
self.fontMainLayout = QtGui.QHBoxLayout(self.fontMainTab)
|
||||
self.fontMainLayout.setSpacing(8)
|
||||
self.fontMainLayout.setMargin(8)
|
||||
self.fontMainLayout.setObjectName(u'fontMainLayout')
|
||||
self.mainLeftWidget = QtGui.QWidget(self.fontMainTab)
|
||||
self.mainLeftWidget.setObjectName(u'mainLeftWidget')
|
||||
self.mainLeftLayout = QtGui.QVBoxLayout(self.mainLeftWidget)
|
||||
self.mainLeftLayout.setSpacing(8)
|
||||
self.mainLeftLayout.setMargin(0)
|
||||
self.mainLeftLayout.setObjectName(u'mainLeftLayout')
|
||||
self.fontMainGroupBox = QtGui.QGroupBox(self.mainLeftWidget)
|
||||
self.fontMainGroupBox.setObjectName(u'fontMainGroupBox')
|
||||
self.mainFontLayout = QtGui.QFormLayout(self.fontMainGroupBox)
|
||||
self.mainFontLayout.setFormAlignment(QtCore.Qt.AlignLeading |
|
||||
QtCore.Qt.AlignLeft | QtCore.Qt.AlignVCenter)
|
||||
self.mainFontLayout.setMargin(8)
|
||||
self.mainFontLayout.setSpacing(8)
|
||||
self.mainFontLayout.setObjectName(u'mainFontLayout')
|
||||
self.fontMainlabel = QtGui.QLabel(self.fontMainGroupBox)
|
||||
self.fontMainlabel.setObjectName(u'fontMainlabel')
|
||||
self.mainFontLayout.setWidget(0, QtGui.QFormLayout.LabelRole,
|
||||
self.fontMainlabel)
|
||||
self.fontMainComboBox = QtGui.QFontComboBox(self.fontMainGroupBox)
|
||||
self.fontMainComboBox.setObjectName(u'fontMainComboBox')
|
||||
self.mainFontLayout.setWidget(0, QtGui.QFormLayout.FieldRole,
|
||||
self.fontMainComboBox)
|
||||
self.fontMainColorLabel = QtGui.QLabel(self.fontMainGroupBox)
|
||||
self.fontMainColorLabel.setObjectName(u'fontMainColorLabel')
|
||||
self.mainFontLayout.setWidget(1, QtGui.QFormLayout.LabelRole,
|
||||
self.fontMainColorLabel)
|
||||
self.fontMainColorPushButton = QtGui.QPushButton(self.fontMainGroupBox)
|
||||
self.fontMainColorPushButton.setObjectName(u'fontMainColorPushButton')
|
||||
self.mainFontLayout.setWidget(1, QtGui.QFormLayout.FieldRole,
|
||||
self.fontMainColorPushButton)
|
||||
self.fontMainSize = QtGui.QLabel(self.fontMainGroupBox)
|
||||
self.fontMainSize.setObjectName(u'fontMainSize')
|
||||
self.mainFontLayout.setWidget(2, QtGui.QFormLayout.LabelRole,
|
||||
self.fontMainSize)
|
||||
self.fontMainSizeSpinBox = QtGui.QSpinBox(self.fontMainGroupBox)
|
||||
defaultSizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum,
|
||||
QtGui.QSizePolicy.Fixed)
|
||||
defaultSizePolicy.setHeightForWidth(
|
||||
self.fontMainSizeSpinBox.sizePolicy().hasHeightForWidth())
|
||||
self.fontMainSizeSpinBox.setSizePolicy(defaultSizePolicy)
|
||||
self.fontMainSizeSpinBox.setMinimumSize(QtCore.QSize(70, 0))
|
||||
self.fontMainSizeSpinBox.setProperty(u'value', QtCore.QVariant(16))
|
||||
self.fontMainSizeSpinBox.setMaximum(999)
|
||||
self.fontMainSizeSpinBox.setObjectName(u'fontMainSizeSpinBox')
|
||||
self.mainFontLayout.setWidget(2, QtGui.QFormLayout.FieldRole,
|
||||
self.fontMainSizeSpinBox)
|
||||
self.fontMainWeightComboBox = QtGui.QComboBox(self.fontMainGroupBox)
|
||||
self.fontMainWeightComboBox.setObjectName(u'fontMainWeightComboBox')
|
||||
self.fontMainWeightComboBox.addItem(QtCore.QString())
|
||||
self.fontMainWeightComboBox.addItem(QtCore.QString())
|
||||
self.fontMainWeightComboBox.addItem(QtCore.QString())
|
||||
self.fontMainWeightComboBox.addItem(QtCore.QString())
|
||||
self.mainFontLayout.setWidget(3, QtGui.QFormLayout.FieldRole,
|
||||
self.fontMainWeightComboBox)
|
||||
self.fontMainWeightLabel = QtGui.QLabel(self.fontMainGroupBox)
|
||||
self.fontMainWeightLabel.setObjectName(u'fontMainWeightLabel')
|
||||
self.mainFontLayout.setWidget(3, QtGui.QFormLayout.LabelRole,
|
||||
self.fontMainWeightLabel)
|
||||
self.mainLeftLayout.addWidget(self.fontMainGroupBox)
|
||||
self.fontMainWrapLineAdjustmentLabel = QtGui.QLabel(
|
||||
self.fontMainGroupBox)
|
||||
self.fontMainWrapLineAdjustmentLabel.setObjectName(
|
||||
u'fontMainWrapLineAdjustmentLabel')
|
||||
self.mainFontLayout.setWidget(4, QtGui.QFormLayout.LabelRole,
|
||||
self.fontMainWrapLineAdjustmentLabel)
|
||||
self.fontMainLineAdjustmentSpinBox = QtGui.QSpinBox(
|
||||
self.fontMainGroupBox)
|
||||
self.fontMainLineAdjustmentSpinBox.setObjectName(
|
||||
u'fontMainLineAdjustmentSpinBox')
|
||||
self.fontMainLineAdjustmentSpinBox.setMinimum(-99)
|
||||
self.mainFontLayout.setWidget(4, QtGui.QFormLayout.FieldRole,
|
||||
self.fontMainLineAdjustmentSpinBox)
|
||||
self.fontMainLinesPageLabel = QtGui.QLabel(self.fontMainGroupBox)
|
||||
self.fontMainLinesPageLabel.setObjectName(u'fontMainLinesPageLabel')
|
||||
self.mainFontLayout.addRow(self.fontMainLinesPageLabel)
|
||||
spacerItem1 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum,
|
||||
QtGui.QSizePolicy.Expanding)
|
||||
self.mainLeftLayout.addItem(spacerItem1)
|
||||
self.fontMainLayout.addWidget(self.mainLeftWidget)
|
||||
self.mainRightWidget = QtGui.QWidget(self.fontMainTab)
|
||||
self.mainRightWidget.setObjectName(u'mainRightWidget')
|
||||
self.mainRightLayout = QtGui.QVBoxLayout(self.mainRightWidget)
|
||||
self.mainRightLayout.setSpacing(8)
|
||||
self.mainRightLayout.setMargin(0)
|
||||
self.mainRightLayout.setObjectName(u'mainRightLayout')
|
||||
self.mainLocationGroupBox = QtGui.QGroupBox(self.mainRightWidget)
|
||||
self.mainLocationGroupBox.setObjectName(u'mainLocationGroupBox')
|
||||
self.mainLocationLayout = QtGui.QFormLayout(self.mainLocationGroupBox)
|
||||
self.mainLocationLayout.setMargin(8)
|
||||
self.mainLocationLayout.setSpacing(8)
|
||||
self.mainLocationLayout.setObjectName(u'mainLocationLayout')
|
||||
self.defaultLocationLabel = QtGui.QLabel(self.mainLocationGroupBox)
|
||||
self.defaultLocationLabel.setObjectName(u'defaultLocationLabel')
|
||||
self.mainLocationLayout.setWidget(0, QtGui.QFormLayout.LabelRole,
|
||||
self.defaultLocationLabel)
|
||||
self.fontMainDefaultCheckBox = QtGui.QCheckBox(
|
||||
self.mainLocationGroupBox)
|
||||
self.fontMainDefaultCheckBox.setTristate(False)
|
||||
self.fontMainDefaultCheckBox.setObjectName(u'fontMainDefaultCheckBox')
|
||||
self.mainLocationLayout.setWidget(0, QtGui.QFormLayout.FieldRole,
|
||||
self.fontMainDefaultCheckBox)
|
||||
self.fontMainXLabel = QtGui.QLabel(self.mainLocationGroupBox)
|
||||
self.fontMainXLabel.setObjectName(u'fontMainXLabel')
|
||||
self.mainLocationLayout.setWidget(1, QtGui.QFormLayout.LabelRole,
|
||||
self.fontMainXLabel)
|
||||
self.fontMainYLabel = QtGui.QLabel(self.mainLocationGroupBox)
|
||||
self.fontMainYLabel.setObjectName(u'fontMainYLabel')
|
||||
self.mainLocationLayout.setWidget(2, QtGui.QFormLayout.LabelRole,
|
||||
self.fontMainYLabel)
|
||||
self.fontMainWidthLabel = QtGui.QLabel(self.mainLocationGroupBox)
|
||||
self.fontMainWidthLabel.setObjectName(u'fontMainWidthLabel')
|
||||
self.mainLocationLayout.setWidget(3, QtGui.QFormLayout.LabelRole,
|
||||
self.fontMainWidthLabel)
|
||||
self.fontMainHeightLabel = QtGui.QLabel(self.mainLocationGroupBox)
|
||||
self.fontMainHeightLabel.setObjectName(u'fontMainHeightLabel')
|
||||
self.mainLocationLayout.setWidget(4, QtGui.QFormLayout.LabelRole,
|
||||
self.fontMainHeightLabel)
|
||||
self.fontMainXSpinBox = QtGui.QSpinBox(self.mainLocationGroupBox)
|
||||
defaultSizePolicy.setHeightForWidth(
|
||||
self.fontMainXSpinBox.sizePolicy().hasHeightForWidth())
|
||||
self.fontMainXSpinBox.setSizePolicy(defaultSizePolicy)
|
||||
self.fontMainXSpinBox.setMinimumSize(QtCore.QSize(78, 0))
|
||||
self.fontMainXSpinBox.setProperty(u'value', QtCore.QVariant(0))
|
||||
self.fontMainXSpinBox.setMaximum(9999)
|
||||
self.fontMainXSpinBox.setObjectName(u'fontMainXSpinBox')
|
||||
self.mainLocationLayout.setWidget(1, QtGui.QFormLayout.FieldRole,
|
||||
self.fontMainXSpinBox)
|
||||
self.fontMainYSpinBox = QtGui.QSpinBox(self.mainLocationGroupBox)
|
||||
defaultSizePolicy.setHeightForWidth(
|
||||
self.fontMainYSpinBox.sizePolicy().hasHeightForWidth())
|
||||
self.fontMainYSpinBox.setSizePolicy(defaultSizePolicy)
|
||||
self.fontMainYSpinBox.setMinimumSize(QtCore.QSize(78, 0))
|
||||
self.fontMainYSpinBox.setMaximum(9999)
|
||||
self.fontMainYSpinBox.setObjectName(u'fontMainYSpinBox')
|
||||
self.mainLocationLayout.setWidget(2, QtGui.QFormLayout.FieldRole,
|
||||
self.fontMainYSpinBox)
|
||||
self.fontMainWidthSpinBox = QtGui.QSpinBox(self.mainLocationGroupBox)
|
||||
defaultSizePolicy.setHeightForWidth(
|
||||
self.fontMainWidthSpinBox.sizePolicy().hasHeightForWidth())
|
||||
self.fontMainWidthSpinBox.setSizePolicy(defaultSizePolicy)
|
||||
self.fontMainWidthSpinBox.setMinimumSize(QtCore.QSize(78, 0))
|
||||
self.fontMainWidthSpinBox.setMaximum(9999)
|
||||
self.fontMainWidthSpinBox.setObjectName(u'fontMainWidthSpinBox')
|
||||
self.mainLocationLayout.setWidget(3, QtGui.QFormLayout.FieldRole,
|
||||
self.fontMainWidthSpinBox)
|
||||
self.fontMainHeightSpinBox = QtGui.QSpinBox(self.mainLocationGroupBox)
|
||||
defaultSizePolicy.setHeightForWidth(
|
||||
self.fontMainHeightSpinBox.sizePolicy().hasHeightForWidth())
|
||||
self.fontMainHeightSpinBox.setSizePolicy(defaultSizePolicy)
|
||||
self.fontMainHeightSpinBox.setMinimumSize(QtCore.QSize(78, 0))
|
||||
self.fontMainHeightSpinBox.setMaximum(9999)
|
||||
self.fontMainHeightSpinBox.setObjectName(u'fontMainHeightSpinBox')
|
||||
self.mainLocationLayout.setWidget(4, QtGui.QFormLayout.FieldRole,
|
||||
self.fontMainHeightSpinBox)
|
||||
self.mainRightLayout.addWidget(self.mainLocationGroupBox)
|
||||
spacerItem2 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum,
|
||||
QtGui.QSizePolicy.Expanding)
|
||||
self.mainRightLayout.addItem(spacerItem2)
|
||||
self.fontMainLayout.addWidget(self.mainRightWidget)
|
||||
self.themeTabWidget.addTab(self.fontMainTab, u'')
|
||||
self.fontFooterTab = QtGui.QWidget()
|
||||
self.fontFooterTab.setObjectName(u'fontFooterTab')
|
||||
self.fontFooterLayout = QtGui.QHBoxLayout(self.fontFooterTab)
|
||||
self.fontFooterLayout.setSpacing(8)
|
||||
self.fontFooterLayout.setMargin(8)
|
||||
self.fontFooterLayout.setObjectName(u'fontFooterLayout')
|
||||
self.footerLeftWidget = QtGui.QWidget(self.fontFooterTab)
|
||||
self.footerLeftWidget.setObjectName(u'footerLeftWidget')
|
||||
self.footerLeftLayout = QtGui.QVBoxLayout(self.footerLeftWidget)
|
||||
self.footerLeftLayout.setSpacing(8)
|
||||
self.footerLeftLayout.setMargin(0)
|
||||
self.footerLeftLayout.setObjectName(u'footerLeftLayout')
|
||||
self.footerFontGroupBox = QtGui.QGroupBox(self.footerLeftWidget)
|
||||
self.footerFontGroupBox.setObjectName(u'footerFontGroupBox')
|
||||
self.footerFontLayout = QtGui.QFormLayout(self.footerFontGroupBox)
|
||||
self.footerFontLayout.setFieldGrowthPolicy(
|
||||
QtGui.QFormLayout.ExpandingFieldsGrow)
|
||||
self.footerFontLayout.setFormAlignment(QtCore.Qt.AlignLeading |
|
||||
QtCore.Qt.AlignLeft | QtCore.Qt.AlignVCenter)
|
||||
self.footerFontLayout.setMargin(8)
|
||||
self.footerFontLayout.setSpacing(8)
|
||||
self.footerFontLayout.setObjectName(u'footerFontLayout')
|
||||
self.fontFooterLabel = QtGui.QLabel(self.footerFontGroupBox)
|
||||
self.fontFooterLabel.setObjectName(u'fontFooterLabel')
|
||||
self.footerFontLayout.setWidget(0, QtGui.QFormLayout.LabelRole,
|
||||
self.fontFooterLabel)
|
||||
self.fontFooterComboBox = QtGui.QFontComboBox(self.footerFontGroupBox)
|
||||
self.fontFooterComboBox.setObjectName(u'fontFooterComboBox')
|
||||
self.footerFontLayout.setWidget(0, QtGui.QFormLayout.FieldRole,
|
||||
self.fontFooterComboBox)
|
||||
self.fontFooterColorLabel = QtGui.QLabel(self.footerFontGroupBox)
|
||||
self.fontFooterColorLabel.setObjectName(u'fontFooterColorLabel')
|
||||
self.footerFontLayout.setWidget(1, QtGui.QFormLayout.LabelRole,
|
||||
self.fontFooterColorLabel)
|
||||
self.fontFooterColorPushButton = QtGui.QPushButton(
|
||||
self.footerFontGroupBox)
|
||||
self.fontFooterColorPushButton.setObjectName(
|
||||
u'fontFooterColorPushButton')
|
||||
self.footerFontLayout.setWidget(1, QtGui.QFormLayout.FieldRole,
|
||||
self.fontFooterColorPushButton)
|
||||
self.fontFooterSizeLabel = QtGui.QLabel(self.footerFontGroupBox)
|
||||
self.fontFooterSizeLabel.setObjectName(u'fontFooterSizeLabel')
|
||||
self.footerFontLayout.setWidget(2, QtGui.QFormLayout.LabelRole,
|
||||
self.fontFooterSizeLabel)
|
||||
self.fontFooterSizeSpinBox = QtGui.QSpinBox(self.footerFontGroupBox)
|
||||
defaultSizePolicy.setHeightForWidth(
|
||||
self.fontFooterSizeSpinBox.sizePolicy().hasHeightForWidth())
|
||||
self.fontFooterSizeSpinBox.setSizePolicy(defaultSizePolicy)
|
||||
self.fontFooterSizeSpinBox.setMinimumSize(QtCore.QSize(70, 0))
|
||||
self.fontFooterSizeSpinBox.setProperty(u'value', QtCore.QVariant(10))
|
||||
self.fontFooterSizeSpinBox.setMaximum(999)
|
||||
self.fontFooterSizeSpinBox.setObjectName(u'fontFooterSizeSpinBox')
|
||||
self.footerFontLayout.setWidget(2, QtGui.QFormLayout.FieldRole,
|
||||
self.fontFooterSizeSpinBox)
|
||||
self.fontFooterWeightComboBox = QtGui.QComboBox(self.footerFontGroupBox)
|
||||
self.fontFooterWeightComboBox.setObjectName(u'fontFooterWeightComboBox')
|
||||
self.fontFooterWeightComboBox.addItem(QtCore.QString())
|
||||
self.fontFooterWeightComboBox.addItem(QtCore.QString())
|
||||
self.fontFooterWeightComboBox.addItem(QtCore.QString())
|
||||
self.fontFooterWeightComboBox.addItem(QtCore.QString())
|
||||
self.footerFontLayout.setWidget(3, QtGui.QFormLayout.FieldRole,
|
||||
self.fontFooterWeightComboBox)
|
||||
self.fontFooterWeightLabel = QtGui.QLabel(self.footerFontGroupBox)
|
||||
self.fontFooterWeightLabel.setObjectName(u'fontFooterWeightLabel')
|
||||
self.footerFontLayout.setWidget(3, QtGui.QFormLayout.LabelRole,
|
||||
self.fontFooterWeightLabel)
|
||||
self.footerLeftLayout.addWidget(self.footerFontGroupBox)
|
||||
spacerItem3 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum,
|
||||
QtGui.QSizePolicy.Expanding)
|
||||
self.footerLeftLayout.addItem(spacerItem3)
|
||||
self.fontFooterLayout.addWidget(self.footerLeftWidget)
|
||||
self.footerRightWidget = QtGui.QWidget(self.fontFooterTab)
|
||||
self.footerRightWidget.setObjectName(u'footerRightWidget')
|
||||
self.footerRightLayout = QtGui.QVBoxLayout(self.footerRightWidget)
|
||||
self.footerRightLayout.setSpacing(8)
|
||||
self.footerRightLayout.setMargin(0)
|
||||
self.footerRightLayout.setObjectName(u'footerRightLayout')
|
||||
self.locationFooterGroupBox = QtGui.QGroupBox(self.footerRightWidget)
|
||||
self.locationFooterGroupBox.setObjectName(u'locationFooterGroupBox')
|
||||
self.locationFooterLayout = QtGui.QFormLayout(
|
||||
self.locationFooterGroupBox)
|
||||
self.locationFooterLayout.setFieldGrowthPolicy(
|
||||
QtGui.QFormLayout.ExpandingFieldsGrow)
|
||||
self.locationFooterLayout.setFormAlignment(QtCore.Qt.AlignLeading |
|
||||
QtCore.Qt.AlignLeft | QtCore.Qt.AlignVCenter)
|
||||
self.locationFooterLayout.setMargin(8)
|
||||
self.locationFooterLayout.setSpacing(8)
|
||||
self.locationFooterLayout.setObjectName(u'locationFooterLayout')
|
||||
self.fontFooterDefaultLabel = QtGui.QLabel(self.locationFooterGroupBox)
|
||||
self.fontFooterDefaultLabel.setObjectName(u'fontFooterDefaultLabel')
|
||||
self.locationFooterLayout.setWidget(0, QtGui.QFormLayout.LabelRole,
|
||||
self.fontFooterDefaultLabel)
|
||||
self.fontFooterDefaultCheckBox = QtGui.QCheckBox(
|
||||
self.locationFooterGroupBox)
|
||||
self.fontFooterDefaultCheckBox.setTristate(False)
|
||||
self.fontFooterDefaultCheckBox.setObjectName(
|
||||
u'fontFooterDefaultCheckBox')
|
||||
self.locationFooterLayout.setWidget(0, QtGui.QFormLayout.FieldRole,
|
||||
self.fontFooterDefaultCheckBox)
|
||||
self.fontFooterXLabel = QtGui.QLabel(self.locationFooterGroupBox)
|
||||
self.fontFooterXLabel.setObjectName(u'fontFooterXLabel')
|
||||
self.locationFooterLayout.setWidget(1, QtGui.QFormLayout.LabelRole,
|
||||
self.fontFooterXLabel)
|
||||
self.fontFooterYLabel = QtGui.QLabel(self.locationFooterGroupBox)
|
||||
self.fontFooterYLabel.setObjectName(u'fontFooterYLabel')
|
||||
self.locationFooterLayout.setWidget(2, QtGui.QFormLayout.LabelRole,
|
||||
self.fontFooterYLabel)
|
||||
self.fontFooterWidthLabel = QtGui.QLabel(self.locationFooterGroupBox)
|
||||
self.fontFooterWidthLabel.setObjectName(u'fontFooterWidthLabel')
|
||||
self.locationFooterLayout.setWidget(3, QtGui.QFormLayout.LabelRole,
|
||||
self.fontFooterWidthLabel)
|
||||
self.fontFooterHeightLabel = QtGui.QLabel(self.locationFooterGroupBox)
|
||||
self.fontFooterHeightLabel.setObjectName(u'fontFooterHeightLabel')
|
||||
self.locationFooterLayout.setWidget(4, QtGui.QFormLayout.LabelRole,
|
||||
self.fontFooterHeightLabel)
|
||||
self.fontFooterXSpinBox = QtGui.QSpinBox(self.locationFooterGroupBox)
|
||||
defaultSizePolicy.setHeightForWidth(
|
||||
self.fontFooterXSpinBox.sizePolicy().hasHeightForWidth())
|
||||
self.fontFooterXSpinBox.setSizePolicy(defaultSizePolicy)
|
||||
self.fontFooterXSpinBox.setMinimumSize(QtCore.QSize(78, 0))
|
||||
self.fontFooterXSpinBox.setProperty(u'value', QtCore.QVariant(0))
|
||||
self.fontFooterXSpinBox.setMaximum(9999)
|
||||
self.fontFooterXSpinBox.setObjectName(u'fontFooterXSpinBox')
|
||||
self.locationFooterLayout.setWidget(1, QtGui.QFormLayout.FieldRole,
|
||||
self.fontFooterXSpinBox)
|
||||
self.fontFooterYSpinBox = QtGui.QSpinBox(self.locationFooterGroupBox)
|
||||
defaultSizePolicy.setHeightForWidth(
|
||||
self.fontFooterXSpinBox.sizePolicy().hasHeightForWidth())
|
||||
self.fontFooterYSpinBox.setSizePolicy(defaultSizePolicy)
|
||||
self.fontFooterYSpinBox.setMinimumSize(QtCore.QSize(78, 0))
|
||||
self.fontFooterYSpinBox.setProperty(u'value', QtCore.QVariant(0))
|
||||
self.fontFooterYSpinBox.setMaximum(9999)
|
||||
self.fontFooterYSpinBox.setObjectName(u'fontFooterYSpinBox')
|
||||
self.locationFooterLayout.setWidget(2, QtGui.QFormLayout.FieldRole,
|
||||
self.fontFooterYSpinBox)
|
||||
self.fontFooterWidthSpinBox = QtGui.QSpinBox(
|
||||
self.locationFooterGroupBox)
|
||||
self.fontFooterWidthSpinBox.setMinimumSize(QtCore.QSize(78, 0))
|
||||
self.fontFooterWidthSpinBox.setMaximum(9999)
|
||||
self.fontFooterWidthSpinBox.setObjectName(u'fontFooterWidthSpinBox')
|
||||
self.locationFooterLayout.setWidget(3, QtGui.QFormLayout.FieldRole,
|
||||
self.fontFooterWidthSpinBox)
|
||||
self.fontFooterHeightSpinBox = QtGui.QSpinBox(
|
||||
self.locationFooterGroupBox)
|
||||
self.fontFooterHeightSpinBox.setMinimumSize(QtCore.QSize(78, 0))
|
||||
self.fontFooterHeightSpinBox.setMaximum(9999)
|
||||
self.fontFooterHeightSpinBox.setObjectName(u'fontFooterHeightSpinBox')
|
||||
self.locationFooterLayout.setWidget(4, QtGui.QFormLayout.FieldRole,
|
||||
self.fontFooterHeightSpinBox)
|
||||
self.footerRightLayout.addWidget(self.locationFooterGroupBox)
|
||||
spacerItem4 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum,
|
||||
QtGui.QSizePolicy.Expanding)
|
||||
self.footerRightLayout.addItem(spacerItem4)
|
||||
self.fontFooterLayout.addWidget(self.footerRightWidget)
|
||||
self.themeTabWidget.addTab(self.fontFooterTab, u'')
|
||||
self.otherOptionsTab = QtGui.QWidget()
|
||||
self.otherOptionsTab.setObjectName(u'otherOptionsTab')
|
||||
self.otherOptionsLayout = QtGui.QHBoxLayout(self.otherOptionsTab)
|
||||
self.otherOptionsLayout.setSpacing(8)
|
||||
self.otherOptionsLayout.setMargin(8)
|
||||
self.otherOptionsLayout.setObjectName(u'otherOptionsLayout')
|
||||
self.optionsLeftWidget = QtGui.QWidget(self.otherOptionsTab)
|
||||
self.optionsLeftWidget.setObjectName(u'optionsLeftWidget')
|
||||
self.optionsLeftLayout = QtGui.QVBoxLayout(self.optionsLeftWidget)
|
||||
self.optionsLeftLayout.setSpacing(8)
|
||||
self.optionsLeftLayout.setMargin(0)
|
||||
self.optionsLeftLayout.setObjectName(u'optionsLeftLayout')
|
||||
self.outlineGroupBox = QtGui.QGroupBox(self.optionsLeftWidget)
|
||||
self.outlineGroupBox.setObjectName(u'outlineGroupBox')
|
||||
self.verticalLayout = QtGui.QVBoxLayout(self.outlineGroupBox)
|
||||
self.verticalLayout.setSpacing(8)
|
||||
self.verticalLayout.setMargin(8)
|
||||
self.verticalLayout.setObjectName(u'verticalLayout')
|
||||
self.outlineWidget = QtGui.QWidget(self.outlineGroupBox)
|
||||
self.outlineWidget.setObjectName(u'outlineWidget')
|
||||
self.outlineLayout = QtGui.QFormLayout(self.outlineWidget)
|
||||
self.outlineLayout.setMargin(0)
|
||||
self.outlineLayout.setSpacing(8)
|
||||
self.outlineLayout.setObjectName(u'outlineLayout')
|
||||
self.outlineCheckBox = QtGui.QCheckBox(self.outlineWidget)
|
||||
self.outlineCheckBox.setObjectName(u'outlineCheckBox')
|
||||
self.outlineLayout.setWidget(0, QtGui.QFormLayout.FieldRole,
|
||||
self.outlineCheckBox)
|
||||
self.outlineSpinBox = QtGui.QSpinBox(self.outlineWidget)
|
||||
self.outlineSpinBox.setObjectName(u'outlineSpinBox')
|
||||
self.outlineSpinBox.setMaximum(10)
|
||||
self.outlineLayout.setWidget(1, QtGui.QFormLayout.FieldRole,
|
||||
self.outlineSpinBox)
|
||||
self.outlineSpinBoxLabel = QtGui.QLabel(self.outlineWidget)
|
||||
self.outlineSpinBoxLabel.setObjectName(u'outlineSpinBoxLabel')
|
||||
self.outlineLayout.setWidget(1, QtGui.QFormLayout.LabelRole,
|
||||
self.outlineSpinBoxLabel)
|
||||
self.outlineColorLabel = QtGui.QLabel(self.outlineWidget)
|
||||
self.outlineColorLabel.setObjectName(u'outlineColorLabel')
|
||||
self.outlineLayout.setWidget(2, QtGui.QFormLayout.LabelRole,
|
||||
self.outlineColorLabel)
|
||||
self.outlineColorPushButton = QtGui.QPushButton(self.outlineWidget)
|
||||
self.outlineColorPushButton.setObjectName(u'outlineColorPushButton')
|
||||
self.outlineLayout.setWidget(2, QtGui.QFormLayout.FieldRole,
|
||||
self.outlineColorPushButton)
|
||||
self.outlineEnabledLabel = QtGui.QLabel(self.outlineWidget)
|
||||
self.outlineEnabledLabel.setObjectName(u'outlineEnabledLabel')
|
||||
self.outlineLayout.setWidget(0, QtGui.QFormLayout.LabelRole,
|
||||
self.outlineEnabledLabel)
|
||||
self.verticalLayout.addWidget(self.outlineWidget)
|
||||
self.optionsLeftLayout.addWidget(self.outlineGroupBox)
|
||||
self.shadowGroupBox = QtGui.QGroupBox(self.optionsLeftWidget)
|
||||
self.shadowGroupBox.setObjectName(u'shadowGroupBox')
|
||||
self.verticalLayout = QtGui.QVBoxLayout(self.shadowGroupBox)
|
||||
self.verticalLayout.setSpacing(8)
|
||||
self.verticalLayout.setMargin(8)
|
||||
self.verticalLayout.setObjectName(u'verticalLayout')
|
||||
self.shadowWidget = QtGui.QWidget(self.shadowGroupBox)
|
||||
self.shadowWidget.setObjectName(u'shadowWidget')
|
||||
self.shadowLayout = QtGui.QFormLayout(self.shadowWidget)
|
||||
self.shadowLayout.setMargin(0)
|
||||
self.shadowLayout.setSpacing(8)
|
||||
self.shadowLayout.setObjectName(u'shadowLayout')
|
||||
self.shadowCheckBox = QtGui.QCheckBox(self.shadowWidget)
|
||||
self.shadowCheckBox.setObjectName(u'shadowCheckBox')
|
||||
self.shadowLayout.setWidget(0, QtGui.QFormLayout.FieldRole,
|
||||
self.shadowCheckBox)
|
||||
self.shadowSpinBox = QtGui.QSpinBox(self.outlineWidget)
|
||||
self.shadowSpinBox.setObjectName(u'shadowSpinBox')
|
||||
self.shadowSpinBox.setMaximum(10)
|
||||
self.shadowLayout.setWidget(1, QtGui.QFormLayout.FieldRole,
|
||||
self.shadowSpinBox)
|
||||
self.shadowSpinBoxLabel = QtGui.QLabel(self.outlineWidget)
|
||||
self.shadowSpinBoxLabel.setObjectName(u'shadowSpinBoxLabel')
|
||||
self.shadowLayout.setWidget(1, QtGui.QFormLayout.LabelRole,
|
||||
self.shadowSpinBoxLabel)
|
||||
self.shadowColorLabel = QtGui.QLabel(self.shadowWidget)
|
||||
self.shadowColorLabel.setObjectName(u'shadowColorLabel')
|
||||
self.shadowLayout.setWidget(2, QtGui.QFormLayout.LabelRole,
|
||||
self.shadowColorLabel)
|
||||
self.shadowColorPushButton = QtGui.QPushButton(self.shadowWidget)
|
||||
self.shadowColorPushButton.setObjectName(u'shadowColorPushButton')
|
||||
self.shadowLayout.setWidget(2, QtGui.QFormLayout.FieldRole,
|
||||
self.shadowColorPushButton)
|
||||
self.shadowEnabledLabel = QtGui.QLabel(self.shadowWidget)
|
||||
self.shadowEnabledLabel.setObjectName(u'shadowEnabledLabel')
|
||||
self.shadowLayout.setWidget(0, QtGui.QFormLayout.LabelRole,
|
||||
self.shadowEnabledLabel)
|
||||
self.verticalLayout.addWidget(self.shadowWidget)
|
||||
self.optionsLeftLayout.addWidget(self.shadowGroupBox)
|
||||
spacerItem5 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum,
|
||||
QtGui.QSizePolicy.Expanding)
|
||||
self.optionsLeftLayout.addItem(spacerItem5)
|
||||
self.otherOptionsLayout.addWidget(self.optionsLeftWidget)
|
||||
self.optionsRightWidget = QtGui.QWidget(self.otherOptionsTab)
|
||||
self.optionsRightWidget.setObjectName(u'optionsRightWidget')
|
||||
self.optionsRightLayout = QtGui.QVBoxLayout(self.optionsRightWidget)
|
||||
self.optionsRightLayout.setSpacing(8)
|
||||
self.optionsRightLayout.setMargin(0)
|
||||
self.optionsRightLayout.setObjectName(u'optionsRightLayout')
|
||||
self.alignmentGroupBox = QtGui.QGroupBox(self.optionsRightWidget)
|
||||
self.alignmentGroupBox.setObjectName(u'alignmentGroupBox')
|
||||
self.gridLayout4 = QtGui.QGridLayout(self.alignmentGroupBox)
|
||||
self.gridLayout4.setObjectName(u'gridLayout4')
|
||||
self.horizontalLabel = QtGui.QLabel(self.alignmentGroupBox)
|
||||
self.horizontalLabel.setObjectName(u'horizontalLabel')
|
||||
self.gridLayout4.addWidget(self.horizontalLabel, 0, 0, 1, 1)
|
||||
self.horizontalComboBox = QtGui.QComboBox(self.alignmentGroupBox)
|
||||
self.horizontalComboBox.setObjectName(u'horizontalComboBox')
|
||||
self.horizontalComboBox.addItem(QtCore.QString())
|
||||
self.horizontalComboBox.addItem(QtCore.QString())
|
||||
self.horizontalComboBox.addItem(QtCore.QString())
|
||||
self.gridLayout4.addWidget(self.horizontalComboBox, 0, 1, 1, 1)
|
||||
self.verticalLabel = QtGui.QLabel(self.alignmentGroupBox)
|
||||
self.verticalLabel.setObjectName(u'verticalLabel')
|
||||
self.gridLayout4.addWidget(self.verticalLabel, 1, 0, 1, 1)
|
||||
self.verticalComboBox = QtGui.QComboBox(self.alignmentGroupBox)
|
||||
self.verticalComboBox.setObjectName(u'verticalComboBox')
|
||||
self.verticalComboBox.addItem(QtCore.QString())
|
||||
self.verticalComboBox.addItem(QtCore.QString())
|
||||
self.verticalComboBox.addItem(QtCore.QString())
|
||||
self.gridLayout4.addWidget(self.verticalComboBox, 1, 1, 1, 1)
|
||||
self.optionsRightLayout.addWidget(self.alignmentGroupBox)
|
||||
self.transitionGroupBox = QtGui.QGroupBox(self.optionsRightWidget)
|
||||
self.transitionGroupBox.setObjectName(u'transitionGroupBox')
|
||||
self.gridLayout5 = QtGui.QGridLayout(self.transitionGroupBox)
|
||||
self.gridLayout5.setObjectName(u'gridLayout5')
|
||||
self.slideTransitionCheckBoxLabel = QtGui.QLabel(
|
||||
self.transitionGroupBox)
|
||||
self.slideTransitionCheckBoxLabel.setObjectName(
|
||||
u'slideTransitionCheckBoxLabel')
|
||||
self.gridLayout5.addWidget(
|
||||
self.slideTransitionCheckBoxLabel, 0, 0, 1, 1)
|
||||
self.slideTransitionCheckBox = QtGui.QCheckBox(self.alignmentGroupBox)
|
||||
self.slideTransitionCheckBox.setTristate(False)
|
||||
self.gridLayout5.addWidget(self.slideTransitionCheckBox, 0, 1, 1, 1)
|
||||
self.optionsRightLayout.addWidget(self.transitionGroupBox)
|
||||
spacerItem6 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum,
|
||||
QtGui.QSizePolicy.Expanding)
|
||||
self.optionsRightLayout.addItem(spacerItem6)
|
||||
self.otherOptionsLayout.addWidget(self.optionsRightWidget)
|
||||
self.themeTabWidget.addTab(self.otherOptionsTab, u'')
|
||||
self.contentLayout.addWidget(self.themeTabWidget)
|
||||
self.amendThemeLayout.addWidget(self.contentWidget)
|
||||
self.previewGroupBox = QtGui.QGroupBox(amendThemeDialog)
|
||||
self.previewGroupBox.setObjectName(u'previewGroupBox')
|
||||
self.themePreviewLayout = QtGui.QHBoxLayout(self.previewGroupBox)
|
||||
self.themePreviewLayout.setSpacing(8)
|
||||
self.themePreviewLayout.setMargin(8)
|
||||
self.themePreviewLayout.setObjectName(u'themePreviewLayout')
|
||||
spacerItem7 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding,
|
||||
QtGui.QSizePolicy.Expanding)
|
||||
self.themePreviewLayout.addItem(spacerItem7)
|
||||
self.themePreview = QtGui.QLabel(self.previewGroupBox)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed,
|
||||
QtGui.QSizePolicy.Fixed)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(
|
||||
self.themePreview.sizePolicy().hasHeightForWidth())
|
||||
self.themePreview.setSizePolicy(sizePolicy)
|
||||
self.themePreview.setMaximumSize(QtCore.QSize(300, 225))
|
||||
self.themePreview.setFrameShape(QtGui.QFrame.WinPanel)
|
||||
self.themePreview.setFrameShadow(QtGui.QFrame.Sunken)
|
||||
self.themePreview.setLineWidth(1)
|
||||
self.themePreview.setScaledContents(True)
|
||||
self.themePreview.setObjectName(u'themePreview')
|
||||
self.themePreviewLayout.addWidget(self.themePreview)
|
||||
spacerItem8 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding,
|
||||
QtGui.QSizePolicy.Expanding)
|
||||
self.themePreviewLayout.addItem(spacerItem8)
|
||||
self.amendThemeLayout.addWidget(self.previewGroupBox)
|
||||
self.themeButtonBox = QtGui.QDialogButtonBox(amendThemeDialog)
|
||||
self.themeButtonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel |
|
||||
QtGui.QDialogButtonBox.Ok)
|
||||
self.themeButtonBox.setObjectName(u'themeButtonBox')
|
||||
self.amendThemeLayout.addWidget(self.themeButtonBox)
|
||||
|
||||
self.retranslateUi(amendThemeDialog)
|
||||
self.themeTabWidget.setCurrentIndex(0)
|
||||
QtCore.QObject.connect(self.themeButtonBox,
|
||||
QtCore.SIGNAL(u'accepted()'), amendThemeDialog.accept)
|
||||
QtCore.QObject.connect(self.themeButtonBox,
|
||||
QtCore.SIGNAL(u'rejected()'), amendThemeDialog.reject)
|
||||
QtCore.QMetaObject.connectSlotsByName(amendThemeDialog)
|
||||
|
||||
def retranslateUi(self, amendThemeDialog):
|
||||
amendThemeDialog.setWindowTitle(
|
||||
translate('OpenLP.AmendThemeForm', 'Theme Maintenance'))
|
||||
self.themeNameLabel.setText(
|
||||
translate('OpenLP.AmendThemeForm', 'Theme &name:'))
|
||||
self.backgroundTypeLabel.setText(
|
||||
translate('OpenLP.AmendThemeForm', 'Type:'))
|
||||
self.backgroundTypeComboBox.setItemText(0,
|
||||
translate('OpenLP.AmendThemeForm', 'Solid Color'))
|
||||
self.backgroundTypeComboBox.setItemText(1,
|
||||
translate('OpenLP.AmendThemeForm', 'Gradient'))
|
||||
self.backgroundTypeComboBox.setItemText(2,
|
||||
translate('OpenLP.AmendThemeForm', 'Image'))
|
||||
self.color1Label.setText(u'<color1>:')
|
||||
self.color2Label.setText(u'<color2>:')
|
||||
self.imageLabel.setText(
|
||||
translate('OpenLP.AmendThemeForm', 'Image:'))
|
||||
self.gradientLabel.setText(
|
||||
translate('OpenLP.AmendThemeForm', 'Gradient:'))
|
||||
self.gradientComboBox.setItemText(0,
|
||||
translate('OpenLP.AmendThemeForm', 'Horizontal'))
|
||||
self.gradientComboBox.setItemText(1,
|
||||
translate('OpenLP.AmendThemeForm', 'Vertical'))
|
||||
self.gradientComboBox.setItemText(2,
|
||||
translate('OpenLP.AmendThemeForm', 'Circular'))
|
||||
self.themeTabWidget.setTabText(
|
||||
self.themeTabWidget.indexOf(self.backgroundTab),
|
||||
translate('OpenLP.AmendThemeForm', '&Background'))
|
||||
self.fontMainGroupBox.setTitle(
|
||||
translate('OpenLP.AmendThemeForm', 'Main Font'))
|
||||
self.fontMainlabel.setText(
|
||||
translate('OpenLP.AmendThemeForm', 'Font:'))
|
||||
self.fontMainColorLabel.setText(
|
||||
translate('OpenLP.AmendThemeForm', 'Color:'))
|
||||
self.fontMainSize.setText(
|
||||
translate('OpenLP.AmendThemeForm', 'Size:'))
|
||||
self.fontMainSizeSpinBox.setSuffix(
|
||||
translate('OpenLP.AmendThemeForm', 'pt'))
|
||||
self.fontMainWrapLineAdjustmentLabel.setText(
|
||||
translate('OpenLP.AmendThemeForm', 'Adjust line spacing:'))
|
||||
self.fontMainWeightComboBox.setItemText(0,
|
||||
translate('OpenLP.AmendThemeForm', 'Normal'))
|
||||
self.fontMainWeightComboBox.setItemText(1,
|
||||
translate('OpenLP.AmendThemeForm', 'Bold'))
|
||||
self.fontMainWeightComboBox.setItemText(2,
|
||||
translate('OpenLP.AmendThemeForm', 'Italics'))
|
||||
self.fontMainWeightComboBox.setItemText(3,
|
||||
translate('OpenLP.AmendThemeForm', 'Bold/Italics'))
|
||||
self.fontMainWeightLabel.setText(
|
||||
translate('OpenLP.AmendThemeForm', 'Style:'))
|
||||
self.mainLocationGroupBox.setTitle(
|
||||
translate('OpenLP.AmendThemeForm', 'Display Location'))
|
||||
self.defaultLocationLabel.setText(
|
||||
translate('OpenLP.AmendThemeForm', 'Use default location'))
|
||||
self.fontMainXLabel.setText(
|
||||
translate('OpenLP.AmendThemeForm', 'X position:'))
|
||||
self.fontMainYLabel.setText(
|
||||
translate('OpenLP.AmendThemeForm', 'Y position:'))
|
||||
self.fontMainWidthLabel.setText(
|
||||
translate('OpenLP.AmendThemeForm', 'Width:'))
|
||||
self.fontMainHeightLabel.setText(
|
||||
translate('OpenLP.AmendThemeForm', 'Height:'))
|
||||
self.fontMainXSpinBox.setSuffix(
|
||||
translate('OpenLP.AmendThemeForm', 'px'))
|
||||
self.fontMainYSpinBox.setSuffix(
|
||||
translate('OpenLP.AmendThemeForm', 'px'))
|
||||
self.fontMainWidthSpinBox.setSuffix(
|
||||
translate('OpenLP.AmendThemeForm', 'px'))
|
||||
self.fontMainHeightSpinBox.setSuffix(
|
||||
translate('OpenLP.AmendThemeForm', 'px'))
|
||||
self.themeTabWidget.setTabText(
|
||||
self.themeTabWidget.indexOf(self.fontMainTab),
|
||||
translate('OpenLP.AmendThemeForm', '&Main Font'))
|
||||
self.footerFontGroupBox.setTitle(
|
||||
translate('OpenLP.AmendThemeForm', 'Footer Font'))
|
||||
self.fontFooterLabel.setText(
|
||||
translate('OpenLP.AmendThemeForm', 'Font:'))
|
||||
self.fontFooterColorLabel.setText(
|
||||
translate('OpenLP.AmendThemeForm', 'Color:'))
|
||||
self.fontFooterSizeLabel.setText(
|
||||
translate('OpenLP.AmendThemeForm', 'Size:'))
|
||||
self.fontFooterSizeSpinBox.setSuffix(
|
||||
translate('OpenLP.AmendThemeForm', 'pt'))
|
||||
self.fontFooterWeightComboBox.setItemText(0,
|
||||
translate('OpenLP.AmendThemeForm', 'Normal'))
|
||||
self.fontFooterWeightComboBox.setItemText(1,
|
||||
translate('OpenLP.AmendThemeForm', 'Bold'))
|
||||
self.fontFooterWeightComboBox.setItemText(2,
|
||||
translate('OpenLP.AmendThemeForm', 'Italics'))
|
||||
self.fontFooterWeightComboBox.setItemText(3,
|
||||
translate('OpenLP.AmendThemeForm', 'Bold/Italics'))
|
||||
self.fontFooterWeightLabel.setText(
|
||||
translate('OpenLP.AmendThemeForm', 'Style:'))
|
||||
self.locationFooterGroupBox.setTitle(
|
||||
translate('OpenLP.AmendThemeForm', 'Display Location'))
|
||||
self.fontFooterDefaultLabel.setText(
|
||||
translate('OpenLP.AmendThemeForm', 'Use default location'))
|
||||
self.fontFooterXLabel.setText(
|
||||
translate('OpenLP.AmendThemeForm', 'X position:'))
|
||||
self.fontFooterYLabel.setText(
|
||||
translate('OpenLP.AmendThemeForm', 'Y position:'))
|
||||
self.fontFooterWidthLabel.setText(
|
||||
translate('OpenLP.AmendThemeForm', 'Width:'))
|
||||
self.fontFooterHeightLabel.setText(
|
||||
translate('OpenLP.AmendThemeForm', 'Height:'))
|
||||
self.fontFooterXSpinBox.setSuffix(
|
||||
translate('OpenLP.AmendThemeForm', 'px'))
|
||||
self.fontFooterYSpinBox.setSuffix(
|
||||
translate('OpenLP.AmendThemeForm', 'px'))
|
||||
self.fontFooterWidthSpinBox.setSuffix(
|
||||
translate('OpenLP.AmendThemeForm', 'px'))
|
||||
self.fontFooterHeightSpinBox.setSuffix(
|
||||
translate('OpenLP.AmendThemeForm', 'px'))
|
||||
self.themeTabWidget.setTabText(
|
||||
self.themeTabWidget.indexOf(self.fontFooterTab),
|
||||
translate('OpenLP.AmendThemeForm', '&Footer Font'))
|
||||
self.outlineGroupBox.setTitle(
|
||||
translate('OpenLP.AmendThemeForm', 'Outline'))
|
||||
self.outlineSpinBoxLabel.setText(
|
||||
translate('OpenLP.AmendThemeForm', 'Outline size:'))
|
||||
self.outlineSpinBox.setSuffix(
|
||||
translate('OpenLP.AmendThemeForm', 'px'))
|
||||
self.outlineColorLabel.setText(
|
||||
translate('OpenLP.AmendThemeForm', 'Outline color:'))
|
||||
self.outlineEnabledLabel.setText(
|
||||
translate('OpenLP.AmendThemeForm', 'Show outline:'))
|
||||
self.shadowGroupBox.setTitle(
|
||||
translate('OpenLP.AmendThemeForm', 'Shadow'))
|
||||
self.shadowSpinBoxLabel.setText(
|
||||
translate('OpenLP.AmendThemeForm', 'Shadow size:'))
|
||||
self.shadowSpinBox.setSuffix(
|
||||
translate('OpenLP.AmendThemeForm', 'px'))
|
||||
self.shadowColorLabel.setText(
|
||||
translate('OpenLP.AmendThemeForm', 'Shadow color:'))
|
||||
self.shadowEnabledLabel.setText(
|
||||
translate('OpenLP.AmendThemeForm', 'Show shadow:'))
|
||||
self.alignmentGroupBox.setTitle(
|
||||
translate('OpenLP.AmendThemeForm', 'Alignment'))
|
||||
self.horizontalLabel.setText(
|
||||
translate('OpenLP.AmendThemeForm', 'Horizontal align:'))
|
||||
self.horizontalComboBox.setItemText(0,
|
||||
translate('OpenLP.AmendThemeForm', 'Left'))
|
||||
self.horizontalComboBox.setItemText(1,
|
||||
translate('OpenLP.AmendThemeForm', 'Right'))
|
||||
self.horizontalComboBox.setItemText(2,
|
||||
translate('OpenLP.AmendThemeForm', 'Center'))
|
||||
self.verticalLabel.setText(
|
||||
translate('OpenLP.AmendThemeForm', 'Vertical align:'))
|
||||
self.verticalComboBox.setItemText(0,
|
||||
translate('OpenLP.AmendThemeForm', 'Top'))
|
||||
self.verticalComboBox.setItemText(1,
|
||||
translate('OpenLP.AmendThemeForm', 'Middle'))
|
||||
self.verticalComboBox.setItemText(2,
|
||||
translate('OpenLP.AmendThemeForm', 'Bottom'))
|
||||
self.transitionGroupBox.setTitle(
|
||||
translate('OpenLP.AmendThemeForm', 'Slide Transition'))
|
||||
self.slideTransitionCheckBoxLabel.setText(
|
||||
translate('OpenLP.AmendThemeForm', 'Transition active'))
|
||||
self.themeTabWidget.setTabText(
|
||||
self.themeTabWidget.indexOf(self.otherOptionsTab),
|
||||
translate('OpenLP.AmendThemeForm', '&Other Options'))
|
||||
self.previewGroupBox.setTitle(
|
||||
translate('OpenLP.AmendThemeForm', 'Preview'))
|
@ -1,722 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
|
||||
|
||||
###############################################################################
|
||||
# OpenLP - Open Source Lyrics Projection #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# Copyright (c) 2008-2010 Raoul Snyman #
|
||||
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
|
||||
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
|
||||
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
||||
# Carsten Tinggaard, Frode Woldsund #
|
||||
# --------------------------------------------------------------------------- #
|
||||
# This program is free software; you can redistribute it and/or modify it #
|
||||
# under the terms of the GNU General Public License as published by the Free #
|
||||
# Software Foundation; version 2 of the License. #
|
||||
# #
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT #
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
|
||||
# more details. #
|
||||
# #
|
||||
# You should have received a copy of the GNU General Public License along #
|
||||
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||
###############################################################################
|
||||
|
||||
import logging
|
||||
import os
|
||||
import os.path
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import ThemeXML, translate
|
||||
from openlp.core.utils import get_images_filter
|
||||
from amendthemedialog import Ui_AmendThemeDialog
|
||||
|
||||
log = logging.getLogger(u'AmendThemeForm')
|
||||
|
||||
class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
|
||||
"""
|
||||
The :class:`AmendThemeForm` class provides the user interface to set up
|
||||
new and edit existing themes.
|
||||
"""
|
||||
def __init__(self, parent):
|
||||
"""
|
||||
Initialise the theme editor user interface
|
||||
"""
|
||||
QtGui.QDialog.__init__(self, parent)
|
||||
self.thememanager = parent
|
||||
self.path = None
|
||||
self.theme = ThemeXML()
|
||||
self.setupUi(self)
|
||||
# Buttons
|
||||
QtCore.QObject.connect(self.color1PushButton,
|
||||
QtCore.SIGNAL(u'pressed()'), self.onColor1PushButtonClicked)
|
||||
QtCore.QObject.connect(self.color2PushButton,
|
||||
QtCore.SIGNAL(u'pressed()'), self.onColor2PushButtonClicked)
|
||||
QtCore.QObject.connect(self.fontMainColorPushButton,
|
||||
QtCore.SIGNAL(u'pressed()'), self.onFontMainColorPushButtonClicked)
|
||||
QtCore.QObject.connect(self.fontFooterColorPushButton,
|
||||
QtCore.SIGNAL(u'pressed()'),
|
||||
self.onFontFooterColorPushButtonClicked)
|
||||
QtCore.QObject.connect(self.outlineColorPushButton,
|
||||
QtCore.SIGNAL(u'pressed()'), self.onOutlineColorPushButtonClicked)
|
||||
QtCore.QObject.connect(self.shadowColorPushButton,
|
||||
QtCore.SIGNAL(u'pressed()'), self.onShadowColorPushButtonClicked)
|
||||
QtCore.QObject.connect(self.imageToolButton,
|
||||
QtCore.SIGNAL(u'clicked()'), self.onImageToolButtonClicked)
|
||||
# Combo boxes
|
||||
QtCore.QObject.connect(self.backgroundTypeComboBox,
|
||||
QtCore.SIGNAL(u'activated(int)'),
|
||||
self.onBackgroundTypeComboBoxSelected)
|
||||
QtCore.QObject.connect(self.gradientComboBox,
|
||||
QtCore.SIGNAL(u'activated(int)'), self.onGradientComboBoxSelected)
|
||||
QtCore.QObject.connect(self.fontMainComboBox,
|
||||
QtCore.SIGNAL(u'activated(int)'), self.onFontMainComboBoxSelected)
|
||||
QtCore.QObject.connect(self.fontMainWeightComboBox,
|
||||
QtCore.SIGNAL(u'activated(int)'),
|
||||
self.onFontMainWeightComboBoxSelected)
|
||||
QtCore.QObject.connect(self.fontFooterComboBox,
|
||||
QtCore.SIGNAL(u'activated(int)'), self.onFontFooterComboBoxSelected)
|
||||
QtCore.QObject.connect(self.fontFooterWeightComboBox,
|
||||
QtCore.SIGNAL(u'activated(int)'),
|
||||
self.onFontFooterWeightComboBoxSelected)
|
||||
QtCore.QObject.connect(self.horizontalComboBox,
|
||||
QtCore.SIGNAL(u'activated(int)'), self.onHorizontalComboBoxSelected)
|
||||
QtCore.QObject.connect(self.verticalComboBox,
|
||||
QtCore.SIGNAL(u'activated(int)'), self.onVerticalComboBoxSelected)
|
||||
# Spin boxes
|
||||
QtCore.QObject.connect(self.fontMainSizeSpinBox,
|
||||
QtCore.SIGNAL(u'editingFinished()'),
|
||||
self.onFontMainSizeSpinBoxChanged)
|
||||
QtCore.QObject.connect(self.fontMainLineAdjustmentSpinBox,
|
||||
QtCore.SIGNAL(u'editingFinished()'),
|
||||
self.onFontMainLineAdjustmentSpinBoxChanged)
|
||||
QtCore.QObject.connect(self.shadowSpinBox,
|
||||
QtCore.SIGNAL(u'editingFinished()'),
|
||||
self.onShadowSpinBoxChanged)
|
||||
QtCore.QObject.connect(self.outlineSpinBox,
|
||||
QtCore.SIGNAL(u'editingFinished()'),
|
||||
self.onOutlineSpinBoxChanged)
|
||||
|
||||
QtCore.QObject.connect(self.fontFooterSizeSpinBox,
|
||||
QtCore.SIGNAL(u'editingFinished()'),
|
||||
self.onFontFooterSizeSpinBoxChanged)
|
||||
QtCore.QObject.connect(self.fontMainXSpinBox,
|
||||
QtCore.SIGNAL(u'editingFinished()'), self.onFontMainXSpinBoxChanged)
|
||||
QtCore.QObject.connect(self.fontMainYSpinBox,
|
||||
QtCore.SIGNAL(u'editingFinished()'), self.onFontMainYSpinBoxChanged)
|
||||
QtCore.QObject.connect(self.fontMainWidthSpinBox,
|
||||
QtCore.SIGNAL(u'editingFinished()'),
|
||||
self.onFontMainWidthSpinBoxChanged)
|
||||
QtCore.QObject.connect(self.fontMainHeightSpinBox,
|
||||
QtCore.SIGNAL(u'editingFinished()'),
|
||||
self.onFontMainHeightSpinBoxChanged)
|
||||
QtCore.QObject.connect(self.fontMainLineAdjustmentSpinBox,
|
||||
QtCore.SIGNAL(u'editingFinished()'),
|
||||
self.onFontMainLineAdjustmentSpinBoxChanged)
|
||||
QtCore.QObject.connect(self.fontFooterXSpinBox,
|
||||
QtCore.SIGNAL(u'editingFinished()'),
|
||||
self.onFontFooterXSpinBoxChanged)
|
||||
QtCore.QObject.connect(self.fontFooterYSpinBox,
|
||||
QtCore.SIGNAL(u'editingFinished()'),
|
||||
self.onFontFooterYSpinBoxChanged)
|
||||
QtCore.QObject.connect(self.fontFooterWidthSpinBox,
|
||||
QtCore.SIGNAL(u'editingFinished()'),
|
||||
self.onFontFooterWidthSpinBoxChanged)
|
||||
QtCore.QObject.connect(self.fontFooterHeightSpinBox,
|
||||
QtCore.SIGNAL(u'editingFinished()'),
|
||||
self.onFontFooterHeightSpinBoxChanged)
|
||||
|
||||
# CheckBoxes
|
||||
QtCore.QObject.connect(self.fontMainDefaultCheckBox,
|
||||
QtCore.SIGNAL(u'stateChanged(int)'),
|
||||
self.onFontMainDefaultCheckBoxChanged)
|
||||
QtCore.QObject.connect(self.fontFooterDefaultCheckBox,
|
||||
QtCore.SIGNAL(u'stateChanged(int)'),
|
||||
self.onFontFooterDefaultCheckBoxChanged)
|
||||
QtCore.QObject.connect(self.outlineCheckBox,
|
||||
QtCore.SIGNAL(u'stateChanged(int)'), self.onOutlineCheckBoxChanged)
|
||||
QtCore.QObject.connect(self.shadowCheckBox,
|
||||
QtCore.SIGNAL(u'stateChanged(int)'), self.onShadowCheckBoxChanged)
|
||||
QtCore.QObject.connect(self.slideTransitionCheckBox,
|
||||
QtCore.SIGNAL(u'stateChanged(int)'),
|
||||
self.onSlideTransitionCheckBoxChanged)
|
||||
|
||||
def accept(self):
|
||||
new_theme = ThemeXML()
|
||||
theme_name = unicode(self.themeNameEdit.text())
|
||||
new_theme.new_document(theme_name)
|
||||
save_from = None
|
||||
save_to = None
|
||||
if self.theme.background_type == u'solid':
|
||||
new_theme.add_background_solid(
|
||||
unicode(self.theme.background_color))
|
||||
elif self.theme.background_type == u'gradient':
|
||||
new_theme.add_background_gradient(
|
||||
unicode(self.theme.background_start_color),
|
||||
unicode(self.theme.background_end_color),
|
||||
self.theme.background_direction)
|
||||
else:
|
||||
filename = \
|
||||
os.path.split(unicode(self.theme.background_filename))[1]
|
||||
new_theme.add_background_image(filename)
|
||||
save_to = os.path.join(self.path, theme_name, filename)
|
||||
save_from = self.theme.background_filename
|
||||
new_theme.add_font(unicode(self.theme.font_main_name),
|
||||
unicode(self.theme.font_main_color),
|
||||
unicode(self.theme.font_main_proportion),
|
||||
unicode(self.theme.font_main_override), u'main',
|
||||
unicode(self.theme.font_main_weight),
|
||||
unicode(self.theme.font_main_italics),
|
||||
unicode(self.theme.font_main_line_adjustment),
|
||||
unicode(self.theme.font_main_x),
|
||||
unicode(self.theme.font_main_y),
|
||||
unicode(self.theme.font_main_width),
|
||||
unicode(self.theme.font_main_height))
|
||||
new_theme.add_font(unicode(self.theme.font_footer_name),
|
||||
unicode(self.theme.font_footer_color),
|
||||
unicode(self.theme.font_footer_proportion),
|
||||
unicode(self.theme.font_footer_override), u'footer',
|
||||
unicode(self.theme.font_footer_weight),
|
||||
unicode(self.theme.font_footer_italics),
|
||||
0, # line adjustment
|
||||
unicode(self.theme.font_footer_x),
|
||||
unicode(self.theme.font_footer_y),
|
||||
unicode(self.theme.font_footer_width),
|
||||
unicode(self.theme.font_footer_height))
|
||||
new_theme.add_display(unicode(self.theme.display_shadow),
|
||||
unicode(self.theme.display_shadow_color),
|
||||
unicode(self.theme.display_outline),
|
||||
unicode(self.theme.display_outline_color),
|
||||
unicode(self.theme.display_horizontal_align),
|
||||
unicode(self.theme.display_vertical_align),
|
||||
unicode(self.theme.display_wrap_style),
|
||||
unicode(self.theme.display_slide_transition),
|
||||
unicode(self.theme.display_shadow_size),
|
||||
unicode(self.theme.display_outline_size))
|
||||
theme = new_theme.extract_xml()
|
||||
pretty_theme = new_theme.extract_formatted_xml()
|
||||
if self.thememanager.saveTheme(theme_name, theme, pretty_theme,
|
||||
save_from, save_to) is not False:
|
||||
return QtGui.QDialog.accept(self)
|
||||
|
||||
def loadTheme(self, theme):
|
||||
log.debug(u'LoadTheme %s', theme)
|
||||
self.theme = theme
|
||||
# Stop the initial screen setup generating 1 preview per field!
|
||||
self.allowPreview = False
|
||||
self.paintUi(self.theme)
|
||||
self.allowPreview = True
|
||||
self.previewTheme()
|
||||
|
||||
def onImageToolButtonClicked(self):
|
||||
images_filter = get_images_filter()
|
||||
images_filter = '%s;;%s (*.*) (*)' % (images_filter,
|
||||
translate('OpenLP.AmendThemeForm', 'All Files'))
|
||||
filename = QtGui.QFileDialog.getOpenFileName(self,
|
||||
translate('OpenLP.AmendThemeForm', 'Select Image'), u'',
|
||||
images_filter)
|
||||
if filename:
|
||||
self.imageLineEdit.setText(filename)
|
||||
self.theme.background_filename = filename
|
||||
self.previewTheme()
|
||||
#
|
||||
# Main Font Tab
|
||||
#
|
||||
def onFontMainComboBoxSelected(self):
|
||||
self.theme.font_main_name = self.fontMainComboBox.currentFont().family()
|
||||
self.previewTheme()
|
||||
|
||||
def onFontMainWeightComboBoxSelected(self, value):
|
||||
if value == 0:
|
||||
self.theme.font_main_weight = u'Normal'
|
||||
self.theme.font_main_italics = False
|
||||
elif value == 1:
|
||||
self.theme.font_main_weight = u'Bold'
|
||||
self.theme.font_main_italics = False
|
||||
elif value == 2:
|
||||
self.theme.font_main_weight = u'Normal'
|
||||
self.theme.font_main_italics = True
|
||||
else:
|
||||
self.theme.font_main_weight = u'Bold'
|
||||
self.theme.font_main_italics = True
|
||||
self.previewTheme()
|
||||
|
||||
def onFontMainColorPushButtonClicked(self):
|
||||
new_color = QtGui.QColorDialog.getColor(
|
||||
QtGui.QColor(self.theme.font_main_color), self)
|
||||
if new_color.isValid():
|
||||
self.theme.font_main_color = new_color.name()
|
||||
self.fontMainColorPushButton.setStyleSheet(
|
||||
u'background-color: %s' % unicode(self.theme.font_main_color))
|
||||
self.previewTheme()
|
||||
|
||||
def onFontMainSizeSpinBoxChanged(self):
|
||||
if self.theme.font_main_proportion != self.fontMainSizeSpinBox.value():
|
||||
self.theme.font_main_proportion = self.fontMainSizeSpinBox.value()
|
||||
self.previewTheme()
|
||||
|
||||
def onFontMainDefaultCheckBoxChanged(self, value):
|
||||
if value == 2: # checked
|
||||
self.theme.font_main_override = False
|
||||
else:
|
||||
self.theme.font_main_override = True
|
||||
|
||||
if not self.theme.font_main_x and not self.theme.font_main_y and \
|
||||
not self.theme.font_main_width and not self.theme.font_main_height:
|
||||
self.theme.font_main_x = u'10'
|
||||
self.theme.font_main_y = u'10'
|
||||
self.theme.font_main_width = u'1024'
|
||||
self.theme.font_main_height = u'730'
|
||||
self.fontMainXSpinBox.setValue(self.theme.font_main_x)
|
||||
self.fontMainYSpinBox.setValue(self.theme.font_main_y)
|
||||
self.fontMainWidthSpinBox.setValue(self.theme.font_main_width)
|
||||
self.fontMainHeightSpinBox.setValue(self.theme.font_main_height)
|
||||
self.fontMainLineAdjustmentSpinBox.setValue(
|
||||
self.theme.font_main_line_adjustment)
|
||||
self.stateChanging(self.theme)
|
||||
self.previewTheme()
|
||||
|
||||
def onFontMainXSpinBoxChanged(self):
|
||||
if self.theme.font_main_x != self.fontMainXSpinBox.value():
|
||||
self.theme.font_main_x = self.fontMainXSpinBox.value()
|
||||
self.previewTheme()
|
||||
|
||||
def onFontMainYSpinBoxChanged(self):
|
||||
if self.theme.font_main_y != self.fontMainYSpinBox.value():
|
||||
self.theme.font_main_y = self.fontMainYSpinBox.value()
|
||||
self.previewTheme()
|
||||
|
||||
def onFontMainWidthSpinBoxChanged(self):
|
||||
if self.theme.font_main_width != self.fontMainWidthSpinBox.value():
|
||||
self.theme.font_main_width = self.fontMainWidthSpinBox.value()
|
||||
self.previewTheme()
|
||||
|
||||
def onFontMainLineAdjustmentSpinBoxChanged(self):
|
||||
if self.theme.font_main_line_adjustment != \
|
||||
self.fontMainLineAdjustmentSpinBox.value():
|
||||
self.theme.font_main_line_adjustment = \
|
||||
self.fontMainLineAdjustmentSpinBox.value()
|
||||
self.previewTheme()
|
||||
|
||||
def onFontMainHeightSpinBoxChanged(self):
|
||||
if self.theme.font_main_height != self.fontMainHeightSpinBox.value():
|
||||
self.theme.font_main_height = self.fontMainHeightSpinBox.value()
|
||||
self.previewTheme()
|
||||
#
|
||||
# Footer Font Tab
|
||||
#
|
||||
def onFontFooterComboBoxSelected(self):
|
||||
self.theme.font_footer_name = \
|
||||
self.fontFooterComboBox.currentFont().family()
|
||||
self.previewTheme()
|
||||
|
||||
def onFontFooterWeightComboBoxSelected(self, value):
|
||||
if value == 0:
|
||||
self.theme.font_footer_weight = u'Normal'
|
||||
self.theme.font_footer_italics = False
|
||||
elif value == 1:
|
||||
self.theme.font_footer_weight = u'Bold'
|
||||
self.theme.font_footer_italics = False
|
||||
elif value == 2:
|
||||
self.theme.font_footer_weight = u'Normal'
|
||||
self.theme.font_footer_italics = True
|
||||
else:
|
||||
self.theme.font_footer_weight = u'Bold'
|
||||
self.theme.font_footer_italics = True
|
||||
self.previewTheme()
|
||||
|
||||
def onFontFooterColorPushButtonClicked(self):
|
||||
new_color = QtGui.QColorDialog.getColor(
|
||||
QtGui.QColor(self.theme.font_footer_color), self)
|
||||
if new_color.isValid():
|
||||
self.theme.font_footer_color = new_color.name()
|
||||
self.fontFooterColorPushButton.setStyleSheet(
|
||||
u'background-color: %s' % unicode(self.theme.font_footer_color))
|
||||
self.previewTheme()
|
||||
|
||||
def onFontFooterSizeSpinBoxChanged(self):
|
||||
if self.theme.font_footer_proportion != \
|
||||
self.fontFooterSizeSpinBox.value():
|
||||
self.theme.font_footer_proportion = \
|
||||
self.fontFooterSizeSpinBox.value()
|
||||
self.previewTheme()
|
||||
|
||||
def onFontFooterDefaultCheckBoxChanged(self, value):
|
||||
if value == 2: # checked
|
||||
self.theme.font_footer_override = False
|
||||
else:
|
||||
self.theme.font_footer_override = True
|
||||
if not self.theme.font_footer_x and not self.theme.font_footer_y and \
|
||||
not self.theme.font_footer_width and \
|
||||
not self.theme.font_footer_height:
|
||||
self.theme.font_footer_x = u'10'
|
||||
self.theme.font_footer_y = u'730'
|
||||
self.theme.font_footer_width = u'1024'
|
||||
self.theme.font_footer_height = u'38'
|
||||
self.fontFooterXSpinBox.setValue(self.theme.font_footer_x)
|
||||
self.fontFooterYSpinBox.setValue(self.theme.font_footer_y)
|
||||
self.fontFooterWidthSpinBox.setValue(self.theme.font_footer_width)
|
||||
self.fontFooterHeightSpinBox.setValue(
|
||||
self.theme.font_footer_height)
|
||||
self.stateChanging(self.theme)
|
||||
self.previewTheme()
|
||||
|
||||
def onFontFooterXSpinBoxChanged(self):
|
||||
if self.theme.font_footer_x != self.fontFooterXSpinBox.value():
|
||||
self.theme.font_footer_x = self.fontFooterXSpinBox.value()
|
||||
self.previewTheme()
|
||||
|
||||
def onFontFooterYSpinBoxChanged(self):
|
||||
if self.theme.font_footer_y != self.fontFooterYSpinBox.value():
|
||||
self.theme.font_footer_y = self.fontFooterYSpinBox.value()
|
||||
self.previewTheme()
|
||||
|
||||
def onFontFooterWidthSpinBoxChanged(self):
|
||||
if self.theme.font_footer_width != self.fontFooterWidthSpinBox.value():
|
||||
self.theme.font_footer_width = self.fontFooterWidthSpinBox.value()
|
||||
self.previewTheme()
|
||||
|
||||
def onFontFooterHeightSpinBoxChanged(self):
|
||||
if self.theme.font_footer_height != \
|
||||
self.fontFooterHeightSpinBox.value():
|
||||
self.theme.font_footer_height = \
|
||||
self.fontFooterHeightSpinBox.value()
|
||||
self.previewTheme()
|
||||
#
|
||||
# Background Tab
|
||||
#
|
||||
def onGradientComboBoxSelected(self, currentIndex):
|
||||
self.setBackground(self.backgroundTypeComboBox.currentIndex(),
|
||||
currentIndex)
|
||||
|
||||
def onBackgroundTypeComboBoxSelected(self, currentIndex):
|
||||
self.setBackground(currentIndex, self.gradientComboBox.currentIndex())
|
||||
|
||||
def setBackground(self, background, gradient):
|
||||
if background == 0: # Solid
|
||||
self.theme.background_type = u'solid'
|
||||
if self.theme.background_color is None:
|
||||
self.theme.background_color = u'#000000'
|
||||
self.imageLineEdit.setText(u'')
|
||||
elif background == 1: # Gradient
|
||||
self.theme.background_type = u'gradient'
|
||||
if gradient == 0: # Horizontal
|
||||
self.theme.background_direction = u'horizontal'
|
||||
elif gradient == 1: # vertical
|
||||
self.theme.background_direction = u'vertical'
|
||||
else:
|
||||
self.theme.background_direction = u'circular'
|
||||
if self.theme.background_start_color is None:
|
||||
self.theme.background_start_color = u'#000000'
|
||||
if self.theme.background_end_color is None:
|
||||
self.theme.background_end_color = u'#ff0000'
|
||||
self.imageLineEdit.setText(u'')
|
||||
else:
|
||||
self.theme.background_type = u'image'
|
||||
self.stateChanging(self.theme)
|
||||
self.previewTheme()
|
||||
|
||||
def onColor1PushButtonClicked(self):
|
||||
if self.theme.background_type == u'solid':
|
||||
new_color = QtGui.QColorDialog.getColor(
|
||||
QtGui.QColor(self.theme.background_color), self)
|
||||
if new_color.isValid():
|
||||
self.theme.background_color = new_color.name()
|
||||
self.color1PushButton.setStyleSheet(u'background-color: %s' %
|
||||
unicode(self.theme.background_color))
|
||||
else:
|
||||
new_color = QtGui.QColorDialog.getColor(
|
||||
QtGui.QColor(self.theme.background_start_color), self)
|
||||
if new_color.isValid():
|
||||
self.theme.background_start_color = new_color.name()
|
||||
self.color1PushButton.setStyleSheet(u'background-color: %s' %
|
||||
unicode(self.theme.background_start_color))
|
||||
self.previewTheme()
|
||||
|
||||
def onColor2PushButtonClicked(self):
|
||||
new_color = QtGui.QColorDialog.getColor(
|
||||
QtGui.QColor(self.theme.background_end_color), self)
|
||||
if new_color.isValid():
|
||||
self.theme.background_end_color = new_color.name()
|
||||
self.color2PushButton.setStyleSheet(u'background-color: %s' %
|
||||
unicode(self.theme.background_end_color))
|
||||
self.previewTheme()
|
||||
#
|
||||
# Other Tab
|
||||
#
|
||||
def onOutlineCheckBoxChanged(self, value):
|
||||
if value == 2: # checked
|
||||
self.theme.display_outline = True
|
||||
else:
|
||||
self.theme.display_outline = False
|
||||
self.stateChanging(self.theme)
|
||||
self.previewTheme()
|
||||
|
||||
def onOutlineSpinBoxChanged(self):
|
||||
if self.theme.display_outline_size != self.outlineSpinBox.value():
|
||||
self.theme.display_outline_size = self.outlineSpinBox.value()
|
||||
self.previewTheme()
|
||||
|
||||
def onShadowSpinBoxChanged(self):
|
||||
if self.theme.display_shadow_size != self.shadowSpinBox.value():
|
||||
self.theme.display_shadow_size = self.shadowSpinBox.value()
|
||||
self.previewTheme()
|
||||
|
||||
def onOutlineColorPushButtonClicked(self):
|
||||
new_color = QtGui.QColorDialog.getColor(
|
||||
QtGui.QColor(self.theme.display_outline_color), self)
|
||||
if new_color.isValid():
|
||||
self.theme.display_outline_color = new_color.name()
|
||||
self.outlineColorPushButton.setStyleSheet(u'background-color: %s' %
|
||||
unicode(self.theme.display_outline_color))
|
||||
self.previewTheme()
|
||||
|
||||
def onShadowCheckBoxChanged(self, value):
|
||||
if value == 2: # checked
|
||||
self.theme.display_shadow = True
|
||||
else:
|
||||
self.theme.display_shadow = False
|
||||
self.stateChanging(self.theme)
|
||||
self.previewTheme()
|
||||
|
||||
def onSlideTransitionCheckBoxChanged(self, value):
|
||||
if value == 2: # checked
|
||||
self.theme.display_slide_transition = True
|
||||
else:
|
||||
self.theme.display_slide_transition = False
|
||||
self.stateChanging(self.theme)
|
||||
self.previewTheme()
|
||||
|
||||
def onShadowColorPushButtonClicked(self):
|
||||
new_color = QtGui.QColorDialog.getColor(
|
||||
QtGui.QColor(self.theme.display_shadow_color), self)
|
||||
if new_color.isValid():
|
||||
self.theme.display_shadow_color = new_color.name()
|
||||
self.shadowColorPushButton.setStyleSheet(u'background-color: %s' %
|
||||
unicode(self.theme.display_shadow_color))
|
||||
self.previewTheme()
|
||||
|
||||
def onHorizontalComboBoxSelected(self, currentIndex):
|
||||
self.theme.display_horizontal_align = currentIndex
|
||||
self.stateChanging(self.theme)
|
||||
self.previewTheme()
|
||||
|
||||
def onVerticalComboBoxSelected(self, currentIndex):
|
||||
self.theme.display_vertical_align = currentIndex
|
||||
self.stateChanging(self.theme)
|
||||
self.previewTheme()
|
||||
#
|
||||
# Local Methods
|
||||
#
|
||||
def paintUi(self, theme):
|
||||
self.stateChanging(theme)
|
||||
self.themeNameEdit.setText(self.theme.theme_name)
|
||||
# Background Tab
|
||||
self.imageLineEdit.setText(u'')
|
||||
if theme.background_type == u'solid':
|
||||
self.backgroundTypeComboBox.setCurrentIndex(0)
|
||||
elif theme.background_type == u'gradient':
|
||||
self.backgroundTypeComboBox.setCurrentIndex(1)
|
||||
else:
|
||||
self.backgroundTypeComboBox.setCurrentIndex(2)
|
||||
self.imageLineEdit.setText(self.theme.background_filename)
|
||||
if self.theme.background_direction == u'horizontal':
|
||||
self.gradientComboBox.setCurrentIndex(0)
|
||||
elif self.theme.background_direction == u'vertical':
|
||||
self.gradientComboBox.setCurrentIndex(1)
|
||||
else:
|
||||
self.gradientComboBox.setCurrentIndex(2)
|
||||
# Font Main Tab
|
||||
self.mainFontComboBox.setCurrentFont(
|
||||
QtGui.QFont(self.theme.font_main_name))
|
||||
self.fontMainSizeSpinBox.setValue(self.theme.font_main_proportion)
|
||||
if not self.theme.font_main_italics and \
|
||||
self.theme.font_main_weight == u'Normal':
|
||||
self.fontMainWeightComboBox.setCurrentIndex(0)
|
||||
elif not self.theme.font_main_italics and \
|
||||
self.theme.font_main_weight == u'Bold':
|
||||
self.fontMainWeightComboBox.setCurrentIndex(1)
|
||||
elif self.theme.font_main_italics and \
|
||||
self.theme.font_main_weight == u'Normal':
|
||||
self.fontMainWeightComboBox.setCurrentIndex(2)
|
||||
else:
|
||||
self.fontMainWeightComboBox.setCurrentIndex(3)
|
||||
self.fontMainXSpinBox.setValue(self.theme.font_main_x)
|
||||
self.fontMainYSpinBox.setValue(self.theme.font_main_y)
|
||||
self.fontMainWidthSpinBox.setValue(self.theme.font_main_width)
|
||||
self.fontMainHeightSpinBox.setValue(self.theme.font_main_height)
|
||||
# Font Footer Tab
|
||||
self.fontFooterComboBox.setCurrentFont(
|
||||
QtGui.QFont(self.theme.font_footer_name))
|
||||
self.fontFooterSizeSpinBox.setValue(
|
||||
self.theme.font_footer_proportion)
|
||||
if not self.theme.font_footer_italics and \
|
||||
self.theme.font_footer_weight == u'Normal':
|
||||
self.fontFooterWeightComboBox.setCurrentIndex(0)
|
||||
elif not self.theme.font_footer_italics and \
|
||||
self.theme.font_footer_weight == u'Bold':
|
||||
self.fontFooterWeightComboBox.setCurrentIndex(1)
|
||||
elif self.theme.font_footer_italics and \
|
||||
self.theme.font_footer_weight == u'Normal':
|
||||
self.fontFooterWeightComboBox.setCurrentIndex(2)
|
||||
else:
|
||||
self.fontFooterWeightComboBox.setCurrentIndex(3)
|
||||
self.fontFooterXSpinBox.setValue(self.theme.font_footer_x)
|
||||
self.fontFooterYSpinBox.setValue(self.theme.font_footer_y)
|
||||
self.fontFooterWidthSpinBox.setValue(self.theme.font_footer_width)
|
||||
self.fontFooterHeightSpinBox.setValue(self.theme.font_footer_height)
|
||||
self.fontMainColorPushButton.setStyleSheet(
|
||||
u'background-color: %s' % unicode(theme.font_main_color))
|
||||
self.fontFooterColorPushButton.setStyleSheet(
|
||||
u'background-color: %s' % unicode(theme.font_footer_color))
|
||||
if not self.theme.font_main_override:
|
||||
self.fontMainDefaultCheckBox.setChecked(True)
|
||||
else:
|
||||
self.fontMainDefaultCheckBox.setChecked(False)
|
||||
if not self.theme.font_footer_override:
|
||||
self.fontFooterDefaultCheckBox.setChecked(True)
|
||||
else:
|
||||
self.fontFooterDefaultCheckBox.setChecked(False)
|
||||
self.outlineColorPushButton.setStyleSheet(
|
||||
u'background-color: %s' % unicode(theme.display_outline_color))
|
||||
self.shadowColorPushButton.setStyleSheet(
|
||||
u'background-color: %s' % unicode(theme.display_shadow_color))
|
||||
if self.theme.display_outline:
|
||||
self.outlineCheckBox.setChecked(True)
|
||||
self.outlineColorPushButton.setEnabled(True)
|
||||
else:
|
||||
self.outlineCheckBox.setChecked(False)
|
||||
self.outlineColorPushButton.setEnabled(False)
|
||||
self.outlineSpinBox.setValue(int(self.theme.display_outline_size))
|
||||
if self.theme.display_shadow:
|
||||
self.shadowCheckBox.setChecked(True)
|
||||
self.shadowColorPushButton.setEnabled(True)
|
||||
else:
|
||||
self.shadowCheckBox.setChecked(False)
|
||||
self.shadowColorPushButton.setEnabled(False)
|
||||
self.shadowSpinBox.setValue(int(self.theme.display_shadow_size))
|
||||
if self.theme.display_slide_transition:
|
||||
self.slideTransitionCheckBox.setCheckState(QtCore.Qt.Checked)
|
||||
else:
|
||||
self.slideTransitionCheckBox.setCheckState(QtCore.Qt.Unchecked)
|
||||
self.horizontalComboBox.setCurrentIndex(
|
||||
self.theme.display_horizontal_align)
|
||||
self.verticalComboBox.setCurrentIndex(self.theme.display_vertical_align)
|
||||
|
||||
def stateChanging(self, theme):
|
||||
self.backgroundTypeComboBox.setVisible(True)
|
||||
self.backgroundTypeLabel.setVisible(True)
|
||||
if theme.background_type == u'solid':
|
||||
self.color1PushButton.setStyleSheet(
|
||||
u'background-color: %s' % unicode(theme.background_color))
|
||||
self.color1Label.setText(
|
||||
translate('OpenLP.AmendThemeForm', 'Color:'))
|
||||
self.color1Label.setVisible(True)
|
||||
self.color1PushButton.setVisible(True)
|
||||
self.color2Label.setVisible(False)
|
||||
self.color2PushButton.setVisible(False)
|
||||
self.imageLabel.setVisible(False)
|
||||
self.imageLineEdit.setVisible(False)
|
||||
self.imageFilenameWidget.setVisible(False)
|
||||
self.gradientLabel.setVisible(False)
|
||||
self.gradientComboBox.setVisible(False)
|
||||
elif theme.background_type == u'gradient':
|
||||
self.color1PushButton.setStyleSheet(u'background-color: %s' \
|
||||
% unicode(theme.background_start_color))
|
||||
self.color2PushButton.setStyleSheet(u'background-color: %s' \
|
||||
% unicode(theme.background_end_color))
|
||||
self.color1Label.setText(
|
||||
translate('OpenLP.AmendThemeForm', 'First color:'))
|
||||
self.color2Label.setText(
|
||||
translate('OpenLP.AmendThemeForm', 'Second color:'))
|
||||
self.color1Label.setVisible(True)
|
||||
self.color1PushButton.setVisible(True)
|
||||
self.color2Label.setVisible(True)
|
||||
self.color2PushButton.setVisible(True)
|
||||
self.imageLabel.setVisible(False)
|
||||
self.imageLineEdit.setVisible(False)
|
||||
self.imageFilenameWidget.setVisible(False)
|
||||
self.gradientLabel.setVisible(True)
|
||||
self.gradientComboBox.setVisible(True)
|
||||
else: # must be image
|
||||
self.color1Label.setVisible(False)
|
||||
self.color1PushButton.setVisible(False)
|
||||
self.color2Label.setVisible(False)
|
||||
self.color2PushButton.setVisible(False)
|
||||
self.imageLabel.setVisible(True)
|
||||
self.imageLineEdit.setVisible(True)
|
||||
self.imageFilenameWidget.setVisible(True)
|
||||
self.gradientLabel.setVisible(False)
|
||||
self.gradientComboBox.setVisible(False)
|
||||
if not theme.font_main_override:
|
||||
self.fontMainXSpinBox.setEnabled(False)
|
||||
self.fontMainYSpinBox.setEnabled(False)
|
||||
self.fontMainWidthSpinBox.setEnabled(False)
|
||||
self.fontMainHeightSpinBox.setEnabled(False)
|
||||
else:
|
||||
self.fontMainXSpinBox.setEnabled(True)
|
||||
self.fontMainYSpinBox.setEnabled(True)
|
||||
self.fontMainWidthSpinBox.setEnabled(True)
|
||||
self.fontMainHeightSpinBox.setEnabled(True)
|
||||
|
||||
if not theme.font_footer_override:
|
||||
self.fontFooterXSpinBox.setEnabled(False)
|
||||
self.fontFooterYSpinBox.setEnabled(False)
|
||||
self.fontFooterWidthSpinBox.setEnabled(False)
|
||||
self.fontFooterHeightSpinBox.setEnabled(False)
|
||||
else:
|
||||
self.fontFooterXSpinBox.setEnabled(True)
|
||||
self.fontFooterYSpinBox.setEnabled(True)
|
||||
self.fontFooterWidthSpinBox.setEnabled(True)
|
||||
self.fontFooterHeightSpinBox.setEnabled(True)
|
||||
|
||||
if self.theme.display_outline:
|
||||
self.outlineColorPushButton.setEnabled(True)
|
||||
else:
|
||||
self.outlineColorPushButton.setEnabled(False)
|
||||
|
||||
if self.theme.display_shadow:
|
||||
self.shadowColorPushButton.setEnabled(True)
|
||||
else:
|
||||
self.shadowColorPushButton.setEnabled(False)
|
||||
|
||||
def previewTheme(self):
|
||||
if self.allowPreview:
|
||||
#calculate main number of rows
|
||||
metrics = self._getThemeMetrics()
|
||||
line_height = metrics.height() \
|
||||
+ int(self.theme.font_main_line_adjustment)
|
||||
if self.theme.display_shadow:
|
||||
line_height += int(self.theme.display_shadow_size)
|
||||
if self.theme.display_outline:
|
||||
# pixels top/bottom
|
||||
line_height += 2 * int(self.theme.display_outline_size)
|
||||
page_length = \
|
||||
((self.fontMainHeightSpinBox.value()) / line_height )
|
||||
log.debug(u'Page Length area height %s, metrics %s, lines %s' %
|
||||
(self.fontMainHeightSpinBox.value(), metrics.height(),
|
||||
page_length))
|
||||
page_length_text = unicode(
|
||||
translate('OpenLP.AmendThemeForm', 'Slide height is %s rows.'))
|
||||
self.fontMainLinesPageLabel.setText(page_length_text % page_length)
|
||||
frame = self.thememanager.generateImage(self.theme)
|
||||
self.themePreview.setPixmap(QtGui.QPixmap.fromImage(frame))
|
||||
|
||||
def _getThemeMetrics(self):
|
||||
main_weight = 50
|
||||
if self.theme.font_main_weight == u'Bold':
|
||||
main_weight = 75
|
||||
mainFont = QtGui.QFont(self.theme.font_main_name,
|
||||
self.theme.font_main_proportion, # size
|
||||
main_weight, # weight
|
||||
self.theme.font_main_italics)# italic
|
||||
mainFont.setPixelSize(self.theme.font_main_proportion)
|
||||
metrics = QtGui.QFontMetrics(mainFont)
|
||||
# Validate that the screen width is big enough to display the text
|
||||
if self.theme.font_main_width < metrics.maxWidth() * 2 + 64:
|
||||
self.theme.font_main_width = metrics.maxWidth() * 2 + 64
|
||||
self.fontMainWidthSpinBox.setValue(self.theme.font_main_width)
|
||||
return metrics
|
@ -229,7 +229,7 @@ class MainDisplay(DisplayWidget):
|
||||
"""
|
||||
API for replacement backgrounds so Images are added directly to cache
|
||||
"""
|
||||
image = self.imageManager.add_image(name, path)
|
||||
self.imageManager.add_image(name, path)
|
||||
self.image(name)
|
||||
|
||||
def image(self, name):
|
||||
|
@ -627,7 +627,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||
# warning cyclic dependency
|
||||
# RenderManager needs to call ThemeManager and
|
||||
# ThemeManager needs to call RenderManager
|
||||
self.RenderManager = RenderManager(
|
||||
self.renderManager = RenderManager(
|
||||
self.ThemeManagerContents, self.screens)
|
||||
# Define the media Dock Manager
|
||||
self.mediaDockManager = MediaDockManager(self.MediaToolBox)
|
||||
@ -635,7 +635,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||
# make the controllers available to the plugins
|
||||
self.plugin_helpers[u'preview'] = self.PreviewController
|
||||
self.plugin_helpers[u'live'] = self.LiveController
|
||||
self.plugin_helpers[u'render'] = self.RenderManager
|
||||
self.plugin_helpers[u'render'] = self.renderManager
|
||||
self.plugin_helpers[u'service'] = self.ServiceManagerContents
|
||||
self.plugin_helpers[u'settings form'] = self.settingsForm
|
||||
self.plugin_helpers[u'toolbox'] = self.mediaDockManager
|
||||
@ -809,7 +809,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||
their locations
|
||||
"""
|
||||
log.debug(u'screenChanged')
|
||||
self.RenderManager.update_display()
|
||||
self.renderManager.update_display()
|
||||
self.setFocus()
|
||||
self.activateWindow()
|
||||
|
||||
|
@ -759,7 +759,7 @@ class ServiceManager(QtGui.QWidget):
|
||||
self.onNewService()
|
||||
for item in items:
|
||||
serviceitem = ServiceItem()
|
||||
serviceitem.render_manager = self.parent.RenderManager
|
||||
serviceitem.render_manager = self.parent.renderManager
|
||||
serviceitem.set_from_service(item, self.servicePath)
|
||||
self.validateItem(serviceitem)
|
||||
self.addServiceItem(serviceitem)
|
||||
@ -820,7 +820,7 @@ class ServiceManager(QtGui.QWidget):
|
||||
"""
|
||||
log.debug(u'onThemeComboBoxSelected')
|
||||
self.service_theme = unicode(self.themeComboBox.currentText())
|
||||
self.parent.RenderManager.set_service_theme(self.service_theme)
|
||||
self.parent.renderManager.set_service_theme(self.service_theme)
|
||||
QtCore.QSettings().setValue(
|
||||
self.parent.serviceSettingsSection + u'/service theme',
|
||||
QtCore.QVariant(self.service_theme))
|
||||
@ -832,7 +832,7 @@ class ServiceManager(QtGui.QWidget):
|
||||
sure the theme combo box is in the correct state.
|
||||
"""
|
||||
log.debug(u'themeChange')
|
||||
if self.parent.RenderManager.theme_level == ThemeLevel.Global:
|
||||
if self.parent.renderManager.theme_level == ThemeLevel.Global:
|
||||
self.toolbar.actions[u'ThemeLabel'].setVisible(False)
|
||||
self.toolbar.actions[u'ThemeWidget'].setVisible(False)
|
||||
else:
|
||||
@ -846,7 +846,7 @@ class ServiceManager(QtGui.QWidget):
|
||||
"""
|
||||
log.debug(u'regenerateServiceItems')
|
||||
# force reset of renderer as theme data has changed
|
||||
self.parent.RenderManager.themedata = None
|
||||
self.parent.renderManager.themedata = None
|
||||
if self.serviceItems:
|
||||
tempServiceItems = self.serviceItems
|
||||
self.serviceManagerList.clear()
|
||||
@ -1088,7 +1088,7 @@ class ServiceManager(QtGui.QWidget):
|
||||
index = 0
|
||||
self.service_theme = u''
|
||||
self.themeComboBox.setCurrentIndex(index)
|
||||
self.parent.RenderManager.set_service_theme(self.service_theme)
|
||||
self.parent.renderManager.set_service_theme(self.service_theme)
|
||||
self.regenerateServiceItems()
|
||||
|
||||
def onThemeChangeAction(self):
|
||||
|
@ -400,7 +400,7 @@ class SlideController(QtGui.QWidget):
|
||||
log.debug(u'screenSizeChanged live = %s' % self.isLive)
|
||||
# rebuild display as screen size changed
|
||||
self.display = MainDisplay(self, self.screens, self.isLive)
|
||||
self.display.imageManager = self.parent.RenderManager.image_manager
|
||||
self.display.imageManager = self.parent.renderManager.image_manager
|
||||
self.display.alertTab = self.alertTab
|
||||
self.ratio = float(self.screens.current[u'size'].width()) / \
|
||||
float(self.screens.current[u'size'].height())
|
||||
@ -416,7 +416,7 @@ class SlideController(QtGui.QWidget):
|
||||
"""
|
||||
log.debug(u'widthChanged live = %s' % self.isLive)
|
||||
width = self.parent.ControlSplitter.sizes()[self.split]
|
||||
height = width * self.parent.RenderManager.screen_ratio
|
||||
height = width * self.parent.renderManager.screen_ratio
|
||||
self.PreviewListWidget.setColumnWidth(0, width)
|
||||
# Sort out image heights (Songs, bibles excluded)
|
||||
if self.serviceItem and not self.serviceItem.is_text():
|
||||
@ -595,14 +595,14 @@ class SlideController(QtGui.QWidget):
|
||||
label.setScaledContents(True)
|
||||
if self.serviceItem.is_command():
|
||||
image = resize_image(frame[u'image'],
|
||||
self.parent.RenderManager.width,
|
||||
self.parent.RenderManager.height)
|
||||
self.parent.renderManager.width,
|
||||
self.parent.renderManager.height)
|
||||
else:
|
||||
image = self.parent.RenderManager.image_manager. \
|
||||
image = self.parent.renderManager.image_manager. \
|
||||
get_image(frame[u'title'])
|
||||
label.setPixmap(QtGui.QPixmap.fromImage(image))
|
||||
self.PreviewListWidget.setCellWidget(framenumber, 0, label)
|
||||
slideHeight = width * self.parent.RenderManager.screen_ratio
|
||||
slideHeight = width * self.parent.renderManager.screen_ratio
|
||||
row += 1
|
||||
text.append(unicode(row))
|
||||
self.PreviewListWidget.setItem(framenumber, 0, item)
|
||||
|
@ -55,30 +55,34 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
|
||||
self.setupUi(self)
|
||||
self.registerFields()
|
||||
self.accepted = False
|
||||
self.updateThemeAllowed = True
|
||||
QtCore.QObject.connect(self.backgroundTypeComboBox,
|
||||
QtCore.SIGNAL(u'currentIndexChanged(int)'),
|
||||
self.onBackgroundComboBox)
|
||||
QtCore.QObject.connect(self.gradientComboBox,
|
||||
QtCore.SIGNAL(u'currentIndexChanged(int)'),
|
||||
self.onGradientComboBox)
|
||||
QtCore.QObject.connect(self.color1PushButton,
|
||||
QtCore.QObject.connect(self.colorButton,
|
||||
QtCore.SIGNAL(u'pressed()'),
|
||||
self.onColor1PushButtonClicked)
|
||||
QtCore.QObject.connect(self.color2PushButton,
|
||||
self.onColorButtonClicked)
|
||||
QtCore.QObject.connect(self.gradientStartButton,
|
||||
QtCore.SIGNAL(u'pressed()'),
|
||||
self.onColor2PushButtonClicked)
|
||||
self.onGradientStartButtonClicked)
|
||||
QtCore.QObject.connect(self.gradientEndButton,
|
||||
QtCore.SIGNAL(u'pressed()'),
|
||||
self.onGradientEndButtonClicked)
|
||||
QtCore.QObject.connect(self.imageBrowseButton,
|
||||
QtCore.SIGNAL(u'pressed()'),
|
||||
self.onImageBrowseButtonClicked)
|
||||
self.onImageBrowseButtonClicked)
|
||||
QtCore.QObject.connect(self.mainColorPushButton,
|
||||
QtCore.SIGNAL(u'pressed()'),
|
||||
self.onMainColourPushButtonClicked)
|
||||
self.onMainColourPushButtonClicked)
|
||||
QtCore.QObject.connect(self.outlineColorPushButton,
|
||||
QtCore.SIGNAL(u'pressed()'),
|
||||
self.onOutlineColourPushButtonClicked)
|
||||
self.onOutlineColourPushButtonClicked)
|
||||
QtCore.QObject.connect(self.shadowColorPushButton,
|
||||
QtCore.SIGNAL(u'pressed()'),
|
||||
self.onShadowColourPushButtonClicked)
|
||||
self.onShadowColourPushButtonClicked)
|
||||
QtCore.QObject.connect(self.outlineCheckBox,
|
||||
QtCore.SIGNAL(u'stateChanged(int)'),
|
||||
self.onOutlineCheckCheckBoxChanged)
|
||||
@ -157,15 +161,15 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
|
||||
self.backgroundPage.registerField(
|
||||
u'background_type', self.backgroundTypeComboBox)
|
||||
self.backgroundPage.registerField(
|
||||
u'color_1', self.color1PushButton)
|
||||
u'color', self.colorButton)
|
||||
self.backgroundPage.registerField(
|
||||
u'color_2', self.color2PushButton)
|
||||
u'grandient_start', self.gradientStartButton)
|
||||
self.backgroundPage.registerField(
|
||||
u'grandient_end', self.gradientEndButton)
|
||||
self.backgroundPage.registerField(
|
||||
u'background_image', self.imageLineEdit)
|
||||
self.backgroundPage.registerField(
|
||||
u'gradient', self.gradientComboBox)
|
||||
self.mainAreaPage.registerField(
|
||||
u'mainFontComboBox', self.mainFontComboBox)
|
||||
self.mainAreaPage.registerField(
|
||||
u'mainColorPushButton', self.mainColorPushButton)
|
||||
self.mainAreaPage.registerField(
|
||||
@ -281,11 +285,15 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
|
||||
self.footerHeightSpinBox.setEnabled(self.theme.font_footer_override)
|
||||
self.footerWidthSpinBox.setEnabled(self.theme.font_footer_override)
|
||||
|
||||
def exec_(self):
|
||||
def exec_(self, edit=False):
|
||||
"""
|
||||
Run the wizard.
|
||||
"""
|
||||
self.updateThemeAllowed = False
|
||||
self.setDefaults()
|
||||
self.updateThemeAllowed = True
|
||||
if edit:
|
||||
self.next()
|
||||
return QtGui.QWizard.exec_(self)
|
||||
|
||||
def initializePage(self, id):
|
||||
@ -311,54 +319,19 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
|
||||
"""
|
||||
if self.theme.background_type == \
|
||||
BackgroundType.to_string(BackgroundType.Solid):
|
||||
self.setField(u'background_type', QtCore.QVariant(0))
|
||||
self.color1PushButton.setVisible(True)
|
||||
self.color1Label.setVisible(True)
|
||||
self.color1PushButton.setStyleSheet(u'background-color: %s' %
|
||||
self.colorButton.setStyleSheet(u'background-color: %s' %
|
||||
self.theme.background_color)
|
||||
self.color1Label.setText(
|
||||
translate('OpenLP.ThemeForm', 'Color:'))
|
||||
self.color2PushButton.setVisible(False)
|
||||
self.color2Label.setVisible(False)
|
||||
self.gradientLabel.setVisible(False)
|
||||
self.gradientComboBox.setVisible(False)
|
||||
self.imageLabel.setVisible(False)
|
||||
self.imageLineEdit.setVisible(False)
|
||||
self.imageBrowseButton.setVisible(False)
|
||||
self.imageLineEdit.setText(u'')
|
||||
self.setField(u'background_type', QtCore.QVariant(0))
|
||||
elif self.theme.background_type == \
|
||||
BackgroundType.to_string(BackgroundType.Gradient):
|
||||
self.setField(u'background_type', QtCore.QVariant(1))
|
||||
self.color1PushButton.setVisible(True)
|
||||
self.color1Label.setVisible(True)
|
||||
self.color1PushButton.setStyleSheet(u'background-color: %s' %
|
||||
self.gradientStartButton.setStyleSheet(u'background-color: %s' %
|
||||
self.theme.background_start_color)
|
||||
self.color1Label.setText(
|
||||
translate('OpenLP.ThemeForm', 'First color:'))
|
||||
self.color2PushButton.setVisible(True)
|
||||
self.color2Label.setVisible(True)
|
||||
self.color2PushButton.setStyleSheet(u'background-color: %s' %
|
||||
self.gradientEndButton.setStyleSheet(u'background-color: %s' %
|
||||
self.theme.background_end_color)
|
||||
self.color2Label.setText(
|
||||
translate('OpenLP.ThemeForm', 'Second color:'))
|
||||
self.gradientLabel.setVisible(True)
|
||||
self.gradientComboBox.setVisible(True)
|
||||
self.imageLabel.setVisible(False)
|
||||
self.imageLineEdit.setVisible(False)
|
||||
self.imageBrowseButton.setVisible(False)
|
||||
self.imageLineEdit.setText(u'')
|
||||
self.setField(u'background_type', QtCore.QVariant(1))
|
||||
else:
|
||||
self.setField(u'background_type', QtCore.QVariant(2))
|
||||
self.color1PushButton.setVisible(False)
|
||||
self.color1Label.setVisible(False)
|
||||
self.color2PushButton.setVisible(False)
|
||||
self.color2Label.setVisible(False)
|
||||
self.gradientLabel.setVisible(False)
|
||||
self.gradientComboBox.setVisible(False)
|
||||
self.imageLineEdit.setVisible(True)
|
||||
self.imageLabel.setVisible(True)
|
||||
self.imageBrowseButton.setVisible(True)
|
||||
self.imageLineEdit.setText(self.theme.background_filename)
|
||||
self.setField(u'background_type', QtCore.QVariant(2))
|
||||
if self.theme.background_direction == \
|
||||
BackgroundGradientType.to_string(BackgroundGradientType.Horizontal):
|
||||
self.setField(u'gradient', QtCore.QVariant(0))
|
||||
@ -491,20 +464,23 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
|
||||
BackgroundGradientType.to_string(index)
|
||||
self.setBackgroundTabValues()
|
||||
|
||||
def onColor1PushButtonClicked(self):
|
||||
def onColorButtonClicked(self):
|
||||
"""
|
||||
Background / Gradient 1 Color button pushed.
|
||||
"""
|
||||
if self.theme.background_type == \
|
||||
BackgroundType.to_string(BackgroundType.Solid):
|
||||
self.theme.background_color = \
|
||||
self._colorButton(self.theme.background_color)
|
||||
else:
|
||||
self.theme.background_start_color = \
|
||||
self._colorButton(self.theme.background_start_color)
|
||||
self.theme.background_color = \
|
||||
self._colorButton(self.theme.background_color)
|
||||
self.setBackgroundTabValues()
|
||||
|
||||
def onColor2PushButtonClicked(self):
|
||||
def onGradientStartButtonClicked(self):
|
||||
"""
|
||||
Gradient 2 Color button pushed.
|
||||
"""
|
||||
self.theme.background_start_color = \
|
||||
self._colorButton(self.theme.background_start_color)
|
||||
self.setBackgroundTabValues()
|
||||
|
||||
def onGradientEndButtonClicked(self):
|
||||
"""
|
||||
Gradient 2 Color button pushed.
|
||||
"""
|
||||
@ -526,11 +502,11 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
|
||||
self.theme.background_filename = unicode(filename)
|
||||
self.setBackgroundTabValues()
|
||||
|
||||
def onMainFontComboBox(self):
|
||||
"""
|
||||
Main Font Combo box changed
|
||||
"""
|
||||
self.theme.font_main_name = self.mainFontComboBox.currentFont().family()
|
||||
# def onMainFontComboBox(self):
|
||||
# """
|
||||
# Main Font Combo box changed
|
||||
# """
|
||||
# self.theme.font_main_name = self.mainFontComboBox.currentFont().family()
|
||||
|
||||
def onMainColourPushButtonClicked(self):
|
||||
self.theme.font_main_color = \
|
||||
@ -557,6 +533,8 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
|
||||
Update the theme object from the UI for fields not already updated
|
||||
when the are changed.
|
||||
"""
|
||||
if not self.updateThemeAllowed:
|
||||
return
|
||||
log.debug(u'updateTheme')
|
||||
# main page
|
||||
self.theme.font_main_name = \
|
||||
@ -606,7 +584,6 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
|
||||
# Hack to stop it for now.
|
||||
if self.accepted:
|
||||
return
|
||||
self.accepted = True
|
||||
# Save the theme name
|
||||
self.theme.theme_name = \
|
||||
unicode(self.field(u'name').toString())
|
||||
@ -628,6 +605,7 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
|
||||
(QtGui.QMessageBox.Ok),
|
||||
QtGui.QMessageBox.Ok)
|
||||
return
|
||||
self.accepted = True
|
||||
saveFrom = None
|
||||
saveTo = None
|
||||
if self.theme.background_type == \
|
||||
@ -646,5 +624,5 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
|
||||
new_color = QtGui.QColorDialog.getColor(
|
||||
QtGui.QColor(field), self)
|
||||
if new_color.isValid():
|
||||
field = new_color.name()
|
||||
field = new_color.name()
|
||||
return field
|
||||
|
@ -280,7 +280,7 @@ class ThemeManager(QtGui.QWidget):
|
||||
self.saveThemeName = unicode(
|
||||
item.data(QtCore.Qt.UserRole).toString())
|
||||
self.themeForm.theme = theme
|
||||
self.themeForm.exec_()
|
||||
self.themeForm.exec_(True)
|
||||
|
||||
def onDeleteTheme(self):
|
||||
"""
|
||||
@ -627,7 +627,8 @@ class ThemeManager(QtGui.QWidget):
|
||||
newtheme.font_main_shadow_color = unicode(theme.ShadowColor.name())
|
||||
if theme.Outline == 1:
|
||||
newtheme.font_main_outline = True
|
||||
newtheme.font_main_outline_color = unicode(theme.OutlineColor.name())
|
||||
newtheme.font_main_outline_color = \
|
||||
unicode(theme.OutlineColor.name())
|
||||
vAlignCorrection = 0
|
||||
if theme.VerticalAlign == 2:
|
||||
vAlignCorrection = 1
|
||||
@ -749,7 +750,7 @@ class ThemeManager(QtGui.QWidget):
|
||||
Flag to tell message lines per page need to be generated.
|
||||
"""
|
||||
log.debug(u'generateImage \n%s ', themeData)
|
||||
return self.parent.RenderManager.generate_preview(themeData, forcePage)
|
||||
return self.parent.renderManager.generate_preview(themeData, forcePage)
|
||||
|
||||
def getPreviewImage(self, theme):
|
||||
"""
|
||||
|
@ -153,7 +153,7 @@ class ThemesTab(SettingsTab):
|
||||
settings.setValue(u'global theme',
|
||||
QtCore.QVariant(self.global_theme))
|
||||
settings.endGroup()
|
||||
self.parent.RenderManager.set_global_theme(
|
||||
self.parent.renderManager.set_global_theme(
|
||||
self.global_theme, self.theme_level)
|
||||
Receiver.send_message(u'theme_update_global', self.global_theme)
|
||||
|
||||
@ -171,7 +171,7 @@ class ThemesTab(SettingsTab):
|
||||
|
||||
def onDefaultComboBoxChanged(self, value):
|
||||
self.global_theme = unicode(self.DefaultComboBox.currentText())
|
||||
self.parent.RenderManager.set_global_theme(
|
||||
self.parent.renderManager.set_global_theme(
|
||||
self.global_theme, self.theme_level)
|
||||
image = self.parent.ThemeManagerContents.getPreviewImage(
|
||||
self.global_theme)
|
||||
@ -203,7 +203,7 @@ class ThemesTab(SettingsTab):
|
||||
id = 0 # Not Found
|
||||
self.global_theme = u''
|
||||
self.DefaultComboBox.setCurrentIndex(id)
|
||||
self.parent.RenderManager.set_global_theme(
|
||||
self.parent.renderManager.set_global_theme(
|
||||
self.global_theme, self.theme_level)
|
||||
if self.global_theme is not u'':
|
||||
image = self.parent.ThemeManagerContents.getPreviewImage(
|
||||
|
@ -30,135 +30,216 @@ from openlp.core.lib import translate, build_icon
|
||||
|
||||
class Ui_ThemeWizard(object):
|
||||
def setupUi(self, ThemeWizard):
|
||||
ThemeWizard.setObjectName(u'ThemeWizard')
|
||||
ThemeWizard.setObjectName(u'OpenLP.ThemeWizard')
|
||||
ThemeWizard.resize(550, 386)
|
||||
ThemeWizard.setModal(True)
|
||||
ThemeWizard.setWizardStyle(QtGui.QWizard.ModernStyle)
|
||||
ThemeWizard.setOptions(QtGui.QWizard.IndependentPages|QtGui.QWizard.NoBackButtonOnStartPage)
|
||||
ThemeWizard.setOptions(
|
||||
QtGui.QWizard.IndependentPages |
|
||||
QtGui.QWizard.NoBackButtonOnStartPage)
|
||||
self.welcomePage = QtGui.QWizardPage()
|
||||
self.welcomePage.setTitle(u'')
|
||||
self.welcomePage.setSubTitle(u'')
|
||||
self.welcomePage.setObjectName(u'welcomePage')
|
||||
self.welcomePage.setPixmap(QtGui.QWizard.WatermarkPixmap,
|
||||
QtGui.QPixmap(u':/wizards/wizard_createtheme.bmp'))
|
||||
self.welcomeLayout = QtGui.QHBoxLayout(self.welcomePage)
|
||||
self.welcomeLayout.setSpacing(8)
|
||||
self.welcomeLayout.setMargin(0)
|
||||
self.welcomeLayout.setObjectName(u'welcomeLayout')
|
||||
self.importBibleImage = QtGui.QLabel(self.welcomePage)
|
||||
self.importBibleImage.setMinimumSize(QtCore.QSize(163, 0))
|
||||
self.importBibleImage.setMaximumSize(QtCore.QSize(163, 16777215))
|
||||
self.importBibleImage.setLineWidth(0)
|
||||
self.importBibleImage.setText(u'')
|
||||
self.importBibleImage.setPixmap(QtGui.QPixmap(u':/wizards/wizard_importbible.bmp'))
|
||||
self.importBibleImage.setIndent(0)
|
||||
self.importBibleImage.setObjectName(u'importBibleImage')
|
||||
self.welcomeLayout.addWidget(self.importBibleImage)
|
||||
self.welcomePageLayout = QtGui.QVBoxLayout()
|
||||
self.welcomePageLayout.setSpacing(8)
|
||||
self.welcomePageLayout.setObjectName(u'welcomePageLayout')
|
||||
self.titleLabel = QtGui.QLabel(self.welcomePage)
|
||||
self.titleLabel.setObjectName(u'titleLabel')
|
||||
self.welcomePageLayout.addWidget(self.titleLabel)
|
||||
spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
|
||||
self.welcomePageLayout.addItem(spacerItem)
|
||||
self.welcomeTopSpacer = QtGui.QSpacerItem(20, 40,
|
||||
QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
|
||||
self.welcomePageLayout.addItem(self.welcomeTopSpacer)
|
||||
self.informationLabel = QtGui.QLabel(self.welcomePage)
|
||||
self.informationLabel.setWordWrap(True)
|
||||
self.informationLabel.setMargin(10)
|
||||
self.informationLabel.setObjectName(u'informationLabel')
|
||||
self.welcomePageLayout.addWidget(self.informationLabel)
|
||||
spacerItem1 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
|
||||
self.welcomePageLayout.addItem(spacerItem1)
|
||||
self.welcomeBottomSpacer = QtGui.QSpacerItem(20, 40,
|
||||
QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
|
||||
self.welcomePageLayout.addItem(self.welcomeBottomSpacer)
|
||||
self.welcomeLayout.addLayout(self.welcomePageLayout)
|
||||
ThemeWizard.addPage(self.welcomePage)
|
||||
self.backgroundPage = QtGui.QWizardPage()
|
||||
self.backgroundPage.setObjectName(u'backgroundPage')
|
||||
self.backgroundLayout = QtGui.QFormLayout(self.backgroundPage)
|
||||
self.backgroundLayout.setFieldGrowthPolicy(QtGui.QFormLayout.ExpandingFieldsGrow)
|
||||
self.backgroundLayout.setLabelAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
|
||||
self.backgroundLayout.setMargin(20)
|
||||
self.backgroundLayout = QtGui.QVBoxLayout(self.backgroundPage)
|
||||
self.backgroundLayout.setSpacing(8)
|
||||
self.backgroundLayout.setMargin(20)
|
||||
self.backgroundLayout.setObjectName(u'backgroundLayout')
|
||||
self.backgroundTypeLayout = QtGui.QHBoxLayout()
|
||||
self.backgroundTypeLayout.setSpacing(8)
|
||||
self.backgroundTypeLayout.setObjectName(u'backgroundTypeLayout')
|
||||
self.backgroundTypeLabel = QtGui.QLabel(self.backgroundPage)
|
||||
self.backgroundTypeLabel.setObjectName(u'backgroundTypeLabel')
|
||||
self.backgroundLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.backgroundTypeLabel)
|
||||
self.backgroundTypeLayout.addWidget(self.backgroundTypeLabel)
|
||||
self.backgroundTypeComboBox = QtGui.QComboBox(self.backgroundPage)
|
||||
self.backgroundTypeComboBox.setObjectName(u'backgroundTypeComboBox')
|
||||
self.backgroundTypeComboBox.addItem(u'')
|
||||
self.backgroundTypeComboBox.addItem(u'')
|
||||
self.backgroundTypeComboBox.addItem(u'')
|
||||
self.backgroundLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.backgroundTypeComboBox)
|
||||
self.color1Label = QtGui.QLabel(self.backgroundPage)
|
||||
self.color1Label.setObjectName(u'color1Label')
|
||||
self.backgroundLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.color1Label)
|
||||
self.color1PushButton = QtGui.QPushButton(self.backgroundPage)
|
||||
self.color1PushButton.setText(u'')
|
||||
self.color1PushButton.setObjectName(u'color1PushButton')
|
||||
self.backgroundLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.color1PushButton)
|
||||
self.color2Label = QtGui.QLabel(self.backgroundPage)
|
||||
self.color2Label.setObjectName(u'color2Label')
|
||||
self.backgroundLayout.setWidget(2, QtGui.QFormLayout.LabelRole, self.color2Label)
|
||||
self.color2PushButton = QtGui.QPushButton(self.backgroundPage)
|
||||
self.color2PushButton.setText(u'')
|
||||
self.color2PushButton.setObjectName(u'color2PushButton')
|
||||
self.backgroundLayout.setWidget(2, QtGui.QFormLayout.FieldRole, self.color2PushButton)
|
||||
self.imageLabel = QtGui.QLabel(self.backgroundPage)
|
||||
self.imageLabel.setObjectName(u'imageLabel')
|
||||
self.backgroundLayout.setWidget(3, QtGui.QFormLayout.LabelRole, self.imageLabel)
|
||||
self.imageLayout = QtGui.QHBoxLayout()
|
||||
self.imageLayout.setSpacing(8)
|
||||
self.imageLayout.setObjectName(u'imageLayout')
|
||||
self.imageLineEdit = QtGui.QLineEdit(self.backgroundPage)
|
||||
self.imageLineEdit.setObjectName(u'imageLineEdit')
|
||||
self.imageLayout.addWidget(self.imageLineEdit)
|
||||
self.imageBrowseButton = QtGui.QToolButton(self.backgroundPage)
|
||||
self.imageBrowseButton.setText(u'')
|
||||
self.imageBrowseButton.setIcon(build_icon(u':/general/general_open.png'))
|
||||
self.imageBrowseButton.setObjectName(u'imageBrowseButton')
|
||||
self.imageLayout.addWidget(self.imageBrowseButton)
|
||||
self.backgroundLayout.setLayout(3, QtGui.QFormLayout.FieldRole, self.imageLayout)
|
||||
self.gradientLabel = QtGui.QLabel(self.backgroundPage)
|
||||
self.gradientLabel.setObjectName(u'gradientLabel')
|
||||
self.backgroundLayout.setWidget(4, QtGui.QFormLayout.LabelRole, self.gradientLabel)
|
||||
self.gradientComboBox = QtGui.QComboBox(self.backgroundPage)
|
||||
self.backgroundTypeLayout.addWidget(self.backgroundTypeComboBox)
|
||||
self.backgroundTypeSpacer = QtGui.QSpacerItem(40, 20,
|
||||
QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
|
||||
self.backgroundTypeLayout.addItem(self.backgroundTypeSpacer)
|
||||
self.backgroundLayout.addLayout(self.backgroundTypeLayout)
|
||||
self.backgroundStackedWidget = QtGui.QStackedWidget(
|
||||
self.backgroundPage)
|
||||
self.backgroundStackedWidget.setObjectName(u'backgroundStackedWidget')
|
||||
self.colorPage = QtGui.QWidget()
|
||||
self.colorPage.setObjectName(u'colorPage')
|
||||
self.colorLayout = QtGui.QFormLayout(self.colorPage)
|
||||
self.colorLayout.setMargin(0)
|
||||
self.colorLayout.setSpacing(8)
|
||||
self.colorLayout.setObjectName(u'colorLayout')
|
||||
self.colorLabel = QtGui.QLabel(self.colorPage)
|
||||
self.colorLabel.setMinimumSize(QtCore.QSize(103, 0))
|
||||
self.colorLabel.setAlignment(QtCore.Qt.AlignRight |
|
||||
QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter)
|
||||
self.colorLabel.setObjectName(u'colorLabel')
|
||||
self.colorLayout.setWidget(0,
|
||||
QtGui.QFormLayout.LabelRole, self.colorLabel)
|
||||
self.colorButton = QtGui.QPushButton(self.colorPage)
|
||||
self.colorButton.setText(u'')
|
||||
self.colorButton.setObjectName(u'colorButton')
|
||||
self.colorLayout.setWidget(0,
|
||||
QtGui.QFormLayout.FieldRole, self.colorButton)
|
||||
self.backgroundStackedWidget.addWidget(self.colorPage)
|
||||
self.gradientPage = QtGui.QWidget()
|
||||
self.gradientPage.setObjectName(u'gradientPage')
|
||||
self.gradientLayout = QtGui.QFormLayout(self.gradientPage)
|
||||
self.gradientLayout.setMargin(0)
|
||||
self.gradientLayout.setSpacing(8)
|
||||
self.gradientLayout.setObjectName(u'gradientLayout')
|
||||
self.gradientStartLabel = QtGui.QLabel(self.gradientPage)
|
||||
self.gradientStartLabel.setMinimumSize(QtCore.QSize(103, 0))
|
||||
self.gradientStartLabel.setAlignment(QtCore.Qt.AlignRight |
|
||||
QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter)
|
||||
self.gradientStartLabel.setObjectName(u'gradientStartLabel')
|
||||
self.gradientLayout.setWidget(0,
|
||||
QtGui.QFormLayout.LabelRole, self.gradientStartLabel)
|
||||
self.gradientStartButton = QtGui.QPushButton(self.gradientPage)
|
||||
self.gradientStartButton.setText(u'')
|
||||
self.gradientStartButton.setObjectName(u'gradientStartButton')
|
||||
self.gradientLayout.setWidget(0,
|
||||
QtGui.QFormLayout.FieldRole, self.gradientStartButton)
|
||||
self.gradientEndLabel = QtGui.QLabel(self.gradientPage)
|
||||
self.gradientEndLabel.setMinimumSize(QtCore.QSize(103, 0))
|
||||
self.gradientEndLabel.setAlignment(QtCore.Qt.AlignRight |
|
||||
QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter)
|
||||
self.gradientEndLabel.setObjectName(u'gradientEndLabel')
|
||||
self.gradientLayout.setWidget(1,
|
||||
QtGui.QFormLayout.LabelRole, self.gradientEndLabel)
|
||||
self.gradientEndButton = QtGui.QPushButton(self.gradientPage)
|
||||
self.gradientEndButton.setText(u'')
|
||||
self.gradientEndButton.setObjectName(u'gradientEndButton')
|
||||
self.gradientLayout.setWidget(1,
|
||||
QtGui.QFormLayout.FieldRole, self.gradientEndButton)
|
||||
self.gradientTypeLabel = QtGui.QLabel(self.gradientPage)
|
||||
self.gradientTypeLabel.setMinimumSize(QtCore.QSize(103, 0))
|
||||
self.gradientTypeLabel.setAlignment(QtCore.Qt.AlignRight |
|
||||
QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter)
|
||||
self.gradientTypeLabel.setObjectName(u'gradientTypeLabel')
|
||||
self.gradientLayout.setWidget(2,
|
||||
QtGui.QFormLayout.LabelRole, self.gradientTypeLabel)
|
||||
self.gradientComboBox = QtGui.QComboBox(self.gradientPage)
|
||||
self.gradientComboBox.setObjectName(u'gradientComboBox')
|
||||
self.gradientComboBox.addItem(u'')
|
||||
self.gradientComboBox.addItem(u'')
|
||||
self.gradientComboBox.addItem(u'')
|
||||
self.gradientComboBox.addItem(u'')
|
||||
self.gradientComboBox.addItem(u'')
|
||||
self.backgroundLayout.setWidget(4, QtGui.QFormLayout.FieldRole, self.gradientComboBox)
|
||||
self.gradientLayout.setWidget(2,
|
||||
QtGui.QFormLayout.FieldRole, self.gradientComboBox)
|
||||
self.backgroundStackedWidget.addWidget(self.gradientPage)
|
||||
self.imagePage = QtGui.QWidget()
|
||||
self.imagePage.setObjectName(u'imagePage')
|
||||
self.imageLayout = QtGui.QFormLayout(self.imagePage)
|
||||
self.imageLayout.setMargin(0)
|
||||
self.imageLayout.setSpacing(8)
|
||||
self.imageLayout.setObjectName(u'imageLayout')
|
||||
self.imageLabel = QtGui.QLabel(self.imagePage)
|
||||
self.imageLabel.setMinimumSize(QtCore.QSize(103, 0))
|
||||
self.imageLabel.setAlignment(QtCore.Qt.AlignRight |
|
||||
QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter)
|
||||
self.imageLabel.setObjectName(u'imageLabel')
|
||||
self.imageLayout.setWidget(0,
|
||||
QtGui.QFormLayout.LabelRole, self.imageLabel)
|
||||
self.imageFileLayout = QtGui.QHBoxLayout()
|
||||
self.imageFileLayout.setSpacing(8)
|
||||
self.imageFileLayout.setObjectName(u'imageFileLayout')
|
||||
self.imageLineEdit = QtGui.QLineEdit(self.imagePage)
|
||||
self.imageLineEdit.setObjectName(u'imageLineEdit')
|
||||
self.imageFileLayout.addWidget(self.imageLineEdit)
|
||||
self.imageBrowseButton = QtGui.QToolButton(self.imagePage)
|
||||
self.imageBrowseButton.setText(u'')
|
||||
self.imageBrowseButton.setIcon(
|
||||
build_icon(u':/general/general_open.png'))
|
||||
self.imageBrowseButton.setObjectName(u'imageBrowseButton')
|
||||
self.imageFileLayout.addWidget(self.imageBrowseButton)
|
||||
self.imageLayout.setLayout(0,
|
||||
QtGui.QFormLayout.FieldRole, self.imageFileLayout)
|
||||
self.backgroundStackedWidget.addWidget(self.imagePage)
|
||||
self.backgroundLayout.addWidget(self.backgroundStackedWidget)
|
||||
ThemeWizard.addPage(self.backgroundPage)
|
||||
self.mainAreaPage = QtGui.QWizardPage()
|
||||
self.mainAreaPage.setObjectName(u'mainAreaPage')
|
||||
self.formLayout = QtGui.QFormLayout(self.mainAreaPage)
|
||||
self.formLayout.setFormAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
|
||||
self.formLayout.setContentsMargins(-1, 20, 20, 20)
|
||||
self.formLayout.setSpacing(8)
|
||||
self.formLayout.setObjectName(u'formLayout')
|
||||
self.mainAreaLayout = QtGui.QFormLayout(self.mainAreaPage)
|
||||
self.mainAreaLayout.setFormAlignment(QtCore.Qt.AlignLeading |
|
||||
QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop)
|
||||
self.mainAreaLayout.setMargin(20)
|
||||
self.mainAreaLayout.setSpacing(8)
|
||||
self.mainAreaLayout.setObjectName(u'mainAreaLayout')
|
||||
self.mainFontLabel = QtGui.QLabel(self.mainAreaPage)
|
||||
self.mainFontLabel.setMinimumSize(QtCore.QSize(103, 0))
|
||||
self.mainFontLabel.setAlignment(QtCore.Qt.AlignRight |
|
||||
QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter)
|
||||
self.mainFontLabel.setObjectName(u'mainFontLabel')
|
||||
self.formLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.mainFontLabel)
|
||||
self.mainAreaLayout.setWidget(0,
|
||||
QtGui.QFormLayout.LabelRole, self.mainFontLabel)
|
||||
self.mainFontComboBox = QtGui.QFontComboBox(self.mainAreaPage)
|
||||
self.mainFontComboBox.setObjectName(u'mainFontComboBox')
|
||||
self.formLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.mainFontComboBox)
|
||||
self.mainAreaLayout.setWidget(0,
|
||||
QtGui.QFormLayout.FieldRole, self.mainFontComboBox)
|
||||
self.mainColorLabel = QtGui.QLabel(self.mainAreaPage)
|
||||
self.mainColorLabel.setObjectName(u'mainColorLabel')
|
||||
self.formLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.mainColorLabel)
|
||||
self.mainAreaLayout.setWidget(1,
|
||||
QtGui.QFormLayout.LabelRole, self.mainColorLabel)
|
||||
self.fontPropertiesLayout = QtGui.QHBoxLayout()
|
||||
self.fontPropertiesLayout.setSpacing(24)
|
||||
self.fontPropertiesLayout.setObjectName(u'fontPropertiesLayout')
|
||||
self.mainColorPushButton = QtGui.QPushButton(self.mainAreaPage)
|
||||
self.mainColorPushButton.setText(u'')
|
||||
self.mainColorPushButton.setObjectName(u'mainColorPushButton')
|
||||
self.formLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.mainColorPushButton)
|
||||
self.fontPropertiesLayout.addWidget(self.mainColorPushButton)
|
||||
self.boldCheckBox = QtGui.QCheckBox(self.mainAreaPage)
|
||||
self.boldCheckBox.setObjectName(u'boldCheckBox')
|
||||
self.fontPropertiesLayout.addWidget(self.boldCheckBox)
|
||||
self.italicsCheckBox = QtGui.QCheckBox(self.mainAreaPage)
|
||||
self.italicsCheckBox.setObjectName(u'italicsCheckBox')
|
||||
self.fontPropertiesLayout.addWidget(self.italicsCheckBox)
|
||||
self.mainAreaLayout.setLayout(1,
|
||||
QtGui.QFormLayout.FieldRole, self.fontPropertiesLayout)
|
||||
self.mainSizeLabel = QtGui.QLabel(self.mainAreaPage)
|
||||
self.mainSizeLabel.setObjectName(u'mainSizeLabel')
|
||||
self.formLayout.setWidget(2, QtGui.QFormLayout.LabelRole, self.mainSizeLabel)
|
||||
self.mainAreaLayout.setWidget(2,
|
||||
QtGui.QFormLayout.LabelRole, self.mainSizeLabel)
|
||||
self.mainSizeLayout = QtGui.QHBoxLayout()
|
||||
self.mainSizeLayout.setSpacing(8)
|
||||
self.mainSizeLayout.setMargin(0)
|
||||
self.mainSizeLayout.setObjectName(u'mainSizeLayout')
|
||||
self.mainSizeSpinBox = QtGui.QSpinBox(self.mainAreaPage)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
|
||||
sizePolicy = QtGui.QSizePolicy(
|
||||
QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.mainSizeSpinBox.sizePolicy().hasHeightForWidth())
|
||||
sizePolicy.setHeightForWidth(
|
||||
self.mainSizeSpinBox.sizePolicy().hasHeightForWidth())
|
||||
self.mainSizeSpinBox.setSizePolicy(sizePolicy)
|
||||
self.mainSizeSpinBox.setMinimumSize(QtCore.QSize(70, 0))
|
||||
self.mainSizeSpinBox.setMaximum(999)
|
||||
@ -168,18 +249,22 @@ class Ui_ThemeWizard(object):
|
||||
self.mainLineCountLabel = QtGui.QLabel(self.mainAreaPage)
|
||||
self.mainLineCountLabel.setObjectName(u'mainLineCountLabel')
|
||||
self.mainSizeLayout.addWidget(self.mainLineCountLabel)
|
||||
self.formLayout.setLayout(2, QtGui.QFormLayout.FieldRole, self.mainSizeLayout)
|
||||
self.mainAreaLayout.setLayout(2,
|
||||
QtGui.QFormLayout.FieldRole, self.mainSizeLayout)
|
||||
self.lineSpacingLabel = QtGui.QLabel(self.mainAreaPage)
|
||||
self.lineSpacingLabel.setObjectName(u'lineSpacingLabel')
|
||||
self.formLayout.setWidget(3, QtGui.QFormLayout.LabelRole, self.lineSpacingLabel)
|
||||
self.mainAreaLayout.setWidget(3,
|
||||
QtGui.QFormLayout.LabelRole, self.lineSpacingLabel)
|
||||
self.lineSpacingSpinBox = QtGui.QSpinBox(self.mainAreaPage)
|
||||
self.lineSpacingSpinBox.setMinimum(-50)
|
||||
self.lineSpacingSpinBox.setMaximum(50)
|
||||
self.lineSpacingSpinBox.setObjectName(u'lineSpacingSpinBox')
|
||||
self.formLayout.setWidget(3, QtGui.QFormLayout.FieldRole, self.lineSpacingSpinBox)
|
||||
self.mainAreaLayout.setWidget(3,
|
||||
QtGui.QFormLayout.FieldRole, self.lineSpacingSpinBox)
|
||||
self.outlineCheckBox = QtGui.QCheckBox(self.mainAreaPage)
|
||||
self.outlineCheckBox.setObjectName(u'outlineCheckBox')
|
||||
self.formLayout.setWidget(4, QtGui.QFormLayout.LabelRole, self.outlineCheckBox)
|
||||
self.mainAreaLayout.setWidget(4,
|
||||
QtGui.QFormLayout.LabelRole, self.outlineCheckBox)
|
||||
self.outlineLayout = QtGui.QHBoxLayout()
|
||||
self.outlineLayout.setObjectName(u'outlineLayout')
|
||||
self.outlineColorPushButton = QtGui.QPushButton(self.mainAreaPage)
|
||||
@ -193,10 +278,12 @@ class Ui_ThemeWizard(object):
|
||||
self.outlineSizeSpinBox = QtGui.QSpinBox(self.mainAreaPage)
|
||||
self.outlineSizeSpinBox.setObjectName(u'outlineSizeSpinBox')
|
||||
self.outlineLayout.addWidget(self.outlineSizeSpinBox)
|
||||
self.formLayout.setLayout(4, QtGui.QFormLayout.FieldRole, self.outlineLayout)
|
||||
self.mainAreaLayout.setLayout(4,
|
||||
QtGui.QFormLayout.FieldRole, self.outlineLayout)
|
||||
self.shadowCheckBox = QtGui.QCheckBox(self.mainAreaPage)
|
||||
self.shadowCheckBox.setObjectName(u'shadowCheckBox')
|
||||
self.formLayout.setWidget(5, QtGui.QFormLayout.LabelRole, self.shadowCheckBox)
|
||||
self.mainAreaLayout.setWidget(5,
|
||||
QtGui.QFormLayout.LabelRole, self.shadowCheckBox)
|
||||
self.shadowLayout = QtGui.QHBoxLayout()
|
||||
self.shadowLayout.setObjectName(u'shadowLayout')
|
||||
self.shadowColorPushButton = QtGui.QPushButton(self.mainAreaPage)
|
||||
@ -210,83 +297,99 @@ class Ui_ThemeWizard(object):
|
||||
self.shadowSizeSpinBox = QtGui.QSpinBox(self.mainAreaPage)
|
||||
self.shadowSizeSpinBox.setObjectName(u'shadowSizeSpinBox')
|
||||
self.shadowLayout.addWidget(self.shadowSizeSpinBox)
|
||||
self.formLayout.setLayout(5, QtGui.QFormLayout.FieldRole, self.shadowLayout)
|
||||
self.boldCheckBox = QtGui.QCheckBox(self.mainAreaPage)
|
||||
self.boldCheckBox.setObjectName(u'boldCheckBox')
|
||||
self.formLayout.setWidget(6, QtGui.QFormLayout.FieldRole, self.boldCheckBox)
|
||||
self.italicsCheckBox = QtGui.QCheckBox(self.mainAreaPage)
|
||||
self.italicsCheckBox.setObjectName(u'italicsCheckBox')
|
||||
self.formLayout.setWidget(7, QtGui.QFormLayout.FieldRole, self.italicsCheckBox)
|
||||
self.mainAreaLayout.setLayout(5,
|
||||
QtGui.QFormLayout.FieldRole, self.shadowLayout)
|
||||
ThemeWizard.addPage(self.mainAreaPage)
|
||||
self.footerAreaPage = QtGui.QWizardPage()
|
||||
self.footerAreaPage.setObjectName(u'footerAreaPage')
|
||||
self.footerLayout = QtGui.QFormLayout(self.footerAreaPage)
|
||||
self.footerLayout.setFieldGrowthPolicy(QtGui.QFormLayout.ExpandingFieldsGrow)
|
||||
self.footerLayout.setContentsMargins(50, 20, 20, 20)
|
||||
self.footerLayout.setFieldGrowthPolicy(
|
||||
QtGui.QFormLayout.ExpandingFieldsGrow)
|
||||
self.footerLayout.setMargin(20)
|
||||
self.footerLayout.setSpacing(8)
|
||||
self.footerLayout.setObjectName(u'footerLayout')
|
||||
self.footerFontLabel = QtGui.QLabel(self.footerAreaPage)
|
||||
self.footerFontLabel.setMinimumSize(QtCore.QSize(103, 0))
|
||||
self.footerFontLabel.setAlignment(QtCore.Qt.AlignRight |
|
||||
QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter)
|
||||
self.footerFontLabel.setObjectName(u'footerFontLabel')
|
||||
self.footerLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.footerFontLabel)
|
||||
self.footerLayout.setWidget(0,
|
||||
QtGui.QFormLayout.LabelRole, self.footerFontLabel)
|
||||
self.footerFontComboBox = QtGui.QFontComboBox(self.footerAreaPage)
|
||||
self.footerFontComboBox.setObjectName(u'footerFontComboBox')
|
||||
self.footerLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.footerFontComboBox)
|
||||
self.footerLayout.setWidget(0,
|
||||
QtGui.QFormLayout.FieldRole, self.footerFontComboBox)
|
||||
self.footerColorLabel = QtGui.QLabel(self.footerAreaPage)
|
||||
self.footerColorLabel.setObjectName(u'footerColorLabel')
|
||||
self.footerLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.footerColorLabel)
|
||||
self.footerLayout.setWidget(1,
|
||||
QtGui.QFormLayout.LabelRole, self.footerColorLabel)
|
||||
self.footerColorPushButton = QtGui.QPushButton(self.footerAreaPage)
|
||||
self.footerColorPushButton.setText(u'')
|
||||
self.footerColorPushButton.setObjectName(u'footerColorPushButton')
|
||||
self.footerLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.footerColorPushButton)
|
||||
self.footerLayout.setWidget(1,
|
||||
QtGui.QFormLayout.FieldRole, self.footerColorPushButton)
|
||||
self.footerSizeLabel = QtGui.QLabel(self.footerAreaPage)
|
||||
self.footerSizeLabel.setObjectName(u'footerSizeLabel')
|
||||
self.footerLayout.setWidget(2, QtGui.QFormLayout.LabelRole, self.footerSizeLabel)
|
||||
self.footerLayout.setWidget(2,
|
||||
QtGui.QFormLayout.LabelRole, self.footerSizeLabel)
|
||||
self.footerSizeSpinBox = QtGui.QSpinBox(self.footerAreaPage)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
|
||||
sizePolicy = QtGui.QSizePolicy(
|
||||
QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.footerSizeSpinBox.sizePolicy().hasHeightForWidth())
|
||||
sizePolicy.setHeightForWidth(
|
||||
self.footerSizeSpinBox.sizePolicy().hasHeightForWidth())
|
||||
self.footerSizeSpinBox.setSizePolicy(sizePolicy)
|
||||
self.footerSizeSpinBox.setMinimumSize(QtCore.QSize(70, 0))
|
||||
self.footerSizeSpinBox.setMaximum(999)
|
||||
self.footerSizeSpinBox.setProperty(u'value', 10)
|
||||
self.footerSizeSpinBox.setObjectName(u'footerSizeSpinBox')
|
||||
self.footerLayout.setWidget(2, QtGui.QFormLayout.FieldRole, self.footerSizeSpinBox)
|
||||
self.footerLayout.setWidget(2,
|
||||
QtGui.QFormLayout.FieldRole, self.footerSizeSpinBox)
|
||||
ThemeWizard.addPage(self.footerAreaPage)
|
||||
self.alignmentPage = QtGui.QWizardPage()
|
||||
self.alignmentPage.setObjectName(u'alignmentPage')
|
||||
self.formLayout_2 = QtGui.QFormLayout(self.alignmentPage)
|
||||
self.formLayout_2.setMargin(20)
|
||||
self.formLayout_2.setObjectName(u'formLayout_2')
|
||||
self.alignmentLayout = QtGui.QFormLayout(self.alignmentPage)
|
||||
self.alignmentLayout.setMargin(20)
|
||||
self.alignmentLayout.setSpacing(8)
|
||||
self.alignmentLayout.setObjectName(u'alignmentLayout')
|
||||
self.horizontalLabel = QtGui.QLabel(self.alignmentPage)
|
||||
self.horizontalLabel.setMinimumSize(QtCore.QSize(103, 0))
|
||||
self.horizontalLabel.setAlignment(QtCore.Qt.AlignRight |
|
||||
QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter)
|
||||
self.horizontalLabel.setObjectName(u'horizontalLabel')
|
||||
self.formLayout_2.setWidget(0, QtGui.QFormLayout.LabelRole, self.horizontalLabel)
|
||||
self.alignmentLayout.setWidget(0,
|
||||
QtGui.QFormLayout.LabelRole, self.horizontalLabel)
|
||||
self.horizontalComboBox = QtGui.QComboBox(self.alignmentPage)
|
||||
self.horizontalComboBox.setEditable(False)
|
||||
self.horizontalComboBox.setObjectName(u'horizontalComboBox')
|
||||
self.horizontalComboBox.addItem(u'')
|
||||
self.horizontalComboBox.addItem(u'')
|
||||
self.horizontalComboBox.addItem(u'')
|
||||
self.formLayout_2.setWidget(0, QtGui.QFormLayout.FieldRole, self.horizontalComboBox)
|
||||
self.alignmentLayout.setWidget(0,
|
||||
QtGui.QFormLayout.FieldRole, self.horizontalComboBox)
|
||||
self.verticalLabel = QtGui.QLabel(self.alignmentPage)
|
||||
self.verticalLabel.setObjectName(u'verticalLabel')
|
||||
self.formLayout_2.setWidget(1, QtGui.QFormLayout.LabelRole, self.verticalLabel)
|
||||
self.alignmentLayout.setWidget(1,
|
||||
QtGui.QFormLayout.LabelRole, self.verticalLabel)
|
||||
self.verticalComboBox = QtGui.QComboBox(self.alignmentPage)
|
||||
self.verticalComboBox.setObjectName(u'verticalComboBox')
|
||||
self.verticalComboBox.addItem(u'')
|
||||
self.verticalComboBox.addItem(u'')
|
||||
self.verticalComboBox.addItem(u'')
|
||||
self.formLayout_2.setWidget(1, QtGui.QFormLayout.FieldRole, self.verticalComboBox)
|
||||
self.alignmentLayout.setWidget(1,
|
||||
QtGui.QFormLayout.FieldRole, self.verticalComboBox)
|
||||
self.transitionsCheckBox = QtGui.QCheckBox(self.alignmentPage)
|
||||
self.transitionsCheckBox.setObjectName(u'transitionsCheckBox')
|
||||
self.formLayout_2.setWidget(2, QtGui.QFormLayout.FieldRole, self.transitionsCheckBox)
|
||||
self.alignmentLayout.setWidget(2,
|
||||
QtGui.QFormLayout.FieldRole, self.transitionsCheckBox)
|
||||
ThemeWizard.addPage(self.alignmentPage)
|
||||
self.areaPositionPage = QtGui.QWizardPage()
|
||||
self.areaPositionPage.setObjectName(u'areaPositionPage')
|
||||
self.gridLayout_2 = QtGui.QGridLayout(self.areaPositionPage)
|
||||
self.gridLayout_2.setMargin(20)
|
||||
self.gridLayout_2.setSpacing(8)
|
||||
self.gridLayout_2.setObjectName(u'gridLayout_2')
|
||||
self.areaPositionLayout = QtGui.QGridLayout(self.areaPositionPage)
|
||||
self.areaPositionLayout.setMargin(20)
|
||||
self.areaPositionLayout.setSpacing(8)
|
||||
self.areaPositionLayout.setObjectName(u'areaPositionLayout')
|
||||
self.mainPositionGroupBox = QtGui.QGroupBox(self.areaPositionPage)
|
||||
self.mainPositionGroupBox.setMinimumSize(QtCore.QSize(248, 0))
|
||||
self.mainPositionGroupBox.setObjectName(u'mainPositionGroupBox')
|
||||
@ -294,254 +397,361 @@ class Ui_ThemeWizard(object):
|
||||
self.mainPositionLayout.setMargin(8)
|
||||
self.mainPositionLayout.setSpacing(8)
|
||||
self.mainPositionLayout.setObjectName(u'mainPositionLayout')
|
||||
self.mainDefaultPositionCheckBox = QtGui.QCheckBox(self.mainPositionGroupBox)
|
||||
self.mainDefaultPositionCheckBox = QtGui.QCheckBox(
|
||||
self.mainPositionGroupBox)
|
||||
self.mainDefaultPositionCheckBox.setChecked(True)
|
||||
self.mainDefaultPositionCheckBox.setTristate(False)
|
||||
self.mainDefaultPositionCheckBox.setObjectName(u'mainDefaultPositionCheckBox')
|
||||
self.mainPositionLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.mainDefaultPositionCheckBox)
|
||||
self.mainDefaultPositionCheckBox.setObjectName(
|
||||
u'mainDefaultPositionCheckBox')
|
||||
self.mainPositionLayout.setWidget(0, QtGui.QFormLayout.FieldRole,
|
||||
self.mainDefaultPositionCheckBox)
|
||||
self.nainXLabel = QtGui.QLabel(self.mainPositionGroupBox)
|
||||
self.nainXLabel.setObjectName(u'nainXLabel')
|
||||
self.mainPositionLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.nainXLabel)
|
||||
self.mainPositionLayout.setWidget(1,
|
||||
QtGui.QFormLayout.LabelRole, self.nainXLabel)
|
||||
self.mainXSpinBox = QtGui.QSpinBox(self.mainPositionGroupBox)
|
||||
self.mainXSpinBox.setEnabled(False)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
|
||||
sizePolicy = QtGui.QSizePolicy(
|
||||
QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.mainXSpinBox.sizePolicy().hasHeightForWidth())
|
||||
sizePolicy.setHeightForWidth(
|
||||
self.mainXSpinBox.sizePolicy().hasHeightForWidth())
|
||||
self.mainXSpinBox.setSizePolicy(sizePolicy)
|
||||
self.mainXSpinBox.setMinimumSize(QtCore.QSize(78, 0))
|
||||
self.mainXSpinBox.setMaximum(9999)
|
||||
self.mainXSpinBox.setProperty(u'value', 0)
|
||||
self.mainXSpinBox.setObjectName(u'mainXSpinBox')
|
||||
self.mainPositionLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.mainXSpinBox)
|
||||
self.mainPositionLayout.setWidget(1,
|
||||
QtGui.QFormLayout.FieldRole, self.mainXSpinBox)
|
||||
self.mainYSpinBox = QtGui.QSpinBox(self.mainPositionGroupBox)
|
||||
self.mainYSpinBox.setEnabled(False)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
|
||||
sizePolicy = QtGui.QSizePolicy(
|
||||
QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.mainYSpinBox.sizePolicy().hasHeightForWidth())
|
||||
sizePolicy.setHeightForWidth(
|
||||
self.mainYSpinBox.sizePolicy().hasHeightForWidth())
|
||||
self.mainYSpinBox.setSizePolicy(sizePolicy)
|
||||
self.mainYSpinBox.setMinimumSize(QtCore.QSize(78, 0))
|
||||
self.mainYSpinBox.setMaximum(9999)
|
||||
self.mainYSpinBox.setObjectName(u'mainYSpinBox')
|
||||
self.mainPositionLayout.setWidget(2, QtGui.QFormLayout.FieldRole, self.mainYSpinBox)
|
||||
self.mainPositionLayout.setWidget(2,
|
||||
QtGui.QFormLayout.FieldRole, self.mainYSpinBox)
|
||||
self.mainYLabel = QtGui.QLabel(self.mainPositionGroupBox)
|
||||
self.mainYLabel.setObjectName(u'mainYLabel')
|
||||
self.mainPositionLayout.setWidget(2, QtGui.QFormLayout.LabelRole, self.mainYLabel)
|
||||
self.mainPositionLayout.setWidget(2,
|
||||
QtGui.QFormLayout.LabelRole, self.mainYLabel)
|
||||
self.mainWidthSpinBox = QtGui.QSpinBox(self.mainPositionGroupBox)
|
||||
self.mainWidthSpinBox.setEnabled(False)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
|
||||
sizePolicy = QtGui.QSizePolicy(
|
||||
QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.mainWidthSpinBox.sizePolicy().hasHeightForWidth())
|
||||
sizePolicy.setHeightForWidth(
|
||||
self.mainWidthSpinBox.sizePolicy().hasHeightForWidth())
|
||||
self.mainWidthSpinBox.setSizePolicy(sizePolicy)
|
||||
self.mainWidthSpinBox.setMinimumSize(QtCore.QSize(78, 0))
|
||||
self.mainWidthSpinBox.setMaximum(9999)
|
||||
self.mainWidthSpinBox.setObjectName(u'mainWidthSpinBox')
|
||||
self.mainPositionLayout.setWidget(3, QtGui.QFormLayout.FieldRole, self.mainWidthSpinBox)
|
||||
self.mainPositionLayout.setWidget(3,
|
||||
QtGui.QFormLayout.FieldRole, self.mainWidthSpinBox)
|
||||
self.mainWidthLabel = QtGui.QLabel(self.mainPositionGroupBox)
|
||||
self.mainWidthLabel.setObjectName(u'mainWidthLabel')
|
||||
self.mainPositionLayout.setWidget(3, QtGui.QFormLayout.LabelRole, self.mainWidthLabel)
|
||||
self.mainPositionLayout.setWidget(3,
|
||||
QtGui.QFormLayout.LabelRole, self.mainWidthLabel)
|
||||
self.mainHeightSpinBox = QtGui.QSpinBox(self.mainPositionGroupBox)
|
||||
self.mainHeightSpinBox.setEnabled(False)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
|
||||
sizePolicy = QtGui.QSizePolicy(
|
||||
QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.mainHeightSpinBox.sizePolicy().hasHeightForWidth())
|
||||
sizePolicy.setHeightForWidth(
|
||||
self.mainHeightSpinBox.sizePolicy().hasHeightForWidth())
|
||||
self.mainHeightSpinBox.setSizePolicy(sizePolicy)
|
||||
self.mainHeightSpinBox.setMinimumSize(QtCore.QSize(78, 0))
|
||||
self.mainHeightSpinBox.setMaximum(9999)
|
||||
self.mainHeightSpinBox.setObjectName(u'mainHeightSpinBox')
|
||||
self.mainPositionLayout.setWidget(4, QtGui.QFormLayout.FieldRole, self.mainHeightSpinBox)
|
||||
self.mainPositionLayout.setWidget(4,
|
||||
QtGui.QFormLayout.FieldRole, self.mainHeightSpinBox)
|
||||
self.mainHeightLabel = QtGui.QLabel(self.mainPositionGroupBox)
|
||||
self.mainHeightLabel.setObjectName(u'mainHeightLabel')
|
||||
self.mainPositionLayout.setWidget(4, QtGui.QFormLayout.LabelRole, self.mainHeightLabel)
|
||||
self.gridLayout_2.addWidget(self.mainPositionGroupBox, 1, 0, 1, 1)
|
||||
self.mainPositionLayout.setWidget(4,
|
||||
QtGui.QFormLayout.LabelRole, self.mainHeightLabel)
|
||||
self.areaPositionLayout.addWidget(
|
||||
self.mainPositionGroupBox, 1, 0, 1, 1)
|
||||
self.footerPositionGroupBox = QtGui.QGroupBox(self.areaPositionPage)
|
||||
self.footerPositionGroupBox.setMinimumSize(QtCore.QSize(248, 0))
|
||||
self.footerPositionGroupBox.setObjectName(u'footerPositionGroupBox')
|
||||
self.footerPositionLayout = QtGui.QFormLayout(self.footerPositionGroupBox)
|
||||
self.footerPositionLayout = QtGui.QFormLayout(
|
||||
self.footerPositionGroupBox)
|
||||
self.footerPositionLayout.setMargin(8)
|
||||
self.footerPositionLayout.setSpacing(8)
|
||||
self.footerPositionLayout.setObjectName(u'footerPositionLayout')
|
||||
self.footerXLabel = QtGui.QLabel(self.footerPositionGroupBox)
|
||||
self.footerXLabel.setObjectName(u'footerXLabel')
|
||||
self.footerPositionLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.footerXLabel)
|
||||
self.footerPositionLayout.setWidget(1,
|
||||
QtGui.QFormLayout.LabelRole, self.footerXLabel)
|
||||
self.footerXSpinBox = QtGui.QSpinBox(self.footerPositionGroupBox)
|
||||
self.footerXSpinBox.setEnabled(False)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
|
||||
sizePolicy = QtGui.QSizePolicy(
|
||||
QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.footerXSpinBox.sizePolicy().hasHeightForWidth())
|
||||
sizePolicy.setHeightForWidth(
|
||||
self.footerXSpinBox.sizePolicy().hasHeightForWidth())
|
||||
self.footerXSpinBox.setSizePolicy(sizePolicy)
|
||||
self.footerXSpinBox.setMinimumSize(QtCore.QSize(78, 0))
|
||||
self.footerXSpinBox.setMaximum(9999)
|
||||
self.footerXSpinBox.setProperty(u'value', 0)
|
||||
self.footerXSpinBox.setObjectName(u'footerXSpinBox')
|
||||
self.footerPositionLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.footerXSpinBox)
|
||||
self.footerPositionLayout.setWidget(1,
|
||||
QtGui.QFormLayout.FieldRole, self.footerXSpinBox)
|
||||
self.footerYLabel = QtGui.QLabel(self.footerPositionGroupBox)
|
||||
self.footerYLabel.setObjectName(u'footerYLabel')
|
||||
self.footerPositionLayout.setWidget(2, QtGui.QFormLayout.LabelRole, self.footerYLabel)
|
||||
self.footerPositionLayout.setWidget(2,
|
||||
QtGui.QFormLayout.LabelRole, self.footerYLabel)
|
||||
self.footerYSpinBox = QtGui.QSpinBox(self.footerPositionGroupBox)
|
||||
self.footerYSpinBox.setEnabled(False)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
|
||||
sizePolicy = QtGui.QSizePolicy(
|
||||
QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.footerYSpinBox.sizePolicy().hasHeightForWidth())
|
||||
sizePolicy.setHeightForWidth(
|
||||
self.footerYSpinBox.sizePolicy().hasHeightForWidth())
|
||||
self.footerYSpinBox.setSizePolicy(sizePolicy)
|
||||
self.footerYSpinBox.setMinimumSize(QtCore.QSize(78, 0))
|
||||
self.footerYSpinBox.setMaximum(9999)
|
||||
self.footerYSpinBox.setProperty(u'value', 0)
|
||||
self.footerYSpinBox.setObjectName(u'footerYSpinBox')
|
||||
self.footerPositionLayout.setWidget(2, QtGui.QFormLayout.FieldRole, self.footerYSpinBox)
|
||||
self.footerPositionLayout.setWidget(2,
|
||||
QtGui.QFormLayout.FieldRole, self.footerYSpinBox)
|
||||
self.footerWidthLabel = QtGui.QLabel(self.footerPositionGroupBox)
|
||||
self.footerWidthLabel.setObjectName(u'footerWidthLabel')
|
||||
self.footerPositionLayout.setWidget(3, QtGui.QFormLayout.LabelRole, self.footerWidthLabel)
|
||||
self.footerPositionLayout.setWidget(3,
|
||||
QtGui.QFormLayout.LabelRole, self.footerWidthLabel)
|
||||
self.footerWidthSpinBox = QtGui.QSpinBox(self.footerPositionGroupBox)
|
||||
self.footerWidthSpinBox.setEnabled(False)
|
||||
self.footerWidthSpinBox.setMinimumSize(QtCore.QSize(78, 0))
|
||||
self.footerWidthSpinBox.setMaximum(9999)
|
||||
self.footerWidthSpinBox.setObjectName(u'footerWidthSpinBox')
|
||||
self.footerPositionLayout.setWidget(3, QtGui.QFormLayout.FieldRole, self.footerWidthSpinBox)
|
||||
self.footerPositionLayout.setWidget(3,
|
||||
QtGui.QFormLayout.FieldRole, self.footerWidthSpinBox)
|
||||
self.footerHeightLabel = QtGui.QLabel(self.footerPositionGroupBox)
|
||||
self.footerHeightLabel.setObjectName(u'footerHeightLabel')
|
||||
self.footerPositionLayout.setWidget(4, QtGui.QFormLayout.LabelRole, self.footerHeightLabel)
|
||||
self.footerPositionLayout.setWidget(4,
|
||||
QtGui.QFormLayout.LabelRole, self.footerHeightLabel)
|
||||
self.footerHeightSpinBox = QtGui.QSpinBox(self.footerPositionGroupBox)
|
||||
self.footerHeightSpinBox.setEnabled(False)
|
||||
self.footerHeightSpinBox.setMinimumSize(QtCore.QSize(78, 0))
|
||||
self.footerHeightSpinBox.setMaximum(9999)
|
||||
self.footerHeightSpinBox.setObjectName(u'footerHeightSpinBox')
|
||||
self.footerPositionLayout.setWidget(4, QtGui.QFormLayout.FieldRole, self.footerHeightSpinBox)
|
||||
self.footerDefaultPositionCheckBox = QtGui.QCheckBox(self.footerPositionGroupBox)
|
||||
self.footerPositionLayout.setWidget(4,
|
||||
QtGui.QFormLayout.FieldRole, self.footerHeightSpinBox)
|
||||
self.footerDefaultPositionCheckBox = QtGui.QCheckBox(
|
||||
self.footerPositionGroupBox)
|
||||
self.footerDefaultPositionCheckBox.setChecked(True)
|
||||
self.footerDefaultPositionCheckBox.setObjectName(u'footerDefaultPositionCheckBox')
|
||||
self.footerPositionLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.footerDefaultPositionCheckBox)
|
||||
self.gridLayout_2.addWidget(self.footerPositionGroupBox, 1, 1, 1, 1)
|
||||
self.footerDefaultPositionCheckBox.setObjectName(
|
||||
u'footerDefaultPositionCheckBox')
|
||||
self.footerPositionLayout.setWidget(0, QtGui.QFormLayout.FieldRole,
|
||||
self.footerDefaultPositionCheckBox)
|
||||
self.areaPositionLayout.addWidget(self.footerPositionGroupBox, 1, 1, 1, 1)
|
||||
ThemeWizard.addPage(self.areaPositionPage)
|
||||
self.previewPage = QtGui.QWizardPage()
|
||||
self.previewPage.setObjectName(u'previewPage')
|
||||
self.previewLayout = QtGui.QVBoxLayout(self.previewPage)
|
||||
self.previewLayout.setSpacing(8)
|
||||
self.previewLayout.setMargin(20)
|
||||
self.previewLayout.setObjectName(u'previewLayout')
|
||||
self.themeNameLayout = QtGui.QHBoxLayout()
|
||||
self.themeNameLayout.setSpacing(8)
|
||||
self.themeNameLayout.setObjectName(u'themeNameLayout')
|
||||
self.themeNameLabel = QtGui.QLabel(self.previewPage)
|
||||
self.themeNameLabel.setGeometry(QtCore.QRect(20, 10, 82, 16))
|
||||
self.themeNameLabel.setMinimumSize(QtCore.QSize(103, 0))
|
||||
self.themeNameLabel.setTextFormat(QtCore.Qt.PlainText)
|
||||
self.themeNameLabel.setAlignment(QtCore.Qt.AlignRight |
|
||||
QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter)
|
||||
self.themeNameLabel.setObjectName(u'themeNameLabel')
|
||||
self.previewLabel = QtGui.QLabel(self.previewPage)
|
||||
self.previewLabel.setGeometry(QtCore.QRect(250, 60, 48, 16))
|
||||
self.previewLabel.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.previewLabel.setObjectName(u'previewLabel')
|
||||
self.themeNameLayout.addWidget(self.themeNameLabel)
|
||||
self.themeNameEdit = QtGui.QLineEdit(self.previewPage)
|
||||
self.themeNameEdit.setGeometry(QtCore.QRect(117, 4, 351, 23))
|
||||
self.themeNameEdit.setObjectName(u'themeNameEdit')
|
||||
self.groupBox = QtGui.QGroupBox(self.previewPage)
|
||||
self.groupBox.setGeometry(QtCore.QRect(40, 80, 464, 214))
|
||||
self.groupBox.setTitle(u'')
|
||||
self.groupBox.setObjectName(u'groupBox')
|
||||
self.horizontalLayout = QtGui.QHBoxLayout(self.groupBox)
|
||||
self.horizontalLayout.setObjectName(u'horizontalLayout')
|
||||
spacerItem2 = QtGui.QSpacerItem(58, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
|
||||
self.horizontalLayout.addItem(spacerItem2)
|
||||
self.previewBoxLabel = QtGui.QLabel(self.groupBox)
|
||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
|
||||
self.themeNameLayout.addWidget(self.themeNameEdit)
|
||||
self.previewLayout.addLayout(self.themeNameLayout)
|
||||
self.previewPaneLayout = QtGui.QHBoxLayout()
|
||||
self.previewPaneLayout.setSpacing(0)
|
||||
self.previewPaneLayout.setObjectName(u'previewPaneLayout')
|
||||
self.previewLeftSpacer = QtGui.QSpacerItem(58, 20,
|
||||
QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
|
||||
self.previewPaneLayout.addItem(self.previewLeftSpacer)
|
||||
self.previewBoxLabel = QtGui.QLabel(self.previewPage)
|
||||
sizePolicy = QtGui.QSizePolicy(
|
||||
QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.previewBoxLabel.sizePolicy().hasHeightForWidth())
|
||||
sizePolicy.setHeightForWidth(
|
||||
self.previewBoxLabel.sizePolicy().hasHeightForWidth())
|
||||
self.previewBoxLabel.setSizePolicy(sizePolicy)
|
||||
self.previewBoxLabel.setMinimumSize(QtCore.QSize(300, 200))
|
||||
self.previewBoxLabel.setMinimumSize(QtCore.QSize(100, 150))
|
||||
self.previewBoxLabel.setFrameShape(QtGui.QFrame.WinPanel)
|
||||
self.previewBoxLabel.setFrameShadow(QtGui.QFrame.Sunken)
|
||||
self.previewBoxLabel.setLineWidth(1)
|
||||
self.previewBoxLabel.setText(u'')
|
||||
self.previewBoxLabel.setScaledContents(True)
|
||||
self.previewBoxLabel.setObjectName(u'previewBoxLabel')
|
||||
self.horizontalLayout.addWidget(self.previewBoxLabel)
|
||||
spacerItem3 = QtGui.QSpacerItem(78, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
|
||||
self.horizontalLayout.addItem(spacerItem3)
|
||||
self.previewPaneLayout.addWidget(self.previewBoxLabel)
|
||||
self.previewRightSpacer = QtGui.QSpacerItem(78, 20,
|
||||
QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
|
||||
self.previewPaneLayout.addItem(self.previewRightSpacer)
|
||||
self.previewLayout.addLayout(self.previewPaneLayout)
|
||||
ThemeWizard.addPage(self.previewPage)
|
||||
self.themeNameLabel.setBuddy(self.themeNameEdit)
|
||||
|
||||
self.retranslateUi(ThemeWizard)
|
||||
QtCore.QObject.connect(ThemeWizard, QtCore.SIGNAL(u'accepted()'), ThemeWizard.accept)
|
||||
self.backgroundStackedWidget.setCurrentIndex(0)
|
||||
QtCore.QObject.connect(
|
||||
ThemeWizard,
|
||||
QtCore.SIGNAL(u'accepted()'),
|
||||
ThemeWizard.accept)
|
||||
QtCore.QObject.connect(
|
||||
self.backgroundTypeComboBox,
|
||||
QtCore.SIGNAL(u'currentIndexChanged(int)'),
|
||||
self.backgroundStackedWidget.setCurrentIndex)
|
||||
QtCore.QMetaObject.connectSlotsByName(ThemeWizard)
|
||||
|
||||
def retranslateUi(self, ThemeWizard):
|
||||
ThemeWizard.setWindowTitle(translate('OpenLP.ThemeForm', 'Theme Wizard'))
|
||||
self.titleLabel.setText(translate('OpenLP.ThemeForm', '<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n'
|
||||
'<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n'
|
||||
'p, li { white-space: pre-wrap; }\n'
|
||||
'</style></head><body style=\" font-family:\'Sans Serif\'; font-size:9pt; font-weight:400; font-style:normal;\">\n'
|
||||
'<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:14pt; font-weight:600;\">Welcome to the Theme Wizard</span></p></body></html>'))
|
||||
self.informationLabel.setText(translate('OpenLP.ThemeForm', 'This wizard will help you to maintain Themes . Click the next button below to start the process by setting up your background.'))
|
||||
self.backgroundPage.setTitle(translate('OpenLP.ThemeForm', 'Set Up Background'))
|
||||
self.backgroundPage.setSubTitle(translate('OpenLP.ThemeForm', 'Set up your theme\'s background according to the parameters below.'))
|
||||
self.backgroundTypeLabel.setText(translate('OpenLP.ThemeForm', 'Background type:'))
|
||||
self.backgroundTypeComboBox.setItemText(0, translate('OpenLP.ThemeForm', 'Solid Color'))
|
||||
self.backgroundTypeComboBox.setItemText(1, translate('OpenLP.ThemeForm', 'Gradient'))
|
||||
self.backgroundTypeComboBox.setItemText(2, translate('OpenLP.ThemeForm', 'Image'))
|
||||
self.color1Label.setText(translate('OpenLP.ThemeForm', '<Color1>'))
|
||||
self.color2Label.setText(translate('OpenLP.ThemeForm', '<Color2>'))
|
||||
self.imageLabel.setText(translate('OpenLP.ThemeForm', 'Image:'))
|
||||
self.gradientLabel.setText(translate('OpenLP.ThemeForm', 'Gradient:'))
|
||||
self.gradientComboBox.setItemText(0, translate('OpenLP.ThemeForm', 'Horizontal'))
|
||||
self.gradientComboBox.setItemText(1, translate('OpenLP.ThemeForm', 'Vertical'))
|
||||
self.gradientComboBox.setItemText(2, translate('OpenLP.ThemeForm', 'Circular'))
|
||||
self.gradientComboBox.setItemText(3, translate('OpenLP.ThemeForm', 'Top Left - Bottom Right'))
|
||||
self.gradientComboBox.setItemText(4, translate('OpenLP.ThemeForm', 'Bottom Left - Top Right'))
|
||||
self.mainAreaPage.setTitle(translate('OpenLP.ThemeForm', 'Main Area Font Details'))
|
||||
self.mainAreaPage.setSubTitle(translate('OpenLP.ThemeForm', 'Define the font and display characteristics for the Display text'))
|
||||
self.mainFontLabel.setText(translate('OpenLP.ThemeForm', 'Font:'))
|
||||
self.mainColorLabel.setText(translate('OpenLP.ThemeForm', 'Color:'))
|
||||
self.mainSizeLabel.setText(translate('OpenLP.ThemeForm', 'Size:'))
|
||||
self.mainSizeSpinBox.setSuffix(translate('OpenLP.ThemeForm', 'pt'))
|
||||
self.mainLineCountLabel.setText(translate('OpenLP.ThemeForm', '(%d lines per slide)'))
|
||||
self.lineSpacingLabel.setText(translate('OpenLP.ThemeForm', 'Line Spacing:'))
|
||||
self.lineSpacingSpinBox.setSuffix(translate('OpenLP.ThemeForm', 'pt'))
|
||||
self.outlineCheckBox.setText(translate('OpenLP.ThemeForm', '&Outline:'))
|
||||
self.outlineSizeLabel.setText(translate('OpenLP.ThemeForm', 'Size:'))
|
||||
self.outlineSizeSpinBox.setSuffix(translate('OpenLP.ThemeForm', 'pt'))
|
||||
self.shadowCheckBox.setText(translate('OpenLP.ThemeForm', '&Shadow:'))
|
||||
self.shadowSizeLabel.setText(translate('OpenLP.ThemeForm', 'Size:'))
|
||||
self.shadowSizeSpinBox.setSuffix(translate('OpenLP.ThemeForm', 'pt'))
|
||||
self.boldCheckBox.setText(translate('OpenLP.ThemeForm', 'Bold Display'))
|
||||
self.italicsCheckBox.setText(translate('OpenLP.ThemeForm', 'Italic Display'))
|
||||
self.footerAreaPage.setTitle(translate('OpenLP.ThemeForm', 'Footer Area Font Details'))
|
||||
self.footerAreaPage.setSubTitle(translate('OpenLP.ThemeForm', 'Define the font and display characteristics for the Footer text'))
|
||||
self.footerFontLabel.setText(translate('OpenLP.ThemeForm', 'Font:'))
|
||||
self.footerColorLabel.setText(translate('OpenLP.ThemeForm', 'Color:'))
|
||||
self.footerSizeLabel.setText(translate('OpenLP.ThemeForm', 'Size:'))
|
||||
self.footerSizeSpinBox.setSuffix(translate('OpenLP.ThemeForm', 'pt'))
|
||||
self.alignmentPage.setTitle(translate('OpenLP.ThemeForm', 'Text Formatting Details'))
|
||||
self.alignmentPage.setSubTitle(translate('OpenLP.ThemeForm', 'Allows additional display formatting information to be defined'))
|
||||
self.horizontalLabel.setText(translate('OpenLP.ThemeForm', 'Horizontal Align:'))
|
||||
self.horizontalComboBox.setItemText(0, translate('OpenLP.ThemeForm', 'Left'))
|
||||
self.horizontalComboBox.setItemText(1, translate('OpenLP.ThemeForm', 'Right'))
|
||||
self.horizontalComboBox.setItemText(2, translate('OpenLP.ThemeForm', 'Center'))
|
||||
self.verticalLabel.setText(translate('OpenLP.ThemeForm', 'Vertcal Align:'))
|
||||
self.verticalComboBox.setItemText(0, translate('OpenLP.ThemeForm', 'Top'))
|
||||
self.verticalComboBox.setItemText(1, translate('OpenLP.ThemeForm', 'Middle'))
|
||||
self.verticalComboBox.setItemText(2, translate('OpenLP.ThemeForm', 'Bottom'))
|
||||
self.transitionsCheckBox.setText(translate('OpenLP.ThemeForm', 'Transitions'))
|
||||
self.areaPositionPage.setTitle(translate('OpenLP.ThemeForm', 'Output Area Locations'))
|
||||
self.areaPositionPage.setSubTitle(translate('OpenLP.ThemeForm', 'Allows you to change and move the Main and Footer areas.'))
|
||||
self.mainPositionGroupBox.setTitle(translate('OpenLP.ThemeForm', '&Main Area'))
|
||||
self.mainDefaultPositionCheckBox.setText(translate('OpenLP.ThemeForm', '&Use default location'))
|
||||
self.nainXLabel.setText(translate('OpenLP.ThemeForm', 'X position:'))
|
||||
self.mainXSpinBox.setSuffix(translate('OpenLP.ThemeForm', 'px'))
|
||||
self.mainYSpinBox.setSuffix(translate('OpenLP.ThemeForm', 'px'))
|
||||
self.mainYLabel.setText(translate('OpenLP.ThemeForm', 'Y position:'))
|
||||
self.mainWidthSpinBox.setSuffix(translate('OpenLP.ThemeForm', 'px'))
|
||||
self.mainWidthLabel.setText(translate('OpenLP.ThemeForm', 'Width:'))
|
||||
self.mainHeightSpinBox.setSuffix(translate('OpenLP.ThemeForm', 'px'))
|
||||
self.mainHeightLabel.setText(translate('OpenLP.ThemeForm', 'Height:'))
|
||||
self.footerPositionGroupBox.setTitle(translate('OpenLP.ThemeForm', 'Footer Area'))
|
||||
self.footerXLabel.setText(translate('OpenLP.ThemeForm', 'X position:'))
|
||||
self.footerXSpinBox.setSuffix(translate('OpenLP.ThemeForm', 'px'))
|
||||
self.footerYLabel.setText(translate('OpenLP.ThemeForm', 'Y position:'))
|
||||
self.footerYSpinBox.setSuffix(translate('OpenLP.ThemeForm', 'px'))
|
||||
self.footerWidthLabel.setText(translate('OpenLP.ThemeForm', 'Width:'))
|
||||
self.footerWidthSpinBox.setSuffix(translate('OpenLP.ThemeForm', 'px'))
|
||||
self.footerHeightLabel.setText(translate('OpenLP.ThemeForm', 'Height:'))
|
||||
self.footerHeightSpinBox.setSuffix(translate('OpenLP.ThemeForm', 'px'))
|
||||
self.footerDefaultPositionCheckBox.setText(translate('OpenLP.ThemeForm', 'Use default location'))
|
||||
self.previewPage.setTitle(translate('OpenLP.ThemeForm', 'Save and Preview'))
|
||||
self.previewPage.setSubTitle(translate('OpenLP.ThemeForm', 'View the theme and save it replacing the current one or change the name to create a new theme'))
|
||||
self.themeNameLabel.setText(translate('OpenLP.ThemeForm', 'Theme name:'))
|
||||
self.previewLabel.setText(translate('OpenLP.ThemeForm', 'Preview'))
|
||||
ThemeWizard.setWindowTitle(
|
||||
translate('OpenLP.ThemeWizard', 'Theme Wizard'))
|
||||
self.titleLabel.setText(
|
||||
u'<span style="font-size:14pt; font-weight:600;">%s</span>' % \
|
||||
translate('OpenLP.ThemeWizard', 'Welcome to the Theme Wizard'))
|
||||
self.informationLabel.setText(
|
||||
translate('OpenLP.ThemeWizard', 'This wizard will help you to '
|
||||
'create and edit your themes . Click the next button below to '
|
||||
'start the process by setting up your background.'))
|
||||
self.backgroundPage.setTitle(
|
||||
translate('OpenLP.ThemeWizard', 'Set Up Background'))
|
||||
self.backgroundPage.setSubTitle(
|
||||
translate('OpenLP.ThemeWizard', 'Set up your theme\'s background '
|
||||
'according to the parameters below.'))
|
||||
self.backgroundTypeLabel.setText(
|
||||
translate('OpenLP.ThemeWizard', 'Background type:'))
|
||||
self.backgroundTypeComboBox.setItemText(0,
|
||||
translate('OpenLP.ThemeWizard', 'Solid Color'))
|
||||
self.backgroundTypeComboBox.setItemText(1,
|
||||
translate('OpenLP.ThemeWizard', 'Gradient'))
|
||||
self.backgroundTypeComboBox.setItemText(2,
|
||||
translate('OpenLP.ThemeWizard', 'Image'))
|
||||
self.colorLabel.setText(translate('OpenLP.ThemeWizard', 'Color:'))
|
||||
self.gradientStartLabel.setText(
|
||||
translate(u'OpenLP.ThemeWizard', 'Starting color:'))
|
||||
self.gradientEndLabel.setText(
|
||||
translate(u'OpenLP.ThemeWizard', 'Ending color:'))
|
||||
self.gradientTypeLabel.setText(
|
||||
translate('OpenLP.ThemeWizard', 'Gradient:'))
|
||||
self.gradientComboBox.setItemText(0,
|
||||
translate('OpenLP.ThemeWizard', 'Horizontal'))
|
||||
self.gradientComboBox.setItemText(1,
|
||||
translate('OpenLP.ThemeWizard', 'Vertical'))
|
||||
self.gradientComboBox.setItemText(2,
|
||||
translate('OpenLP.ThemeWizard', 'Circular'))
|
||||
self.gradientComboBox.setItemText(3,
|
||||
translate('OpenLP.ThemeWizard', 'Top Left - Bottom Right'))
|
||||
self.gradientComboBox.setItemText(4,
|
||||
translate('OpenLP.ThemeWizard', 'Bottom Left - Top Right'))
|
||||
self.imageLabel.setText(translate('OpenLP.ThemeWizard', 'Image:'))
|
||||
self.mainAreaPage.setTitle(
|
||||
translate('OpenLP.ThemeWizard', 'Main Area Font Details'))
|
||||
self.mainAreaPage.setSubTitle(
|
||||
translate('OpenLP.ThemeWizard', 'Define the font and display '
|
||||
'characteristics for the Display text'))
|
||||
self.mainFontLabel.setText(
|
||||
translate('OpenLP.ThemeWizard', 'Font:'))
|
||||
self.mainColorLabel.setText(translate('OpenLP.ThemeWizard', 'Color:'))
|
||||
self.mainSizeLabel.setText(translate('OpenLP.ThemeWizard', 'Size:'))
|
||||
self.mainSizeSpinBox.setSuffix(translate('OpenLP.ThemeWizard', 'pt'))
|
||||
self.mainLineCountLabel.setText(
|
||||
translate('OpenLP.ThemeWizard', '(%d lines per slide)'))
|
||||
self.lineSpacingLabel.setText(
|
||||
translate('OpenLP.ThemeWizard', 'Line Spacing:'))
|
||||
self.lineSpacingSpinBox.setSuffix(translate('OpenLP.ThemeWizard', 'pt'))
|
||||
self.outlineCheckBox.setText(
|
||||
translate('OpenLP.ThemeWizard', '&Outline:'))
|
||||
self.outlineSizeLabel.setText(translate('OpenLP.ThemeWizard', 'Size:'))
|
||||
self.outlineSizeSpinBox.setSuffix(translate('OpenLP.ThemeWizard', 'pt'))
|
||||
self.shadowCheckBox.setText(translate('OpenLP.ThemeWizard', '&Shadow:'))
|
||||
self.shadowSizeLabel.setText(translate('OpenLP.ThemeWizard', 'Size:'))
|
||||
self.shadowSizeSpinBox.setSuffix(translate('OpenLP.ThemeWizard', 'pt'))
|
||||
self.boldCheckBox.setText(
|
||||
translate('OpenLP.ThemeWizard', 'Bold'))
|
||||
self.italicsCheckBox.setText(
|
||||
translate('OpenLP.ThemeWizard', 'Italic'))
|
||||
self.footerAreaPage.setTitle(
|
||||
translate('OpenLP.ThemeWizard', 'Footer Area Font Details'))
|
||||
self.footerAreaPage.setSubTitle(
|
||||
translate('OpenLP.ThemeWizard', 'Define the font and display '
|
||||
'characteristics for the Footer text'))
|
||||
self.footerFontLabel.setText(translate('OpenLP.ThemeWizard', 'Font:'))
|
||||
self.footerColorLabel.setText(translate('OpenLP.ThemeWizard', 'Color:'))
|
||||
self.footerSizeLabel.setText(translate('OpenLP.ThemeWizard', 'Size:'))
|
||||
self.footerSizeSpinBox.setSuffix(translate('OpenLP.ThemeWizard', 'pt'))
|
||||
self.alignmentPage.setTitle(
|
||||
translate('OpenLP.ThemeWizard', 'Text Formatting Details'))
|
||||
self.alignmentPage.setSubTitle(
|
||||
translate('OpenLP.ThemeWizard', 'Allows additional display '
|
||||
'formatting information to be defined'))
|
||||
self.horizontalLabel.setText(
|
||||
translate('OpenLP.ThemeWizard', 'Horizontal Align:'))
|
||||
self.horizontalComboBox.setItemText(0,
|
||||
translate('OpenLP.ThemeWizard', 'Left'))
|
||||
self.horizontalComboBox.setItemText(1,
|
||||
translate('OpenLP.ThemeWizard', 'Right'))
|
||||
self.horizontalComboBox.setItemText(2,
|
||||
translate('OpenLP.ThemeWizard', 'Center'))
|
||||
self.verticalLabel.setText(
|
||||
translate('OpenLP.ThemeWizard', 'Vertcal Align:'))
|
||||
self.verticalComboBox.setItemText(0,
|
||||
translate('OpenLP.ThemeWizard', 'Top'))
|
||||
self.verticalComboBox.setItemText(1,
|
||||
translate('OpenLP.ThemeWizard', 'Middle'))
|
||||
self.verticalComboBox.setItemText(2,
|
||||
translate('OpenLP.ThemeWizard', 'Bottom'))
|
||||
self.transitionsCheckBox.setText(
|
||||
translate('OpenLP.ThemeWizard', 'Transitions'))
|
||||
self.areaPositionPage.setTitle(
|
||||
translate('OpenLP.ThemeWizard', 'Output Area Locations'))
|
||||
self.areaPositionPage.setSubTitle(
|
||||
translate('OpenLP.ThemeWizard', 'Allows you to change and move the '
|
||||
'main and footer areas.'))
|
||||
self.mainPositionGroupBox.setTitle(
|
||||
translate('OpenLP.ThemeWizard', '&Main Area'))
|
||||
self.mainDefaultPositionCheckBox.setText(
|
||||
translate('OpenLP.ThemeWizard', '&Use default location'))
|
||||
self.nainXLabel.setText(translate('OpenLP.ThemeWizard', 'X position:'))
|
||||
self.mainXSpinBox.setSuffix(translate('OpenLP.ThemeWizard', 'px'))
|
||||
self.mainYSpinBox.setSuffix(translate('OpenLP.ThemeWizard', 'px'))
|
||||
self.mainYLabel.setText(translate('OpenLP.ThemeWizard', 'Y position:'))
|
||||
self.mainWidthSpinBox.setSuffix(translate('OpenLP.ThemeWizard', 'px'))
|
||||
self.mainWidthLabel.setText(translate('OpenLP.ThemeWizard', 'Width:'))
|
||||
self.mainHeightSpinBox.setSuffix(translate('OpenLP.ThemeWizard', 'px'))
|
||||
self.mainHeightLabel.setText(translate('OpenLP.ThemeWizard', 'Height:'))
|
||||
self.footerPositionGroupBox.setTitle(
|
||||
translate('OpenLP.ThemeWizard', 'Footer Area'))
|
||||
self.footerXLabel.setText(translate('OpenLP.ThemeWizard', 'X position:'))
|
||||
self.footerXSpinBox.setSuffix(translate('OpenLP.ThemeWizard', 'px'))
|
||||
self.footerYLabel.setText(translate('OpenLP.ThemeWizard', 'Y position:'))
|
||||
self.footerYSpinBox.setSuffix(translate('OpenLP.ThemeWizard', 'px'))
|
||||
self.footerWidthLabel.setText(translate('OpenLP.ThemeWizard', 'Width:'))
|
||||
self.footerWidthSpinBox.setSuffix(translate('OpenLP.ThemeWizard', 'px'))
|
||||
self.footerHeightLabel.setText(
|
||||
translate('OpenLP.ThemeWizard', 'Height:'))
|
||||
self.footerHeightSpinBox.setSuffix(translate('OpenLP.ThemeWizard', 'px'))
|
||||
self.footerDefaultPositionCheckBox.setText(
|
||||
translate('OpenLP.ThemeWizard', 'Use default location'))
|
||||
self.previewPage.setTitle(
|
||||
translate('OpenLP.ThemeWizard', 'Save and Preview'))
|
||||
self.previewPage.setSubTitle(
|
||||
translate('OpenLP.ThemeWizard', 'View the theme and save it '
|
||||
'replacing the current one or change the name to create a '
|
||||
'new theme'))
|
||||
self.themeNameLabel.setText(
|
||||
translate('OpenLP.ThemeWizard', 'Theme name:'))
|
||||
|
@ -42,9 +42,8 @@ The basic XML is of the format::
|
||||
import logging
|
||||
|
||||
from xml.dom.minidom import Document
|
||||
from xml.etree.ElementTree import ElementTree, XML, dump
|
||||
from xml.etree.ElementTree import dump
|
||||
from lxml import etree, objectify
|
||||
from xml.parsers.expat import ExpatError
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
@ -152,7 +152,7 @@ class OpenLPSongImport(SongImport):
|
||||
u'Importing song %s of %s' % (song_count, song_total))
|
||||
new_song = Song()
|
||||
new_song.title = song.title
|
||||
if has_media_files:
|
||||
if has_media_files and hasattr(song, 'alternate_title'):
|
||||
new_song.alternate_title = song.alternate_title
|
||||
else:
|
||||
old_titles = song.search_title.split(u'@')
|
||||
|
@ -133,138 +133,254 @@ p, li { white-space: pre-wrap; }
|
||||
<property name="subTitle">
|
||||
<string>Set up your theme's background according to the parameters below.</string>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="backgroundLayout">
|
||||
<property name="fieldGrowthPolicy">
|
||||
<enum>QFormLayout::ExpandingFieldsGrow</enum>
|
||||
</property>
|
||||
<property name="labelAlignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="horizontalSpacing">
|
||||
<number>8</number>
|
||||
</property>
|
||||
<property name="verticalSpacing">
|
||||
<layout class="QVBoxLayout" name="backgroundLayout">
|
||||
<property name="spacing">
|
||||
<number>8</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>20</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="backgroundTypeLabel">
|
||||
<property name="text">
|
||||
<string>Background type:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="backgroundTypeComboBox">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Solid Color</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Gradient</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Image</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="color1Label">
|
||||
<property name="text">
|
||||
<string><Color1></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QPushButton" name="color1PushButton">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="color2Label">
|
||||
<property name="text">
|
||||
<string><Color2></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QPushButton" name="color2PushButton">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="imageLabel">
|
||||
<property name="text">
|
||||
<string>Image:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<layout class="QHBoxLayout" name="imageLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="backgroundTypeLayout">
|
||||
<property name="spacing">
|
||||
<number>8</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="imageLineEdit"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="imageBrowseButton">
|
||||
<widget class="QLabel" name="backgroundTypeLabel">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../images/openlp-2.qrc">
|
||||
<normaloff>:/general/general_open.png</normaloff>:/general/general_open.png</iconset>
|
||||
<string>Background type:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="backgroundTypeComboBox">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Solid Color</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Gradient</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Image</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="gradientLabel">
|
||||
<property name="text">
|
||||
<string>Gradient:</string>
|
||||
<item>
|
||||
<widget class="QStackedWidget" name="backgroundStackedWidget">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QComboBox" name="gradientComboBox">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Horizontal</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Vertical</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Circular</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Top Left - Bottom Right</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Bottom Left - Top Right</string>
|
||||
</property>
|
||||
</item>
|
||||
<widget class="QWidget" name="colorPage">
|
||||
<layout class="QFormLayout" name="colorLayout">
|
||||
<property name="horizontalSpacing">
|
||||
<number>8</number>
|
||||
</property>
|
||||
<property name="verticalSpacing">
|
||||
<number>8</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="colorLabel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>103</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Color:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QPushButton" name="colorButton">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="gradientPage">
|
||||
<layout class="QFormLayout" name="gradientLayout">
|
||||
<property name="horizontalSpacing">
|
||||
<number>8</number>
|
||||
</property>
|
||||
<property name="verticalSpacing">
|
||||
<number>8</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="gradientStartLabel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>103</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Starting color:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QPushButton" name="gradientStartButton">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="gradientEndLabel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>103</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Ending color:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QPushButton" name="gradientEndButton">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="gradientTypeLabel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>103</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Gradient:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QComboBox" name="gradientComboBox">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Horizontal</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Vertical</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Circular</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Top Left - Bottom Right</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Bottom Left - Top Right</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="imagePage">
|
||||
<layout class="QFormLayout" name="imageLayout">
|
||||
<property name="horizontalSpacing">
|
||||
<number>8</number>
|
||||
</property>
|
||||
<property name="verticalSpacing">
|
||||
<number>8</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="imageLabel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>103</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Image:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<layout class="QHBoxLayout" name="imageFileLayout">
|
||||
<property name="spacing">
|
||||
<number>8</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="imageLineEdit"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="imageBrowseButton">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../images/openlp-2.qrc">
|
||||
<normaloff>:/general/general_open.png</normaloff>:/general/general_open.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
@ -276,30 +392,30 @@ p, li { white-space: pre-wrap; }
|
||||
<property name="subTitle">
|
||||
<string>Define the font and display characteristics for the Display text</string>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<property name="formAlignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="mainAreaLayout">
|
||||
<property name="horizontalSpacing">
|
||||
<number>8</number>
|
||||
</property>
|
||||
<property name="verticalSpacing">
|
||||
<number>8</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>20</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>20</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<property name="margin">
|
||||
<number>20</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="mainFontLabel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>103</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Font:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
@ -313,11 +429,32 @@ p, li { white-space: pre-wrap; }
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QPushButton" name="mainColorPushButton">
|
||||
<property name="text">
|
||||
<string/>
|
||||
<layout class="QHBoxLayout" name="fontPropertiesLayout">
|
||||
<property name="spacing">
|
||||
<number>24</number>
|
||||
</property>
|
||||
</widget>
|
||||
<item>
|
||||
<widget class="QPushButton" name="mainColorPushButton">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="boldCheckBox">
|
||||
<property name="text">
|
||||
<string>Bold</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="italicsCheckBox">
|
||||
<property name="text">
|
||||
<string>Italic</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="mainSizeLabel">
|
||||
@ -458,20 +595,6 @@ p, li { white-space: pre-wrap; }
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="QCheckBox" name="boldCheckBox">
|
||||
<property name="text">
|
||||
<string>Bold Display</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<widget class="QCheckBox" name="italicsCheckBox">
|
||||
<property name="text">
|
||||
<string>Italic Display</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWizardPage" name="footerAreaPage">
|
||||
@ -491,23 +614,23 @@ p, li { white-space: pre-wrap; }
|
||||
<property name="verticalSpacing">
|
||||
<number>8</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>50</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>20</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>20</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<property name="margin">
|
||||
<number>20</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="footerFontLabel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>103</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Font:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
@ -569,14 +692,29 @@ p, li { white-space: pre-wrap; }
|
||||
<string>Allows additional display formatting information to be defined</string>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout_2">
|
||||
<property name="horizontalSpacing">
|
||||
<number>8</number>
|
||||
</property>
|
||||
<property name="verticalSpacing">
|
||||
<number>8</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>20</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="horizontalLabel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>103</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Horizontal Align:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
@ -643,7 +781,7 @@ p, li { white-space: pre-wrap; }
|
||||
<property name="subTitle">
|
||||
<string>Allows you to change and move the Main and Footer areas.</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<layout class="QGridLayout" name="areaPositionLayout">
|
||||
<property name="margin">
|
||||
<number>20</number>
|
||||
</property>
|
||||
@ -983,129 +1121,114 @@ p, li { white-space: pre-wrap; }
|
||||
<property name="subTitle">
|
||||
<string>View the theme and save it replacing the current one or change the name to create a new theme</string>
|
||||
</property>
|
||||
<widget class="QLabel" name="themeNameLabel">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>10</y>
|
||||
<width>82</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
<layout class="QVBoxLayout" name="previewLayout">
|
||||
<property name="spacing">
|
||||
<number>8</number>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Theme name:</string>
|
||||
<property name="margin">
|
||||
<number>20</number>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::PlainText</enum>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>themeNameEdit</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="previewLabel">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>250</x>
|
||||
<y>60</y>
|
||||
<width>48</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Preview</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="themeNameEdit">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>117</x>
|
||||
<y>4</y>
|
||||
<width>351</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>40</x>
|
||||
<y>80</y>
|
||||
<width>464</width>
|
||||
<height>214</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<spacer name="leftSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>58</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="previewBoxLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>300</width>
|
||||
<height>200</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::WinPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Sunken</enum>
|
||||
</property>
|
||||
<property name="lineWidth">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="rightSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>78</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="themeNameLayout">
|
||||
<property name="spacing">
|
||||
<number>8</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="themeNameLabel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>103</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Theme name:</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::PlainText</enum>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>themeNameEdit</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="themeNameEdit"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="previewPaneLayout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<spacer name="leftSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>58</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="previewBoxLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>150</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::WinPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Sunken</enum>
|
||||
</property>
|
||||
<property name="lineWidth">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="rightSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>78</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="../images/openlp-2.qrc"/>
|
||||
<include location="../images/openlp-2.qrc"/>
|
||||
<include location="Projects/OpenLP/trunk/resources/images/openlp-2.qrc"/>
|
||||
</resources>
|
||||
<connections>
|
||||
<connection>
|
||||
@ -1124,5 +1247,21 @@ p, li { white-space: pre-wrap; }
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>backgroundTypeComboBox</sender>
|
||||
<signal>currentIndexChanged(int)</signal>
|
||||
<receiver>backgroundStackedWidget</receiver>
|
||||
<slot>setCurrentIndex(int)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>178</x>
|
||||
<y>78</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>249</x>
|
||||
<y>199</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
|
@ -81,6 +81,7 @@
|
||||
<qresource prefix="wizards">
|
||||
<file>wizard_importsong.bmp</file>
|
||||
<file>wizard_importbible.bmp</file>
|
||||
<file>wizard_createtheme.bmp</file>
|
||||
</qresource>
|
||||
<qresource prefix="services">
|
||||
<file>service_collapse_all.png</file>
|
||||
|
BIN
resources/images/wizard_createtheme.bmp
Normal file
BIN
resources/images/wizard_createtheme.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 168 KiB |
Loading…
Reference in New Issue
Block a user