forked from openlp/openlp
Head
This commit is contained in:
commit
5a5d03a7bd
@ -80,6 +80,9 @@ html_expands.append({u'desc':u'Bold', u'start tag':u'{st}',
|
|||||||
html_expands.append({u'desc': u'Italics', u'start tag': u'{it}',
|
html_expands.append({u'desc': u'Italics', u'start tag': u'{it}',
|
||||||
u'start html': u'<em>', u'end tag': u'{/it}', u'end html': u'</em>',
|
u'start html': u'<em>', u'end tag': u'{/it}', u'end html': u'</em>',
|
||||||
u'protected': True})
|
u'protected': True})
|
||||||
|
html_expands.append({u'desc': u'Underline', u'start tag': u'{u}',
|
||||||
|
u'start html': u'<span style="text-decoration: underline;">',
|
||||||
|
u'end tag': u'{/u}', u'end html': u'</span>', u'protected': True})
|
||||||
|
|
||||||
def translate(context, text, comment=None):
|
def translate(context, text, comment=None):
|
||||||
"""
|
"""
|
||||||
@ -303,8 +306,8 @@ def expand_tags(text):
|
|||||||
text = text.replace(tag[u'end tag'], tag[u'end html'])
|
text = text.replace(tag[u'end tag'], tag[u'end html'])
|
||||||
return text
|
return text
|
||||||
|
|
||||||
from theme import ThemeLevel, ThemeXML, BackgroundGradientType, BackgroundType, \
|
from theme import ThemeLevel, ThemeXML, BackgroundGradientType, \
|
||||||
HorizontalType, VerticalType
|
BackgroundType, HorizontalType, VerticalType
|
||||||
from spelltextedit import SpellTextEdit
|
from spelltextedit import SpellTextEdit
|
||||||
from eventreceiver import Receiver
|
from eventreceiver import Receiver
|
||||||
from imagemanager import ImageManager
|
from imagemanager import ImageManager
|
||||||
|
@ -371,7 +371,8 @@ def build_background_css(item, width, height):
|
|||||||
theme = item.themedata
|
theme = item.themedata
|
||||||
background = u'background-color: black'
|
background = u'background-color: black'
|
||||||
if theme:
|
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
|
background = u'background-color: %s' % theme.background_color
|
||||||
else:
|
else:
|
||||||
if theme.background_direction == BackgroundGradientType.to_string \
|
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, ' \
|
u'-webkit-gradient(linear, left top, left bottom, ' \
|
||||||
'from(%s), to(%s))' % (theme.background_start_color,
|
'from(%s), to(%s))' % (theme.background_start_color,
|
||||||
theme.background_end_color)
|
theme.background_end_color)
|
||||||
elif theme.background_direction == BackgroundGradientType.to_string \
|
elif theme.background_direction == \
|
||||||
(BackgroundGradientType.LeftTop):
|
BackgroundGradientType.to_string( \
|
||||||
|
BackgroundGradientType.LeftTop):
|
||||||
background = \
|
background = \
|
||||||
u'background: ' \
|
u'background: ' \
|
||||||
u'-webkit-gradient(linear, left top, right bottom, ' \
|
u'-webkit-gradient(linear, left top, right bottom, ' \
|
||||||
'from(%s), to(%s))' % (theme.background_start_color,
|
'from(%s), to(%s))' % (theme.background_start_color,
|
||||||
theme.background_end_color)
|
theme.background_end_color)
|
||||||
elif theme.background_direction == BackgroundGradientType.to_string \
|
elif theme.background_direction == \
|
||||||
|
BackgroundGradientType.to_string \
|
||||||
(BackgroundGradientType.LeftBottom):
|
(BackgroundGradientType.LeftBottom):
|
||||||
background = \
|
background = \
|
||||||
u'background: ' \
|
u'background: ' \
|
||||||
u'-webkit-gradient(linear, left bottom, right top, ' \
|
u'-webkit-gradient(linear, left bottom, right top, ' \
|
||||||
'from(%s), to(%s))' % (theme.background_start_color,
|
'from(%s), to(%s))' % (theme.background_start_color,
|
||||||
theme.background_end_color)
|
theme.background_end_color)
|
||||||
elif theme.background_direction == BackgroundGradientType.to_string \
|
elif theme.background_direction == \
|
||||||
|
BackgroundGradientType.to_string \
|
||||||
(BackgroundGradientType.Vertical):
|
(BackgroundGradientType.Vertical):
|
||||||
background = \
|
background = \
|
||||||
u'background: -webkit-gradient(linear, left top, ' \
|
u'background: -webkit-gradient(linear, left top, ' \
|
||||||
|
@ -46,13 +46,13 @@ class ImageThread(QtCore.QThread):
|
|||||||
"""
|
"""
|
||||||
def __init__(self, manager):
|
def __init__(self, manager):
|
||||||
QtCore.QThread.__init__(self, None)
|
QtCore.QThread.__init__(self, None)
|
||||||
self.image_mamager = manager
|
self.imageManager = manager
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
"""
|
"""
|
||||||
Run the thread.
|
Run the thread.
|
||||||
"""
|
"""
|
||||||
self.image_mamager.process()
|
self.imageManager.process()
|
||||||
|
|
||||||
|
|
||||||
class Image(object):
|
class Image(object):
|
||||||
|
@ -87,8 +87,12 @@ class SettingsTab(QtGui.QWidget):
|
|||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def postSetUp(self):
|
def postSetUp(self, postUpdate=False):
|
||||||
"""
|
"""
|
||||||
Changes which need to be made after setup of application
|
Changes which need to be made after setup of application
|
||||||
|
|
||||||
|
``postUpdate``
|
||||||
|
Indicates if called before or after updates.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
@ -33,12 +33,15 @@ except ImportError:
|
|||||||
enchant_available = False
|
enchant_available = False
|
||||||
|
|
||||||
# based on code from
|
# 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 PyQt4 import QtCore, QtGui
|
||||||
from openlp.core.lib import html_expands, translate
|
from openlp.core.lib import html_expands, translate
|
||||||
|
|
||||||
class SpellTextEdit(QtGui.QPlainTextEdit):
|
class SpellTextEdit(QtGui.QPlainTextEdit):
|
||||||
|
"""
|
||||||
|
Spell checking widget based on QPlanTextEdit.
|
||||||
|
"""
|
||||||
def __init__(self, *args):
|
def __init__(self, *args):
|
||||||
QtGui.QPlainTextEdit.__init__(self, *args)
|
QtGui.QPlainTextEdit.__init__(self, *args)
|
||||||
# Default dictionary based on the current locale.
|
# Default dictionary based on the current locale.
|
||||||
@ -60,7 +63,7 @@ class SpellTextEdit(QtGui.QPlainTextEdit):
|
|||||||
QtGui.QPlainTextEdit.mousePressEvent(self, event)
|
QtGui.QPlainTextEdit.mousePressEvent(self, event)
|
||||||
|
|
||||||
def contextMenuEvent(self, event):
|
def contextMenuEvent(self, event):
|
||||||
popup_menu = self.createStandardContextMenu()
|
popupMenu = self.createStandardContextMenu()
|
||||||
# Select the word under the cursor.
|
# Select the word under the cursor.
|
||||||
cursor = self.textCursor()
|
cursor = self.textCursor()
|
||||||
# only select text if not already selected
|
# 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
|
# Only add the spelling suggests to the menu if there are
|
||||||
# suggestions.
|
# suggestions.
|
||||||
if len(spell_menu.actions()) != 0:
|
if len(spell_menu.actions()) != 0:
|
||||||
popup_menu.insertSeparator(popup_menu.actions()[0])
|
popupMenu.insertSeparator(popupMenu.actions()[0])
|
||||||
popup_menu.insertMenu(popup_menu.actions()[0], spell_menu)
|
popupMenu.insertMenu(popupMenu.actions()[0], spell_menu)
|
||||||
tag_menu = QtGui.QMenu(translate('OpenLP.SpellTextEdit',
|
tagMenu = QtGui.QMenu(translate('OpenLP.SpellTextEdit',
|
||||||
'Formatting Tags'))
|
'Formatting Tags'))
|
||||||
for html in html_expands:
|
for html in html_expands:
|
||||||
action = SpellAction( html[u'desc'], tag_menu)
|
action = SpellAction( html[u'desc'], tagMenu)
|
||||||
action.correct.connect(self.htmlTag)
|
action.correct.connect(self.htmlTag)
|
||||||
tag_menu.addAction(action)
|
tagMenu.addAction(action)
|
||||||
popup_menu.insertSeparator(popup_menu.actions()[0])
|
popupMenu.insertSeparator(popupMenu.actions()[0])
|
||||||
popup_menu.insertMenu(popup_menu.actions()[0], tag_menu)
|
popupMenu.insertMenu(popupMenu.actions()[0], tagMenu)
|
||||||
popup_menu.exec_(event.globalPos())
|
popupMenu.exec_(event.globalPos())
|
||||||
|
|
||||||
def correctWord(self, word):
|
def correctWord(self, word):
|
||||||
"""
|
"""
|
||||||
|
@ -31,7 +31,6 @@ import re
|
|||||||
import logging
|
import logging
|
||||||
|
|
||||||
from xml.dom.minidom import Document
|
from xml.dom.minidom import Document
|
||||||
from xml.etree.ElementTree import ElementTree, XML
|
|
||||||
from lxml import etree, objectify
|
from lxml import etree, objectify
|
||||||
|
|
||||||
from openlp.core.lib import str_to_bool
|
from openlp.core.lib import str_to_bool
|
||||||
@ -56,7 +55,7 @@ BLANK_THEME_XML = \
|
|||||||
<font type="main">
|
<font type="main">
|
||||||
<name>Arial</name>
|
<name>Arial</name>
|
||||||
<color>#FFFFFF</color>
|
<color>#FFFFFF</color>
|
||||||
<size>30</size>
|
<size>40</size>
|
||||||
<bold>False</bold>
|
<bold>False</bold>
|
||||||
<italics>False</italics>
|
<italics>False</italics>
|
||||||
<line_adjustment>0</line_adjustment>
|
<line_adjustment>0</line_adjustment>
|
||||||
@ -261,8 +260,9 @@ class ThemeXML(object):
|
|||||||
|
|
||||||
def add_font(self, name, color, size, override, fonttype=u'main',
|
def add_font(self, name, color, size, override, fonttype=u'main',
|
||||||
bold=u'False', italics=u'False', line_adjustment=0,
|
bold=u'False', italics=u'False', line_adjustment=0,
|
||||||
xpos=0, ypos=0, width=0, height=0 , outline=u'False', outline_color=u'#ffffff',
|
xpos=0, ypos=0, width=0, height=0 , outline=u'False',
|
||||||
outline_pixel=2, shadow=u'False', shadow_color=u'#ffffff', shadow_pixel=5):
|
outline_color=u'#ffffff', outline_pixel=2, shadow=u'False',
|
||||||
|
shadow_color=u'#ffffff', shadow_pixel=5):
|
||||||
"""
|
"""
|
||||||
Add a Font.
|
Add a Font.
|
||||||
|
|
||||||
@ -317,7 +317,6 @@ class ThemeXML(object):
|
|||||||
``shadow_size``
|
``shadow_size``
|
||||||
How big the Shadow is
|
How big the Shadow is
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
background = self.theme_xml.createElement(u'font')
|
background = self.theme_xml.createElement(u'font')
|
||||||
background.setAttribute(u'type', fonttype)
|
background.setAttribute(u'type', fonttype)
|
||||||
@ -325,7 +324,7 @@ class ThemeXML(object):
|
|||||||
# Create Font name element
|
# Create Font name element
|
||||||
self.child_element(background, u'name', name)
|
self.child_element(background, u'name', name)
|
||||||
# Create Font color element
|
# Create Font color element
|
||||||
self.child_element(background, u'color', color)
|
self.child_element(background, u'color', unicode(color))
|
||||||
# Create Proportion name element
|
# Create Proportion name element
|
||||||
self.child_element(background, u'size', unicode(size))
|
self.child_element(background, u'size', unicode(size))
|
||||||
# Create weight name element
|
# Create weight name element
|
||||||
@ -457,7 +456,8 @@ class ThemeXML(object):
|
|||||||
if element.getparent().tag == u'display':
|
if element.getparent().tag == u'display':
|
||||||
if element.tag.startswith(u'shadow') or \
|
if element.tag.startswith(u'shadow') or \
|
||||||
element.tag.startswith(u'outline'):
|
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
|
master = element.getparent().tag
|
||||||
if element.getparent().tag == u'background':
|
if element.getparent().tag == u'background':
|
||||||
master = element.getparent().tag
|
master = element.getparent().tag
|
||||||
@ -471,7 +471,8 @@ class ThemeXML(object):
|
|||||||
for attr in element.attrib:
|
for attr in element.attrib:
|
||||||
base_element = attr
|
base_element = attr
|
||||||
# correction for the shadow and outline tags
|
# 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):
|
if not attr.startswith(element.tag):
|
||||||
base_element = element.tag + u'_' + attr
|
base_element = element.tag + u'_' + attr
|
||||||
self._create_attr(master, base_element,
|
self._create_attr(master, base_element,
|
||||||
@ -540,8 +541,8 @@ class ThemeXML(object):
|
|||||||
"""
|
"""
|
||||||
Change Camel Case string to python string
|
Change Camel Case string to python string
|
||||||
"""
|
"""
|
||||||
s1 = re.sub(u'(.)([A-Z][a-z]+)', r'\1_\2', name)
|
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', s1).lower()
|
return re.sub(u'([a-z0-9])([A-Z])', r'\1_\2', sub_name).lower()
|
||||||
|
|
||||||
def _build_xml_from_attrs(self):
|
def _build_xml_from_attrs(self):
|
||||||
"""
|
"""
|
||||||
|
@ -82,7 +82,8 @@ class AdvancedTab(SettingsTab):
|
|||||||
self.doubleClickLiveCheckBox.setObjectName(u'doubleClickLiveCheckBox')
|
self.doubleClickLiveCheckBox.setObjectName(u'doubleClickLiveCheckBox')
|
||||||
self.uiLayout.addWidget(self.doubleClickLiveCheckBox)
|
self.uiLayout.addWidget(self.doubleClickLiveCheckBox)
|
||||||
# self.expandServiceItemCheckBox = QtGui.QCheckBox(self.uiGroupBox)
|
# self.expandServiceItemCheckBox = QtGui.QCheckBox(self.uiGroupBox)
|
||||||
# self.expandServiceItemCheckBox.setObjectName(u'expandServiceItemCheckBox')
|
# self.expandServiceItemCheckBox.setObjectName(
|
||||||
|
# u'expandServiceItemCheckBox')
|
||||||
# self.uiLayout.addWidget(self.expandServiceItemCheckBox)
|
# self.uiLayout.addWidget(self.expandServiceItemCheckBox)
|
||||||
self.leftLayout.addWidget(self.uiGroupBox)
|
self.leftLayout.addWidget(self.uiGroupBox)
|
||||||
self.expandServiceItemCheckBox = QtGui.QCheckBox(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
|
|
@ -23,7 +23,8 @@
|
|||||||
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
"""
|
||||||
|
"""
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
|
|
||||||
@ -236,7 +237,7 @@ class MainDisplay(DisplayWidget):
|
|||||||
"""
|
"""
|
||||||
API for replacement backgrounds so Images are added directly to cache
|
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)
|
self.image(name)
|
||||||
|
|
||||||
def image(self, name):
|
def image(self, name):
|
||||||
|
@ -627,7 +627,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||||||
# warning cyclic dependency
|
# warning cyclic dependency
|
||||||
# RenderManager needs to call ThemeManager and
|
# RenderManager needs to call ThemeManager and
|
||||||
# ThemeManager needs to call RenderManager
|
# ThemeManager needs to call RenderManager
|
||||||
self.RenderManager = RenderManager(
|
self.renderManager = RenderManager(
|
||||||
self.ThemeManagerContents, self.screens)
|
self.ThemeManagerContents, self.screens)
|
||||||
# Define the media Dock Manager
|
# Define the media Dock Manager
|
||||||
self.mediaDockManager = MediaDockManager(self.MediaToolBox)
|
self.mediaDockManager = MediaDockManager(self.MediaToolBox)
|
||||||
@ -635,7 +635,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||||||
# make the controllers available to the plugins
|
# make the controllers available to the plugins
|
||||||
self.plugin_helpers[u'preview'] = self.PreviewController
|
self.plugin_helpers[u'preview'] = self.PreviewController
|
||||||
self.plugin_helpers[u'live'] = self.LiveController
|
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'service'] = self.ServiceManagerContents
|
||||||
self.plugin_helpers[u'settings form'] = self.settingsForm
|
self.plugin_helpers[u'settings form'] = self.settingsForm
|
||||||
self.plugin_helpers[u'toolbox'] = self.mediaDockManager
|
self.plugin_helpers[u'toolbox'] = self.mediaDockManager
|
||||||
@ -809,7 +809,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||||||
their locations
|
their locations
|
||||||
"""
|
"""
|
||||||
log.debug(u'screenChanged')
|
log.debug(u'screenChanged')
|
||||||
self.RenderManager.update_display()
|
self.renderManager.update_display()
|
||||||
self.setFocus()
|
self.setFocus()
|
||||||
self.activateWindow()
|
self.activateWindow()
|
||||||
|
|
||||||
|
@ -782,7 +782,7 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
self.onNewService()
|
self.onNewService()
|
||||||
for item in items:
|
for item in items:
|
||||||
serviceitem = ServiceItem()
|
serviceitem = ServiceItem()
|
||||||
serviceitem.render_manager = self.parent.RenderManager
|
serviceitem.render_manager = self.parent.renderManager
|
||||||
serviceitem.set_from_service(item, self.servicePath)
|
serviceitem.set_from_service(item, self.servicePath)
|
||||||
self.validateItem(serviceitem)
|
self.validateItem(serviceitem)
|
||||||
self.addServiceItem(serviceitem)
|
self.addServiceItem(serviceitem)
|
||||||
@ -843,7 +843,7 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
"""
|
"""
|
||||||
log.debug(u'onThemeComboBoxSelected')
|
log.debug(u'onThemeComboBoxSelected')
|
||||||
self.service_theme = unicode(self.themeComboBox.currentText())
|
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(
|
QtCore.QSettings().setValue(
|
||||||
self.parent.serviceSettingsSection + u'/service theme',
|
self.parent.serviceSettingsSection + u'/service theme',
|
||||||
QtCore.QVariant(self.service_theme))
|
QtCore.QVariant(self.service_theme))
|
||||||
@ -855,7 +855,7 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
sure the theme combo box is in the correct state.
|
sure the theme combo box is in the correct state.
|
||||||
"""
|
"""
|
||||||
log.debug(u'themeChange')
|
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'ThemeLabel'].setVisible(False)
|
||||||
self.toolbar.actions[u'ThemeWidget'].setVisible(False)
|
self.toolbar.actions[u'ThemeWidget'].setVisible(False)
|
||||||
else:
|
else:
|
||||||
@ -869,7 +869,7 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
"""
|
"""
|
||||||
log.debug(u'regenerateServiceItems')
|
log.debug(u'regenerateServiceItems')
|
||||||
# force reset of renderer as theme data has changed
|
# force reset of renderer as theme data has changed
|
||||||
self.parent.RenderManager.themedata = None
|
self.parent.renderManager.themedata = None
|
||||||
if self.serviceItems:
|
if self.serviceItems:
|
||||||
tempServiceItems = self.serviceItems
|
tempServiceItems = self.serviceItems
|
||||||
self.serviceManagerList.clear()
|
self.serviceManagerList.clear()
|
||||||
@ -1111,7 +1111,7 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
index = 0
|
index = 0
|
||||||
self.service_theme = u''
|
self.service_theme = u''
|
||||||
self.themeComboBox.setCurrentIndex(index)
|
self.themeComboBox.setCurrentIndex(index)
|
||||||
self.parent.RenderManager.set_service_theme(self.service_theme)
|
self.parent.renderManager.set_service_theme(self.service_theme)
|
||||||
self.regenerateServiceItems()
|
self.regenerateServiceItems()
|
||||||
|
|
||||||
def onThemeChangeAction(self):
|
def onThemeChangeAction(self):
|
||||||
|
@ -497,7 +497,7 @@ class SlideController(QtGui.QWidget):
|
|||||||
log.debug(u'screenSizeChanged live = %s' % self.isLive)
|
log.debug(u'screenSizeChanged live = %s' % self.isLive)
|
||||||
# rebuild display as screen size changed
|
# rebuild display as screen size changed
|
||||||
self.display = MainDisplay(self, self.screens, self.isLive)
|
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.display.alertTab = self.alertTab
|
||||||
self.ratio = float(self.screens.current[u'size'].width()) / \
|
self.ratio = float(self.screens.current[u'size'].width()) / \
|
||||||
float(self.screens.current[u'size'].height())
|
float(self.screens.current[u'size'].height())
|
||||||
@ -517,7 +517,7 @@ class SlideController(QtGui.QWidget):
|
|||||||
"""
|
"""
|
||||||
log.debug(u'widthChanged live = %s' % self.isLive)
|
log.debug(u'widthChanged live = %s' % self.isLive)
|
||||||
width = self.parent.ControlSplitter.sizes()[self.split]
|
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)
|
self.PreviewListWidget.setColumnWidth(0, width)
|
||||||
# Sort out image heights (Songs, bibles excluded)
|
# Sort out image heights (Songs, bibles excluded)
|
||||||
if self.serviceItem and not self.serviceItem.is_text():
|
if self.serviceItem and not self.serviceItem.is_text():
|
||||||
@ -696,14 +696,14 @@ class SlideController(QtGui.QWidget):
|
|||||||
label.setScaledContents(True)
|
label.setScaledContents(True)
|
||||||
if self.serviceItem.is_command():
|
if self.serviceItem.is_command():
|
||||||
image = resize_image(frame[u'image'],
|
image = resize_image(frame[u'image'],
|
||||||
self.parent.RenderManager.width,
|
self.parent.renderManager.width,
|
||||||
self.parent.RenderManager.height)
|
self.parent.renderManager.height)
|
||||||
else:
|
else:
|
||||||
image = self.parent.RenderManager.image_manager. \
|
image = self.parent.renderManager.image_manager. \
|
||||||
get_image(frame[u'title'])
|
get_image(frame[u'title'])
|
||||||
label.setPixmap(QtGui.QPixmap.fromImage(image))
|
label.setPixmap(QtGui.QPixmap.fromImage(image))
|
||||||
self.PreviewListWidget.setCellWidget(framenumber, 0, label)
|
self.PreviewListWidget.setCellWidget(framenumber, 0, label)
|
||||||
slideHeight = width * self.parent.RenderManager.screen_ratio
|
slideHeight = width * self.parent.renderManager.screen_ratio
|
||||||
row += 1
|
row += 1
|
||||||
text.append(unicode(row))
|
text.append(unicode(row))
|
||||||
self.PreviewListWidget.setItem(framenumber, 0, item)
|
self.PreviewListWidget.setItem(framenumber, 0, item)
|
||||||
|
@ -55,18 +55,22 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
|
|||||||
self.setupUi(self)
|
self.setupUi(self)
|
||||||
self.registerFields()
|
self.registerFields()
|
||||||
self.accepted = False
|
self.accepted = False
|
||||||
|
self.updateThemeAllowed = True
|
||||||
QtCore.QObject.connect(self.backgroundTypeComboBox,
|
QtCore.QObject.connect(self.backgroundTypeComboBox,
|
||||||
QtCore.SIGNAL(u'currentIndexChanged(int)'),
|
QtCore.SIGNAL(u'currentIndexChanged(int)'),
|
||||||
self.onBackgroundComboBox)
|
self.onBackgroundComboBox)
|
||||||
QtCore.QObject.connect(self.gradientComboBox,
|
QtCore.QObject.connect(self.gradientComboBox,
|
||||||
QtCore.SIGNAL(u'currentIndexChanged(int)'),
|
QtCore.SIGNAL(u'currentIndexChanged(int)'),
|
||||||
self.onGradientComboBox)
|
self.onGradientComboBox)
|
||||||
QtCore.QObject.connect(self.color1PushButton,
|
QtCore.QObject.connect(self.colorButton,
|
||||||
QtCore.SIGNAL(u'pressed()'),
|
QtCore.SIGNAL(u'pressed()'),
|
||||||
self.onColor1PushButtonClicked)
|
self.onColorButtonClicked)
|
||||||
QtCore.QObject.connect(self.color2PushButton,
|
QtCore.QObject.connect(self.gradientStartButton,
|
||||||
QtCore.SIGNAL(u'pressed()'),
|
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.QObject.connect(self.imageBrowseButton,
|
||||||
QtCore.SIGNAL(u'pressed()'),
|
QtCore.SIGNAL(u'pressed()'),
|
||||||
self.onImageBrowseButtonClicked)
|
self.onImageBrowseButtonClicked)
|
||||||
@ -157,15 +161,15 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
|
|||||||
self.backgroundPage.registerField(
|
self.backgroundPage.registerField(
|
||||||
u'background_type', self.backgroundTypeComboBox)
|
u'background_type', self.backgroundTypeComboBox)
|
||||||
self.backgroundPage.registerField(
|
self.backgroundPage.registerField(
|
||||||
u'color_1', self.color1PushButton)
|
u'color', self.colorButton)
|
||||||
self.backgroundPage.registerField(
|
self.backgroundPage.registerField(
|
||||||
u'color_2', self.color2PushButton)
|
u'grandient_start', self.gradientStartButton)
|
||||||
|
self.backgroundPage.registerField(
|
||||||
|
u'grandient_end', self.gradientEndButton)
|
||||||
self.backgroundPage.registerField(
|
self.backgroundPage.registerField(
|
||||||
u'background_image', self.imageLineEdit)
|
u'background_image', self.imageLineEdit)
|
||||||
self.backgroundPage.registerField(
|
self.backgroundPage.registerField(
|
||||||
u'gradient', self.gradientComboBox)
|
u'gradient', self.gradientComboBox)
|
||||||
self.mainAreaPage.registerField(
|
|
||||||
u'mainFontComboBox', self.mainFontComboBox)
|
|
||||||
self.mainAreaPage.registerField(
|
self.mainAreaPage.registerField(
|
||||||
u'mainColorPushButton', self.mainColorPushButton)
|
u'mainColorPushButton', self.mainColorPushButton)
|
||||||
self.mainAreaPage.registerField(
|
self.mainAreaPage.registerField(
|
||||||
@ -281,11 +285,15 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
|
|||||||
self.footerHeightSpinBox.setEnabled(self.theme.font_footer_override)
|
self.footerHeightSpinBox.setEnabled(self.theme.font_footer_override)
|
||||||
self.footerWidthSpinBox.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.
|
Run the wizard.
|
||||||
"""
|
"""
|
||||||
|
self.updateThemeAllowed = False
|
||||||
self.setDefaults()
|
self.setDefaults()
|
||||||
|
self.updateThemeAllowed = True
|
||||||
|
if edit:
|
||||||
|
self.next()
|
||||||
return QtGui.QWizard.exec_(self)
|
return QtGui.QWizard.exec_(self)
|
||||||
|
|
||||||
def initializePage(self, id):
|
def initializePage(self, id):
|
||||||
@ -311,54 +319,19 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
|
|||||||
"""
|
"""
|
||||||
if self.theme.background_type == \
|
if self.theme.background_type == \
|
||||||
BackgroundType.to_string(BackgroundType.Solid):
|
BackgroundType.to_string(BackgroundType.Solid):
|
||||||
self.setField(u'background_type', QtCore.QVariant(0))
|
self.colorButton.setStyleSheet(u'background-color: %s' %
|
||||||
self.color1PushButton.setVisible(True)
|
|
||||||
self.color1Label.setVisible(True)
|
|
||||||
self.color1PushButton.setStyleSheet(u'background-color: %s' %
|
|
||||||
self.theme.background_color)
|
self.theme.background_color)
|
||||||
self.color1Label.setText(
|
self.setField(u'background_type', QtCore.QVariant(0))
|
||||||
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'')
|
|
||||||
elif self.theme.background_type == \
|
elif self.theme.background_type == \
|
||||||
BackgroundType.to_string(BackgroundType.Gradient):
|
BackgroundType.to_string(BackgroundType.Gradient):
|
||||||
self.setField(u'background_type', QtCore.QVariant(1))
|
self.gradientStartButton.setStyleSheet(u'background-color: %s' %
|
||||||
self.color1PushButton.setVisible(True)
|
|
||||||
self.color1Label.setVisible(True)
|
|
||||||
self.color1PushButton.setStyleSheet(u'background-color: %s' %
|
|
||||||
self.theme.background_start_color)
|
self.theme.background_start_color)
|
||||||
self.color1Label.setText(
|
self.gradientEndButton.setStyleSheet(u'background-color: %s' %
|
||||||
translate('OpenLP.ThemeForm', 'First color:'))
|
|
||||||
self.color2PushButton.setVisible(True)
|
|
||||||
self.color2Label.setVisible(True)
|
|
||||||
self.color2PushButton.setStyleSheet(u'background-color: %s' %
|
|
||||||
self.theme.background_end_color)
|
self.theme.background_end_color)
|
||||||
self.color2Label.setText(
|
self.setField(u'background_type', QtCore.QVariant(1))
|
||||||
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'')
|
|
||||||
else:
|
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.imageLineEdit.setText(self.theme.background_filename)
|
||||||
|
self.setField(u'background_type', QtCore.QVariant(2))
|
||||||
if self.theme.background_direction == \
|
if self.theme.background_direction == \
|
||||||
BackgroundGradientType.to_string(BackgroundGradientType.Horizontal):
|
BackgroundGradientType.to_string(BackgroundGradientType.Horizontal):
|
||||||
self.setField(u'gradient', QtCore.QVariant(0))
|
self.setField(u'gradient', QtCore.QVariant(0))
|
||||||
@ -491,20 +464,23 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
|
|||||||
BackgroundGradientType.to_string(index)
|
BackgroundGradientType.to_string(index)
|
||||||
self.setBackgroundTabValues()
|
self.setBackgroundTabValues()
|
||||||
|
|
||||||
def onColor1PushButtonClicked(self):
|
def onColorButtonClicked(self):
|
||||||
"""
|
"""
|
||||||
Background / Gradient 1 Color button pushed.
|
Background / Gradient 1 Color button pushed.
|
||||||
"""
|
"""
|
||||||
if self.theme.background_type == \
|
|
||||||
BackgroundType.to_string(BackgroundType.Solid):
|
|
||||||
self.theme.background_color = \
|
self.theme.background_color = \
|
||||||
self._colorButton(self.theme.background_color)
|
self._colorButton(self.theme.background_color)
|
||||||
else:
|
self.setBackgroundTabValues()
|
||||||
|
|
||||||
|
def onGradientStartButtonClicked(self):
|
||||||
|
"""
|
||||||
|
Gradient 2 Color button pushed.
|
||||||
|
"""
|
||||||
self.theme.background_start_color = \
|
self.theme.background_start_color = \
|
||||||
self._colorButton(self.theme.background_start_color)
|
self._colorButton(self.theme.background_start_color)
|
||||||
self.setBackgroundTabValues()
|
self.setBackgroundTabValues()
|
||||||
|
|
||||||
def onColor2PushButtonClicked(self):
|
def onGradientEndButtonClicked(self):
|
||||||
"""
|
"""
|
||||||
Gradient 2 Color button pushed.
|
Gradient 2 Color button pushed.
|
||||||
"""
|
"""
|
||||||
@ -526,12 +502,6 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
|
|||||||
self.theme.background_filename = unicode(filename)
|
self.theme.background_filename = unicode(filename)
|
||||||
self.setBackgroundTabValues()
|
self.setBackgroundTabValues()
|
||||||
|
|
||||||
def onMainFontComboBox(self):
|
|
||||||
"""
|
|
||||||
Main Font Combo box changed
|
|
||||||
"""
|
|
||||||
self.theme.font_main_name = self.mainFontComboBox.currentFont().family()
|
|
||||||
|
|
||||||
def onMainColourPushButtonClicked(self):
|
def onMainColourPushButtonClicked(self):
|
||||||
self.theme.font_main_color = \
|
self.theme.font_main_color = \
|
||||||
self._colorButton(self.theme.font_main_color)
|
self._colorButton(self.theme.font_main_color)
|
||||||
@ -557,6 +527,8 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
|
|||||||
Update the theme object from the UI for fields not already updated
|
Update the theme object from the UI for fields not already updated
|
||||||
when the are changed.
|
when the are changed.
|
||||||
"""
|
"""
|
||||||
|
if not self.updateThemeAllowed:
|
||||||
|
return
|
||||||
log.debug(u'updateTheme')
|
log.debug(u'updateTheme')
|
||||||
# main page
|
# main page
|
||||||
self.theme.font_main_name = \
|
self.theme.font_main_name = \
|
||||||
@ -606,7 +578,6 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
|
|||||||
# Hack to stop it for now.
|
# Hack to stop it for now.
|
||||||
if self.accepted:
|
if self.accepted:
|
||||||
return
|
return
|
||||||
self.accepted = True
|
|
||||||
# Save the theme name
|
# Save the theme name
|
||||||
self.theme.theme_name = \
|
self.theme.theme_name = \
|
||||||
unicode(self.field(u'name').toString())
|
unicode(self.field(u'name').toString())
|
||||||
@ -628,6 +599,7 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
|
|||||||
(QtGui.QMessageBox.Ok),
|
(QtGui.QMessageBox.Ok),
|
||||||
QtGui.QMessageBox.Ok)
|
QtGui.QMessageBox.Ok)
|
||||||
return
|
return
|
||||||
|
self.accepted = True
|
||||||
saveFrom = None
|
saveFrom = None
|
||||||
saveTo = None
|
saveTo = None
|
||||||
if self.theme.background_type == \
|
if self.theme.background_type == \
|
||||||
|
@ -280,7 +280,7 @@ class ThemeManager(QtGui.QWidget):
|
|||||||
self.saveThemeName = unicode(
|
self.saveThemeName = unicode(
|
||||||
item.data(QtCore.Qt.UserRole).toString())
|
item.data(QtCore.Qt.UserRole).toString())
|
||||||
self.themeForm.theme = theme
|
self.themeForm.theme = theme
|
||||||
self.themeForm.exec_()
|
self.themeForm.exec_(True)
|
||||||
|
|
||||||
def onDeleteTheme(self):
|
def onDeleteTheme(self):
|
||||||
"""
|
"""
|
||||||
@ -627,7 +627,8 @@ class ThemeManager(QtGui.QWidget):
|
|||||||
newtheme.font_main_shadow_color = unicode(theme.ShadowColor.name())
|
newtheme.font_main_shadow_color = unicode(theme.ShadowColor.name())
|
||||||
if theme.Outline == 1:
|
if theme.Outline == 1:
|
||||||
newtheme.font_main_outline = True
|
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
|
vAlignCorrection = 0
|
||||||
if theme.VerticalAlign == 2:
|
if theme.VerticalAlign == 2:
|
||||||
vAlignCorrection = 1
|
vAlignCorrection = 1
|
||||||
@ -749,7 +750,7 @@ class ThemeManager(QtGui.QWidget):
|
|||||||
Flag to tell message lines per page need to be generated.
|
Flag to tell message lines per page need to be generated.
|
||||||
"""
|
"""
|
||||||
log.debug(u'generateImage \n%s ', themeData)
|
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):
|
def getPreviewImage(self, theme):
|
||||||
"""
|
"""
|
||||||
|
@ -153,7 +153,7 @@ class ThemesTab(SettingsTab):
|
|||||||
settings.setValue(u'global theme',
|
settings.setValue(u'global theme',
|
||||||
QtCore.QVariant(self.global_theme))
|
QtCore.QVariant(self.global_theme))
|
||||||
settings.endGroup()
|
settings.endGroup()
|
||||||
self.parent.RenderManager.set_global_theme(
|
self.parent.renderManager.set_global_theme(
|
||||||
self.global_theme, self.theme_level)
|
self.global_theme, self.theme_level)
|
||||||
Receiver.send_message(u'theme_update_global', self.global_theme)
|
Receiver.send_message(u'theme_update_global', self.global_theme)
|
||||||
|
|
||||||
@ -171,7 +171,7 @@ class ThemesTab(SettingsTab):
|
|||||||
|
|
||||||
def onDefaultComboBoxChanged(self, value):
|
def onDefaultComboBoxChanged(self, value):
|
||||||
self.global_theme = unicode(self.DefaultComboBox.currentText())
|
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)
|
self.global_theme, self.theme_level)
|
||||||
image = self.parent.ThemeManagerContents.getPreviewImage(
|
image = self.parent.ThemeManagerContents.getPreviewImage(
|
||||||
self.global_theme)
|
self.global_theme)
|
||||||
@ -183,9 +183,14 @@ class ThemesTab(SettingsTab):
|
|||||||
|
|
||||||
def updateThemeList(self, theme_list):
|
def updateThemeList(self, theme_list):
|
||||||
"""
|
"""
|
||||||
Called from ThemeManager when the Themes have changed
|
Called from ThemeManager when the Themes have changed.
|
||||||
|
|
||||||
|
``theme_list``
|
||||||
|
The list of available themes::
|
||||||
|
|
||||||
|
[u'Bible Theme', u'Song Theme']
|
||||||
"""
|
"""
|
||||||
#reload as may have been triggered by the ThemeManager
|
# Reload as may have been triggered by the ThemeManager.
|
||||||
self.global_theme = unicode(QtCore.QSettings().value(
|
self.global_theme = unicode(QtCore.QSettings().value(
|
||||||
self.settingsSection + u'/global theme',
|
self.settingsSection + u'/global theme',
|
||||||
QtCore.QVariant(u'')).toString())
|
QtCore.QVariant(u'')).toString())
|
||||||
@ -198,7 +203,7 @@ class ThemesTab(SettingsTab):
|
|||||||
id = 0 # Not Found
|
id = 0 # Not Found
|
||||||
self.global_theme = u''
|
self.global_theme = u''
|
||||||
self.DefaultComboBox.setCurrentIndex(id)
|
self.DefaultComboBox.setCurrentIndex(id)
|
||||||
self.parent.RenderManager.set_global_theme(
|
self.parent.renderManager.set_global_theme(
|
||||||
self.global_theme, self.theme_level)
|
self.global_theme, self.theme_level)
|
||||||
if self.global_theme is not u'':
|
if self.global_theme is not u'':
|
||||||
image = self.parent.ThemeManagerContents.getPreviewImage(
|
image = self.parent.ThemeManagerContents.getPreviewImage(
|
||||||
|
@ -30,135 +30,216 @@ from openlp.core.lib import translate, build_icon
|
|||||||
|
|
||||||
class Ui_ThemeWizard(object):
|
class Ui_ThemeWizard(object):
|
||||||
def setupUi(self, ThemeWizard):
|
def setupUi(self, ThemeWizard):
|
||||||
ThemeWizard.setObjectName(u'ThemeWizard')
|
ThemeWizard.setObjectName(u'OpenLP.ThemeWizard')
|
||||||
ThemeWizard.resize(550, 386)
|
ThemeWizard.resize(550, 386)
|
||||||
ThemeWizard.setModal(True)
|
ThemeWizard.setModal(True)
|
||||||
ThemeWizard.setWizardStyle(QtGui.QWizard.ModernStyle)
|
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 = QtGui.QWizardPage()
|
||||||
self.welcomePage.setTitle(u'')
|
self.welcomePage.setTitle(u'')
|
||||||
self.welcomePage.setSubTitle(u'')
|
self.welcomePage.setSubTitle(u'')
|
||||||
self.welcomePage.setObjectName(u'welcomePage')
|
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 = QtGui.QHBoxLayout(self.welcomePage)
|
||||||
self.welcomeLayout.setSpacing(8)
|
self.welcomeLayout.setSpacing(8)
|
||||||
self.welcomeLayout.setMargin(0)
|
self.welcomeLayout.setMargin(0)
|
||||||
self.welcomeLayout.setObjectName(u'welcomeLayout')
|
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 = QtGui.QVBoxLayout()
|
||||||
self.welcomePageLayout.setSpacing(8)
|
self.welcomePageLayout.setSpacing(8)
|
||||||
self.welcomePageLayout.setObjectName(u'welcomePageLayout')
|
self.welcomePageLayout.setObjectName(u'welcomePageLayout')
|
||||||
self.titleLabel = QtGui.QLabel(self.welcomePage)
|
self.titleLabel = QtGui.QLabel(self.welcomePage)
|
||||||
self.titleLabel.setObjectName(u'titleLabel')
|
self.titleLabel.setObjectName(u'titleLabel')
|
||||||
self.welcomePageLayout.addWidget(self.titleLabel)
|
self.welcomePageLayout.addWidget(self.titleLabel)
|
||||||
spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
|
self.welcomeTopSpacer = QtGui.QSpacerItem(20, 40,
|
||||||
self.welcomePageLayout.addItem(spacerItem)
|
QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
|
||||||
|
self.welcomePageLayout.addItem(self.welcomeTopSpacer)
|
||||||
self.informationLabel = QtGui.QLabel(self.welcomePage)
|
self.informationLabel = QtGui.QLabel(self.welcomePage)
|
||||||
self.informationLabel.setWordWrap(True)
|
self.informationLabel.setWordWrap(True)
|
||||||
self.informationLabel.setMargin(10)
|
self.informationLabel.setMargin(10)
|
||||||
self.informationLabel.setObjectName(u'informationLabel')
|
self.informationLabel.setObjectName(u'informationLabel')
|
||||||
self.welcomePageLayout.addWidget(self.informationLabel)
|
self.welcomePageLayout.addWidget(self.informationLabel)
|
||||||
spacerItem1 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
|
self.welcomeBottomSpacer = QtGui.QSpacerItem(20, 40,
|
||||||
self.welcomePageLayout.addItem(spacerItem1)
|
QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
|
||||||
|
self.welcomePageLayout.addItem(self.welcomeBottomSpacer)
|
||||||
self.welcomeLayout.addLayout(self.welcomePageLayout)
|
self.welcomeLayout.addLayout(self.welcomePageLayout)
|
||||||
ThemeWizard.addPage(self.welcomePage)
|
ThemeWizard.addPage(self.welcomePage)
|
||||||
self.backgroundPage = QtGui.QWizardPage()
|
self.backgroundPage = QtGui.QWizardPage()
|
||||||
self.backgroundPage.setObjectName(u'backgroundPage')
|
self.backgroundPage.setObjectName(u'backgroundPage')
|
||||||
self.backgroundLayout = QtGui.QFormLayout(self.backgroundPage)
|
self.backgroundLayout = QtGui.QVBoxLayout(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.setSpacing(8)
|
self.backgroundLayout.setSpacing(8)
|
||||||
|
self.backgroundLayout.setMargin(20)
|
||||||
self.backgroundLayout.setObjectName(u'backgroundLayout')
|
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 = QtGui.QLabel(self.backgroundPage)
|
||||||
self.backgroundTypeLabel.setObjectName(u'backgroundTypeLabel')
|
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 = QtGui.QComboBox(self.backgroundPage)
|
||||||
self.backgroundTypeComboBox.setObjectName(u'backgroundTypeComboBox')
|
self.backgroundTypeComboBox.setObjectName(u'backgroundTypeComboBox')
|
||||||
self.backgroundTypeComboBox.addItem(u'')
|
self.backgroundTypeComboBox.addItem(u'')
|
||||||
self.backgroundTypeComboBox.addItem(u'')
|
self.backgroundTypeComboBox.addItem(u'')
|
||||||
self.backgroundTypeComboBox.addItem(u'')
|
self.backgroundTypeComboBox.addItem(u'')
|
||||||
self.backgroundLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.backgroundTypeComboBox)
|
self.backgroundTypeLayout.addWidget(self.backgroundTypeComboBox)
|
||||||
self.color1Label = QtGui.QLabel(self.backgroundPage)
|
self.backgroundTypeSpacer = QtGui.QSpacerItem(40, 20,
|
||||||
self.color1Label.setObjectName(u'color1Label')
|
QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
|
||||||
self.backgroundLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.color1Label)
|
self.backgroundTypeLayout.addItem(self.backgroundTypeSpacer)
|
||||||
self.color1PushButton = QtGui.QPushButton(self.backgroundPage)
|
self.backgroundLayout.addLayout(self.backgroundTypeLayout)
|
||||||
self.color1PushButton.setText(u'')
|
self.backgroundStackedWidget = QtGui.QStackedWidget(
|
||||||
self.color1PushButton.setObjectName(u'color1PushButton')
|
self.backgroundPage)
|
||||||
self.backgroundLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.color1PushButton)
|
self.backgroundStackedWidget.setObjectName(u'backgroundStackedWidget')
|
||||||
self.color2Label = QtGui.QLabel(self.backgroundPage)
|
self.colorPage = QtGui.QWidget()
|
||||||
self.color2Label.setObjectName(u'color2Label')
|
self.colorPage.setObjectName(u'colorPage')
|
||||||
self.backgroundLayout.setWidget(2, QtGui.QFormLayout.LabelRole, self.color2Label)
|
self.colorLayout = QtGui.QFormLayout(self.colorPage)
|
||||||
self.color2PushButton = QtGui.QPushButton(self.backgroundPage)
|
self.colorLayout.setMargin(0)
|
||||||
self.color2PushButton.setText(u'')
|
self.colorLayout.setSpacing(8)
|
||||||
self.color2PushButton.setObjectName(u'color2PushButton')
|
self.colorLayout.setObjectName(u'colorLayout')
|
||||||
self.backgroundLayout.setWidget(2, QtGui.QFormLayout.FieldRole, self.color2PushButton)
|
self.colorLabel = QtGui.QLabel(self.colorPage)
|
||||||
self.imageLabel = QtGui.QLabel(self.backgroundPage)
|
self.colorLabel.setMinimumSize(QtCore.QSize(103, 0))
|
||||||
self.imageLabel.setObjectName(u'imageLabel')
|
self.colorLabel.setAlignment(QtCore.Qt.AlignRight |
|
||||||
self.backgroundLayout.setWidget(3, QtGui.QFormLayout.LabelRole, self.imageLabel)
|
QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter)
|
||||||
self.imageLayout = QtGui.QHBoxLayout()
|
self.colorLabel.setObjectName(u'colorLabel')
|
||||||
self.imageLayout.setSpacing(8)
|
self.colorLayout.setWidget(0,
|
||||||
self.imageLayout.setObjectName(u'imageLayout')
|
QtGui.QFormLayout.LabelRole, self.colorLabel)
|
||||||
self.imageLineEdit = QtGui.QLineEdit(self.backgroundPage)
|
self.colorButton = QtGui.QPushButton(self.colorPage)
|
||||||
self.imageLineEdit.setObjectName(u'imageLineEdit')
|
self.colorButton.setText(u'')
|
||||||
self.imageLayout.addWidget(self.imageLineEdit)
|
self.colorButton.setObjectName(u'colorButton')
|
||||||
self.imageBrowseButton = QtGui.QToolButton(self.backgroundPage)
|
self.colorLayout.setWidget(0,
|
||||||
self.imageBrowseButton.setText(u'')
|
QtGui.QFormLayout.FieldRole, self.colorButton)
|
||||||
self.imageBrowseButton.setIcon(build_icon(u':/general/general_open.png'))
|
self.backgroundStackedWidget.addWidget(self.colorPage)
|
||||||
self.imageBrowseButton.setObjectName(u'imageBrowseButton')
|
self.gradientPage = QtGui.QWidget()
|
||||||
self.imageLayout.addWidget(self.imageBrowseButton)
|
self.gradientPage.setObjectName(u'gradientPage')
|
||||||
self.backgroundLayout.setLayout(3, QtGui.QFormLayout.FieldRole, self.imageLayout)
|
self.gradientLayout = QtGui.QFormLayout(self.gradientPage)
|
||||||
self.gradientLabel = QtGui.QLabel(self.backgroundPage)
|
self.gradientLayout.setMargin(0)
|
||||||
self.gradientLabel.setObjectName(u'gradientLabel')
|
self.gradientLayout.setSpacing(8)
|
||||||
self.backgroundLayout.setWidget(4, QtGui.QFormLayout.LabelRole, self.gradientLabel)
|
self.gradientLayout.setObjectName(u'gradientLayout')
|
||||||
self.gradientComboBox = QtGui.QComboBox(self.backgroundPage)
|
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.setObjectName(u'gradientComboBox')
|
||||||
self.gradientComboBox.addItem(u'')
|
self.gradientComboBox.addItem(u'')
|
||||||
self.gradientComboBox.addItem(u'')
|
self.gradientComboBox.addItem(u'')
|
||||||
self.gradientComboBox.addItem(u'')
|
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)
|
ThemeWizard.addPage(self.backgroundPage)
|
||||||
self.mainAreaPage = QtGui.QWizardPage()
|
self.mainAreaPage = QtGui.QWizardPage()
|
||||||
self.mainAreaPage.setObjectName(u'mainAreaPage')
|
self.mainAreaPage.setObjectName(u'mainAreaPage')
|
||||||
self.formLayout = QtGui.QFormLayout(self.mainAreaPage)
|
self.mainAreaLayout = QtGui.QFormLayout(self.mainAreaPage)
|
||||||
self.formLayout.setFormAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
|
self.mainAreaLayout.setFormAlignment(QtCore.Qt.AlignLeading |
|
||||||
self.formLayout.setContentsMargins(-1, 20, 20, 20)
|
QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop)
|
||||||
self.formLayout.setSpacing(8)
|
self.mainAreaLayout.setMargin(20)
|
||||||
self.formLayout.setObjectName(u'formLayout')
|
self.mainAreaLayout.setSpacing(8)
|
||||||
|
self.mainAreaLayout.setObjectName(u'mainAreaLayout')
|
||||||
self.mainFontLabel = QtGui.QLabel(self.mainAreaPage)
|
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.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 = QtGui.QFontComboBox(self.mainAreaPage)
|
||||||
self.mainFontComboBox.setObjectName(u'mainFontComboBox')
|
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 = QtGui.QLabel(self.mainAreaPage)
|
||||||
self.mainColorLabel.setObjectName(u'mainColorLabel')
|
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 = QtGui.QPushButton(self.mainAreaPage)
|
||||||
self.mainColorPushButton.setText(u'')
|
self.mainColorPushButton.setText(u'')
|
||||||
self.mainColorPushButton.setObjectName(u'mainColorPushButton')
|
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 = QtGui.QLabel(self.mainAreaPage)
|
||||||
self.mainSizeLabel.setObjectName(u'mainSizeLabel')
|
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 = QtGui.QHBoxLayout()
|
||||||
self.mainSizeLayout.setSpacing(8)
|
self.mainSizeLayout.setSpacing(8)
|
||||||
self.mainSizeLayout.setMargin(0)
|
self.mainSizeLayout.setMargin(0)
|
||||||
self.mainSizeLayout.setObjectName(u'mainSizeLayout')
|
self.mainSizeLayout.setObjectName(u'mainSizeLayout')
|
||||||
self.mainSizeSpinBox = QtGui.QSpinBox(self.mainAreaPage)
|
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.setHorizontalStretch(0)
|
||||||
sizePolicy.setVerticalStretch(0)
|
sizePolicy.setVerticalStretch(0)
|
||||||
sizePolicy.setHeightForWidth(self.mainSizeSpinBox.sizePolicy().hasHeightForWidth())
|
sizePolicy.setHeightForWidth(
|
||||||
|
self.mainSizeSpinBox.sizePolicy().hasHeightForWidth())
|
||||||
self.mainSizeSpinBox.setSizePolicy(sizePolicy)
|
self.mainSizeSpinBox.setSizePolicy(sizePolicy)
|
||||||
self.mainSizeSpinBox.setMinimumSize(QtCore.QSize(70, 0))
|
self.mainSizeSpinBox.setMinimumSize(QtCore.QSize(70, 0))
|
||||||
self.mainSizeSpinBox.setMaximum(999)
|
self.mainSizeSpinBox.setMaximum(999)
|
||||||
@ -168,18 +249,22 @@ class Ui_ThemeWizard(object):
|
|||||||
self.mainLineCountLabel = QtGui.QLabel(self.mainAreaPage)
|
self.mainLineCountLabel = QtGui.QLabel(self.mainAreaPage)
|
||||||
self.mainLineCountLabel.setObjectName(u'mainLineCountLabel')
|
self.mainLineCountLabel.setObjectName(u'mainLineCountLabel')
|
||||||
self.mainSizeLayout.addWidget(self.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 = QtGui.QLabel(self.mainAreaPage)
|
||||||
self.lineSpacingLabel.setObjectName(u'lineSpacingLabel')
|
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 = QtGui.QSpinBox(self.mainAreaPage)
|
||||||
self.lineSpacingSpinBox.setMinimum(-50)
|
self.lineSpacingSpinBox.setMinimum(-50)
|
||||||
self.lineSpacingSpinBox.setMaximum(50)
|
self.lineSpacingSpinBox.setMaximum(50)
|
||||||
self.lineSpacingSpinBox.setObjectName(u'lineSpacingSpinBox')
|
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 = QtGui.QCheckBox(self.mainAreaPage)
|
||||||
self.outlineCheckBox.setObjectName(u'outlineCheckBox')
|
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 = QtGui.QHBoxLayout()
|
||||||
self.outlineLayout.setObjectName(u'outlineLayout')
|
self.outlineLayout.setObjectName(u'outlineLayout')
|
||||||
self.outlineColorPushButton = QtGui.QPushButton(self.mainAreaPage)
|
self.outlineColorPushButton = QtGui.QPushButton(self.mainAreaPage)
|
||||||
@ -193,10 +278,12 @@ class Ui_ThemeWizard(object):
|
|||||||
self.outlineSizeSpinBox = QtGui.QSpinBox(self.mainAreaPage)
|
self.outlineSizeSpinBox = QtGui.QSpinBox(self.mainAreaPage)
|
||||||
self.outlineSizeSpinBox.setObjectName(u'outlineSizeSpinBox')
|
self.outlineSizeSpinBox.setObjectName(u'outlineSizeSpinBox')
|
||||||
self.outlineLayout.addWidget(self.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 = QtGui.QCheckBox(self.mainAreaPage)
|
||||||
self.shadowCheckBox.setObjectName(u'shadowCheckBox')
|
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 = QtGui.QHBoxLayout()
|
||||||
self.shadowLayout.setObjectName(u'shadowLayout')
|
self.shadowLayout.setObjectName(u'shadowLayout')
|
||||||
self.shadowColorPushButton = QtGui.QPushButton(self.mainAreaPage)
|
self.shadowColorPushButton = QtGui.QPushButton(self.mainAreaPage)
|
||||||
@ -210,83 +297,99 @@ class Ui_ThemeWizard(object):
|
|||||||
self.shadowSizeSpinBox = QtGui.QSpinBox(self.mainAreaPage)
|
self.shadowSizeSpinBox = QtGui.QSpinBox(self.mainAreaPage)
|
||||||
self.shadowSizeSpinBox.setObjectName(u'shadowSizeSpinBox')
|
self.shadowSizeSpinBox.setObjectName(u'shadowSizeSpinBox')
|
||||||
self.shadowLayout.addWidget(self.shadowSizeSpinBox)
|
self.shadowLayout.addWidget(self.shadowSizeSpinBox)
|
||||||
self.formLayout.setLayout(5, QtGui.QFormLayout.FieldRole, self.shadowLayout)
|
self.mainAreaLayout.setLayout(5,
|
||||||
self.boldCheckBox = QtGui.QCheckBox(self.mainAreaPage)
|
QtGui.QFormLayout.FieldRole, self.shadowLayout)
|
||||||
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)
|
|
||||||
ThemeWizard.addPage(self.mainAreaPage)
|
ThemeWizard.addPage(self.mainAreaPage)
|
||||||
self.footerAreaPage = QtGui.QWizardPage()
|
self.footerAreaPage = QtGui.QWizardPage()
|
||||||
self.footerAreaPage.setObjectName(u'footerAreaPage')
|
self.footerAreaPage.setObjectName(u'footerAreaPage')
|
||||||
self.footerLayout = QtGui.QFormLayout(self.footerAreaPage)
|
self.footerLayout = QtGui.QFormLayout(self.footerAreaPage)
|
||||||
self.footerLayout.setFieldGrowthPolicy(QtGui.QFormLayout.ExpandingFieldsGrow)
|
self.footerLayout.setFieldGrowthPolicy(
|
||||||
self.footerLayout.setContentsMargins(50, 20, 20, 20)
|
QtGui.QFormLayout.ExpandingFieldsGrow)
|
||||||
|
self.footerLayout.setMargin(20)
|
||||||
self.footerLayout.setSpacing(8)
|
self.footerLayout.setSpacing(8)
|
||||||
self.footerLayout.setObjectName(u'footerLayout')
|
self.footerLayout.setObjectName(u'footerLayout')
|
||||||
self.footerFontLabel = QtGui.QLabel(self.footerAreaPage)
|
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.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 = QtGui.QFontComboBox(self.footerAreaPage)
|
||||||
self.footerFontComboBox.setObjectName(u'footerFontComboBox')
|
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 = QtGui.QLabel(self.footerAreaPage)
|
||||||
self.footerColorLabel.setObjectName(u'footerColorLabel')
|
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 = QtGui.QPushButton(self.footerAreaPage)
|
||||||
self.footerColorPushButton.setText(u'')
|
self.footerColorPushButton.setText(u'')
|
||||||
self.footerColorPushButton.setObjectName(u'footerColorPushButton')
|
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 = QtGui.QLabel(self.footerAreaPage)
|
||||||
self.footerSizeLabel.setObjectName(u'footerSizeLabel')
|
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)
|
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.setHorizontalStretch(0)
|
||||||
sizePolicy.setVerticalStretch(0)
|
sizePolicy.setVerticalStretch(0)
|
||||||
sizePolicy.setHeightForWidth(self.footerSizeSpinBox.sizePolicy().hasHeightForWidth())
|
sizePolicy.setHeightForWidth(
|
||||||
|
self.footerSizeSpinBox.sizePolicy().hasHeightForWidth())
|
||||||
self.footerSizeSpinBox.setSizePolicy(sizePolicy)
|
self.footerSizeSpinBox.setSizePolicy(sizePolicy)
|
||||||
self.footerSizeSpinBox.setMinimumSize(QtCore.QSize(70, 0))
|
self.footerSizeSpinBox.setMinimumSize(QtCore.QSize(70, 0))
|
||||||
self.footerSizeSpinBox.setMaximum(999)
|
self.footerSizeSpinBox.setMaximum(999)
|
||||||
self.footerSizeSpinBox.setProperty(u'value', 10)
|
self.footerSizeSpinBox.setProperty(u'value', 10)
|
||||||
self.footerSizeSpinBox.setObjectName(u'footerSizeSpinBox')
|
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)
|
ThemeWizard.addPage(self.footerAreaPage)
|
||||||
self.alignmentPage = QtGui.QWizardPage()
|
self.alignmentPage = QtGui.QWizardPage()
|
||||||
self.alignmentPage.setObjectName(u'alignmentPage')
|
self.alignmentPage.setObjectName(u'alignmentPage')
|
||||||
self.formLayout_2 = QtGui.QFormLayout(self.alignmentPage)
|
self.alignmentLayout = QtGui.QFormLayout(self.alignmentPage)
|
||||||
self.formLayout_2.setMargin(20)
|
self.alignmentLayout.setMargin(20)
|
||||||
self.formLayout_2.setObjectName(u'formLayout_2')
|
self.alignmentLayout.setSpacing(8)
|
||||||
|
self.alignmentLayout.setObjectName(u'alignmentLayout')
|
||||||
self.horizontalLabel = QtGui.QLabel(self.alignmentPage)
|
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.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 = QtGui.QComboBox(self.alignmentPage)
|
||||||
self.horizontalComboBox.setEditable(False)
|
self.horizontalComboBox.setEditable(False)
|
||||||
self.horizontalComboBox.setObjectName(u'horizontalComboBox')
|
self.horizontalComboBox.setObjectName(u'horizontalComboBox')
|
||||||
self.horizontalComboBox.addItem(u'')
|
self.horizontalComboBox.addItem(u'')
|
||||||
self.horizontalComboBox.addItem(u'')
|
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 = QtGui.QLabel(self.alignmentPage)
|
||||||
self.verticalLabel.setObjectName(u'verticalLabel')
|
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 = QtGui.QComboBox(self.alignmentPage)
|
||||||
self.verticalComboBox.setObjectName(u'verticalComboBox')
|
self.verticalComboBox.setObjectName(u'verticalComboBox')
|
||||||
self.verticalComboBox.addItem(u'')
|
self.verticalComboBox.addItem(u'')
|
||||||
self.verticalComboBox.addItem(u'')
|
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 = QtGui.QCheckBox(self.alignmentPage)
|
||||||
self.transitionsCheckBox.setObjectName(u'transitionsCheckBox')
|
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)
|
ThemeWizard.addPage(self.alignmentPage)
|
||||||
self.areaPositionPage = QtGui.QWizardPage()
|
self.areaPositionPage = QtGui.QWizardPage()
|
||||||
self.areaPositionPage.setObjectName(u'areaPositionPage')
|
self.areaPositionPage.setObjectName(u'areaPositionPage')
|
||||||
self.gridLayout_2 = QtGui.QGridLayout(self.areaPositionPage)
|
self.areaPositionLayout = QtGui.QGridLayout(self.areaPositionPage)
|
||||||
self.gridLayout_2.setMargin(20)
|
self.areaPositionLayout.setMargin(20)
|
||||||
self.gridLayout_2.setSpacing(8)
|
self.areaPositionLayout.setSpacing(8)
|
||||||
self.gridLayout_2.setObjectName(u'gridLayout_2')
|
self.areaPositionLayout.setObjectName(u'areaPositionLayout')
|
||||||
self.mainPositionGroupBox = QtGui.QGroupBox(self.areaPositionPage)
|
self.mainPositionGroupBox = QtGui.QGroupBox(self.areaPositionPage)
|
||||||
self.mainPositionGroupBox.setMinimumSize(QtCore.QSize(248, 0))
|
self.mainPositionGroupBox.setMinimumSize(QtCore.QSize(248, 0))
|
||||||
self.mainPositionGroupBox.setObjectName(u'mainPositionGroupBox')
|
self.mainPositionGroupBox.setObjectName(u'mainPositionGroupBox')
|
||||||
@ -294,254 +397,361 @@ class Ui_ThemeWizard(object):
|
|||||||
self.mainPositionLayout.setMargin(8)
|
self.mainPositionLayout.setMargin(8)
|
||||||
self.mainPositionLayout.setSpacing(8)
|
self.mainPositionLayout.setSpacing(8)
|
||||||
self.mainPositionLayout.setObjectName(u'mainPositionLayout')
|
self.mainPositionLayout.setObjectName(u'mainPositionLayout')
|
||||||
self.mainDefaultPositionCheckBox = QtGui.QCheckBox(self.mainPositionGroupBox)
|
self.mainDefaultPositionCheckBox = QtGui.QCheckBox(
|
||||||
|
self.mainPositionGroupBox)
|
||||||
self.mainDefaultPositionCheckBox.setChecked(True)
|
self.mainDefaultPositionCheckBox.setChecked(True)
|
||||||
self.mainDefaultPositionCheckBox.setTristate(False)
|
self.mainDefaultPositionCheckBox.setTristate(False)
|
||||||
self.mainDefaultPositionCheckBox.setObjectName(u'mainDefaultPositionCheckBox')
|
self.mainDefaultPositionCheckBox.setObjectName(
|
||||||
self.mainPositionLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.mainDefaultPositionCheckBox)
|
u'mainDefaultPositionCheckBox')
|
||||||
|
self.mainPositionLayout.setWidget(0, QtGui.QFormLayout.FieldRole,
|
||||||
|
self.mainDefaultPositionCheckBox)
|
||||||
self.nainXLabel = QtGui.QLabel(self.mainPositionGroupBox)
|
self.nainXLabel = QtGui.QLabel(self.mainPositionGroupBox)
|
||||||
self.nainXLabel.setObjectName(u'nainXLabel')
|
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 = QtGui.QSpinBox(self.mainPositionGroupBox)
|
||||||
self.mainXSpinBox.setEnabled(False)
|
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.setHorizontalStretch(0)
|
||||||
sizePolicy.setVerticalStretch(0)
|
sizePolicy.setVerticalStretch(0)
|
||||||
sizePolicy.setHeightForWidth(self.mainXSpinBox.sizePolicy().hasHeightForWidth())
|
sizePolicy.setHeightForWidth(
|
||||||
|
self.mainXSpinBox.sizePolicy().hasHeightForWidth())
|
||||||
self.mainXSpinBox.setSizePolicy(sizePolicy)
|
self.mainXSpinBox.setSizePolicy(sizePolicy)
|
||||||
self.mainXSpinBox.setMinimumSize(QtCore.QSize(78, 0))
|
self.mainXSpinBox.setMinimumSize(QtCore.QSize(78, 0))
|
||||||
self.mainXSpinBox.setMaximum(9999)
|
self.mainXSpinBox.setMaximum(9999)
|
||||||
self.mainXSpinBox.setProperty(u'value', 0)
|
self.mainXSpinBox.setProperty(u'value', 0)
|
||||||
self.mainXSpinBox.setObjectName(u'mainXSpinBox')
|
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 = QtGui.QSpinBox(self.mainPositionGroupBox)
|
||||||
self.mainYSpinBox.setEnabled(False)
|
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.setHorizontalStretch(0)
|
||||||
sizePolicy.setVerticalStretch(0)
|
sizePolicy.setVerticalStretch(0)
|
||||||
sizePolicy.setHeightForWidth(self.mainYSpinBox.sizePolicy().hasHeightForWidth())
|
sizePolicy.setHeightForWidth(
|
||||||
|
self.mainYSpinBox.sizePolicy().hasHeightForWidth())
|
||||||
self.mainYSpinBox.setSizePolicy(sizePolicy)
|
self.mainYSpinBox.setSizePolicy(sizePolicy)
|
||||||
self.mainYSpinBox.setMinimumSize(QtCore.QSize(78, 0))
|
self.mainYSpinBox.setMinimumSize(QtCore.QSize(78, 0))
|
||||||
self.mainYSpinBox.setMaximum(9999)
|
self.mainYSpinBox.setMaximum(9999)
|
||||||
self.mainYSpinBox.setObjectName(u'mainYSpinBox')
|
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 = QtGui.QLabel(self.mainPositionGroupBox)
|
||||||
self.mainYLabel.setObjectName(u'mainYLabel')
|
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 = QtGui.QSpinBox(self.mainPositionGroupBox)
|
||||||
self.mainWidthSpinBox.setEnabled(False)
|
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.setHorizontalStretch(0)
|
||||||
sizePolicy.setVerticalStretch(0)
|
sizePolicy.setVerticalStretch(0)
|
||||||
sizePolicy.setHeightForWidth(self.mainWidthSpinBox.sizePolicy().hasHeightForWidth())
|
sizePolicy.setHeightForWidth(
|
||||||
|
self.mainWidthSpinBox.sizePolicy().hasHeightForWidth())
|
||||||
self.mainWidthSpinBox.setSizePolicy(sizePolicy)
|
self.mainWidthSpinBox.setSizePolicy(sizePolicy)
|
||||||
self.mainWidthSpinBox.setMinimumSize(QtCore.QSize(78, 0))
|
self.mainWidthSpinBox.setMinimumSize(QtCore.QSize(78, 0))
|
||||||
self.mainWidthSpinBox.setMaximum(9999)
|
self.mainWidthSpinBox.setMaximum(9999)
|
||||||
self.mainWidthSpinBox.setObjectName(u'mainWidthSpinBox')
|
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 = QtGui.QLabel(self.mainPositionGroupBox)
|
||||||
self.mainWidthLabel.setObjectName(u'mainWidthLabel')
|
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 = QtGui.QSpinBox(self.mainPositionGroupBox)
|
||||||
self.mainHeightSpinBox.setEnabled(False)
|
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.setHorizontalStretch(0)
|
||||||
sizePolicy.setVerticalStretch(0)
|
sizePolicy.setVerticalStretch(0)
|
||||||
sizePolicy.setHeightForWidth(self.mainHeightSpinBox.sizePolicy().hasHeightForWidth())
|
sizePolicy.setHeightForWidth(
|
||||||
|
self.mainHeightSpinBox.sizePolicy().hasHeightForWidth())
|
||||||
self.mainHeightSpinBox.setSizePolicy(sizePolicy)
|
self.mainHeightSpinBox.setSizePolicy(sizePolicy)
|
||||||
self.mainHeightSpinBox.setMinimumSize(QtCore.QSize(78, 0))
|
self.mainHeightSpinBox.setMinimumSize(QtCore.QSize(78, 0))
|
||||||
self.mainHeightSpinBox.setMaximum(9999)
|
self.mainHeightSpinBox.setMaximum(9999)
|
||||||
self.mainHeightSpinBox.setObjectName(u'mainHeightSpinBox')
|
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 = QtGui.QLabel(self.mainPositionGroupBox)
|
||||||
self.mainHeightLabel.setObjectName(u'mainHeightLabel')
|
self.mainHeightLabel.setObjectName(u'mainHeightLabel')
|
||||||
self.mainPositionLayout.setWidget(4, QtGui.QFormLayout.LabelRole, self.mainHeightLabel)
|
self.mainPositionLayout.setWidget(4,
|
||||||
self.gridLayout_2.addWidget(self.mainPositionGroupBox, 1, 0, 1, 1)
|
QtGui.QFormLayout.LabelRole, self.mainHeightLabel)
|
||||||
|
self.areaPositionLayout.addWidget(
|
||||||
|
self.mainPositionGroupBox, 1, 0, 1, 1)
|
||||||
self.footerPositionGroupBox = QtGui.QGroupBox(self.areaPositionPage)
|
self.footerPositionGroupBox = QtGui.QGroupBox(self.areaPositionPage)
|
||||||
self.footerPositionGroupBox.setMinimumSize(QtCore.QSize(248, 0))
|
self.footerPositionGroupBox.setMinimumSize(QtCore.QSize(248, 0))
|
||||||
self.footerPositionGroupBox.setObjectName(u'footerPositionGroupBox')
|
self.footerPositionGroupBox.setObjectName(u'footerPositionGroupBox')
|
||||||
self.footerPositionLayout = QtGui.QFormLayout(self.footerPositionGroupBox)
|
self.footerPositionLayout = QtGui.QFormLayout(
|
||||||
|
self.footerPositionGroupBox)
|
||||||
self.footerPositionLayout.setMargin(8)
|
self.footerPositionLayout.setMargin(8)
|
||||||
self.footerPositionLayout.setSpacing(8)
|
self.footerPositionLayout.setSpacing(8)
|
||||||
self.footerPositionLayout.setObjectName(u'footerPositionLayout')
|
self.footerPositionLayout.setObjectName(u'footerPositionLayout')
|
||||||
self.footerXLabel = QtGui.QLabel(self.footerPositionGroupBox)
|
self.footerXLabel = QtGui.QLabel(self.footerPositionGroupBox)
|
||||||
self.footerXLabel.setObjectName(u'footerXLabel')
|
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 = QtGui.QSpinBox(self.footerPositionGroupBox)
|
||||||
self.footerXSpinBox.setEnabled(False)
|
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.setHorizontalStretch(0)
|
||||||
sizePolicy.setVerticalStretch(0)
|
sizePolicy.setVerticalStretch(0)
|
||||||
sizePolicy.setHeightForWidth(self.footerXSpinBox.sizePolicy().hasHeightForWidth())
|
sizePolicy.setHeightForWidth(
|
||||||
|
self.footerXSpinBox.sizePolicy().hasHeightForWidth())
|
||||||
self.footerXSpinBox.setSizePolicy(sizePolicy)
|
self.footerXSpinBox.setSizePolicy(sizePolicy)
|
||||||
self.footerXSpinBox.setMinimumSize(QtCore.QSize(78, 0))
|
self.footerXSpinBox.setMinimumSize(QtCore.QSize(78, 0))
|
||||||
self.footerXSpinBox.setMaximum(9999)
|
self.footerXSpinBox.setMaximum(9999)
|
||||||
self.footerXSpinBox.setProperty(u'value', 0)
|
self.footerXSpinBox.setProperty(u'value', 0)
|
||||||
self.footerXSpinBox.setObjectName(u'footerXSpinBox')
|
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 = QtGui.QLabel(self.footerPositionGroupBox)
|
||||||
self.footerYLabel.setObjectName(u'footerYLabel')
|
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 = QtGui.QSpinBox(self.footerPositionGroupBox)
|
||||||
self.footerYSpinBox.setEnabled(False)
|
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.setHorizontalStretch(0)
|
||||||
sizePolicy.setVerticalStretch(0)
|
sizePolicy.setVerticalStretch(0)
|
||||||
sizePolicy.setHeightForWidth(self.footerYSpinBox.sizePolicy().hasHeightForWidth())
|
sizePolicy.setHeightForWidth(
|
||||||
|
self.footerYSpinBox.sizePolicy().hasHeightForWidth())
|
||||||
self.footerYSpinBox.setSizePolicy(sizePolicy)
|
self.footerYSpinBox.setSizePolicy(sizePolicy)
|
||||||
self.footerYSpinBox.setMinimumSize(QtCore.QSize(78, 0))
|
self.footerYSpinBox.setMinimumSize(QtCore.QSize(78, 0))
|
||||||
self.footerYSpinBox.setMaximum(9999)
|
self.footerYSpinBox.setMaximum(9999)
|
||||||
self.footerYSpinBox.setProperty(u'value', 0)
|
self.footerYSpinBox.setProperty(u'value', 0)
|
||||||
self.footerYSpinBox.setObjectName(u'footerYSpinBox')
|
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 = QtGui.QLabel(self.footerPositionGroupBox)
|
||||||
self.footerWidthLabel.setObjectName(u'footerWidthLabel')
|
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 = QtGui.QSpinBox(self.footerPositionGroupBox)
|
||||||
self.footerWidthSpinBox.setEnabled(False)
|
self.footerWidthSpinBox.setEnabled(False)
|
||||||
self.footerWidthSpinBox.setMinimumSize(QtCore.QSize(78, 0))
|
self.footerWidthSpinBox.setMinimumSize(QtCore.QSize(78, 0))
|
||||||
self.footerWidthSpinBox.setMaximum(9999)
|
self.footerWidthSpinBox.setMaximum(9999)
|
||||||
self.footerWidthSpinBox.setObjectName(u'footerWidthSpinBox')
|
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 = QtGui.QLabel(self.footerPositionGroupBox)
|
||||||
self.footerHeightLabel.setObjectName(u'footerHeightLabel')
|
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 = QtGui.QSpinBox(self.footerPositionGroupBox)
|
||||||
self.footerHeightSpinBox.setEnabled(False)
|
self.footerHeightSpinBox.setEnabled(False)
|
||||||
self.footerHeightSpinBox.setMinimumSize(QtCore.QSize(78, 0))
|
self.footerHeightSpinBox.setMinimumSize(QtCore.QSize(78, 0))
|
||||||
self.footerHeightSpinBox.setMaximum(9999)
|
self.footerHeightSpinBox.setMaximum(9999)
|
||||||
self.footerHeightSpinBox.setObjectName(u'footerHeightSpinBox')
|
self.footerHeightSpinBox.setObjectName(u'footerHeightSpinBox')
|
||||||
self.footerPositionLayout.setWidget(4, QtGui.QFormLayout.FieldRole, self.footerHeightSpinBox)
|
self.footerPositionLayout.setWidget(4,
|
||||||
self.footerDefaultPositionCheckBox = QtGui.QCheckBox(self.footerPositionGroupBox)
|
QtGui.QFormLayout.FieldRole, self.footerHeightSpinBox)
|
||||||
|
self.footerDefaultPositionCheckBox = QtGui.QCheckBox(
|
||||||
|
self.footerPositionGroupBox)
|
||||||
self.footerDefaultPositionCheckBox.setChecked(True)
|
self.footerDefaultPositionCheckBox.setChecked(True)
|
||||||
self.footerDefaultPositionCheckBox.setObjectName(u'footerDefaultPositionCheckBox')
|
self.footerDefaultPositionCheckBox.setObjectName(
|
||||||
self.footerPositionLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.footerDefaultPositionCheckBox)
|
u'footerDefaultPositionCheckBox')
|
||||||
self.gridLayout_2.addWidget(self.footerPositionGroupBox, 1, 1, 1, 1)
|
self.footerPositionLayout.setWidget(0, QtGui.QFormLayout.FieldRole,
|
||||||
|
self.footerDefaultPositionCheckBox)
|
||||||
|
self.areaPositionLayout.addWidget(self.footerPositionGroupBox, 1, 1, 1, 1)
|
||||||
ThemeWizard.addPage(self.areaPositionPage)
|
ThemeWizard.addPage(self.areaPositionPage)
|
||||||
self.previewPage = QtGui.QWizardPage()
|
self.previewPage = QtGui.QWizardPage()
|
||||||
self.previewPage.setObjectName(u'previewPage')
|
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 = 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.setTextFormat(QtCore.Qt.PlainText)
|
||||||
|
self.themeNameLabel.setAlignment(QtCore.Qt.AlignRight |
|
||||||
|
QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter)
|
||||||
self.themeNameLabel.setObjectName(u'themeNameLabel')
|
self.themeNameLabel.setObjectName(u'themeNameLabel')
|
||||||
self.previewLabel = QtGui.QLabel(self.previewPage)
|
self.themeNameLayout.addWidget(self.themeNameLabel)
|
||||||
self.previewLabel.setGeometry(QtCore.QRect(250, 60, 48, 16))
|
|
||||||
self.previewLabel.setAlignment(QtCore.Qt.AlignCenter)
|
|
||||||
self.previewLabel.setObjectName(u'previewLabel')
|
|
||||||
self.themeNameEdit = QtGui.QLineEdit(self.previewPage)
|
self.themeNameEdit = QtGui.QLineEdit(self.previewPage)
|
||||||
self.themeNameEdit.setGeometry(QtCore.QRect(117, 4, 351, 23))
|
|
||||||
self.themeNameEdit.setObjectName(u'themeNameEdit')
|
self.themeNameEdit.setObjectName(u'themeNameEdit')
|
||||||
self.groupBox = QtGui.QGroupBox(self.previewPage)
|
self.themeNameLayout.addWidget(self.themeNameEdit)
|
||||||
self.groupBox.setGeometry(QtCore.QRect(40, 80, 464, 214))
|
self.previewLayout.addLayout(self.themeNameLayout)
|
||||||
self.groupBox.setTitle(u'')
|
self.previewPaneLayout = QtGui.QHBoxLayout()
|
||||||
self.groupBox.setObjectName(u'groupBox')
|
self.previewPaneLayout.setSpacing(0)
|
||||||
self.horizontalLayout = QtGui.QHBoxLayout(self.groupBox)
|
self.previewPaneLayout.setObjectName(u'previewPaneLayout')
|
||||||
self.horizontalLayout.setObjectName(u'horizontalLayout')
|
self.previewLeftSpacer = QtGui.QSpacerItem(58, 20,
|
||||||
spacerItem2 = QtGui.QSpacerItem(58, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
|
QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
|
||||||
self.horizontalLayout.addItem(spacerItem2)
|
self.previewPaneLayout.addItem(self.previewLeftSpacer)
|
||||||
self.previewBoxLabel = QtGui.QLabel(self.groupBox)
|
self.previewBoxLabel = QtGui.QLabel(self.previewPage)
|
||||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
|
sizePolicy = QtGui.QSizePolicy(
|
||||||
|
QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
|
||||||
sizePolicy.setHorizontalStretch(0)
|
sizePolicy.setHorizontalStretch(0)
|
||||||
sizePolicy.setVerticalStretch(0)
|
sizePolicy.setVerticalStretch(0)
|
||||||
sizePolicy.setHeightForWidth(self.previewBoxLabel.sizePolicy().hasHeightForWidth())
|
sizePolicy.setHeightForWidth(
|
||||||
|
self.previewBoxLabel.sizePolicy().hasHeightForWidth())
|
||||||
self.previewBoxLabel.setSizePolicy(sizePolicy)
|
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.setFrameShape(QtGui.QFrame.WinPanel)
|
||||||
self.previewBoxLabel.setFrameShadow(QtGui.QFrame.Sunken)
|
self.previewBoxLabel.setFrameShadow(QtGui.QFrame.Sunken)
|
||||||
self.previewBoxLabel.setLineWidth(1)
|
self.previewBoxLabel.setLineWidth(1)
|
||||||
self.previewBoxLabel.setText(u'')
|
self.previewBoxLabel.setText(u'')
|
||||||
self.previewBoxLabel.setScaledContents(True)
|
self.previewBoxLabel.setScaledContents(True)
|
||||||
self.previewBoxLabel.setObjectName(u'previewBoxLabel')
|
self.previewBoxLabel.setObjectName(u'previewBoxLabel')
|
||||||
self.horizontalLayout.addWidget(self.previewBoxLabel)
|
self.previewPaneLayout.addWidget(self.previewBoxLabel)
|
||||||
spacerItem3 = QtGui.QSpacerItem(78, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
|
self.previewRightSpacer = QtGui.QSpacerItem(78, 20,
|
||||||
self.horizontalLayout.addItem(spacerItem3)
|
QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
|
||||||
|
self.previewPaneLayout.addItem(self.previewRightSpacer)
|
||||||
|
self.previewLayout.addLayout(self.previewPaneLayout)
|
||||||
ThemeWizard.addPage(self.previewPage)
|
ThemeWizard.addPage(self.previewPage)
|
||||||
self.themeNameLabel.setBuddy(self.themeNameEdit)
|
self.themeNameLabel.setBuddy(self.themeNameEdit)
|
||||||
|
|
||||||
self.retranslateUi(ThemeWizard)
|
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)
|
QtCore.QMetaObject.connectSlotsByName(ThemeWizard)
|
||||||
|
|
||||||
def retranslateUi(self, ThemeWizard):
|
def retranslateUi(self, ThemeWizard):
|
||||||
ThemeWizard.setWindowTitle(translate('OpenLP.ThemeForm', 'Theme Wizard'))
|
ThemeWizard.setWindowTitle(
|
||||||
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'
|
translate('OpenLP.ThemeWizard', 'Theme Wizard'))
|
||||||
'<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n'
|
self.titleLabel.setText(
|
||||||
'p, li { white-space: pre-wrap; }\n'
|
u'<span style="font-size:14pt; font-weight:600;">%s</span>' % \
|
||||||
'</style></head><body style=\" font-family:\'Sans Serif\'; font-size:9pt; font-weight:400; font-style:normal;\">\n'
|
translate('OpenLP.ThemeWizard', 'Welcome to the Theme Wizard'))
|
||||||
'<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(
|
||||||
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.'))
|
translate('OpenLP.ThemeWizard', 'This wizard will help you to '
|
||||||
self.backgroundPage.setTitle(translate('OpenLP.ThemeForm', 'Set Up Background'))
|
'create and edit your themes . Click the next button below to '
|
||||||
self.backgroundPage.setSubTitle(translate('OpenLP.ThemeForm', 'Set up your theme\'s background according to the parameters below.'))
|
'start the process by setting up your background.'))
|
||||||
self.backgroundTypeLabel.setText(translate('OpenLP.ThemeForm', 'Background type:'))
|
self.backgroundPage.setTitle(
|
||||||
self.backgroundTypeComboBox.setItemText(0, translate('OpenLP.ThemeForm', 'Solid Color'))
|
translate('OpenLP.ThemeWizard', 'Set Up Background'))
|
||||||
self.backgroundTypeComboBox.setItemText(1, translate('OpenLP.ThemeForm', 'Gradient'))
|
self.backgroundPage.setSubTitle(
|
||||||
self.backgroundTypeComboBox.setItemText(2, translate('OpenLP.ThemeForm', 'Image'))
|
translate('OpenLP.ThemeWizard', 'Set up your theme\'s background '
|
||||||
self.color1Label.setText(translate('OpenLP.ThemeForm', '<Color1>'))
|
'according to the parameters below.'))
|
||||||
self.color2Label.setText(translate('OpenLP.ThemeForm', '<Color2>'))
|
self.backgroundTypeLabel.setText(
|
||||||
self.imageLabel.setText(translate('OpenLP.ThemeForm', 'Image:'))
|
translate('OpenLP.ThemeWizard', 'Background type:'))
|
||||||
self.gradientLabel.setText(translate('OpenLP.ThemeForm', 'Gradient:'))
|
self.backgroundTypeComboBox.setItemText(0,
|
||||||
self.gradientComboBox.setItemText(0, translate('OpenLP.ThemeForm', 'Horizontal'))
|
translate('OpenLP.ThemeWizard', 'Solid Color'))
|
||||||
self.gradientComboBox.setItemText(1, translate('OpenLP.ThemeForm', 'Vertical'))
|
self.backgroundTypeComboBox.setItemText(1,
|
||||||
self.gradientComboBox.setItemText(2, translate('OpenLP.ThemeForm', 'Circular'))
|
translate('OpenLP.ThemeWizard', 'Gradient'))
|
||||||
self.gradientComboBox.setItemText(3, translate('OpenLP.ThemeForm', 'Top Left - Bottom Right'))
|
self.backgroundTypeComboBox.setItemText(2,
|
||||||
self.gradientComboBox.setItemText(4, translate('OpenLP.ThemeForm', 'Bottom Left - Top Right'))
|
translate('OpenLP.ThemeWizard', 'Image'))
|
||||||
self.mainAreaPage.setTitle(translate('OpenLP.ThemeForm', 'Main Area Font Details'))
|
self.colorLabel.setText(translate('OpenLP.ThemeWizard', 'Color:'))
|
||||||
self.mainAreaPage.setSubTitle(translate('OpenLP.ThemeForm', 'Define the font and display characteristics for the Display text'))
|
self.gradientStartLabel.setText(
|
||||||
self.mainFontLabel.setText(translate('OpenLP.ThemeForm', 'Font:'))
|
translate(u'OpenLP.ThemeWizard', 'Starting color:'))
|
||||||
self.mainColorLabel.setText(translate('OpenLP.ThemeForm', 'Color:'))
|
self.gradientEndLabel.setText(
|
||||||
self.mainSizeLabel.setText(translate('OpenLP.ThemeForm', 'Size:'))
|
translate(u'OpenLP.ThemeWizard', 'Ending color:'))
|
||||||
self.mainSizeSpinBox.setSuffix(translate('OpenLP.ThemeForm', 'pt'))
|
self.gradientTypeLabel.setText(
|
||||||
self.mainLineCountLabel.setText(translate('OpenLP.ThemeForm', '(%d lines per slide)'))
|
translate('OpenLP.ThemeWizard', 'Gradient:'))
|
||||||
self.lineSpacingLabel.setText(translate('OpenLP.ThemeForm', 'Line Spacing:'))
|
self.gradientComboBox.setItemText(0,
|
||||||
self.lineSpacingSpinBox.setSuffix(translate('OpenLP.ThemeForm', 'pt'))
|
translate('OpenLP.ThemeWizard', 'Horizontal'))
|
||||||
self.outlineCheckBox.setText(translate('OpenLP.ThemeForm', '&Outline:'))
|
self.gradientComboBox.setItemText(1,
|
||||||
self.outlineSizeLabel.setText(translate('OpenLP.ThemeForm', 'Size:'))
|
translate('OpenLP.ThemeWizard', 'Vertical'))
|
||||||
self.outlineSizeSpinBox.setSuffix(translate('OpenLP.ThemeForm', 'pt'))
|
self.gradientComboBox.setItemText(2,
|
||||||
self.shadowCheckBox.setText(translate('OpenLP.ThemeForm', '&Shadow:'))
|
translate('OpenLP.ThemeWizard', 'Circular'))
|
||||||
self.shadowSizeLabel.setText(translate('OpenLP.ThemeForm', 'Size:'))
|
self.gradientComboBox.setItemText(3,
|
||||||
self.shadowSizeSpinBox.setSuffix(translate('OpenLP.ThemeForm', 'pt'))
|
translate('OpenLP.ThemeWizard', 'Top Left - Bottom Right'))
|
||||||
self.boldCheckBox.setText(translate('OpenLP.ThemeForm', 'Bold Display'))
|
self.gradientComboBox.setItemText(4,
|
||||||
self.italicsCheckBox.setText(translate('OpenLP.ThemeForm', 'Italic Display'))
|
translate('OpenLP.ThemeWizard', 'Bottom Left - Top Right'))
|
||||||
self.footerAreaPage.setTitle(translate('OpenLP.ThemeForm', 'Footer Area Font Details'))
|
self.imageLabel.setText(translate('OpenLP.ThemeWizard', 'Image:'))
|
||||||
self.footerAreaPage.setSubTitle(translate('OpenLP.ThemeForm', 'Define the font and display characteristics for the Footer text'))
|
self.mainAreaPage.setTitle(
|
||||||
self.footerFontLabel.setText(translate('OpenLP.ThemeForm', 'Font:'))
|
translate('OpenLP.ThemeWizard', 'Main Area Font Details'))
|
||||||
self.footerColorLabel.setText(translate('OpenLP.ThemeForm', 'Color:'))
|
self.mainAreaPage.setSubTitle(
|
||||||
self.footerSizeLabel.setText(translate('OpenLP.ThemeForm', 'Size:'))
|
translate('OpenLP.ThemeWizard', 'Define the font and display '
|
||||||
self.footerSizeSpinBox.setSuffix(translate('OpenLP.ThemeForm', 'pt'))
|
'characteristics for the Display text'))
|
||||||
self.alignmentPage.setTitle(translate('OpenLP.ThemeForm', 'Text Formatting Details'))
|
self.mainFontLabel.setText(
|
||||||
self.alignmentPage.setSubTitle(translate('OpenLP.ThemeForm', 'Allows additional display formatting information to be defined'))
|
translate('OpenLP.ThemeWizard', 'Font:'))
|
||||||
self.horizontalLabel.setText(translate('OpenLP.ThemeForm', 'Horizontal Align:'))
|
self.mainColorLabel.setText(translate('OpenLP.ThemeWizard', 'Color:'))
|
||||||
self.horizontalComboBox.setItemText(0, translate('OpenLP.ThemeForm', 'Left'))
|
self.mainSizeLabel.setText(translate('OpenLP.ThemeWizard', 'Size:'))
|
||||||
self.horizontalComboBox.setItemText(1, translate('OpenLP.ThemeForm', 'Right'))
|
self.mainSizeSpinBox.setSuffix(translate('OpenLP.ThemeWizard', 'pt'))
|
||||||
self.horizontalComboBox.setItemText(2, translate('OpenLP.ThemeForm', 'Center'))
|
self.mainLineCountLabel.setText(
|
||||||
self.verticalLabel.setText(translate('OpenLP.ThemeForm', 'Vertcal Align:'))
|
translate('OpenLP.ThemeWizard', '(%d lines per slide)'))
|
||||||
self.verticalComboBox.setItemText(0, translate('OpenLP.ThemeForm', 'Top'))
|
self.lineSpacingLabel.setText(
|
||||||
self.verticalComboBox.setItemText(1, translate('OpenLP.ThemeForm', 'Middle'))
|
translate('OpenLP.ThemeWizard', 'Line Spacing:'))
|
||||||
self.verticalComboBox.setItemText(2, translate('OpenLP.ThemeForm', 'Bottom'))
|
self.lineSpacingSpinBox.setSuffix(translate('OpenLP.ThemeWizard', 'pt'))
|
||||||
self.transitionsCheckBox.setText(translate('OpenLP.ThemeForm', 'Transitions'))
|
self.outlineCheckBox.setText(
|
||||||
self.areaPositionPage.setTitle(translate('OpenLP.ThemeForm', 'Output Area Locations'))
|
translate('OpenLP.ThemeWizard', '&Outline:'))
|
||||||
self.areaPositionPage.setSubTitle(translate('OpenLP.ThemeForm', 'Allows you to change and move the Main and Footer areas.'))
|
self.outlineSizeLabel.setText(translate('OpenLP.ThemeWizard', 'Size:'))
|
||||||
self.mainPositionGroupBox.setTitle(translate('OpenLP.ThemeForm', '&Main Area'))
|
self.outlineSizeSpinBox.setSuffix(translate('OpenLP.ThemeWizard', 'pt'))
|
||||||
self.mainDefaultPositionCheckBox.setText(translate('OpenLP.ThemeForm', '&Use default location'))
|
self.shadowCheckBox.setText(translate('OpenLP.ThemeWizard', '&Shadow:'))
|
||||||
self.nainXLabel.setText(translate('OpenLP.ThemeForm', 'X position:'))
|
self.shadowSizeLabel.setText(translate('OpenLP.ThemeWizard', 'Size:'))
|
||||||
self.mainXSpinBox.setSuffix(translate('OpenLP.ThemeForm', 'px'))
|
self.shadowSizeSpinBox.setSuffix(translate('OpenLP.ThemeWizard', 'pt'))
|
||||||
self.mainYSpinBox.setSuffix(translate('OpenLP.ThemeForm', 'px'))
|
self.boldCheckBox.setText(
|
||||||
self.mainYLabel.setText(translate('OpenLP.ThemeForm', 'Y position:'))
|
translate('OpenLP.ThemeWizard', 'Bold'))
|
||||||
self.mainWidthSpinBox.setSuffix(translate('OpenLP.ThemeForm', 'px'))
|
self.italicsCheckBox.setText(
|
||||||
self.mainWidthLabel.setText(translate('OpenLP.ThemeForm', 'Width:'))
|
translate('OpenLP.ThemeWizard', 'Italic'))
|
||||||
self.mainHeightSpinBox.setSuffix(translate('OpenLP.ThemeForm', 'px'))
|
self.footerAreaPage.setTitle(
|
||||||
self.mainHeightLabel.setText(translate('OpenLP.ThemeForm', 'Height:'))
|
translate('OpenLP.ThemeWizard', 'Footer Area Font Details'))
|
||||||
self.footerPositionGroupBox.setTitle(translate('OpenLP.ThemeForm', 'Footer Area'))
|
self.footerAreaPage.setSubTitle(
|
||||||
self.footerXLabel.setText(translate('OpenLP.ThemeForm', 'X position:'))
|
translate('OpenLP.ThemeWizard', 'Define the font and display '
|
||||||
self.footerXSpinBox.setSuffix(translate('OpenLP.ThemeForm', 'px'))
|
'characteristics for the Footer text'))
|
||||||
self.footerYLabel.setText(translate('OpenLP.ThemeForm', 'Y position:'))
|
self.footerFontLabel.setText(translate('OpenLP.ThemeWizard', 'Font:'))
|
||||||
self.footerYSpinBox.setSuffix(translate('OpenLP.ThemeForm', 'px'))
|
self.footerColorLabel.setText(translate('OpenLP.ThemeWizard', 'Color:'))
|
||||||
self.footerWidthLabel.setText(translate('OpenLP.ThemeForm', 'Width:'))
|
self.footerSizeLabel.setText(translate('OpenLP.ThemeWizard', 'Size:'))
|
||||||
self.footerWidthSpinBox.setSuffix(translate('OpenLP.ThemeForm', 'px'))
|
self.footerSizeSpinBox.setSuffix(translate('OpenLP.ThemeWizard', 'pt'))
|
||||||
self.footerHeightLabel.setText(translate('OpenLP.ThemeForm', 'Height:'))
|
self.alignmentPage.setTitle(
|
||||||
self.footerHeightSpinBox.setSuffix(translate('OpenLP.ThemeForm', 'px'))
|
translate('OpenLP.ThemeWizard', 'Text Formatting Details'))
|
||||||
self.footerDefaultPositionCheckBox.setText(translate('OpenLP.ThemeForm', 'Use default location'))
|
self.alignmentPage.setSubTitle(
|
||||||
self.previewPage.setTitle(translate('OpenLP.ThemeForm', 'Save and Preview'))
|
translate('OpenLP.ThemeWizard', 'Allows additional display '
|
||||||
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'))
|
'formatting information to be defined'))
|
||||||
self.themeNameLabel.setText(translate('OpenLP.ThemeForm', 'Theme name:'))
|
self.horizontalLabel.setText(
|
||||||
self.previewLabel.setText(translate('OpenLP.ThemeForm', 'Preview'))
|
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', 'Vertical 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:'))
|
||||||
|
@ -133,7 +133,7 @@ class BibleImportForm(QtGui.QWizard, Ui_BibleImportWizard):
|
|||||||
self.OSISLocationEdit.setFocus()
|
self.OSISLocationEdit.setFocus()
|
||||||
return False
|
return False
|
||||||
elif self.field(u'source_format').toInt()[0] == BibleFormat.CSV:
|
elif self.field(u'source_format').toInt()[0] == BibleFormat.CSV:
|
||||||
if self.field(u'csv_booksfile').toString() == u'':
|
if not self.field(u'csv_booksfile').toString():
|
||||||
QtGui.QMessageBox.critical(self,
|
QtGui.QMessageBox.critical(self,
|
||||||
translate('BiblesPlugin.ImportWizardForm',
|
translate('BiblesPlugin.ImportWizardForm',
|
||||||
'Invalid Books File'),
|
'Invalid Books File'),
|
||||||
@ -142,7 +142,7 @@ class BibleImportForm(QtGui.QWizard, Ui_BibleImportWizard):
|
|||||||
'the Bible to use in the import.'))
|
'the Bible to use in the import.'))
|
||||||
self.BooksLocationEdit.setFocus()
|
self.BooksLocationEdit.setFocus()
|
||||||
return False
|
return False
|
||||||
elif self.field(u'csv_versefile').toString() == u'':
|
elif not self.field(u'csv_versefile').toString():
|
||||||
QtGui.QMessageBox.critical(self,
|
QtGui.QMessageBox.critical(self,
|
||||||
translate('BiblesPlugin.ImportWizardForm',
|
translate('BiblesPlugin.ImportWizardForm',
|
||||||
'Invalid Verse File'),
|
'Invalid Verse File'),
|
||||||
@ -153,7 +153,7 @@ class BibleImportForm(QtGui.QWizard, Ui_BibleImportWizard):
|
|||||||
return False
|
return False
|
||||||
elif self.field(u'source_format').toInt()[0] == \
|
elif self.field(u'source_format').toInt()[0] == \
|
||||||
BibleFormat.OpenSong:
|
BibleFormat.OpenSong:
|
||||||
if self.field(u'opensong_file').toString() == u'':
|
if not self.field(u'opensong_file').toString():
|
||||||
QtGui.QMessageBox.critical(self,
|
QtGui.QMessageBox.critical(self,
|
||||||
translate('BiblesPlugin.ImportWizardForm',
|
translate('BiblesPlugin.ImportWizardForm',
|
||||||
'Invalid OpenSong Bible'),
|
'Invalid OpenSong Bible'),
|
||||||
@ -168,7 +168,7 @@ class BibleImportForm(QtGui.QWizard, Ui_BibleImportWizard):
|
|||||||
license_version = unicode(self.field(u'license_version').toString())
|
license_version = unicode(self.field(u'license_version').toString())
|
||||||
license_copyright = \
|
license_copyright = \
|
||||||
unicode(self.field(u'license_copyright').toString())
|
unicode(self.field(u'license_copyright').toString())
|
||||||
if license_version == u'':
|
if not license_version:
|
||||||
QtGui.QMessageBox.critical(self,
|
QtGui.QMessageBox.critical(self,
|
||||||
translate('BiblesPlugin.ImportWizardForm',
|
translate('BiblesPlugin.ImportWizardForm',
|
||||||
'Empty Version Name'),
|
'Empty Version Name'),
|
||||||
@ -176,7 +176,7 @@ class BibleImportForm(QtGui.QWizard, Ui_BibleImportWizard):
|
|||||||
'You need to specify a version name for your Bible.'))
|
'You need to specify a version name for your Bible.'))
|
||||||
self.VersionNameEdit.setFocus()
|
self.VersionNameEdit.setFocus()
|
||||||
return False
|
return False
|
||||||
elif license_copyright == u'':
|
elif not license_copyright:
|
||||||
QtGui.QMessageBox.critical(self,
|
QtGui.QMessageBox.critical(self,
|
||||||
translate('BiblesPlugin.ImportWizardForm',
|
translate('BiblesPlugin.ImportWizardForm',
|
||||||
'Empty Copyright'),
|
'Empty Copyright'),
|
||||||
@ -207,9 +207,11 @@ class BibleImportForm(QtGui.QWizard, Ui_BibleImportWizard):
|
|||||||
The index of the combo box.
|
The index of the combo box.
|
||||||
"""
|
"""
|
||||||
self.BibleComboBox.clear()
|
self.BibleComboBox.clear()
|
||||||
for bible in self.web_bible_list[index].keys():
|
bibles = [unicode(translate('BiblesPlugin.ImportWizardForm', bible)) for
|
||||||
self.BibleComboBox.addItem(unicode(
|
bible in self.web_bible_list[index].keys()]
|
||||||
translate('BiblesPlugin.ImportWizardForm', bible)))
|
bibles.sort()
|
||||||
|
for bible in bibles:
|
||||||
|
self.BibleComboBox.addItem(bible)
|
||||||
|
|
||||||
def onOsisFileButtonClicked(self):
|
def onOsisFileButtonClicked(self):
|
||||||
"""
|
"""
|
||||||
@ -317,7 +319,7 @@ class BibleImportForm(QtGui.QWizard, Ui_BibleImportWizard):
|
|||||||
"""
|
"""
|
||||||
Load the list of Crosswalk and BibleGateway bibles.
|
Load the list of Crosswalk and BibleGateway bibles.
|
||||||
"""
|
"""
|
||||||
#Load and store Crosswalk Bibles
|
# Load and store Crosswalk Bibles.
|
||||||
filepath = AppLocation.get_directory(AppLocation.PluginsDir)
|
filepath = AppLocation.get_directory(AppLocation.PluginsDir)
|
||||||
filepath = os.path.join(filepath, u'bibles', u'resources')
|
filepath = os.path.join(filepath, u'bibles', u'resources')
|
||||||
books_file = None
|
books_file = None
|
||||||
@ -341,7 +343,7 @@ class BibleImportForm(QtGui.QWizard, Ui_BibleImportWizard):
|
|||||||
finally:
|
finally:
|
||||||
if books_file:
|
if books_file:
|
||||||
books_file.close()
|
books_file.close()
|
||||||
#Load and store BibleGateway Bibles
|
# Load and store BibleGateway Bibles.
|
||||||
books_file = None
|
books_file = None
|
||||||
try:
|
try:
|
||||||
self.web_bible_list[WebDownload.BibleGateway] = {}
|
self.web_bible_list[WebDownload.BibleGateway] = {}
|
||||||
@ -379,12 +381,18 @@ class BibleImportForm(QtGui.QWizard, Ui_BibleImportWizard):
|
|||||||
Receiver.send_message(u'openlp_process_events')
|
Receiver.send_message(u'openlp_process_events')
|
||||||
|
|
||||||
def preImport(self):
|
def preImport(self):
|
||||||
|
bible_type = self.field(u'source_format').toInt()[0]
|
||||||
self.finishButton.setVisible(False)
|
self.finishButton.setVisible(False)
|
||||||
self.ImportProgressBar.setMinimum(0)
|
self.ImportProgressBar.setMinimum(0)
|
||||||
self.ImportProgressBar.setMaximum(1188)
|
self.ImportProgressBar.setMaximum(1188)
|
||||||
self.ImportProgressBar.setValue(0)
|
self.ImportProgressBar.setValue(0)
|
||||||
self.ImportProgressLabel.setText(
|
if bible_type == BibleFormat.WebDownload:
|
||||||
translate('BiblesPlugin.ImportWizardForm', 'Starting import...'))
|
self.ImportProgressLabel.setText(translate(
|
||||||
|
'BiblesPlugin.ImportWizardForm',
|
||||||
|
'Starting Registering bible...'))
|
||||||
|
else:
|
||||||
|
self.ImportProgressLabel.setText(translate(
|
||||||
|
'BiblesPlugin.ImportWizardForm', 'Starting import...'))
|
||||||
Receiver.send_message(u'openlp_process_events')
|
Receiver.send_message(u'openlp_process_events')
|
||||||
|
|
||||||
def performImport(self):
|
def performImport(self):
|
||||||
@ -395,26 +403,26 @@ class BibleImportForm(QtGui.QWizard, Ui_BibleImportWizard):
|
|||||||
unicode(self.field(u'license_permissions').toString())
|
unicode(self.field(u'license_permissions').toString())
|
||||||
importer = None
|
importer = None
|
||||||
if bible_type == BibleFormat.OSIS:
|
if bible_type == BibleFormat.OSIS:
|
||||||
# Import an OSIS bible
|
# Import an OSIS bible.
|
||||||
importer = self.manager.import_bible(BibleFormat.OSIS,
|
importer = self.manager.import_bible(BibleFormat.OSIS,
|
||||||
name=license_version,
|
name=license_version,
|
||||||
filename=unicode(self.field(u'osis_location').toString())
|
filename=unicode(self.field(u'osis_location').toString())
|
||||||
)
|
)
|
||||||
elif bible_type == BibleFormat.CSV:
|
elif bible_type == BibleFormat.CSV:
|
||||||
# Import a CSV bible
|
# Import a CSV bible.
|
||||||
importer = self.manager.import_bible(BibleFormat.CSV,
|
importer = self.manager.import_bible(BibleFormat.CSV,
|
||||||
name=license_version,
|
name=license_version,
|
||||||
booksfile=unicode(self.field(u'csv_booksfile').toString()),
|
booksfile=unicode(self.field(u'csv_booksfile').toString()),
|
||||||
versefile=unicode(self.field(u'csv_versefile').toString())
|
versefile=unicode(self.field(u'csv_versefile').toString())
|
||||||
)
|
)
|
||||||
elif bible_type == BibleFormat.OpenSong:
|
elif bible_type == BibleFormat.OpenSong:
|
||||||
# Import an OpenSong bible
|
# Import an OpenSong bible.
|
||||||
importer = self.manager.import_bible(BibleFormat.OpenSong,
|
importer = self.manager.import_bible(BibleFormat.OpenSong,
|
||||||
name=license_version,
|
name=license_version,
|
||||||
filename=unicode(self.field(u'opensong_file').toString())
|
filename=unicode(self.field(u'opensong_file').toString())
|
||||||
)
|
)
|
||||||
elif bible_type == BibleFormat.WebDownload:
|
elif bible_type == BibleFormat.WebDownload:
|
||||||
# Import a bible from the web
|
# Import a bible from the web.
|
||||||
self.ImportProgressBar.setMaximum(1)
|
self.ImportProgressBar.setMaximum(1)
|
||||||
download_location = self.field(u'web_location').toInt()[0]
|
download_location = self.field(u'web_location').toInt()[0]
|
||||||
bible_version = unicode(self.BibleComboBox.currentText())
|
bible_version = unicode(self.BibleComboBox.currentText())
|
||||||
@ -438,8 +446,14 @@ class BibleImportForm(QtGui.QWizard, Ui_BibleImportWizard):
|
|||||||
self.manager.save_meta_data(license_version, license_version,
|
self.manager.save_meta_data(license_version, license_version,
|
||||||
license_copyright, license_permissions)
|
license_copyright, license_permissions)
|
||||||
self.manager.reload_bibles()
|
self.manager.reload_bibles()
|
||||||
|
if bible_type == BibleFormat.WebDownload:
|
||||||
self.ImportProgressLabel.setText(
|
self.ImportProgressLabel.setText(
|
||||||
translate('BiblesPlugin.ImportWizardForm', 'Finished import.'))
|
translate('BiblesPlugin.ImportWizardForm', 'Registered '
|
||||||
|
'bible. Please note, that verses will be downloaded on\n'
|
||||||
|
'demand and thus an internet connection is required.'))
|
||||||
|
else:
|
||||||
|
self.ImportProgressLabel.setText(translate(
|
||||||
|
'BiblesPlugin.ImportWizardForm', 'Finished import.'))
|
||||||
else:
|
else:
|
||||||
self.ImportProgressLabel.setText(
|
self.ImportProgressLabel.setText(
|
||||||
translate('BiblesPlugin.ImportWizardForm',
|
translate('BiblesPlugin.ImportWizardForm',
|
||||||
|
@ -110,9 +110,9 @@ class BiblesTab(SettingsTab):
|
|||||||
self.BibleThemeComboBox.setObjectName(u'BibleThemeComboBox')
|
self.BibleThemeComboBox.setObjectName(u'BibleThemeComboBox')
|
||||||
self.BibleThemeComboBox.addItem(QtCore.QString())
|
self.BibleThemeComboBox.addItem(QtCore.QString())
|
||||||
self.BibleThemeLayout.addWidget(self.BibleThemeComboBox)
|
self.BibleThemeLayout.addWidget(self.BibleThemeComboBox)
|
||||||
self.BibleDualCheckBox = QtGui.QCheckBox(self.VerseDisplayGroupBox)
|
self.BibleSecondCheckBox = QtGui.QCheckBox(self.VerseDisplayGroupBox)
|
||||||
self.BibleDualCheckBox.setObjectName(u'BibleDualCheckBox')
|
self.BibleSecondCheckBox.setObjectName(u'BibleSecondCheckBox')
|
||||||
self.VerseDisplayLayout.addWidget(self.BibleDualCheckBox, 3, 0, 1, 1)
|
self.VerseDisplayLayout.addWidget(self.BibleSecondCheckBox, 3, 0, 1, 1)
|
||||||
self.VerseDisplayLayout.addWidget(self.BibleThemeWidget, 4, 0, 1, 1)
|
self.VerseDisplayLayout.addWidget(self.BibleThemeWidget, 4, 0, 1, 1)
|
||||||
self.ChangeNoteLabel = QtGui.QLabel(self.VerseDisplayGroupBox)
|
self.ChangeNoteLabel = QtGui.QLabel(self.VerseDisplayGroupBox)
|
||||||
self.ChangeNoteLabel.setObjectName(u'ChangeNoteLabel')
|
self.ChangeNoteLabel.setObjectName(u'ChangeNoteLabel')
|
||||||
@ -143,8 +143,8 @@ class BiblesTab(SettingsTab):
|
|||||||
self.LayoutStyleComboBox, QtCore.SIGNAL(u'activated(int)'),
|
self.LayoutStyleComboBox, QtCore.SIGNAL(u'activated(int)'),
|
||||||
self.onLayoutStyleComboBoxChanged)
|
self.onLayoutStyleComboBoxChanged)
|
||||||
QtCore.QObject.connect(
|
QtCore.QObject.connect(
|
||||||
self.BibleDualCheckBox, QtCore.SIGNAL(u'stateChanged(int)'),
|
self.BibleSecondCheckBox, QtCore.SIGNAL(u'stateChanged(int)'),
|
||||||
self.onBibleDualCheckBox)
|
self.onBibleSecondCheckBox)
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||||
QtCore.SIGNAL(u'theme_update_list'), self.updateThemeList)
|
QtCore.SIGNAL(u'theme_update_list'), self.updateThemeList)
|
||||||
|
|
||||||
@ -176,8 +176,8 @@ class BiblesTab(SettingsTab):
|
|||||||
translate('BiblesPlugin.BiblesTab', '[ And ]'))
|
translate('BiblesPlugin.BiblesTab', '[ And ]'))
|
||||||
self.ChangeNoteLabel.setText(translate('BiblesPlugin.BiblesTab',
|
self.ChangeNoteLabel.setText(translate('BiblesPlugin.BiblesTab',
|
||||||
'Note:\nChanges do not affect verses already in the service.'))
|
'Note:\nChanges do not affect verses already in the service.'))
|
||||||
self.BibleDualCheckBox.setText(
|
self.BibleSecondCheckBox.setText(
|
||||||
translate('BiblesPlugin.BiblesTab', 'Display dual Bible verses'))
|
translate('BiblesPlugin.BiblesTab', 'Display second Bible verses'))
|
||||||
|
|
||||||
def onBibleThemeComboBoxChanged(self):
|
def onBibleThemeComboBoxChanged(self):
|
||||||
self.bible_theme = self.BibleThemeComboBox.currentText()
|
self.bible_theme = self.BibleThemeComboBox.currentText()
|
||||||
@ -190,15 +190,15 @@ class BiblesTab(SettingsTab):
|
|||||||
|
|
||||||
def onNewChaptersCheckBoxChanged(self, check_state):
|
def onNewChaptersCheckBoxChanged(self, check_state):
|
||||||
self.show_new_chapters = False
|
self.show_new_chapters = False
|
||||||
# we have a set value convert to True/False
|
# We have a set value convert to True/False.
|
||||||
if check_state == QtCore.Qt.Checked:
|
if check_state == QtCore.Qt.Checked:
|
||||||
self.show_new_chapters = True
|
self.show_new_chapters = True
|
||||||
|
|
||||||
def onBibleDualCheckBox(self, check_state):
|
def onBibleSecondCheckBox(self, check_state):
|
||||||
self.dual_bibles = False
|
self.second_bibles = False
|
||||||
# we have a set value convert to True/False
|
# We have a set value convert to True/False.
|
||||||
if check_state == QtCore.Qt.Checked:
|
if check_state == QtCore.Qt.Checked:
|
||||||
self.dual_bibles = True
|
self.second_bibles = True
|
||||||
|
|
||||||
def load(self):
|
def load(self):
|
||||||
settings = QtCore.QSettings()
|
settings = QtCore.QSettings()
|
||||||
@ -211,12 +211,12 @@ class BiblesTab(SettingsTab):
|
|||||||
u'verse layout style', QtCore.QVariant(0)).toInt()[0]
|
u'verse layout style', QtCore.QVariant(0)).toInt()[0]
|
||||||
self.bible_theme = unicode(
|
self.bible_theme = unicode(
|
||||||
settings.value(u'bible theme', QtCore.QVariant(u'')).toString())
|
settings.value(u'bible theme', QtCore.QVariant(u'')).toString())
|
||||||
self.dual_bibles = settings.value(
|
self.second_bibles = settings.value(
|
||||||
u'dual bibles', QtCore.QVariant(True)).toBool()
|
u'second bibles', QtCore.QVariant(True)).toBool()
|
||||||
self.NewChaptersCheckBox.setChecked(self.show_new_chapters)
|
self.NewChaptersCheckBox.setChecked(self.show_new_chapters)
|
||||||
self.DisplayStyleComboBox.setCurrentIndex(self.display_style)
|
self.DisplayStyleComboBox.setCurrentIndex(self.display_style)
|
||||||
self.LayoutStyleComboBox.setCurrentIndex(self.layout_style)
|
self.LayoutStyleComboBox.setCurrentIndex(self.layout_style)
|
||||||
self.BibleDualCheckBox.setChecked(self.dual_bibles)
|
self.BibleSecondCheckBox.setChecked(self.second_bibles)
|
||||||
settings.endGroup()
|
settings.endGroup()
|
||||||
|
|
||||||
def save(self):
|
def save(self):
|
||||||
@ -228,13 +228,18 @@ class BiblesTab(SettingsTab):
|
|||||||
QtCore.QVariant(self.display_style))
|
QtCore.QVariant(self.display_style))
|
||||||
settings.setValue(u'verse layout style',
|
settings.setValue(u'verse layout style',
|
||||||
QtCore.QVariant(self.layout_style))
|
QtCore.QVariant(self.layout_style))
|
||||||
settings.setValue(u'dual bibles', QtCore.QVariant(self.dual_bibles))
|
settings.setValue(u'second bibles', QtCore.QVariant(self.second_bibles))
|
||||||
settings.setValue(u'bible theme', QtCore.QVariant(self.bible_theme))
|
settings.setValue(u'bible theme', QtCore.QVariant(self.bible_theme))
|
||||||
settings.endGroup()
|
settings.endGroup()
|
||||||
|
|
||||||
def updateThemeList(self, theme_list):
|
def updateThemeList(self, theme_list):
|
||||||
"""
|
"""
|
||||||
Called from ThemeManager when the Themes have changed
|
Called from ThemeManager when the Themes have changed.
|
||||||
|
|
||||||
|
``theme_list``
|
||||||
|
The list of available themes::
|
||||||
|
|
||||||
|
[u'Bible Theme', u'Song Theme']
|
||||||
"""
|
"""
|
||||||
self.BibleThemeComboBox.clear()
|
self.BibleThemeComboBox.clear()
|
||||||
self.BibleThemeComboBox.addItem(u'')
|
self.BibleThemeComboBox.addItem(u'')
|
||||||
@ -243,7 +248,7 @@ class BiblesTab(SettingsTab):
|
|||||||
index = self.BibleThemeComboBox.findText(
|
index = self.BibleThemeComboBox.findText(
|
||||||
unicode(self.bible_theme), QtCore.Qt.MatchExactly)
|
unicode(self.bible_theme), QtCore.Qt.MatchExactly)
|
||||||
if index == -1:
|
if index == -1:
|
||||||
# Not Found
|
# Not Found.
|
||||||
index = 0
|
index = 0
|
||||||
self.bible_theme = u''
|
self.bible_theme = u''
|
||||||
self.BibleThemeComboBox.setCurrentIndex(index)
|
self.BibleThemeComboBox.setCurrentIndex(index)
|
||||||
|
@ -44,24 +44,28 @@ class BibleMeta(BaseModel):
|
|||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class Testament(BaseModel):
|
class Testament(BaseModel):
|
||||||
"""
|
"""
|
||||||
Bible Testaments
|
Bible Testaments
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class Book(BaseModel):
|
class Book(BaseModel):
|
||||||
"""
|
"""
|
||||||
Song model
|
Song model
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class Verse(BaseModel):
|
class Verse(BaseModel):
|
||||||
"""
|
"""
|
||||||
Topic model
|
Topic model
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
def init_schema(url):
|
def init_schema(url):
|
||||||
"""
|
"""
|
||||||
Setup a bible database connection and initialise the database schema.
|
Setup a bible database connection and initialise the database schema.
|
||||||
@ -240,7 +244,7 @@ class BibleDB(QtCore.QObject, Manager):
|
|||||||
and the value is the verse text.
|
and the value is the verse text.
|
||||||
"""
|
"""
|
||||||
log.debug(u'create_chapter %s,%s', book_id, chapter)
|
log.debug(u'create_chapter %s,%s', book_id, chapter)
|
||||||
# text list has book and chapter as first two elements of the array
|
# Text list has book and chapter as first two elements of the array.
|
||||||
for verse_number, verse_text in textlist.iteritems():
|
for verse_number, verse_text in textlist.iteritems():
|
||||||
verse = Verse.populate(
|
verse = Verse.populate(
|
||||||
book_id = book_id,
|
book_id = book_id,
|
||||||
|
@ -364,12 +364,11 @@ class HTTPBible(BibleDB):
|
|||||||
if self.proxy_server:
|
if self.proxy_server:
|
||||||
self.create_meta(u'proxy server', self.proxy_server)
|
self.create_meta(u'proxy server', self.proxy_server)
|
||||||
if self.proxy_username:
|
if self.proxy_username:
|
||||||
# store the proxy userid
|
# Store the proxy userid.
|
||||||
self.create_meta(u'proxy username', self.proxy_username)
|
self.create_meta(u'proxy username', self.proxy_username)
|
||||||
if self.proxy_password:
|
if self.proxy_password:
|
||||||
# store the proxy password
|
# Store the proxy password.
|
||||||
self.create_meta(u'proxy password', self.proxy_password)
|
self.create_meta(u'proxy password', self.proxy_password)
|
||||||
self.wizard.incrementProgressBar('Registered.')
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def get_verses(self, reference_list):
|
def get_verses(self, reference_list):
|
||||||
@ -417,7 +416,7 @@ class HTTPBible(BibleDB):
|
|||||||
## to request ac and get Acts back.
|
## to request ac and get Acts back.
|
||||||
bookname = search_results.book
|
bookname = search_results.book
|
||||||
Receiver.send_message(u'openlp_process_events')
|
Receiver.send_message(u'openlp_process_events')
|
||||||
# check to see if book/chapter exists
|
# Check to see if book/chapter exists.
|
||||||
db_book = self.get_book(bookname)
|
db_book = self.get_book(bookname)
|
||||||
self.create_chapter(db_book.id, search_results.chapter,
|
self.create_chapter(db_book.id, search_results.chapter,
|
||||||
search_results.verselist)
|
search_results.verselist)
|
||||||
|
@ -257,17 +257,34 @@ class BibleManager(object):
|
|||||||
'Book Chapter:Verse-Chapter:Verse'))
|
'Book Chapter:Verse-Chapter:Verse'))
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def verse_search(self, bible, text):
|
def verse_search(self, bible, second_bible, text):
|
||||||
"""
|
"""
|
||||||
Does a verse search for the given bible and text.
|
Does a verse search for the given bible and text.
|
||||||
|
|
||||||
``bible``
|
``bible``
|
||||||
The bible to seach in (unicode).
|
The bible to seach in (unicode).
|
||||||
|
|
||||||
|
``second_bible``
|
||||||
|
The second bible (unicode). We do not search in this bible.
|
||||||
|
|
||||||
``text``
|
``text``
|
||||||
The text to search for (unicode).
|
The text to search for (unicode).
|
||||||
"""
|
"""
|
||||||
log.debug(u'BibleManager.verse_search("%s", "%s")', bible, text)
|
log.debug(u'BibleManager.verse_search("%s", "%s")', bible, text)
|
||||||
|
# Check if the bible or second_bible is a web bible.
|
||||||
|
webbible = self.db_cache[bible].get_object(BibleMeta,
|
||||||
|
u'download source')
|
||||||
|
second_webbible = u''
|
||||||
|
if second_bible:
|
||||||
|
second_webbible = self.db_cache[second_bible].get_object(BibleMeta,
|
||||||
|
u'download source')
|
||||||
|
if webbible or second_webbible:
|
||||||
|
QtGui.QMessageBox.information(self.parent.mediaItem,
|
||||||
|
translate('BiblesPlugin.BibleManager',
|
||||||
|
'Web Bible cannot be used'),
|
||||||
|
translate('BiblesPlugin.BibleManager', 'Text Search is not '
|
||||||
|
'available with Web Bibles.'))
|
||||||
|
return None
|
||||||
if text:
|
if text:
|
||||||
return self.db_cache[bible].verse_search(text)
|
return self.db_cache[bible].verse_search(text)
|
||||||
else:
|
else:
|
||||||
@ -317,4 +334,3 @@ class BibleManager(object):
|
|||||||
"""
|
"""
|
||||||
for bible in self.db_cache:
|
for bible in self.db_cache:
|
||||||
self.db_cache[bible].finalise()
|
self.db_cache[bible].finalise()
|
||||||
|
|
||||||
|
@ -47,21 +47,22 @@ class BibleListView(BaseListWithDnD):
|
|||||||
self.parent().onListViewResize(event.size().width(),
|
self.parent().onListViewResize(event.size().width(),
|
||||||
event.size().width())
|
event.size().width())
|
||||||
|
|
||||||
|
|
||||||
class BibleMediaItem(MediaManagerItem):
|
class BibleMediaItem(MediaManagerItem):
|
||||||
"""
|
"""
|
||||||
This is the custom media manager item for Bibles.
|
This is the custom media manager item for Bibles.
|
||||||
"""
|
"""
|
||||||
log.info(u'Bible Media Item loaded')
|
log.info(u'Bible Media Item loaded')
|
||||||
|
|
||||||
def __init__(self, parent, icon, title):
|
def __init__(self, parent, plugin, icon):
|
||||||
self.PluginNameShort = u'Bible'
|
self.PluginNameShort = u'Bible'
|
||||||
self.pluginNameVisible = translate('BiblesPlugin.MediaItem', 'Bible')
|
self.pluginNameVisible = translate('BiblesPlugin.MediaItem', 'Bible')
|
||||||
self.IconPath = u'songs/song'
|
self.IconPath = u'songs/song'
|
||||||
self.ListViewWithDnD_class = BibleListView
|
self.ListViewWithDnD_class = BibleListView
|
||||||
MediaManagerItem.__init__(self, parent, icon, title)
|
MediaManagerItem.__init__(self, parent, plugin, icon)
|
||||||
# place to store the search results for both bibles
|
# Place to store the search results for both bibles.
|
||||||
self.search_results = {}
|
self.search_results = {}
|
||||||
self.dual_search_results = {}
|
self.second_search_results = {}
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||||
QtCore.SIGNAL(u'bibles_load_list'), self.reloadBibles)
|
QtCore.SIGNAL(u'bibles_load_list'), self.reloadBibles)
|
||||||
|
|
||||||
@ -83,7 +84,7 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
self.SearchTabWidget.sizePolicy().hasHeightForWidth())
|
self.SearchTabWidget.sizePolicy().hasHeightForWidth())
|
||||||
self.SearchTabWidget.setSizePolicy(sizePolicy)
|
self.SearchTabWidget.setSizePolicy(sizePolicy)
|
||||||
self.SearchTabWidget.setObjectName(u'SearchTabWidget')
|
self.SearchTabWidget.setObjectName(u'SearchTabWidget')
|
||||||
# Add the Quick Search tab
|
# Add the Quick Search tab.
|
||||||
self.QuickTab = QtGui.QWidget()
|
self.QuickTab = QtGui.QWidget()
|
||||||
self.QuickTab.setObjectName(u'QuickTab')
|
self.QuickTab.setObjectName(u'QuickTab')
|
||||||
self.QuickLayout = QtGui.QGridLayout(self.QuickTab)
|
self.QuickLayout = QtGui.QGridLayout(self.QuickTab)
|
||||||
@ -144,7 +145,7 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
QuickSpacerItem = QtGui.QSpacerItem(20, 35, QtGui.QSizePolicy.Minimum,
|
QuickSpacerItem = QtGui.QSpacerItem(20, 35, QtGui.QSizePolicy.Minimum,
|
||||||
QtGui.QSizePolicy.Expanding)
|
QtGui.QSizePolicy.Expanding)
|
||||||
self.QuickLayout.addItem(QuickSpacerItem, 6, 2, 1, 1)
|
self.QuickLayout.addItem(QuickSpacerItem, 6, 2, 1, 1)
|
||||||
# Add the Advanced Search tab
|
# Add the Advanced Search tab.
|
||||||
self.AdvancedTab = QtGui.QWidget()
|
self.AdvancedTab = QtGui.QWidget()
|
||||||
self.AdvancedTab.setObjectName(u'AdvancedTab')
|
self.AdvancedTab.setObjectName(u'AdvancedTab')
|
||||||
self.AdvancedLayout = QtGui.QGridLayout(self.AdvancedTab)
|
self.AdvancedLayout = QtGui.QGridLayout(self.AdvancedTab)
|
||||||
@ -226,7 +227,7 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
self.AdvancedLayout.addWidget(self.AdvancedMessage, 8, 0, 1, 3)
|
self.AdvancedLayout.addWidget(self.AdvancedMessage, 8, 0, 1, 3)
|
||||||
self.SearchTabWidget.addTab(self.AdvancedTab,
|
self.SearchTabWidget.addTab(self.AdvancedTab,
|
||||||
translate('BiblesPlugin.MediaItem', 'Advanced'))
|
translate('BiblesPlugin.MediaItem', 'Advanced'))
|
||||||
# Add the search tab widget to the page layout
|
# Add the search tab widget to the page layout.
|
||||||
self.pageLayout.addWidget(self.SearchTabWidget)
|
self.pageLayout.addWidget(self.SearchTabWidget)
|
||||||
# Combo Boxes
|
# Combo Boxes
|
||||||
QtCore.QObject.connect(self.AdvancedVersionComboBox,
|
QtCore.QObject.connect(self.AdvancedVersionComboBox,
|
||||||
@ -239,6 +240,10 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
QtCore.SIGNAL(u'activated(int)'), self.onAdvancedFromVerse)
|
QtCore.SIGNAL(u'activated(int)'), self.onAdvancedFromVerse)
|
||||||
QtCore.QObject.connect(self.AdvancedToChapter,
|
QtCore.QObject.connect(self.AdvancedToChapter,
|
||||||
QtCore.SIGNAL(u'activated(int)'), self.onAdvancedToChapter)
|
QtCore.SIGNAL(u'activated(int)'), self.onAdvancedToChapter)
|
||||||
|
QtCore.QObject.connect(self.QuickSearchComboBox,
|
||||||
|
QtCore.SIGNAL(u'activated(int)'), self.updateAutoCompleter)
|
||||||
|
QtCore.QObject.connect(self.QuickVersionComboBox,
|
||||||
|
QtCore.SIGNAL(u'activated(int)'), self.updateAutoCompleter)
|
||||||
# Buttons
|
# Buttons
|
||||||
QtCore.QObject.connect(self.AdvancedSearchButton,
|
QtCore.QObject.connect(self.AdvancedSearchButton,
|
||||||
QtCore.SIGNAL(u'pressed()'), self.onAdvancedSearchButton)
|
QtCore.SIGNAL(u'pressed()'), self.onAdvancedSearchButton)
|
||||||
@ -270,7 +275,7 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
|
|
||||||
def configUpdated(self):
|
def configUpdated(self):
|
||||||
log.debug(u'configUpdated')
|
log.debug(u'configUpdated')
|
||||||
if QtCore.QSettings().value(self.settingsSection + u'/dual bibles',
|
if QtCore.QSettings().value(self.settingsSection + u'/second bibles',
|
||||||
QtCore.QVariant(True)).toBool():
|
QtCore.QVariant(True)).toBool():
|
||||||
self.AdvancedSecondBibleLabel.setVisible(True)
|
self.AdvancedSecondBibleLabel.setVisible(True)
|
||||||
self.AdvancedSecondBibleComboBox.setVisible(True)
|
self.AdvancedSecondBibleComboBox.setVisible(True)
|
||||||
@ -287,7 +292,7 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
self.QuickVersionLabel.setText(
|
self.QuickVersionLabel.setText(
|
||||||
translate('BiblesPlugin.MediaItem', 'Version:'))
|
translate('BiblesPlugin.MediaItem', 'Version:'))
|
||||||
self.QuickSecondVersionLabel.setText(
|
self.QuickSecondVersionLabel.setText(
|
||||||
translate('BiblesPlugin.MediaItem', 'Dual:'))
|
translate('BiblesPlugin.MediaItem', 'Second:'))
|
||||||
self.QuickSearchLabel.setText(
|
self.QuickSearchLabel.setText(
|
||||||
translate('BiblesPlugin.MediaItem', 'Search type:'))
|
translate('BiblesPlugin.MediaItem', 'Search type:'))
|
||||||
self.QuickSearchLabel.setText(
|
self.QuickSearchLabel.setText(
|
||||||
@ -299,7 +304,7 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
self.AdvancedVersionLabel.setText(
|
self.AdvancedVersionLabel.setText(
|
||||||
translate('BiblesPlugin.MediaItem', 'Version:'))
|
translate('BiblesPlugin.MediaItem', 'Version:'))
|
||||||
self.AdvancedSecondBibleLabel.setText(
|
self.AdvancedSecondBibleLabel.setText(
|
||||||
translate('BiblesPlugin.MediaItem', 'Dual:'))
|
translate('BiblesPlugin.MediaItem', 'Second:'))
|
||||||
self.AdvancedBookLabel.setText(
|
self.AdvancedBookLabel.setText(
|
||||||
translate('BiblesPlugin.MediaItem', 'Book:'))
|
translate('BiblesPlugin.MediaItem', 'Book:'))
|
||||||
self.AdvancedChapterLabel.setText(
|
self.AdvancedChapterLabel.setText(
|
||||||
@ -331,6 +336,7 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
log.debug(u'bible manager initialise')
|
log.debug(u'bible manager initialise')
|
||||||
self.parent.manager.media = self
|
self.parent.manager.media = self
|
||||||
self.loadBibles()
|
self.loadBibles()
|
||||||
|
self.updateAutoCompleter()
|
||||||
self.configUpdated()
|
self.configUpdated()
|
||||||
log.debug(u'bible manager initialise complete')
|
log.debug(u'bible manager initialise complete')
|
||||||
|
|
||||||
@ -338,7 +344,7 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
self.QuickMessage.setText(text)
|
self.QuickMessage.setText(text)
|
||||||
self.AdvancedMessage.setText(text)
|
self.AdvancedMessage.setText(text)
|
||||||
Receiver.send_message(u'openlp_process_events')
|
Receiver.send_message(u'openlp_process_events')
|
||||||
# minor delay to get the events processed
|
# Minor delay to get the events processed.
|
||||||
time.sleep(0.1)
|
time.sleep(0.1)
|
||||||
|
|
||||||
def onListViewResize(self, width, height):
|
def onListViewResize(self, width, height):
|
||||||
@ -358,12 +364,14 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
translate('BiblesPlugin.MediaItem', 'No Book Found'),
|
translate('BiblesPlugin.MediaItem', 'No Book Found'),
|
||||||
translate('BiblesPlugin.MediaItem',
|
translate('BiblesPlugin.MediaItem',
|
||||||
'No matching book could be found in this Bible.'))
|
'No matching book could be found in this Bible.'))
|
||||||
|
self.AdvancedSearchButton.setEnabled(True)
|
||||||
|
|
||||||
def onImportClick(self):
|
def onImportClick(self):
|
||||||
if not hasattr(self, u'import_wizard'):
|
if not hasattr(self, u'import_wizard'):
|
||||||
self.import_wizard = BibleImportForm(self, self.parent.manager,
|
self.import_wizard = BibleImportForm(self, self.parent.manager,
|
||||||
self.parent)
|
self.parent)
|
||||||
self.import_wizard.exec_()
|
# If the import was not canceled then reload.
|
||||||
|
if self.import_wizard.exec_():
|
||||||
self.reloadBibles()
|
self.reloadBibles()
|
||||||
|
|
||||||
def loadBibles(self):
|
def loadBibles(self):
|
||||||
@ -374,8 +382,10 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
self.AdvancedSecondBibleComboBox.clear()
|
self.AdvancedSecondBibleComboBox.clear()
|
||||||
self.QuickSecondBibleComboBox.addItem(u'')
|
self.QuickSecondBibleComboBox.addItem(u'')
|
||||||
self.AdvancedSecondBibleComboBox.addItem(u'')
|
self.AdvancedSecondBibleComboBox.addItem(u'')
|
||||||
|
# Get all bibles and sort the list.
|
||||||
bibles = self.parent.manager.get_bibles().keys()
|
bibles = self.parent.manager.get_bibles().keys()
|
||||||
# load bibles into the combo boxes
|
bibles.sort()
|
||||||
|
# Load the bibles into the combo boxes.
|
||||||
first = True
|
first = True
|
||||||
for bible in bibles:
|
for bible in bibles:
|
||||||
if bible:
|
if bible:
|
||||||
@ -393,6 +403,15 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
self.loadBibles()
|
self.loadBibles()
|
||||||
|
|
||||||
def initialiseBible(self, bible):
|
def initialiseBible(self, bible):
|
||||||
|
"""
|
||||||
|
This initialises the given bible, which means that its book names and
|
||||||
|
their chapter numbers is added to the combo boxes on the
|
||||||
|
'Advanced Search' Tab. This is not of any importance of the
|
||||||
|
'Quick Search' Tab.
|
||||||
|
|
||||||
|
``bible``
|
||||||
|
The bible to initialise (unicode).
|
||||||
|
"""
|
||||||
log.debug(u'initialiseBible %s', bible)
|
log.debug(u'initialiseBible %s', bible)
|
||||||
book_data = self.parent.manager.get_books(bible)
|
book_data = self.parent.manager.get_books(bible)
|
||||||
self.AdvancedBookComboBox.clear()
|
self.AdvancedBookComboBox.clear()
|
||||||
@ -423,6 +442,25 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
self.adjustComboBox(1, verse_count, self.AdvancedFromVerse)
|
self.adjustComboBox(1, verse_count, self.AdvancedFromVerse)
|
||||||
self.adjustComboBox(1, verse_count, self.AdvancedToVerse)
|
self.adjustComboBox(1, verse_count, self.AdvancedToVerse)
|
||||||
|
|
||||||
|
def updateAutoCompleter(self):
|
||||||
|
"""
|
||||||
|
This updates the bible book completion list for the search field. The
|
||||||
|
completion depends on the bible. It is only updated when we are doing a
|
||||||
|
verse search, otherwise the auto completion list is removed.
|
||||||
|
"""
|
||||||
|
books = []
|
||||||
|
# We have to do a 'Verse Search'.
|
||||||
|
if self.QuickSearchComboBox.currentIndex() == 0:
|
||||||
|
bibles = self.parent.manager.get_bibles()
|
||||||
|
bible = unicode(self.QuickVersionComboBox.currentText())
|
||||||
|
if bible:
|
||||||
|
book_data = bibles[bible].get_books()
|
||||||
|
books = [book.name for book in book_data]
|
||||||
|
books.sort()
|
||||||
|
completer = QtGui.QCompleter(books)
|
||||||
|
completer.setCaseSensitivity(QtCore.Qt.CaseInsensitive)
|
||||||
|
self.QuickSearchEdit.setCompleter(completer)
|
||||||
|
|
||||||
def onAdvancedVersionComboBox(self):
|
def onAdvancedVersionComboBox(self):
|
||||||
self.initialiseBible(
|
self.initialiseBible(
|
||||||
unicode(self.AdvancedVersionComboBox.currentText()))
|
unicode(self.AdvancedVersionComboBox.currentText()))
|
||||||
@ -482,6 +520,17 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
|
|
||||||
def adjustComboBox(self, range_from, range_to, combo, restore=False):
|
def adjustComboBox(self, range_from, range_to, combo, restore=False):
|
||||||
"""
|
"""
|
||||||
|
Adjusts the given como box to the given values.
|
||||||
|
|
||||||
|
``range_from``
|
||||||
|
The first number of the range (int).
|
||||||
|
|
||||||
|
``range_to``
|
||||||
|
The last number of the range (int).
|
||||||
|
|
||||||
|
``combo``
|
||||||
|
The combo box itself (QComboBox).
|
||||||
|
|
||||||
``restore``
|
``restore``
|
||||||
If True, then the combo's currentText will be restored after
|
If True, then the combo's currentText will be restored after
|
||||||
adjusting (if possible).
|
adjusting (if possible).
|
||||||
@ -490,16 +539,19 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
if restore:
|
if restore:
|
||||||
old_text = unicode(combo.currentText())
|
old_text = unicode(combo.currentText())
|
||||||
combo.clear()
|
combo.clear()
|
||||||
for i in range(int(range_from), int(range_to) + 1):
|
for i in range(range_from, range_to + 1):
|
||||||
combo.addItem(unicode(i))
|
combo.addItem(unicode(i))
|
||||||
if restore and combo.findText(old_text) != -1:
|
if restore and combo.findText(old_text) != -1:
|
||||||
combo.setCurrentIndex(combo.findText(old_text))
|
combo.setCurrentIndex(combo.findText(old_text))
|
||||||
|
|
||||||
def onAdvancedSearchButton(self):
|
def onAdvancedSearchButton(self):
|
||||||
|
"""
|
||||||
|
Does an advanced search and saves the search results.
|
||||||
|
"""
|
||||||
log.debug(u'Advanced Search Button pressed')
|
log.debug(u'Advanced Search Button pressed')
|
||||||
self.AdvancedSearchButton.setEnabled(False)
|
self.AdvancedSearchButton.setEnabled(False)
|
||||||
bible = unicode(self.AdvancedVersionComboBox.currentText())
|
bible = unicode(self.AdvancedVersionComboBox.currentText())
|
||||||
dual_bible = unicode(self.AdvancedSecondBibleComboBox.currentText())
|
second_bible = unicode(self.AdvancedSecondBibleComboBox.currentText())
|
||||||
book = unicode(self.AdvancedBookComboBox.currentText())
|
book = unicode(self.AdvancedBookComboBox.currentText())
|
||||||
chapter_from = int(self.AdvancedFromChapter.currentText())
|
chapter_from = int(self.AdvancedFromChapter.currentText())
|
||||||
chapter_to = int(self.AdvancedToChapter.currentText())
|
chapter_to = int(self.AdvancedToChapter.currentText())
|
||||||
@ -508,74 +560,81 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
versetext = u'%s %s:%s-%s:%s' % (book, chapter_from, verse_from,
|
versetext = u'%s %s:%s-%s:%s' % (book, chapter_from, verse_from,
|
||||||
chapter_to, verse_to)
|
chapter_to, verse_to)
|
||||||
self.search_results = self.parent.manager.get_verses(bible, versetext)
|
self.search_results = self.parent.manager.get_verses(bible, versetext)
|
||||||
if dual_bible:
|
if second_bible:
|
||||||
self.dual_search_results = self.parent.manager.get_verses(
|
self.second_search_results = self.parent.manager.get_verses(
|
||||||
dual_bible, versetext)
|
second_bible, versetext)
|
||||||
if self.ClearAdvancedSearchComboBox.currentIndex() == 0:
|
if self.ClearAdvancedSearchComboBox.currentIndex() == 0:
|
||||||
self.listView.clear()
|
self.listView.clear()
|
||||||
if self.listView.count() != 0:
|
if self.listView.count() != 0:
|
||||||
|
# Check if the first item is a second bible item or not.
|
||||||
bitem = self.listView.item(0)
|
bitem = self.listView.item(0)
|
||||||
item_dual_bible = self._decodeQtObject(bitem, 'dual_bible')
|
item_second_bible = self._decodeQtObject(bitem, 'second_bible')
|
||||||
if item_dual_bible and dual_bible or not item_dual_bible and \
|
if item_second_bible and second_bible or not item_second_bible and \
|
||||||
not dual_bible:
|
not second_bible:
|
||||||
self.displayResults(bible, dual_bible)
|
self.displayResults(bible, second_bible)
|
||||||
elif QtGui.QMessageBox.critical(self,
|
elif QtGui.QMessageBox.critical(self,
|
||||||
translate('BiblePlugin.MediaItem', 'Error'),
|
translate('BiblePlugin.MediaItem', 'Error'),
|
||||||
translate('BiblePlugin.MediaItem', 'You cannot combine single '
|
translate('BiblePlugin.MediaItem', 'You cannot combine single '
|
||||||
'and dual bible verses. Do you want to delete your search '
|
'and second bible verses. Do you want to delete your search '
|
||||||
'results and start a new search?'),
|
'results and start a new search?'),
|
||||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.No |
|
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.No |
|
||||||
QtGui.QMessageBox.Yes)) == QtGui.QMessageBox.Yes:
|
QtGui.QMessageBox.Yes)) == QtGui.QMessageBox.Yes:
|
||||||
self.listView.clear()
|
self.listView.clear()
|
||||||
self.displayResults(bible, dual_bible)
|
self.displayResults(bible, second_bible)
|
||||||
else:
|
else:
|
||||||
self.displayResults(bible, dual_bible)
|
self.displayResults(bible, second_bible)
|
||||||
self.AdvancedSearchButton.setEnabled(True)
|
self.AdvancedSearchButton.setEnabled(True)
|
||||||
|
|
||||||
def onQuickSearchButton(self):
|
def onQuickSearchButton(self):
|
||||||
|
"""
|
||||||
|
Does a quick search and saves the search results. Quick search can
|
||||||
|
either be "Verse Search" or "Text Search".
|
||||||
|
"""
|
||||||
log.debug(u'Quick Search Button pressed')
|
log.debug(u'Quick Search Button pressed')
|
||||||
self.QuickSearchButton.setEnabled(False)
|
self.QuickSearchButton.setEnabled(False)
|
||||||
bible = unicode(self.QuickVersionComboBox.currentText())
|
bible = unicode(self.QuickVersionComboBox.currentText())
|
||||||
dual_bible = unicode(self.QuickSecondBibleComboBox.currentText())
|
second_bible = unicode(self.QuickSecondBibleComboBox.currentText())
|
||||||
text = unicode(self.QuickSearchEdit.text())
|
text = unicode(self.QuickSearchEdit.text())
|
||||||
if self.QuickSearchComboBox.currentIndex() == 0:
|
if self.QuickSearchComboBox.currentIndex() == 0:
|
||||||
# We are doing a 'Verse Search'.
|
# We are doing a 'Verse Search'.
|
||||||
self.search_results = self.parent.manager.get_verses(bible, text)
|
self.search_results = self.parent.manager.get_verses(bible, text)
|
||||||
if dual_bible and self.search_results:
|
if second_bible and self.search_results:
|
||||||
self.dual_search_results = self.parent.manager.get_verses(
|
self.second_search_results = self.parent.manager.get_verses(
|
||||||
dual_bible, text)
|
second_bible, text)
|
||||||
else:
|
else:
|
||||||
# We are doing a 'Text Search'.
|
# We are doing a 'Text Search'.
|
||||||
bibles = self.parent.manager.get_bibles()
|
bibles = self.parent.manager.get_bibles()
|
||||||
self.search_results = self.parent.manager.verse_search(bible, text)
|
self.search_results = self.parent.manager.verse_search(bible,
|
||||||
if dual_bible and self.search_results:
|
second_bible, text)
|
||||||
|
if second_bible and self.search_results:
|
||||||
text = []
|
text = []
|
||||||
for verse in self.search_results:
|
for verse in self.search_results:
|
||||||
text.append((verse.book.name, verse.chapter, verse.verse,
|
text.append((verse.book.name, verse.chapter, verse.verse,
|
||||||
verse.verse))
|
verse.verse))
|
||||||
self.dual_search_results = bibles[dual_bible].get_verses(text)
|
self.second_search_results = \
|
||||||
|
bibles[second_bible].get_verses(text)
|
||||||
if self.ClearQuickSearchComboBox.currentIndex() == 0:
|
if self.ClearQuickSearchComboBox.currentIndex() == 0:
|
||||||
self.listView.clear()
|
self.listView.clear()
|
||||||
if self.listView.count() != 0 and self.search_results:
|
if self.listView.count() != 0 and self.search_results:
|
||||||
bitem = self.listView.item(0)
|
bitem = self.listView.item(0)
|
||||||
item_dual_bible = self._decodeQtObject(bitem, 'dual_bible')
|
item_second_bible = self._decodeQtObject(bitem, 'second_bible')
|
||||||
if item_dual_bible and dual_bible or not item_dual_bible and \
|
if item_second_bible and second_bible or not item_second_bible and \
|
||||||
not dual_bible:
|
not second_bible:
|
||||||
self.displayResults(bible, dual_bible)
|
self.displayResults(bible, second_bible)
|
||||||
elif QtGui.QMessageBox.critical(self,
|
elif QtGui.QMessageBox.critical(self,
|
||||||
translate('BiblePlugin.MediaItem', 'Error'),
|
translate('BiblePlugin.MediaItem', 'Error'),
|
||||||
translate('BiblePlugin.MediaItem', 'You cannot combine single '
|
translate('BiblePlugin.MediaItem', 'You cannot combine single '
|
||||||
'and dual bible verses. Do you want to delete your search '
|
'and second bible verses. Do you want to delete your search '
|
||||||
'results and start a new search?'),
|
'results and start a new search?'),
|
||||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.No |
|
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.No |
|
||||||
QtGui.QMessageBox.Yes)) == QtGui.QMessageBox.Yes:
|
QtGui.QMessageBox.Yes)) == QtGui.QMessageBox.Yes:
|
||||||
self.listView.clear()
|
self.listView.clear()
|
||||||
self.displayResults(bible, dual_bible)
|
self.displayResults(bible, second_bible)
|
||||||
elif self.search_results:
|
elif self.search_results:
|
||||||
self.displayResults(bible, dual_bible)
|
self.displayResults(bible, second_bible)
|
||||||
self.QuickSearchButton.setEnabled(True)
|
self.QuickSearchButton.setEnabled(True)
|
||||||
|
|
||||||
def displayResults(self, bible, dual_bible=u''):
|
def displayResults(self, bible, second_bible=u''):
|
||||||
"""
|
"""
|
||||||
Displays the search results in the media manager. All data needed for
|
Displays the search results in the media manager. All data needed for
|
||||||
further action is saved for/in each row.
|
further action is saved for/in each row.
|
||||||
@ -583,19 +642,18 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
version = self.parent.manager.get_meta_data(bible, u'Version')
|
version = self.parent.manager.get_meta_data(bible, u'Version')
|
||||||
copyright = self.parent.manager.get_meta_data(bible, u'Copyright')
|
copyright = self.parent.manager.get_meta_data(bible, u'Copyright')
|
||||||
permissions = self.parent.manager.get_meta_data(bible, u'Permissions')
|
permissions = self.parent.manager.get_meta_data(bible, u'Permissions')
|
||||||
if dual_bible:
|
if second_bible:
|
||||||
dual_version = self.parent.manager.get_meta_data(dual_bible,
|
second_version = self.parent.manager.get_meta_data(second_bible,
|
||||||
u'Version')
|
u'Version')
|
||||||
dual_copyright = self.parent.manager.get_meta_data(dual_bible,
|
second_copyright = self.parent.manager.get_meta_data(second_bible,
|
||||||
u'Copyright')
|
u'Copyright')
|
||||||
dual_permissions = self.parent.manager.get_meta_data(dual_bible,
|
second_permissions = self.parent.manager.get_meta_data(second_bible,
|
||||||
u'Permissions')
|
u'Permissions')
|
||||||
if not dual_permissions:
|
if not second_permissions:
|
||||||
dual_permissions = u''
|
second_permissions = u''
|
||||||
# We count the number of rows which are maybe already present.
|
|
||||||
start_count = self.listView.count()
|
|
||||||
for count, verse in enumerate(self.search_results):
|
for count, verse in enumerate(self.search_results):
|
||||||
if dual_bible:
|
if second_bible:
|
||||||
|
try:
|
||||||
vdict = {
|
vdict = {
|
||||||
'book': QtCore.QVariant(verse.book.name),
|
'book': QtCore.QVariant(verse.book.name),
|
||||||
'chapter': QtCore.QVariant(verse.chapter),
|
'chapter': QtCore.QVariant(verse.chapter),
|
||||||
@ -605,16 +663,20 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
'copyright': QtCore.QVariant(copyright.value),
|
'copyright': QtCore.QVariant(copyright.value),
|
||||||
'permissions': QtCore.QVariant(permissions.value),
|
'permissions': QtCore.QVariant(permissions.value),
|
||||||
'text': QtCore.QVariant(verse.text),
|
'text': QtCore.QVariant(verse.text),
|
||||||
'dual_bible': QtCore.QVariant(dual_bible),
|
'second_bible': QtCore.QVariant(second_bible),
|
||||||
'dual_version': QtCore.QVariant(dual_version.value),
|
'second_version': QtCore.QVariant(second_version.value),
|
||||||
'dual_copyright': QtCore.QVariant(dual_copyright.value),
|
'second_copyright': QtCore.QVariant(
|
||||||
'dual_permissions': QtCore.QVariant(dual_permissions.value),
|
second_copyright.value),
|
||||||
'dual_text': QtCore.QVariant(
|
'second_permissions': QtCore.QVariant(
|
||||||
self.dual_search_results[count].text)
|
second_permissions.value),
|
||||||
|
'second_text': QtCore.QVariant(
|
||||||
|
self.second_search_results[count].text)
|
||||||
}
|
}
|
||||||
|
except IndexError:
|
||||||
|
break
|
||||||
bible_text = u' %s %d:%d (%s, %s)' % (verse.book.name,
|
bible_text = u' %s %d:%d (%s, %s)' % (verse.book.name,
|
||||||
verse.chapter, verse.verse, version.value,
|
verse.chapter, verse.verse, version.value,
|
||||||
dual_version.value)
|
second_version.value)
|
||||||
else:
|
else:
|
||||||
vdict = {
|
vdict = {
|
||||||
'book': QtCore.QVariant(verse.book.name),
|
'book': QtCore.QVariant(verse.book.name),
|
||||||
@ -625,22 +687,20 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
'copyright': QtCore.QVariant(copyright.value),
|
'copyright': QtCore.QVariant(copyright.value),
|
||||||
'permissions': QtCore.QVariant(permissions.value),
|
'permissions': QtCore.QVariant(permissions.value),
|
||||||
'text': QtCore.QVariant(verse.text),
|
'text': QtCore.QVariant(verse.text),
|
||||||
'dual_bible': QtCore.QVariant(u''),
|
'second_bible': QtCore.QVariant(u''),
|
||||||
'dual_version': QtCore.QVariant(u''),
|
'second_version': QtCore.QVariant(u''),
|
||||||
'dual_copyright': QtCore.QVariant(u''),
|
'second_copyright': QtCore.QVariant(u''),
|
||||||
'dual_permissions': QtCore.QVariant(u''),
|
'second_permissions': QtCore.QVariant(u''),
|
||||||
'dual_text': QtCore.QVariant(u'')
|
'second_text': QtCore.QVariant(u'')
|
||||||
}
|
}
|
||||||
bible_text = u'%s %d:%d (%s)' % (verse.book.name,
|
bible_text = u'%s %d:%d (%s)' % (verse.book.name,
|
||||||
verse.chapter, verse.verse, version.value)
|
verse.chapter, verse.verse, version.value)
|
||||||
bible_verse = QtGui.QListWidgetItem(bible_text)
|
bible_verse = QtGui.QListWidgetItem(bible_text)
|
||||||
bible_verse.setData(QtCore.Qt.UserRole, QtCore.QVariant(vdict))
|
bible_verse.setData(QtCore.Qt.UserRole, QtCore.QVariant(vdict))
|
||||||
self.listView.addItem(bible_verse)
|
self.listView.addItem(bible_verse)
|
||||||
row = self.listView.setCurrentRow(count + start_count)
|
self.listView.selectAll()
|
||||||
if row:
|
|
||||||
row.setSelected(True)
|
|
||||||
self.search_results = {}
|
self.search_results = {}
|
||||||
self.dual_search_results = {}
|
self.second_search_results = {}
|
||||||
|
|
||||||
def _decodeQtObject(self, bitem, key):
|
def _decodeQtObject(self, bitem, key):
|
||||||
reference = bitem.data(QtCore.Qt.UserRole)
|
reference = bitem.data(QtCore.Qt.UserRole)
|
||||||
@ -661,7 +721,7 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
if len(items) == 0:
|
if len(items) == 0:
|
||||||
return False
|
return False
|
||||||
bible_text = u''
|
bible_text = u''
|
||||||
old_chapter = u''
|
old_chapter = -1
|
||||||
raw_footer = []
|
raw_footer = []
|
||||||
raw_slides = []
|
raw_slides = []
|
||||||
raw_title = []
|
raw_title = []
|
||||||
@ -676,22 +736,22 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
copyright = self._decodeQtObject(bitem, 'copyright')
|
copyright = self._decodeQtObject(bitem, 'copyright')
|
||||||
permissions = self._decodeQtObject(bitem, 'permissions')
|
permissions = self._decodeQtObject(bitem, 'permissions')
|
||||||
text = self._decodeQtObject(bitem, 'text')
|
text = self._decodeQtObject(bitem, 'text')
|
||||||
dual_bible = self._decodeQtObject(bitem, 'dual_bible')
|
second_bible = self._decodeQtObject(bitem, 'second_bible')
|
||||||
dual_version = self._decodeQtObject(bitem, 'dual_version')
|
second_version = self._decodeQtObject(bitem, 'second_version')
|
||||||
dual_copyright = self._decodeQtObject(bitem, 'dual_copyright')
|
second_copyright = self._decodeQtObject(bitem, 'second_copyright')
|
||||||
dual_permissions = self._decodeQtObject(bitem, 'dual_permissions')
|
second_permissions = self._decodeQtObject(bitem, 'second_permissions')
|
||||||
dual_text = self._decodeQtObject(bitem, 'dual_text')
|
second_text = self._decodeQtObject(bitem, 'second_text')
|
||||||
verse_text = self.formatVerse(old_chapter, chapter, verse)
|
verse_text = self.formatVerse(old_chapter, chapter, verse)
|
||||||
footer = u'%s (%s %s %s)' % (book, version, copyright, permissions)
|
footer = u'%s (%s %s %s)' % (book, version, copyright, permissions)
|
||||||
if footer not in raw_footer:
|
if footer not in raw_footer:
|
||||||
raw_footer.append(footer)
|
raw_footer.append(footer)
|
||||||
if dual_bible:
|
if second_bible:
|
||||||
footer = u'%s (%s %s %s)' % (book, dual_version, dual_copyright,
|
footer = u'%s (%s %s %s)' % (book, second_version,
|
||||||
dual_permissions)
|
second_copyright, second_permissions)
|
||||||
if footer not in raw_footer:
|
if footer not in raw_footer:
|
||||||
raw_footer.append(footer)
|
raw_footer.append(footer)
|
||||||
bible_text = u'%s %s\n\n%s %s' % (verse_text, text, verse_text,
|
bible_text = u'%s %s\n\n%s %s' % (verse_text, text, verse_text,
|
||||||
dual_text)
|
second_text)
|
||||||
raw_slides.append(bible_text)
|
raw_slides.append(bible_text)
|
||||||
bible_text = u''
|
bible_text = u''
|
||||||
# If we are 'Verse Per Slide' then create a new slide.
|
# If we are 'Verse Per Slide' then create a new slide.
|
||||||
@ -719,7 +779,7 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
raw_slides.append(bible_text)
|
raw_slides.append(bible_text)
|
||||||
bible_text = u''
|
bible_text = u''
|
||||||
# Service Item: Capabilities
|
# Service Item: Capabilities
|
||||||
if self.parent.settings_tab.layout_style == 2 and not dual_bible:
|
if self.parent.settings_tab.layout_style == 2 and not second_bible:
|
||||||
# Split the line but do not replace line breaks in renderer.
|
# Split the line but do not replace line breaks in renderer.
|
||||||
service_item.add_capability(ItemCapabilities.NoLineBreaks)
|
service_item.add_capability(ItemCapabilities.NoLineBreaks)
|
||||||
service_item.add_capability(ItemCapabilities.AllowsPreview)
|
service_item.add_capability(ItemCapabilities.AllowsPreview)
|
||||||
@ -749,6 +809,12 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
This methode is called, when we have to change the title, because
|
This methode is called, when we have to change the title, because
|
||||||
we are at the end of a verse range. E. g. if we want to add
|
we are at the end of a verse range. E. g. if we want to add
|
||||||
Genesis 1:1-6 as well as Daniel 2:14.
|
Genesis 1:1-6 as well as Daniel 2:14.
|
||||||
|
|
||||||
|
``start_item``
|
||||||
|
The first item of a range.
|
||||||
|
|
||||||
|
``old_item``
|
||||||
|
The last item of a range.
|
||||||
"""
|
"""
|
||||||
old_bitem = self.listView.item(old_item.row())
|
old_bitem = self.listView.item(old_item.row())
|
||||||
old_chapter = int(self._decodeQtObject(old_bitem, 'chapter'))
|
old_chapter = int(self._decodeQtObject(old_bitem, 'chapter'))
|
||||||
@ -758,18 +824,18 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
start_chapter = int(self._decodeQtObject(start_bitem, 'chapter'))
|
start_chapter = int(self._decodeQtObject(start_bitem, 'chapter'))
|
||||||
start_verse = int(self._decodeQtObject(start_bitem, 'verse'))
|
start_verse = int(self._decodeQtObject(start_bitem, 'verse'))
|
||||||
start_bible = self._decodeQtObject(start_bitem, 'bible')
|
start_bible = self._decodeQtObject(start_bitem, 'bible')
|
||||||
start_dual_bible = self._decodeQtObject(start_bitem, 'dual_bible')
|
start_second_bible = self._decodeQtObject(start_bitem, 'second_bible')
|
||||||
if start_dual_bible:
|
if start_second_bible:
|
||||||
if start_verse == old_verse and start_chapter == old_chapter:
|
if start_verse == old_verse and start_chapter == old_chapter:
|
||||||
title = u'%s %s:%s (%s, %s)' % (start_book, start_chapter,
|
title = u'%s %s:%s (%s, %s)' % (start_book, start_chapter,
|
||||||
start_verse, start_bible, start_dual_bible)
|
start_verse, start_bible, start_second_bible)
|
||||||
elif start_chapter == old_chapter:
|
elif start_chapter == old_chapter:
|
||||||
title = u'%s %s:%s-%s (%s, %s)' % (start_book, start_chapter,
|
title = u'%s %s:%s-%s (%s, %s)' % (start_book, start_chapter,
|
||||||
start_verse, old_verse, start_bible, start_dual_bible)
|
start_verse, old_verse, start_bible, start_second_bible)
|
||||||
else:
|
else:
|
||||||
title = u'%s %s:%s-%s:%s (%s, %s)' % (start_book, start_chapter,
|
title = u'%s %s:%s-%s:%s (%s, %s)' % (start_book, start_chapter,
|
||||||
start_verse, old_chapter, old_verse, start_bible,
|
start_verse, old_chapter, old_verse, start_bible,
|
||||||
start_dual_bible)
|
start_second_bible)
|
||||||
else:
|
else:
|
||||||
if start_verse == old_verse and start_chapter == old_chapter:
|
if start_verse == old_verse and start_chapter == old_chapter:
|
||||||
title = u'%s %s:%s (%s)' % (start_book, start_chapter,
|
title = u'%s %s:%s (%s)' % (start_book, start_chapter,
|
||||||
@ -785,34 +851,62 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
def checkTitle(self, item, old_item):
|
def checkTitle(self, item, old_item):
|
||||||
"""
|
"""
|
||||||
This methode checks if we are at the end of an verse range. If that is
|
This methode checks if we are at the end of an verse range. If that is
|
||||||
the case, we return True, else False. E. g. if we added Genesis 1:1-6,
|
the case, we return True, otherwise False. E. g. if we added
|
||||||
but the next verse is Daniel 2:14.
|
Genesis 1:1-6, but the next verse is Daniel 2:14, we return True.
|
||||||
|
|
||||||
|
``item``
|
||||||
|
The item we are dealing with at the moment.
|
||||||
|
|
||||||
|
``old_item``
|
||||||
|
The item we were previously dealing with.
|
||||||
"""
|
"""
|
||||||
|
# Get all the necessary meta data.
|
||||||
bitem = self.listView.item(item.row())
|
bitem = self.listView.item(item.row())
|
||||||
book = self._decodeQtObject(bitem, 'book')
|
book = self._decodeQtObject(bitem, 'book')
|
||||||
chapter = int(self._decodeQtObject(bitem, 'chapter'))
|
chapter = int(self._decodeQtObject(bitem, 'chapter'))
|
||||||
verse = int(self._decodeQtObject(bitem, 'verse'))
|
verse = int(self._decodeQtObject(bitem, 'verse'))
|
||||||
bible = self._decodeQtObject(bitem, 'bible')
|
bible = self._decodeQtObject(bitem, 'bible')
|
||||||
dual_bible = self._decodeQtObject(bitem, 'dual_bible')
|
second_bible = self._decodeQtObject(bitem, 'second_bible')
|
||||||
old_bitem = self.listView.item(old_item.row())
|
old_bitem = self.listView.item(old_item.row())
|
||||||
old_book = self._decodeQtObject(old_bitem, 'book')
|
old_book = self._decodeQtObject(old_bitem, 'book')
|
||||||
old_chapter = int(self._decodeQtObject(old_bitem, 'chapter'))
|
old_chapter = int(self._decodeQtObject(old_bitem, 'chapter'))
|
||||||
old_verse = int(self._decodeQtObject(old_bitem, 'verse'))
|
old_verse = int(self._decodeQtObject(old_bitem, 'verse'))
|
||||||
old_bible = self._decodeQtObject(old_bitem, 'bible')
|
old_bible = self._decodeQtObject(old_bitem, 'bible')
|
||||||
old_dual_bible = self._decodeQtObject(old_bitem, 'dual_bible')
|
old_second_bible = self._decodeQtObject(old_bitem, 'second_bible')
|
||||||
if old_bible != bible or old_dual_bible != dual_bible or \
|
if old_bible != bible or old_second_bible != second_bible or \
|
||||||
old_book != book:
|
old_book != book:
|
||||||
|
# The bible, second bible or book has changed.
|
||||||
return True
|
return True
|
||||||
elif old_verse + 1 != verse and old_chapter == chapter:
|
elif old_verse + 1 != verse and old_chapter == chapter:
|
||||||
|
# We are still in the same chapter, but a verse has been skipped.
|
||||||
return True
|
return True
|
||||||
elif old_chapter + 1 == chapter and (verse != 1 or
|
elif old_chapter + 1 == chapter and (verse != 1 or
|
||||||
old_verse != self.parent.manager.get_verse_count(
|
old_verse != self.parent.manager.get_verse_count(
|
||||||
old_bible, old_book, old_chapter)):
|
old_bible, old_book, old_chapter)):
|
||||||
|
# We are in the following chapter, but the last verse was not the
|
||||||
|
# last verse of the chapter or the current verse is not the
|
||||||
|
# first one of the chapter.
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def formatVerse(self, old_chapter, chapter, verse):
|
def formatVerse(self, old_chapter, chapter, verse):
|
||||||
|
"""
|
||||||
|
Formats and returns the text, each verse starts with, for the given
|
||||||
|
chapter and verse. The text is either surrounded by round, square,
|
||||||
|
curly brackets or no brackets at all. For example::
|
||||||
|
|
||||||
|
u'{su}1:1{/su}'
|
||||||
|
|
||||||
|
``old_chapter``
|
||||||
|
The previous verse's chapter number (int).
|
||||||
|
|
||||||
|
``chapter``
|
||||||
|
The chapter number (int).
|
||||||
|
|
||||||
|
``verse``
|
||||||
|
The verse number (int).
|
||||||
|
"""
|
||||||
if not self.parent.settings_tab.show_new_chapters or \
|
if not self.parent.settings_tab.show_new_chapters or \
|
||||||
old_chapter != chapter:
|
old_chapter != chapter:
|
||||||
verse_text = u'%s:%s' % (chapter, verse)
|
verse_text = u'%s:%s' % (chapter, verse)
|
||||||
|
@ -42,9 +42,8 @@ The basic XML is of the format::
|
|||||||
import logging
|
import logging
|
||||||
|
|
||||||
from xml.dom.minidom import Document
|
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 lxml import etree, objectify
|
||||||
from xml.parsers.expat import ExpatError
|
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@ -507,8 +507,7 @@ class SongImportForm(QtGui.QWizard, Ui_SongImportWizard):
|
|||||||
filenames=self.getListOfFiles(
|
filenames=self.getListOfFiles(
|
||||||
self.songBeamerFileListWidget)
|
self.songBeamerFileListWidget)
|
||||||
)
|
)
|
||||||
success = importer.do_import()
|
if importer.do_import():
|
||||||
if success:
|
|
||||||
# reload songs
|
# reload songs
|
||||||
self.importProgressLabel.setText(
|
self.importProgressLabel.setText(
|
||||||
translate('SongsPlugin.SongImportForm', 'Finished import.'))
|
translate('SongsPlugin.SongImportForm', 'Finished import.'))
|
||||||
|
@ -152,7 +152,7 @@ class OpenLPSongImport(SongImport):
|
|||||||
u'Importing song %s of %s' % (song_count, song_total))
|
u'Importing song %s of %s' % (song_count, song_total))
|
||||||
new_song = Song()
|
new_song = Song()
|
||||||
new_song.title = song.title
|
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
|
new_song.alternate_title = song.alternate_title
|
||||||
else:
|
else:
|
||||||
old_titles = song.search_title.split(u'@')
|
old_titles = song.search_title.split(u'@')
|
||||||
|
@ -57,6 +57,7 @@ class SongBeamerTypes(object):
|
|||||||
u'Unknown': u'O'
|
u'Unknown': u'O'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class SongBeamerImport(SongImport):
|
class SongBeamerImport(SongImport):
|
||||||
"""
|
"""
|
||||||
Import Song Beamer files(s)
|
Import Song Beamer files(s)
|
||||||
@ -66,6 +67,7 @@ class SongBeamerImport(SongImport):
|
|||||||
def __init__(self, master_manager, **kwargs):
|
def __init__(self, master_manager, **kwargs):
|
||||||
"""
|
"""
|
||||||
Initialise the import.
|
Initialise the import.
|
||||||
|
|
||||||
``master_manager``
|
``master_manager``
|
||||||
The song manager for the running OpenLP installation.
|
The song manager for the running OpenLP installation.
|
||||||
"""
|
"""
|
||||||
@ -88,6 +90,7 @@ class SongBeamerImport(SongImport):
|
|||||||
# TODO: check that it is a valid SongBeamer file
|
# TODO: check that it is a valid SongBeamer file
|
||||||
self.current_verse = u''
|
self.current_verse = u''
|
||||||
self.current_verse_type = u'V'
|
self.current_verse_type = u'V'
|
||||||
|
read_verses = False
|
||||||
self.file_name = os.path.split(file)[1]
|
self.file_name = os.path.split(file)[1]
|
||||||
self.import_wizard.incrementProgressBar(
|
self.import_wizard.incrementProgressBar(
|
||||||
"Importing %s" % (self.file_name), 0)
|
"Importing %s" % (self.file_name), 0)
|
||||||
@ -100,134 +103,182 @@ class SongBeamerImport(SongImport):
|
|||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
for line in self.songData:
|
for line in self.songData:
|
||||||
line = line.strip()
|
# Just make sure that the line is of the type 'Unicode'.
|
||||||
if line.startswith('#'):
|
line = unicode(line).strip()
|
||||||
log.debug(u'find tag: %s' % line)
|
if line.startswith(u'#') and not read_verses:
|
||||||
if not self.parse_tags(line):
|
self.parse_tags(line)
|
||||||
return False
|
elif line.startswith(u'---'):
|
||||||
elif line.startswith('---'):
|
if self.current_verse:
|
||||||
log.debug(u'find ---')
|
self.replace_html_tags()
|
||||||
if len(self.current_verse) > 0:
|
|
||||||
self.add_verse(self.current_verse,
|
self.add_verse(self.current_verse,
|
||||||
self.current_verse_type)
|
self.current_verse_type)
|
||||||
self.current_verse = u''
|
self.current_verse = u''
|
||||||
self.current_verse_type = u'V'
|
self.current_verse_type = u'V'
|
||||||
self.read_verse = True
|
read_verses = True
|
||||||
self.verse_start = True
|
verse_start = True
|
||||||
elif self.read_verse:
|
elif read_verses:
|
||||||
if self.verse_start:
|
if verse_start:
|
||||||
self.check_verse_marks(line)
|
verse_start = False
|
||||||
self.verse_start = False
|
if not self.check_verse_marks(line):
|
||||||
|
self.current_verse = u'%s\n' % line
|
||||||
else:
|
else:
|
||||||
self.current_verse += u'%s\n' % line
|
self.current_verse += u'%s\n' % line
|
||||||
if len(self.current_verse) > 0:
|
if self.current_verse:
|
||||||
|
self.replace_html_tags()
|
||||||
self.add_verse(self.current_verse, self.current_verse_type)
|
self.add_verse(self.current_verse, self.current_verse_type)
|
||||||
self.finish()
|
self.finish()
|
||||||
self.import_wizard.incrementProgressBar(
|
self.import_wizard.incrementProgressBar(
|
||||||
"Importing %s" % (self.file_name))
|
"Importing %s" % (self.file_name))
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
def replace_html_tags(self):
|
||||||
|
"""
|
||||||
|
This can be called to replace SongBeamer's specific (html) tags with
|
||||||
|
OpenLP's specific (html) tags.
|
||||||
|
"""
|
||||||
|
tag_pairs = [
|
||||||
|
(u'<b>', u'{st}'),
|
||||||
|
(u'</b>', u'{/st}'),
|
||||||
|
(u'<i>', u'{it}'),
|
||||||
|
(u'</i>', u'{/it}'),
|
||||||
|
(u'<u>', u'{u}'),
|
||||||
|
(u'</u>', u'{/u}'),
|
||||||
|
(u'<br>', u'{st}'),
|
||||||
|
(u'</br>', u'{st}'),
|
||||||
|
(u'</ br>', u'{st}'),
|
||||||
|
(u'<p>', u'{p}'),
|
||||||
|
(u'</p>', u'{/p}'),
|
||||||
|
(u'<super>', u'{su}'),
|
||||||
|
(u'</super>', u'{/su}'),
|
||||||
|
(u'<sub>', u'{sb}'),
|
||||||
|
(u'</sub>', u'{/sb}'),
|
||||||
|
(u'<wordwrap>', u''),
|
||||||
|
(u'</wordwrap>', u''),
|
||||||
|
(u'<strike>', u''),
|
||||||
|
(u'</strike>', u'')
|
||||||
|
]
|
||||||
|
for pair in tag_pairs:
|
||||||
|
self.current_verse = self.current_verse.replace(pair[0], pair[1])
|
||||||
|
# TODO: check for unsupported tags (see wiki) and remove them as well.
|
||||||
|
|
||||||
def parse_tags(self, line):
|
def parse_tags(self, line):
|
||||||
tag_val = line.split('=')
|
"""
|
||||||
if len(tag_val[0]) == 0 or len(tag_val[1]) == 0:
|
Parses a meta data line.
|
||||||
return True
|
|
||||||
if tag_val[0] == '#(c)':
|
``line``
|
||||||
|
The line in the file. It should consist of a tag and a value
|
||||||
|
for this tag (unicode)::
|
||||||
|
|
||||||
|
u'#Title=Nearer my God to Thee'
|
||||||
|
"""
|
||||||
|
tag_val = line.split(u'=', 1)
|
||||||
|
if len(tag_val) == 1:
|
||||||
|
return
|
||||||
|
if not tag_val[0] or not tag_val[1]:
|
||||||
|
return
|
||||||
|
if tag_val[0] == u'#(c)':
|
||||||
self.add_copyright(tag_val[1])
|
self.add_copyright(tag_val[1])
|
||||||
elif tag_val[0] == '#AddCopyrightInfo':
|
elif tag_val[0] == u'#AddCopyrightInfo':
|
||||||
pass
|
pass
|
||||||
elif tag_val[0] == '#Author':
|
elif tag_val[0] == u'#Author':
|
||||||
#TODO split Authors
|
self.parse_author(tag_val[1])
|
||||||
self.add_author(tag_val[1])
|
elif tag_val[0] == u'#BackgroundImage':
|
||||||
elif tag_val[0] == '#BackgroundImage':
|
|
||||||
pass
|
pass
|
||||||
elif tag_val[0] == '#Bible':
|
elif tag_val[0] == u'#Bible':
|
||||||
pass
|
pass
|
||||||
elif tag_val[0] == '#Categories':
|
elif tag_val[0] == u'#Categories':
|
||||||
self.topics = line.split(',')
|
self.topics = line.split(',')
|
||||||
elif tag_val[0] == '#CCLI':
|
elif tag_val[0] == u'#CCLI':
|
||||||
self.ccli_number = tag_val[1]
|
self.ccli_number = tag_val[1]
|
||||||
elif tag_val[0] == '#Chords':
|
elif tag_val[0] == u'#Chords':
|
||||||
pass
|
pass
|
||||||
elif tag_val[0] == '#ChurchSongID':
|
elif tag_val[0] == u'#ChurchSongID':
|
||||||
pass
|
pass
|
||||||
elif tag_val[0] == '#ColorChords':
|
elif tag_val[0] == u'#ColorChords':
|
||||||
pass
|
pass
|
||||||
elif tag_val[0] == '#Comments':
|
elif tag_val[0] == u'#Comments':
|
||||||
self.comments = tag_val[1]
|
self.comments = tag_val[1]
|
||||||
elif tag_val[0] == '#Editor':
|
elif tag_val[0] == u'#Editor':
|
||||||
pass
|
pass
|
||||||
elif tag_val[0] == '#Font':
|
elif tag_val[0] == u'#Font':
|
||||||
pass
|
pass
|
||||||
elif tag_val[0] == '#FontLang2':
|
elif tag_val[0] == u'#FontLang2':
|
||||||
pass
|
pass
|
||||||
elif tag_val[0] == '#FontSize':
|
elif tag_val[0] == u'#FontSize':
|
||||||
pass
|
pass
|
||||||
elif tag_val[0] == '#Format':
|
elif tag_val[0] == u'#Format':
|
||||||
pass
|
pass
|
||||||
elif tag_val[0] == '#Format_PreLine':
|
elif tag_val[0] == u'#Format_PreLine':
|
||||||
pass
|
pass
|
||||||
elif tag_val[0] == '#Format_PrePage':
|
elif tag_val[0] == u'#Format_PrePage':
|
||||||
pass
|
pass
|
||||||
elif tag_val[0] == '#ID':
|
elif tag_val[0] == u'#ID':
|
||||||
pass
|
pass
|
||||||
elif tag_val[0] == '#Key':
|
elif tag_val[0] == u'#Key':
|
||||||
pass
|
pass
|
||||||
elif tag_val[0] == '#Keywords':
|
elif tag_val[0] == u'#Keywords':
|
||||||
pass
|
pass
|
||||||
elif tag_val[0] == '#LangCount':
|
elif tag_val[0] == u'#LangCount':
|
||||||
pass
|
pass
|
||||||
elif tag_val[0] == '#Melody':
|
elif tag_val[0] == u'#Melody':
|
||||||
#TODO split Authors
|
self.parse_author(tag_val[1])
|
||||||
self.add_author(tag_val[1])
|
elif tag_val[0] == u'#NatCopyright':
|
||||||
elif tag_val[0] == '#NatCopyright':
|
|
||||||
pass
|
pass
|
||||||
elif tag_val[0] == '#OTitle':
|
elif tag_val[0] == u'#OTitle':
|
||||||
pass
|
pass
|
||||||
elif tag_val[0] == '#OutlineColor':
|
elif tag_val[0] == u'#OutlineColor':
|
||||||
pass
|
pass
|
||||||
elif tag_val[0] == '#OutlinedFont':
|
elif tag_val[0] == u'#OutlinedFont':
|
||||||
pass
|
pass
|
||||||
elif tag_val[0] == '#QuickFind':
|
elif tag_val[0] == u'#QuickFind':
|
||||||
pass
|
pass
|
||||||
elif tag_val[0] == '#Rights':
|
elif tag_val[0] == u'#Rights':
|
||||||
song_book_pub = tag_val[1]
|
song_book_pub = tag_val[1]
|
||||||
elif tag_val[0] == '#Songbook':
|
elif tag_val[0] == u'#Songbook':
|
||||||
book_num = tag_val[1].split(' / ')
|
book_num = tag_val[1].split(' / ')
|
||||||
self.song_book_name = book_num[0]
|
self.song_book_name = book_num[0]
|
||||||
if len(book_num) == book_num[1]:
|
if len(book_num) == book_num[1]:
|
||||||
self.song_number = u''
|
self.song_number = u''
|
||||||
elif tag_val[0] == '#Speed':
|
elif tag_val[0] == u'#Speed':
|
||||||
pass
|
pass
|
||||||
elif tag_val[0] == '#TextAlign':
|
elif tag_val[0] == u'#TextAlign':
|
||||||
pass
|
pass
|
||||||
elif tag_val[0] == '#Title':
|
elif tag_val[0] == u'#Title':
|
||||||
self.title = u'%s' % tag_val[1]
|
self.title = u'%s' % tag_val[1]
|
||||||
elif tag_val[0] == '#TitleAlign':
|
elif tag_val[0] == u'#TitleAlign':
|
||||||
pass
|
pass
|
||||||
elif tag_val[0] == '#TitleFontSize':
|
elif tag_val[0] == u'#TitleFontSize':
|
||||||
pass
|
pass
|
||||||
elif tag_val[0] == '#TitleLang2':
|
elif tag_val[0] == u'#TitleLang2':
|
||||||
pass
|
pass
|
||||||
elif tag_val[0] == '#TitleLang3':
|
elif tag_val[0] == u'#TitleLang3':
|
||||||
pass
|
pass
|
||||||
elif tag_val[0] == '#TitleLang4':
|
elif tag_val[0] == u'#TitleLang4':
|
||||||
pass
|
pass
|
||||||
elif tag_val[0] == '#Translation':
|
elif tag_val[0] == u'#Translation':
|
||||||
pass
|
pass
|
||||||
elif tag_val[0] == '#Transpose':
|
elif tag_val[0] == u'#Transpose':
|
||||||
pass
|
pass
|
||||||
elif tag_val[0] == '#TransposeAccidental':
|
elif tag_val[0] == u'#TransposeAccidental':
|
||||||
pass
|
pass
|
||||||
elif tag_val[0] == '#Version':
|
elif tag_val[0] == u'#Version':
|
||||||
pass
|
pass
|
||||||
else:
|
|
||||||
pass
|
|
||||||
return True
|
|
||||||
|
|
||||||
def check_verse_marks(self, line):
|
def check_verse_marks(self, line):
|
||||||
marks = line.split(' ')
|
"""
|
||||||
|
Check and add the verse's MarkType. Returns ``True`` if the given line
|
||||||
|
contains a correct verse mark otherwise ``False``.
|
||||||
|
|
||||||
|
``line``
|
||||||
|
The line to check for marks (unicode).
|
||||||
|
"""
|
||||||
|
marks = line.split(u' ')
|
||||||
if len(marks) <= 2 and marks[0] in SongBeamerTypes.MarkTypes:
|
if len(marks) <= 2 and marks[0] in SongBeamerTypes.MarkTypes:
|
||||||
self.current_verse_type = SongBeamerTypes.MarkTypes[marks[0]]
|
self.current_verse_type = SongBeamerTypes.MarkTypes[marks[0]]
|
||||||
if len(marks) == 2:
|
if len(marks) == 2:
|
||||||
#TODO: may check, because of only digits are allowed
|
# If we have a digit, we append it to current_verse_type.
|
||||||
|
if marks[1].isdigit():
|
||||||
self.current_verse_type += marks[1]
|
self.current_verse_type += marks[1]
|
||||||
|
return True
|
||||||
|
else:
|
||||||
|
return False
|
||||||
|
@ -254,7 +254,8 @@ class SongImport(QtCore.QObject):
|
|||||||
All fields have been set to this song. Write it away
|
All fields have been set to this song. Write it away
|
||||||
"""
|
"""
|
||||||
if not self.authors:
|
if not self.authors:
|
||||||
self.authors.append(u'Author unknown')
|
self.authors.append(unicode(translate('SongsPlugin.SongImport',
|
||||||
|
'Author unknown')))
|
||||||
self.commit_song()
|
self.commit_song()
|
||||||
|
|
||||||
def commit_song(self):
|
def commit_song(self):
|
||||||
|
@ -133,30 +133,26 @@ p, li { white-space: pre-wrap; }
|
|||||||
<property name="subTitle">
|
<property name="subTitle">
|
||||||
<string>Set up your theme's background according to the parameters below.</string>
|
<string>Set up your theme's background according to the parameters below.</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QFormLayout" name="backgroundLayout">
|
<layout class="QVBoxLayout" name="backgroundLayout">
|
||||||
<property name="fieldGrowthPolicy">
|
<property name="spacing">
|
||||||
<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">
|
|
||||||
<number>8</number>
|
<number>8</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="margin">
|
<property name="margin">
|
||||||
<number>20</number>
|
<number>20</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="0">
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="backgroundTypeLayout">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>8</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
<widget class="QLabel" name="backgroundTypeLabel">
|
<widget class="QLabel" name="backgroundTypeLabel">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Background type:</string>
|
<string>Background type:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
<item>
|
||||||
<widget class="QComboBox" name="backgroundTypeComboBox">
|
<widget class="QComboBox" name="backgroundTypeComboBox">
|
||||||
<item>
|
<item>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -175,70 +171,136 @@ p, li { white-space: pre-wrap; }
|
|||||||
</item>
|
</item>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item>
|
||||||
<widget class="QLabel" name="color1Label">
|
<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>
|
||||||
|
<widget class="QStackedWidget" name="backgroundStackedWidget">
|
||||||
|
<property name="currentIndex">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<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">
|
<property name="text">
|
||||||
<string><Color1></string>
|
<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>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1">
|
<item row="1" column="1">
|
||||||
<widget class="QPushButton" name="color1PushButton">
|
<widget class="QPushButton" name="gradientEndButton">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
<item row="2" column="0">
|
||||||
<widget class="QLabel" name="color2Label">
|
<widget class="QLabel" name="gradientTypeLabel">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>103</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string><Color2></string>
|
<string>Gradient:</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="1">
|
<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">
|
|
||||||
<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>
|
|
||||||
<item row="4" column="0">
|
|
||||||
<widget class="QLabel" name="gradientLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Gradient:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="1">
|
|
||||||
<widget class="QComboBox" name="gradientComboBox">
|
<widget class="QComboBox" name="gradientComboBox">
|
||||||
<item>
|
<item>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -269,6 +331,60 @@ p, li { white-space: pre-wrap; }
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</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>
|
||||||
|
</widget>
|
||||||
<widget class="QWizardPage" name="mainAreaPage">
|
<widget class="QWizardPage" name="mainAreaPage">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Main Area Font Details</string>
|
<string>Main Area Font Details</string>
|
||||||
@ -276,30 +392,30 @@ p, li { white-space: pre-wrap; }
|
|||||||
<property name="subTitle">
|
<property name="subTitle">
|
||||||
<string>Define the font and display characteristics for the Display text</string>
|
<string>Define the font and display characteristics for the Display text</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QFormLayout" name="formLayout">
|
<layout class="QFormLayout" name="mainAreaLayout">
|
||||||
<property name="formAlignment">
|
|
||||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
|
||||||
</property>
|
|
||||||
<property name="horizontalSpacing">
|
<property name="horizontalSpacing">
|
||||||
<number>8</number>
|
<number>8</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="verticalSpacing">
|
<property name="verticalSpacing">
|
||||||
<number>8</number>
|
<number>8</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="topMargin">
|
<property name="margin">
|
||||||
<number>20</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>20</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>20</number>
|
<number>20</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="mainFontLabel">
|
<widget class="QLabel" name="mainFontLabel">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>103</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Font:</string>
|
<string>Font:</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
@ -313,12 +429,33 @@ p, li { white-space: pre-wrap; }
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1">
|
<item row="1" column="1">
|
||||||
|
<layout class="QHBoxLayout" name="fontPropertiesLayout">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>24</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
<widget class="QPushButton" name="mainColorPushButton">
|
<widget class="QPushButton" name="mainColorPushButton">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</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">
|
<item row="2" column="0">
|
||||||
<widget class="QLabel" name="mainSizeLabel">
|
<widget class="QLabel" name="mainSizeLabel">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -458,20 +595,6 @@ p, li { white-space: pre-wrap; }
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</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>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWizardPage" name="footerAreaPage">
|
<widget class="QWizardPage" name="footerAreaPage">
|
||||||
@ -491,23 +614,23 @@ p, li { white-space: pre-wrap; }
|
|||||||
<property name="verticalSpacing">
|
<property name="verticalSpacing">
|
||||||
<number>8</number>
|
<number>8</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="leftMargin">
|
<property name="margin">
|
||||||
<number>50</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>20</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>20</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>20</number>
|
<number>20</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="footerFontLabel">
|
<widget class="QLabel" name="footerFontLabel">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>103</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Font:</string>
|
<string>Font:</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
<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>
|
<string>Allows additional display formatting information to be defined</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QFormLayout" name="formLayout_2">
|
<layout class="QFormLayout" name="formLayout_2">
|
||||||
|
<property name="horizontalSpacing">
|
||||||
|
<number>8</number>
|
||||||
|
</property>
|
||||||
|
<property name="verticalSpacing">
|
||||||
|
<number>8</number>
|
||||||
|
</property>
|
||||||
<property name="margin">
|
<property name="margin">
|
||||||
<number>20</number>
|
<number>20</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="horizontalLabel">
|
<widget class="QLabel" name="horizontalLabel">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>103</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Horizontal Align:</string>
|
<string>Horizontal Align:</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
@ -643,7 +781,7 @@ p, li { white-space: pre-wrap; }
|
|||||||
<property name="subTitle">
|
<property name="subTitle">
|
||||||
<string>Allows you to change and move the Main and Footer areas.</string>
|
<string>Allows you to change and move the Main and Footer areas.</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
<layout class="QGridLayout" name="areaPositionLayout">
|
||||||
<property name="margin">
|
<property name="margin">
|
||||||
<number>20</number>
|
<number>20</number>
|
||||||
</property>
|
</property>
|
||||||
@ -983,14 +1121,25 @@ p, li { white-space: pre-wrap; }
|
|||||||
<property name="subTitle">
|
<property name="subTitle">
|
||||||
<string>View the theme and save it replacing the current one or change the name to create a new theme</string>
|
<string>View the theme and save it replacing the current one or change the name to create a new theme</string>
|
||||||
</property>
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="previewLayout">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>8</number>
|
||||||
|
</property>
|
||||||
|
<property name="margin">
|
||||||
|
<number>20</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="themeNameLayout">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>8</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
<widget class="QLabel" name="themeNameLabel">
|
<widget class="QLabel" name="themeNameLabel">
|
||||||
<property name="geometry">
|
<property name="minimumSize">
|
||||||
<rect>
|
<size>
|
||||||
<x>20</x>
|
<width>103</width>
|
||||||
<y>10</y>
|
<height>0</height>
|
||||||
<width>82</width>
|
</size>
|
||||||
<height>16</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Theme name:</string>
|
<string>Theme name:</string>
|
||||||
@ -998,49 +1147,24 @@ p, li { white-space: pre-wrap; }
|
|||||||
<property name="textFormat">
|
<property name="textFormat">
|
||||||
<enum>Qt::PlainText</enum>
|
<enum>Qt::PlainText</enum>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
<property name="buddy">
|
<property name="buddy">
|
||||||
<cstring>themeNameEdit</cstring>
|
<cstring>themeNameEdit</cstring>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QLabel" name="previewLabel">
|
</item>
|
||||||
<property name="geometry">
|
<item>
|
||||||
<rect>
|
<widget class="QLineEdit" name="themeNameEdit"/>
|
||||||
<x>250</x>
|
</item>
|
||||||
<y>60</y>
|
</layout>
|
||||||
<width>48</width>
|
</item>
|
||||||
<height>16</height>
|
<item>
|
||||||
</rect>
|
<layout class="QHBoxLayout" name="previewPaneLayout">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>0</number>
|
||||||
</property>
|
</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>
|
<item>
|
||||||
<spacer name="leftSpacer">
|
<spacer name="leftSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
@ -1064,8 +1188,8 @@ p, li { white-space: pre-wrap; }
|
|||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>300</width>
|
<width>100</width>
|
||||||
<height>200</height>
|
<height>150</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="frameShape">
|
<property name="frameShape">
|
||||||
@ -1099,13 +1223,12 @@ p, li { white-space: pre-wrap; }
|
|||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</item>
|
||||||
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../images/openlp-2.qrc"/>
|
<include location="../images/openlp-2.qrc"/>
|
||||||
<include location="../images/openlp-2.qrc"/>
|
|
||||||
<include location="Projects/OpenLP/trunk/resources/images/openlp-2.qrc"/>
|
|
||||||
</resources>
|
</resources>
|
||||||
<connections>
|
<connections>
|
||||||
<connection>
|
<connection>
|
||||||
@ -1124,5 +1247,21 @@ p, li { white-space: pre-wrap; }
|
|||||||
</hint>
|
</hint>
|
||||||
</hints>
|
</hints>
|
||||||
</connection>
|
</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>
|
</connections>
|
||||||
</ui>
|
</ui>
|
||||||
|
@ -81,6 +81,7 @@
|
|||||||
<qresource prefix="wizards">
|
<qresource prefix="wizards">
|
||||||
<file>wizard_importsong.bmp</file>
|
<file>wizard_importsong.bmp</file>
|
||||||
<file>wizard_importbible.bmp</file>
|
<file>wizard_importbible.bmp</file>
|
||||||
|
<file>wizard_createtheme.bmp</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
<qresource prefix="services">
|
<qresource prefix="services">
|
||||||
<file>service_collapse_all.png</file>
|
<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