diff --git a/openlp/core/lib/theme.py b/openlp/core/lib/theme.py index def6f01cc..6fa7c5eb4 100644 --- a/openlp/core/lib/theme.py +++ b/openlp/core/lib/theme.py @@ -427,3 +427,52 @@ class ThemeXML(object): s1 = re.sub(u'(.)([A-Z][a-z]+)', r'\1_\2', name) return re.sub(u'([a-z0-9])([A-Z])', r'\1_\2', s1).lower() + def build_xml_from_attrs(self, ): + """ + Build the XML from the varables in the object + """ + if self.background_type == u'solid': + self.add_background_solid( + unicode(self.background_color)) + elif self.background_type == u'gradient': + self.add_background_gradient( + unicode(self.background_start_color), + unicode(self.background_end_color), + self.background_direction) + else: + filename = \ + os.path.split(unicode(self.background_filename))[1] + self.add_background_image(filename) + self.add_font(unicode(self.font_main_name), + unicode(self.font_main_color), + unicode(self.font_main_proportion), + unicode(self.font_main_override), u'main', + unicode(self.font_main_weight), + unicode(self.font_main_italics), + unicode(self.font_main_line_adjustment), + unicode(self.font_main_x), + unicode(self.font_main_y), + unicode(self.font_main_width), + unicode(self.font_main_height)) + self.add_font(unicode(self.font_footer_name), + unicode(self.font_footer_color), + unicode(self.font_footer_proportion), + unicode(self.font_footer_override), u'footer', + unicode(self.font_footer_weight), + unicode(self.font_footer_italics), + 0, # line adjustment + unicode(self.font_footer_x), + unicode(self.font_footer_y), + unicode(self.font_footer_width), + unicode(self.font_footer_height)) + self.add_display(unicode(self.display_shadow), + unicode(self.display_shadow_color), + unicode(self.display_outline), + unicode(self.display_outline_color), + unicode(self.display_horizontal_align), + unicode(self.display_vertical_align), + unicode(self.display_wrap_style), + unicode(self.display_slide_transition), + unicode(self.display_shadow_size), + unicode(self.display_outline_size)) + diff --git a/openlp/core/ui/__init__.py b/openlp/core/ui/__init__.py index 80d677386..ca671f61a 100644 --- a/openlp/core/ui/__init__.py +++ b/openlp/core/ui/__init__.py @@ -37,6 +37,7 @@ class HideMode(object): Theme = 2 Screen = 3 +from themewizardform import ThemeWizardForm from filerenameform import FileRenameForm from maindisplay import MainDisplay from slidecontroller import HideMode diff --git a/openlp/core/ui/thememanager.py b/openlp/core/ui/thememanager.py index ff61b05e8..43958be8b 100644 --- a/openlp/core/ui/thememanager.py +++ b/openlp/core/ui/thememanager.py @@ -32,7 +32,7 @@ import logging from xml.etree.ElementTree import ElementTree, XML from PyQt4 import QtCore, QtGui -from openlp.core.ui import AmendThemeForm, FileRenameForm +from openlp.core.ui import AmendThemeForm, FileRenameForm, ThemeWizardForm from openlp.core.theme import Theme from openlp.core.lib import OpenLPToolbar, context_menu_action, \ ThemeXML, str_to_bool, get_text_file_string, build_icon, Receiver, \ @@ -54,6 +54,7 @@ class ThemeManager(QtGui.QWidget): self.layout.setSpacing(0) self.layout.setMargin(0) self.amendThemeForm = AmendThemeForm(self) + self.themeWizardForm = ThemeWizardForm(self) self.fileRenameForm = FileRenameForm(self) self.toolbar = OpenLPToolbar(self) self.toolbar.addToolbarButton( @@ -215,9 +216,10 @@ class ThemeManager(QtGui.QWidget): editing form for the user to make their customisations. """ theme = self.createThemeFromXml(self.baseTheme(), self.path) - self.amendThemeForm.loadTheme(theme) + #self.amendThemeForm.loadTheme(theme) self.saveThemeName = u'' - self.amendThemeForm.exec_() + self.themeWizardForm.theme = theme + self.themeWizardForm.exec_() def onRenameTheme(self): """ @@ -243,66 +245,25 @@ class ThemeManager(QtGui.QWidget): self.saveThemeName = u'' if self.fileRenameForm.exec_(): newThemeName = unicode(self.fileRenameForm.FileNameEdit.text()) - oldThemeData = self.getThemeData(oldThemeName) - self.cloneThemeData(oldThemeData, newThemeName) + themeData = self.getThemeData(oldThemeName) + self.cloneThemeData(themeData, newThemeName) self.loadThemes() - def cloneThemeData(self, oldThemeData, newThemeName): + def cloneThemeData(self, themeData, newThemeName): """ + Takes a theme and makes a new copy of it as well as saving it. """ log.debug(u'cloneThemeData') - new_theme = ThemeXML() - new_theme.new_document(newThemeName) - save_from = None + themeData.new_document(newThemeName) + themeData.build_xml_from_attrs() save_to = None - if oldThemeData.background_type == u'solid': - new_theme.add_background_solid( - unicode(oldThemeData.background_color)) - elif oldThemeData.background_type == u'gradient': - new_theme.add_background_gradient( - unicode(oldThemeData.background_start_color), - unicode(oldThemeData.background_end_color), - oldThemeData.background_direction) - else: - filename = \ - os.path.split(unicode(oldThemeData.background_filename))[1] - new_theme.add_background_image(filename) - save_to = os.path.join(self.path, theme_name, filename) - save_from = oldThemeData.background_filename - new_theme.add_font(unicode(oldThemeData.font_main_name), - unicode(oldThemeData.font_main_color), - unicode(oldThemeData.font_main_proportion), - unicode(oldThemeData.font_main_override), u'main', - unicode(oldThemeData.font_main_weight), - unicode(oldThemeData.font_main_italics), - unicode(oldThemeData.font_main_line_adjustment), - unicode(oldThemeData.font_main_x), - unicode(oldThemeData.font_main_y), - unicode(oldThemeData.font_main_width), - unicode(oldThemeData.font_main_height)) - new_theme.add_font(unicode(oldThemeData.font_footer_name), - unicode(oldThemeData.font_footer_color), - unicode(oldThemeData.font_footer_proportion), - unicode(oldThemeData.font_footer_override), u'footer', - unicode(oldThemeData.font_footer_weight), - unicode(oldThemeData.font_footer_italics), - 0, # line adjustment - unicode(oldThemeData.font_footer_x), - unicode(oldThemeData.font_footer_y), - unicode(oldThemeData.font_footer_width), - unicode(oldThemeData.font_footer_height)) - new_theme.add_display(unicode(oldThemeData.display_shadow), - unicode(oldThemeData.display_shadow_color), - unicode(oldThemeData.display_outline), - unicode(oldThemeData.display_outline_color), - unicode(oldThemeData.display_horizontal_align), - unicode(oldThemeData.display_vertical_align), - unicode(oldThemeData.display_wrap_style), - unicode(oldThemeData.display_slide_transition), - unicode(oldThemeData.display_shadow_size), - unicode(oldThemeData.display_outline_size)) - theme = new_theme.extract_xml() - pretty_theme = new_theme.extract_formatted_xml() + save_from = None + if themeData.background_type == u'image': + save_to = os.path.join(self.path, newThemeName, + os.path.split(unicode(themeData.background_filename))[1]) + save_from = themeData.background_filename + theme = themeData.extract_xml() + pretty_theme =themeData.extract_formatted_xml() self.saveTheme(newThemeName, theme, pretty_theme, save_from, save_to) def onEditTheme(self): @@ -321,10 +282,12 @@ class ThemeManager(QtGui.QWidget): unicode(item.data(QtCore.Qt.UserRole).toString())) if theme.background_type == u'image': self.oldBackgroundImage = theme.background_filename - self.amendThemeForm.loadTheme(theme) + #self.amendThemeForm.loadTheme(theme) self.saveThemeName = unicode( item.data(QtCore.Qt.UserRole).toString()) - self.amendThemeForm.exec_() + #self.amendThemeForm.exec_() + self.themeWizardForm.theme = theme + self.themeWizardForm.exec_() def onDeleteTheme(self): """ diff --git a/openlp/core/ui/themewizard.py b/openlp/core/ui/themewizard.py new file mode 100644 index 000000000..80621d000 --- /dev/null +++ b/openlp/core/ui/themewizard.py @@ -0,0 +1,467 @@ +# -*- coding: utf-8 -*- + +# Form implementation generated from reading ui file 'themewizard.ui' +# +# Created: Sat Oct 2 08:13:48 2010 +# by: PyQt4 UI code generator 4.7.4 +# +# WARNING! All changes made in this file will be lost! + +from PyQt4 import QtCore, QtGui + +class Ui_ThemeWizard(object): + def setupUi(self, ThemeWizard): + ThemeWizard.setObjectName("ThemeWizard") + ThemeWizard.resize(550, 386) + ThemeWizard.setModal(True) + ThemeWizard.setWizardStyle(QtGui.QWizard.ModernStyle) + ThemeWizard.setOptions(QtGui.QWizard.NoBackButtonOnStartPage) + self.welcomePage = QtGui.QWizardPage() + self.welcomePage.setTitle("") + self.welcomePage.setSubTitle("") + self.welcomePage.setObjectName("welcomePage") + self.WelcomeLayout = QtGui.QHBoxLayout(self.welcomePage) + self.WelcomeLayout.setSpacing(8) + self.WelcomeLayout.setMargin(0) + self.WelcomeLayout.setObjectName("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("") + self.importBibleImage.setPixmap(QtGui.QPixmap(":/wizards/wizard_importbible.bmp")) + self.importBibleImage.setIndent(0) + self.importBibleImage.setObjectName("importBibleImage") + self.WelcomeLayout.addWidget(self.importBibleImage) + self.welcomePageLayout = QtGui.QVBoxLayout() + self.welcomePageLayout.setSpacing(8) + self.welcomePageLayout.setObjectName("welcomePageLayout") + self.titleLabel = QtGui.QLabel(self.welcomePage) + self.titleLabel.setObjectName("titleLabel") + self.welcomePageLayout.addWidget(self.titleLabel) + spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed) + self.welcomePageLayout.addItem(spacerItem) + self.informationLabel = QtGui.QLabel(self.welcomePage) + self.informationLabel.setWordWrap(True) + self.informationLabel.setMargin(10) + self.informationLabel.setObjectName("informationLabel") + self.welcomePageLayout.addWidget(self.informationLabel) + spacerItem1 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) + self.welcomePageLayout.addItem(spacerItem1) + self.WelcomeLayout.addLayout(self.welcomePageLayout) + ThemeWizard.addPage(self.welcomePage) + self.backgroundPage = QtGui.QWizardPage() + self.backgroundPage.setObjectName("backgroundPage") + self.backgroundLayout = QtGui.QFormLayout(self.backgroundPage) + self.backgroundLayout.setFieldGrowthPolicy(QtGui.QFormLayout.ExpandingFieldsGrow) + self.backgroundLayout.setLabelAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) + self.backgroundLayout.setMargin(20) + self.backgroundLayout.setSpacing(8) + self.backgroundLayout.setObjectName("backgroundLayout") + self.backgroundTypeLabel = QtGui.QLabel(self.backgroundPage) + self.backgroundTypeLabel.setObjectName("backgroundTypeLabel") + self.backgroundLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.backgroundTypeLabel) + self.backgroundTypeComboBox = QtGui.QComboBox(self.backgroundPage) + self.backgroundTypeComboBox.setObjectName("backgroundTypeComboBox") + self.backgroundTypeComboBox.addItem("") + self.backgroundTypeComboBox.addItem("") + self.backgroundTypeComboBox.addItem("") + self.backgroundLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.backgroundTypeComboBox) + self.color1Label = QtGui.QLabel(self.backgroundPage) + self.color1Label.setObjectName("color1Label") + self.backgroundLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.color1Label) + self.color1PushButton = QtGui.QPushButton(self.backgroundPage) + self.color1PushButton.setText("") + self.color1PushButton.setObjectName("color1PushButton") + self.backgroundLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.color1PushButton) + self.color2Label = QtGui.QLabel(self.backgroundPage) + self.color2Label.setObjectName("color2Label") + self.backgroundLayout.setWidget(2, QtGui.QFormLayout.LabelRole, self.color2Label) + self.color2PushButton = QtGui.QPushButton(self.backgroundPage) + self.color2PushButton.setText("") + self.color2PushButton.setObjectName("color2PushButton") + self.backgroundLayout.setWidget(2, QtGui.QFormLayout.FieldRole, self.color2PushButton) + self.imageLabel = QtGui.QLabel(self.backgroundPage) + self.imageLabel.setObjectName("imageLabel") + self.backgroundLayout.setWidget(3, QtGui.QFormLayout.LabelRole, self.imageLabel) + self.imageLayout = QtGui.QHBoxLayout() + self.imageLayout.setSpacing(8) + self.imageLayout.setObjectName("imageLayout") + self.imageLineEdit = QtGui.QLineEdit(self.backgroundPage) + self.imageLineEdit.setObjectName("imageLineEdit") + self.imageLayout.addWidget(self.imageLineEdit) + self.imageBrowseButton = QtGui.QToolButton(self.backgroundPage) + self.imageBrowseButton.setText("") + icon = QtGui.QIcon() + icon.addPixmap(QtGui.QPixmap(":/general/general_open.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) + self.imageBrowseButton.setIcon(icon) + self.imageBrowseButton.setObjectName("imageBrowseButton") + self.imageLayout.addWidget(self.imageBrowseButton) + self.backgroundLayout.setLayout(3, QtGui.QFormLayout.FieldRole, self.imageLayout) + self.gradientLabel = QtGui.QLabel(self.backgroundPage) + self.gradientLabel.setObjectName("gradientLabel") + self.backgroundLayout.setWidget(4, QtGui.QFormLayout.LabelRole, self.gradientLabel) + self.gradientComboBox = QtGui.QComboBox(self.backgroundPage) + self.gradientComboBox.setObjectName("gradientComboBox") + self.gradientComboBox.addItem("") + self.gradientComboBox.addItem("") + self.gradientComboBox.addItem("") + self.backgroundLayout.setWidget(4, QtGui.QFormLayout.FieldRole, self.gradientComboBox) + ThemeWizard.addPage(self.backgroundPage) + self.mainAreaPage = QtGui.QWizardPage() + self.mainAreaPage.setObjectName("mainAreaPage") + self.mainAreaLayout = QtGui.QFormLayout(self.mainAreaPage) + self.mainAreaLayout.setFieldGrowthPolicy(QtGui.QFormLayout.ExpandingFieldsGrow) + self.mainAreaLayout.setContentsMargins(50, 20, 20, 20) + self.mainAreaLayout.setSpacing(8) + self.mainAreaLayout.setObjectName("mainAreaLayout") + self.mainFontLabel = QtGui.QLabel(self.mainAreaPage) + self.mainFontLabel.setObjectName("mainFontLabel") + self.mainAreaLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.mainFontLabel) + self.mainFontComboBox = QtGui.QFontComboBox(self.mainAreaPage) + self.mainFontComboBox.setObjectName("mainFontComboBox") + self.mainAreaLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.mainFontComboBox) + self.mainColorLabel = QtGui.QLabel(self.mainAreaPage) + self.mainColorLabel.setObjectName("mainColorLabel") + self.mainAreaLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.mainColorLabel) + self.mainColorPushButton = QtGui.QPushButton(self.mainAreaPage) + self.mainColorPushButton.setText("") + self.mainColorPushButton.setObjectName("mainColorPushButton") + self.mainAreaLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.mainColorPushButton) + self.mainSizeLabel = QtGui.QLabel(self.mainAreaPage) + self.mainSizeLabel.setObjectName("mainSizeLabel") + self.mainAreaLayout.setWidget(2, QtGui.QFormLayout.LabelRole, self.mainSizeLabel) + self.mainSizeLayout = QtGui.QHBoxLayout() + self.mainSizeLayout.setSpacing(8) + self.mainSizeLayout.setMargin(0) + self.mainSizeLayout.setObjectName("mainSizeLayout") + self.mainSizeSpinBox = QtGui.QSpinBox(self.mainAreaPage) + sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.mainSizeSpinBox.sizePolicy().hasHeightForWidth()) + self.mainSizeSpinBox.setSizePolicy(sizePolicy) + self.mainSizeSpinBox.setMinimumSize(QtCore.QSize(70, 0)) + self.mainSizeSpinBox.setMaximum(999) + self.mainSizeSpinBox.setProperty("value", 16) + self.mainSizeSpinBox.setObjectName("mainSizeSpinBox") + self.mainSizeLayout.addWidget(self.mainSizeSpinBox) + self.mainLineCountLabel = QtGui.QLabel(self.mainAreaPage) + self.mainLineCountLabel.setObjectName("mainLineCountLabel") + self.mainSizeLayout.addWidget(self.mainLineCountLabel) + self.mainAreaLayout.setLayout(2, QtGui.QFormLayout.FieldRole, self.mainSizeLayout) + self.mainOutlineCheckBox = QtGui.QCheckBox(self.mainAreaPage) + self.mainOutlineCheckBox.setObjectName("mainOutlineCheckBox") + self.mainAreaLayout.setWidget(3, QtGui.QFormLayout.LabelRole, self.mainOutlineCheckBox) + self.mainOutlineColorPushButton = QtGui.QPushButton(self.mainAreaPage) + self.mainOutlineColorPushButton.setEnabled(False) + self.mainOutlineColorPushButton.setText("") + self.mainOutlineColorPushButton.setObjectName("mainOutlineColorPushButton") + self.mainAreaLayout.setWidget(3, QtGui.QFormLayout.FieldRole, self.mainOutlineColorPushButton) + self.mainShadowCheckBox = QtGui.QCheckBox(self.mainAreaPage) + self.mainShadowCheckBox.setObjectName("mainShadowCheckBox") + self.mainAreaLayout.setWidget(4, QtGui.QFormLayout.LabelRole, self.mainShadowCheckBox) + self.mainShadowColorPushButton = QtGui.QPushButton(self.mainAreaPage) + self.mainShadowColorPushButton.setEnabled(False) + self.mainShadowColorPushButton.setText("") + self.mainShadowColorPushButton.setObjectName("mainShadowColorPushButton") + self.mainAreaLayout.setWidget(4, QtGui.QFormLayout.FieldRole, self.mainShadowColorPushButton) + ThemeWizard.addPage(self.mainAreaPage) + self.footerAreaPage = QtGui.QWizardPage() + self.footerAreaPage.setObjectName("footerAreaPage") + self.footerLayout = QtGui.QFormLayout(self.footerAreaPage) + self.footerLayout.setFieldGrowthPolicy(QtGui.QFormLayout.ExpandingFieldsGrow) + self.footerLayout.setContentsMargins(50, 20, 20, 20) + self.footerLayout.setSpacing(8) + self.footerLayout.setObjectName("footerLayout") + self.footerFontLabel = QtGui.QLabel(self.footerAreaPage) + self.footerFontLabel.setObjectName("footerFontLabel") + self.footerLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.footerFontLabel) + self.footerFontComboBox = QtGui.QFontComboBox(self.footerAreaPage) + self.footerFontComboBox.setObjectName("footerFontComboBox") + self.footerLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.footerFontComboBox) + self.footerColorLabel = QtGui.QLabel(self.footerAreaPage) + self.footerColorLabel.setObjectName("footerColorLabel") + self.footerLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.footerColorLabel) + self.footerColorPushButton = QtGui.QPushButton(self.footerAreaPage) + self.footerColorPushButton.setText("") + self.footerColorPushButton.setObjectName("footerColorPushButton") + self.footerLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.footerColorPushButton) + self.footerSizeLabel = QtGui.QLabel(self.footerAreaPage) + self.footerSizeLabel.setObjectName("footerSizeLabel") + self.footerLayout.setWidget(2, QtGui.QFormLayout.LabelRole, self.footerSizeLabel) + self.footerSizeSpinBox = QtGui.QSpinBox(self.footerAreaPage) + sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.footerSizeSpinBox.sizePolicy().hasHeightForWidth()) + self.footerSizeSpinBox.setSizePolicy(sizePolicy) + self.footerSizeSpinBox.setMinimumSize(QtCore.QSize(70, 0)) + self.footerSizeSpinBox.setMaximum(999) + self.footerSizeSpinBox.setProperty("value", 10) + self.footerSizeSpinBox.setObjectName("footerSizeSpinBox") + self.footerLayout.setWidget(2, QtGui.QFormLayout.FieldRole, self.footerSizeSpinBox) + self.footerOutlineCheckBox = QtGui.QCheckBox(self.footerAreaPage) + self.footerOutlineCheckBox.setObjectName("footerOutlineCheckBox") + self.footerLayout.setWidget(3, QtGui.QFormLayout.LabelRole, self.footerOutlineCheckBox) + self.footerOutlineColorPushButton = QtGui.QPushButton(self.footerAreaPage) + self.footerOutlineColorPushButton.setEnabled(False) + self.footerOutlineColorPushButton.setText("") + self.footerOutlineColorPushButton.setObjectName("footerOutlineColorPushButton") + self.footerLayout.setWidget(3, QtGui.QFormLayout.FieldRole, self.footerOutlineColorPushButton) + self.footerShadowCheckBox = QtGui.QCheckBox(self.footerAreaPage) + self.footerShadowCheckBox.setObjectName("footerShadowCheckBox") + self.footerLayout.setWidget(4, QtGui.QFormLayout.LabelRole, self.footerShadowCheckBox) + self.footerShadowColorPushButton = QtGui.QPushButton(self.footerAreaPage) + self.footerShadowColorPushButton.setEnabled(False) + self.footerShadowColorPushButton.setText("") + self.footerShadowColorPushButton.setObjectName("footerShadowColorPushButton") + self.footerLayout.setWidget(4, QtGui.QFormLayout.FieldRole, self.footerShadowColorPushButton) + ThemeWizard.addPage(self.footerAreaPage) + self.areaPositionPage = QtGui.QWizardPage() + self.areaPositionPage.setObjectName("areaPositionPage") + self.gridLayout_2 = QtGui.QGridLayout(self.areaPositionPage) + self.gridLayout_2.setMargin(20) + self.gridLayout_2.setSpacing(8) + self.gridLayout_2.setObjectName("gridLayout_2") + self.mainPositionGroupBox = QtGui.QGroupBox(self.areaPositionPage) + self.mainPositionGroupBox.setMinimumSize(QtCore.QSize(248, 0)) + self.mainPositionGroupBox.setObjectName("mainPositionGroupBox") + self.mainPositionLayout = QtGui.QFormLayout(self.mainPositionGroupBox) + self.mainPositionLayout.setMargin(8) + self.mainPositionLayout.setSpacing(8) + self.mainPositionLayout.setObjectName("mainPositionLayout") + self.mainDefaultPositionCheckBox = QtGui.QCheckBox(self.mainPositionGroupBox) + self.mainDefaultPositionCheckBox.setChecked(True) + self.mainDefaultPositionCheckBox.setTristate(False) + self.mainDefaultPositionCheckBox.setObjectName("mainDefaultPositionCheckBox") + self.mainPositionLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.mainDefaultPositionCheckBox) + self.nainXLabel = QtGui.QLabel(self.mainPositionGroupBox) + self.nainXLabel.setObjectName("nainXLabel") + self.mainPositionLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.nainXLabel) + self.mainXSpinBox = QtGui.QSpinBox(self.mainPositionGroupBox) + self.mainXSpinBox.setEnabled(False) + sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.mainXSpinBox.sizePolicy().hasHeightForWidth()) + self.mainXSpinBox.setSizePolicy(sizePolicy) + self.mainXSpinBox.setMinimumSize(QtCore.QSize(78, 0)) + self.mainXSpinBox.setMaximum(9999) + self.mainXSpinBox.setProperty("value", 0) + self.mainXSpinBox.setObjectName("mainXSpinBox") + self.mainPositionLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.mainXSpinBox) + self.mainYSpinBox = QtGui.QSpinBox(self.mainPositionGroupBox) + self.mainYSpinBox.setEnabled(False) + sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.mainYSpinBox.sizePolicy().hasHeightForWidth()) + self.mainYSpinBox.setSizePolicy(sizePolicy) + self.mainYSpinBox.setMinimumSize(QtCore.QSize(78, 0)) + self.mainYSpinBox.setMaximum(9999) + self.mainYSpinBox.setObjectName("mainYSpinBox") + self.mainPositionLayout.setWidget(2, QtGui.QFormLayout.FieldRole, self.mainYSpinBox) + self.mainYLabel = QtGui.QLabel(self.mainPositionGroupBox) + self.mainYLabel.setObjectName("mainYLabel") + self.mainPositionLayout.setWidget(2, QtGui.QFormLayout.LabelRole, self.mainYLabel) + self.mainWidthSpinBox = QtGui.QSpinBox(self.mainPositionGroupBox) + self.mainWidthSpinBox.setEnabled(False) + sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.mainWidthSpinBox.sizePolicy().hasHeightForWidth()) + self.mainWidthSpinBox.setSizePolicy(sizePolicy) + self.mainWidthSpinBox.setMinimumSize(QtCore.QSize(78, 0)) + self.mainWidthSpinBox.setMaximum(9999) + self.mainWidthSpinBox.setObjectName("mainWidthSpinBox") + self.mainPositionLayout.setWidget(3, QtGui.QFormLayout.FieldRole, self.mainWidthSpinBox) + self.mainWidthLabel = QtGui.QLabel(self.mainPositionGroupBox) + self.mainWidthLabel.setObjectName("mainWidthLabel") + self.mainPositionLayout.setWidget(3, QtGui.QFormLayout.LabelRole, self.mainWidthLabel) + self.mainHeightSpinBox = QtGui.QSpinBox(self.mainPositionGroupBox) + self.mainHeightSpinBox.setEnabled(False) + sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.mainHeightSpinBox.sizePolicy().hasHeightForWidth()) + self.mainHeightSpinBox.setSizePolicy(sizePolicy) + self.mainHeightSpinBox.setMinimumSize(QtCore.QSize(78, 0)) + self.mainHeightSpinBox.setMaximum(9999) + self.mainHeightSpinBox.setObjectName("mainHeightSpinBox") + self.mainPositionLayout.setWidget(4, QtGui.QFormLayout.FieldRole, self.mainHeightSpinBox) + self.mainHeightLabel = QtGui.QLabel(self.mainPositionGroupBox) + self.mainHeightLabel.setObjectName("mainHeightLabel") + self.mainPositionLayout.setWidget(4, QtGui.QFormLayout.LabelRole, self.mainHeightLabel) + self.gridLayout_2.addWidget(self.mainPositionGroupBox, 1, 0, 1, 1) + self.footerPositionGroupBox = QtGui.QGroupBox(self.areaPositionPage) + self.footerPositionGroupBox.setMinimumSize(QtCore.QSize(248, 0)) + self.footerPositionGroupBox.setObjectName("footerPositionGroupBox") + self.footerPositionLayout = QtGui.QFormLayout(self.footerPositionGroupBox) + self.footerPositionLayout.setMargin(8) + self.footerPositionLayout.setSpacing(8) + self.footerPositionLayout.setObjectName("footerPositionLayout") + self.footerXLabel = QtGui.QLabel(self.footerPositionGroupBox) + self.footerXLabel.setObjectName("footerXLabel") + self.footerPositionLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.footerXLabel) + self.footerXSpinBox = QtGui.QSpinBox(self.footerPositionGroupBox) + self.footerXSpinBox.setEnabled(False) + sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.footerXSpinBox.sizePolicy().hasHeightForWidth()) + self.footerXSpinBox.setSizePolicy(sizePolicy) + self.footerXSpinBox.setMinimumSize(QtCore.QSize(78, 0)) + self.footerXSpinBox.setMaximum(9999) + self.footerXSpinBox.setProperty("value", 0) + self.footerXSpinBox.setObjectName("footerXSpinBox") + self.footerPositionLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.footerXSpinBox) + self.footerYLabel = QtGui.QLabel(self.footerPositionGroupBox) + self.footerYLabel.setObjectName("footerYLabel") + self.footerPositionLayout.setWidget(2, QtGui.QFormLayout.LabelRole, self.footerYLabel) + self.footerYSpinBox = QtGui.QSpinBox(self.footerPositionGroupBox) + self.footerYSpinBox.setEnabled(False) + sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.footerYSpinBox.sizePolicy().hasHeightForWidth()) + self.footerYSpinBox.setSizePolicy(sizePolicy) + self.footerYSpinBox.setMinimumSize(QtCore.QSize(78, 0)) + self.footerYSpinBox.setMaximum(9999) + self.footerYSpinBox.setProperty("value", 0) + self.footerYSpinBox.setObjectName("footerYSpinBox") + self.footerPositionLayout.setWidget(2, QtGui.QFormLayout.FieldRole, self.footerYSpinBox) + self.footerWidthLabel = QtGui.QLabel(self.footerPositionGroupBox) + self.footerWidthLabel.setObjectName("footerWidthLabel") + self.footerPositionLayout.setWidget(3, QtGui.QFormLayout.LabelRole, self.footerWidthLabel) + self.footerWidthSpinBox = QtGui.QSpinBox(self.footerPositionGroupBox) + self.footerWidthSpinBox.setEnabled(False) + self.footerWidthSpinBox.setMinimumSize(QtCore.QSize(78, 0)) + self.footerWidthSpinBox.setMaximum(9999) + self.footerWidthSpinBox.setObjectName("footerWidthSpinBox") + self.footerPositionLayout.setWidget(3, QtGui.QFormLayout.FieldRole, self.footerWidthSpinBox) + self.footerHeightLabel = QtGui.QLabel(self.footerPositionGroupBox) + self.footerHeightLabel.setObjectName("footerHeightLabel") + self.footerPositionLayout.setWidget(4, QtGui.QFormLayout.LabelRole, self.footerHeightLabel) + self.footerHeightSpinBox = QtGui.QSpinBox(self.footerPositionGroupBox) + self.footerHeightSpinBox.setEnabled(False) + self.footerHeightSpinBox.setMinimumSize(QtCore.QSize(78, 0)) + self.footerHeightSpinBox.setMaximum(9999) + self.footerHeightSpinBox.setObjectName("footerHeightSpinBox") + self.footerPositionLayout.setWidget(4, QtGui.QFormLayout.FieldRole, self.footerHeightSpinBox) + self.footerDefaultPositionCheckBox = QtGui.QCheckBox(self.footerPositionGroupBox) + self.footerDefaultPositionCheckBox.setChecked(True) + self.footerDefaultPositionCheckBox.setObjectName("footerDefaultPositionCheckBox") + self.footerPositionLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.footerDefaultPositionCheckBox) + self.gridLayout_2.addWidget(self.footerPositionGroupBox, 1, 1, 1, 1) + ThemeWizard.addPage(self.areaPositionPage) + self.previewPage = QtGui.QWizardPage() + self.previewPage.setObjectName("previewPage") + self.previewLayout = QtGui.QGridLayout(self.previewPage) + self.previewLayout.setMargin(20) + self.previewLayout.setSpacing(8) + self.previewLayout.setObjectName("previewLayout") + self.themeNameLabel = QtGui.QLabel(self.previewPage) + self.themeNameLabel.setTextFormat(QtCore.Qt.PlainText) + self.themeNameLabel.setObjectName("themeNameLabel") + self.previewLayout.addWidget(self.themeNameLabel, 0, 0, 1, 1) + self.previewLabel = QtGui.QLabel(self.previewPage) + self.previewLabel.setAlignment(QtCore.Qt.AlignCenter) + self.previewLabel.setObjectName("previewLabel") + self.previewLayout.addWidget(self.previewLabel, 2, 0, 1, 2) + self.themeNameEdit = QtGui.QLineEdit(self.previewPage) + self.themeNameEdit.setObjectName("themeNameEdit") + self.previewLayout.addWidget(self.themeNameEdit, 0, 1, 1, 1) + self.previewBoxLayout = QtGui.QHBoxLayout() + self.previewBoxLayout.setSpacing(0) + self.previewBoxLayout.setContentsMargins(0, 0, -1, -1) + self.previewBoxLayout.setObjectName("previewBoxLayout") + spacerItem2 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) + self.previewBoxLayout.addItem(spacerItem2) + self.previewBoxLabel = QtGui.QLabel(self.previewPage) + sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.previewBoxLabel.sizePolicy().hasHeightForWidth()) + self.previewBoxLabel.setSizePolicy(sizePolicy) + self.previewBoxLabel.setMinimumSize(QtCore.QSize(300, 200)) + self.previewBoxLabel.setFrameShape(QtGui.QFrame.WinPanel) + self.previewBoxLabel.setFrameShadow(QtGui.QFrame.Sunken) + self.previewBoxLabel.setLineWidth(1) + self.previewBoxLabel.setText("") + self.previewBoxLabel.setScaledContents(True) + self.previewBoxLabel.setObjectName("previewBoxLabel") + self.previewBoxLayout.addWidget(self.previewBoxLabel) + spacerItem3 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) + self.previewBoxLayout.addItem(spacerItem3) + self.previewLayout.addLayout(self.previewBoxLayout, 3, 0, 1, 2) + ThemeWizard.addPage(self.previewPage) + self.themeNameLabel.setBuddy(self.themeNameEdit) + + self.retranslateUi(ThemeWizard) + QtCore.QMetaObject.connectSlotsByName(ThemeWizard) + + def retranslateUi(self, ThemeWizard): + ThemeWizard.setWindowTitle(QtGui.QApplication.translate("ThemeWizard", "Theme Wizard", None, QtGui.QApplication.UnicodeUTF8)) + self.titleLabel.setText(QtGui.QApplication.translate("ThemeWizard", "\n" +"
\n" +"Welcome to the Theme Wizard
", None, QtGui.QApplication.UnicodeUTF8)) + self.informationLabel.setText(QtGui.QApplication.translate("ThemeWizard", "This wizard will help you to maintain Themes . Click the next button below to start the process by setting up your background.", None, QtGui.QApplication.UnicodeUTF8)) + self.backgroundPage.setTitle(QtGui.QApplication.translate("ThemeWizard", "Set Up Background", None, QtGui.QApplication.UnicodeUTF8)) + self.backgroundPage.setSubTitle(QtGui.QApplication.translate("ThemeWizard", "Set up your theme\'s background according to the parameters below.", None, QtGui.QApplication.UnicodeUTF8)) + self.backgroundTypeLabel.setText(QtGui.QApplication.translate("ThemeWizard", "Background type:", None, QtGui.QApplication.UnicodeUTF8)) + self.backgroundTypeComboBox.setItemText(0, QtGui.QApplication.translate("ThemeWizard", "Solid Color", None, QtGui.QApplication.UnicodeUTF8)) + self.backgroundTypeComboBox.setItemText(1, QtGui.QApplication.translate("ThemeWizard", "Gradient", None, QtGui.QApplication.UnicodeUTF8)) + self.backgroundTypeComboBox.setItemText(2, QtGui.QApplication.translate("ThemeWizard", "Image", None, QtGui.QApplication.UnicodeUTF8)) + self.color1Label.setText(QtGui.QApplication.translate("ThemeWizard", "