diff --git a/openlp/core/ui/themeform.py b/openlp/core/ui/themeform.py index 1d15daaa9..b82626a7d 100644 --- a/openlp/core/ui/themeform.py +++ b/openlp/core/ui/themeform.py @@ -62,24 +62,27 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard): QtCore.QObject.connect(self.gradientComboBox, QtCore.SIGNAL(u'currentIndexChanged(int)'), self.onGradientComboBox) - QtCore.QObject.connect(self.color1PushButton, + QtCore.QObject.connect(self.colorButton, QtCore.SIGNAL(u'pressed()'), - self.onColor1PushButtonClicked) - QtCore.QObject.connect(self.color2PushButton, + self.onColorButtonClicked) + QtCore.QObject.connect(self.gradientStartButton, QtCore.SIGNAL(u'pressed()'), - self.onColor2PushButtonClicked) + self.onGradientStartButtonClicked) + QtCore.QObject.connect(self.gradientEndButton, + QtCore.SIGNAL(u'pressed()'), + self.onGradientEndButtonClicked) QtCore.QObject.connect(self.imageBrowseButton, QtCore.SIGNAL(u'pressed()'), - self.onImageBrowseButtonClicked) + self.onImageBrowseButtonClicked) QtCore.QObject.connect(self.mainColorPushButton, QtCore.SIGNAL(u'pressed()'), - self.onMainColourPushButtonClicked) + self.onMainColourPushButtonClicked) QtCore.QObject.connect(self.outlineColorPushButton, QtCore.SIGNAL(u'pressed()'), - self.onOutlineColourPushButtonClicked) + self.onOutlineColourPushButtonClicked) QtCore.QObject.connect(self.shadowColorPushButton, QtCore.SIGNAL(u'pressed()'), - self.onShadowColourPushButtonClicked) + self.onShadowColourPushButtonClicked) QtCore.QObject.connect(self.outlineCheckBox, QtCore.SIGNAL(u'stateChanged(int)'), self.onOutlineCheckCheckBoxChanged) @@ -158,9 +161,11 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard): self.backgroundPage.registerField( u'background_type', self.backgroundTypeComboBox) self.backgroundPage.registerField( - u'color_1', self.color1PushButton) + u'color', self.colorButton) self.backgroundPage.registerField( - u'color_2', self.color2PushButton) + u'grandient_start', self.gradientStartButton) + self.backgroundPage.registerField( + u'grandient_end', self.gradientEndButton) self.backgroundPage.registerField( u'background_image', self.imageLineEdit) self.backgroundPage.registerField( @@ -280,13 +285,15 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard): self.footerHeightSpinBox.setEnabled(self.theme.font_footer_override) self.footerWidthSpinBox.setEnabled(self.theme.font_footer_override) - def exec_(self): + def exec_(self, edit=False): """ Run the wizard. """ self.updateThemeAllowed = False self.setDefaults() self.updateThemeAllowed = True + if edit: + self.next() return QtGui.QWizard.exec_(self) def initializePage(self, id): @@ -312,54 +319,19 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard): """ if self.theme.background_type == \ BackgroundType.to_string(BackgroundType.Solid): - self.setField(u'background_type', QtCore.QVariant(0)) - self.color1PushButton.setVisible(True) - self.color1Label.setVisible(True) - self.color1PushButton.setStyleSheet(u'background-color: %s' % + self.colorButton.setStyleSheet(u'background-color: %s' % self.theme.background_color) - self.color1Label.setText( - translate('OpenLP.ThemeForm', 'Color:')) - self.color2PushButton.setVisible(False) - self.color2Label.setVisible(False) - self.gradientLabel.setVisible(False) - self.gradientComboBox.setVisible(False) - self.imageLabel.setVisible(False) - self.imageLineEdit.setVisible(False) - self.imageBrowseButton.setVisible(False) - self.imageLineEdit.setText(u'') + self.setField(u'background_type', QtCore.QVariant(0)) elif self.theme.background_type == \ BackgroundType.to_string(BackgroundType.Gradient): - self.setField(u'background_type', QtCore.QVariant(1)) - self.color1PushButton.setVisible(True) - self.color1Label.setVisible(True) - self.color1PushButton.setStyleSheet(u'background-color: %s' % + self.gradientStartButton.setStyleSheet(u'background-color: %s' % self.theme.background_start_color) - self.color1Label.setText( - translate('OpenLP.ThemeForm', 'First color:')) - self.color2PushButton.setVisible(True) - self.color2Label.setVisible(True) - self.color2PushButton.setStyleSheet(u'background-color: %s' % + self.gradientEndButton.setStyleSheet(u'background-color: %s' % self.theme.background_end_color) - self.color2Label.setText( - translate('OpenLP.ThemeForm', 'Second color:')) - self.gradientLabel.setVisible(True) - self.gradientComboBox.setVisible(True) - self.imageLabel.setVisible(False) - self.imageLineEdit.setVisible(False) - self.imageBrowseButton.setVisible(False) - self.imageLineEdit.setText(u'') + self.setField(u'background_type', QtCore.QVariant(1)) else: - self.setField(u'background_type', QtCore.QVariant(2)) - self.color1PushButton.setVisible(False) - self.color1Label.setVisible(False) - self.color2PushButton.setVisible(False) - self.color2Label.setVisible(False) - self.gradientLabel.setVisible(False) - self.gradientComboBox.setVisible(False) - self.imageLineEdit.setVisible(True) - self.imageLabel.setVisible(True) - self.imageBrowseButton.setVisible(True) self.imageLineEdit.setText(self.theme.background_filename) + self.setField(u'background_type', QtCore.QVariant(2)) if self.theme.background_direction == \ BackgroundGradientType.to_string(BackgroundGradientType.Horizontal): self.setField(u'gradient', QtCore.QVariant(0)) @@ -492,20 +464,23 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard): BackgroundGradientType.to_string(index) self.setBackgroundTabValues() - def onColor1PushButtonClicked(self): + def onColorButtonClicked(self): """ Background / Gradient 1 Color button pushed. """ - if self.theme.background_type == \ - BackgroundType.to_string(BackgroundType.Solid): - self.theme.background_color = \ - self._colorButton(self.theme.background_color) - else: - self.theme.background_start_color = \ - self._colorButton(self.theme.background_start_color) + self.theme.background_color = \ + self._colorButton(self.theme.background_color) self.setBackgroundTabValues() - def onColor2PushButtonClicked(self): + def onGradientStartButtonClicked(self): + """ + Gradient 2 Color button pushed. + """ + self.theme.background_start_color = \ + self._colorButton(self.theme.background_start_color) + self.setBackgroundTabValues() + + def onGradientEndButtonClicked(self): """ Gradient 2 Color button pushed. """ diff --git a/openlp/core/ui/thememanager.py b/openlp/core/ui/thememanager.py index e69bdade1..da8597cc0 100644 --- a/openlp/core/ui/thememanager.py +++ b/openlp/core/ui/thememanager.py @@ -280,7 +280,7 @@ class ThemeManager(QtGui.QWidget): self.saveThemeName = unicode( item.data(QtCore.Qt.UserRole).toString()) self.themeForm.theme = theme - self.themeForm.exec_() + self.themeForm.exec_(True) def onDeleteTheme(self): """ diff --git a/openlp/core/ui/themewizard.py b/openlp/core/ui/themewizard.py index 786f55cb4..76fd1d445 100644 --- a/openlp/core/ui/themewizard.py +++ b/openlp/core/ui/themewizard.py @@ -30,156 +30,212 @@ from openlp.core.lib import translate, build_icon class Ui_ThemeWizard(object): def setupUi(self, ThemeWizard): - ThemeWizard.setObjectName(u'ThemeWizard') + ThemeWizard.setObjectName(u'OpenLP.ThemeWizard') ThemeWizard.resize(550, 386) ThemeWizard.setModal(True) ThemeWizard.setWizardStyle(QtGui.QWizard.ModernStyle) - ThemeWizard.setOptions(QtGui.QWizard.IndependentPages| + ThemeWizard.setOptions( + QtGui.QWizard.IndependentPages | QtGui.QWizard.NoBackButtonOnStartPage) self.welcomePage = QtGui.QWizardPage() self.welcomePage.setTitle(u'') self.welcomePage.setSubTitle(u'') self.welcomePage.setObjectName(u'welcomePage') + self.welcomePage.setPixmap(QtGui.QWizard.WatermarkPixmap, + QtGui.QPixmap(u':/wizards/wizard_createtheme.bmp')) self.welcomeLayout = QtGui.QHBoxLayout(self.welcomePage) self.welcomeLayout.setSpacing(8) self.welcomeLayout.setMargin(0) self.welcomeLayout.setObjectName(u'welcomeLayout') - self.importBibleImage = QtGui.QLabel(self.welcomePage) - self.importBibleImage.setMinimumSize(QtCore.QSize(163, 0)) - self.importBibleImage.setMaximumSize(QtCore.QSize(163, 16777215)) - self.importBibleImage.setLineWidth(0) - self.importBibleImage.setText(u'') - self.importBibleImage.setPixmap(QtGui.QPixmap - (u':/wizards/wizard_importbible.bmp')) - self.importBibleImage.setIndent(0) - self.importBibleImage.setObjectName(u'importBibleImage') - self.welcomeLayout.addWidget(self.importBibleImage) self.welcomePageLayout = QtGui.QVBoxLayout() self.welcomePageLayout.setSpacing(8) self.welcomePageLayout.setObjectName(u'welcomePageLayout') self.titleLabel = QtGui.QLabel(self.welcomePage) self.titleLabel.setObjectName(u'titleLabel') self.welcomePageLayout.addWidget(self.titleLabel) - spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, - QtGui.QSizePolicy.Fixed) - self.welcomePageLayout.addItem(spacerItem) + self.welcomeTopSpacer = QtGui.QSpacerItem(20, 40, + QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed) + self.welcomePageLayout.addItem(self.welcomeTopSpacer) self.informationLabel = QtGui.QLabel(self.welcomePage) self.informationLabel.setWordWrap(True) self.informationLabel.setMargin(10) self.informationLabel.setObjectName(u'informationLabel') self.welcomePageLayout.addWidget(self.informationLabel) - spacerItem1 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, - QtGui.QSizePolicy.Expanding) - self.welcomePageLayout.addItem(spacerItem1) + self.welcomeBottomSpacer = QtGui.QSpacerItem(20, 40, + QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) + self.welcomePageLayout.addItem(self.welcomeBottomSpacer) self.welcomeLayout.addLayout(self.welcomePageLayout) ThemeWizard.addPage(self.welcomePage) self.backgroundPage = QtGui.QWizardPage() self.backgroundPage.setObjectName(u'backgroundPage') - self.backgroundLayout = QtGui.QFormLayout(self.backgroundPage) - self.backgroundLayout.setFieldGrowthPolicy( - QtGui.QFormLayout.ExpandingFieldsGrow) - self.backgroundLayout.setLabelAlignment( - QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) - self.backgroundLayout.setMargin(20) + self.backgroundLayout = QtGui.QVBoxLayout(self.backgroundPage) self.backgroundLayout.setSpacing(8) + self.backgroundLayout.setMargin(20) self.backgroundLayout.setObjectName(u'backgroundLayout') + self.backgroundTypeLayout = QtGui.QHBoxLayout() + self.backgroundTypeLayout.setSpacing(8) + self.backgroundTypeLayout.setObjectName(u'backgroundTypeLayout') self.backgroundTypeLabel = QtGui.QLabel(self.backgroundPage) self.backgroundTypeLabel.setObjectName(u'backgroundTypeLabel') - self.backgroundLayout.setWidget(0, QtGui.QFormLayout.LabelRole, - self.backgroundTypeLabel) + self.backgroundTypeLayout.addWidget(self.backgroundTypeLabel) self.backgroundTypeComboBox = QtGui.QComboBox(self.backgroundPage) self.backgroundTypeComboBox.setObjectName(u'backgroundTypeComboBox') self.backgroundTypeComboBox.addItem(u'') self.backgroundTypeComboBox.addItem(u'') self.backgroundTypeComboBox.addItem(u'') - self.backgroundLayout.setWidget(0, QtGui.QFormLayout.FieldRole, - self.backgroundTypeComboBox) - self.color1Label = QtGui.QLabel(self.backgroundPage) - self.color1Label.setObjectName(u'color1Label') - self.backgroundLayout.setWidget(1, QtGui.QFormLayout.LabelRole, - self.color1Label) - self.color1PushButton = QtGui.QPushButton(self.backgroundPage) - self.color1PushButton.setText(u'') - self.color1PushButton.setObjectName(u'color1PushButton') - self.backgroundLayout.setWidget(1, QtGui.QFormLayout.FieldRole, - self.color1PushButton) - self.color2Label = QtGui.QLabel(self.backgroundPage) - self.color2Label.setObjectName(u'color2Label') - self.backgroundLayout.setWidget(2, QtGui.QFormLayout.LabelRole, - self.color2Label) - self.color2PushButton = QtGui.QPushButton(self.backgroundPage) - self.color2PushButton.setText(u'') - self.color2PushButton.setObjectName(u'color2PushButton') - self.backgroundLayout.setWidget(2, QtGui.QFormLayout.FieldRole, - self.color2PushButton) - self.imageLabel = QtGui.QLabel(self.backgroundPage) - self.imageLabel.setObjectName(u'imageLabel') - self.backgroundLayout.setWidget(3, QtGui.QFormLayout.LabelRole, - self.imageLabel) - self.imageLayout = QtGui.QHBoxLayout() - self.imageLayout.setSpacing(8) - self.imageLayout.setObjectName(u'imageLayout') - self.imageLineEdit = QtGui.QLineEdit(self.backgroundPage) - self.imageLineEdit.setObjectName(u'imageLineEdit') - self.imageLayout.addWidget(self.imageLineEdit) - self.imageBrowseButton = QtGui.QToolButton(self.backgroundPage) - self.imageBrowseButton.setText(u'') - self.imageBrowseButton.setIcon(build_icon - (u':/general/general_open.png')) - self.imageBrowseButton.setObjectName(u'imageBrowseButton') - self.imageLayout.addWidget(self.imageBrowseButton) - self.backgroundLayout.setLayout(3, QtGui.QFormLayout.FieldRole, - self.imageLayout) - self.gradientLabel = QtGui.QLabel(self.backgroundPage) - self.gradientLabel.setObjectName(u'gradientLabel') - self.backgroundLayout.setWidget(4, QtGui.QFormLayout.LabelRole, - self.gradientLabel) - self.gradientComboBox = QtGui.QComboBox(self.backgroundPage) + self.backgroundTypeLayout.addWidget(self.backgroundTypeComboBox) + self.backgroundTypeSpacer = QtGui.QSpacerItem(40, 20, + QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) + self.backgroundTypeLayout.addItem(self.backgroundTypeSpacer) + self.backgroundLayout.addLayout(self.backgroundTypeLayout) + self.backgroundStackedWidget = QtGui.QStackedWidget( + self.backgroundPage) + self.backgroundStackedWidget.setObjectName(u'backgroundStackedWidget') + self.colorPage = QtGui.QWidget() + self.colorPage.setObjectName(u'colorPage') + self.colorLayout = QtGui.QFormLayout(self.colorPage) + self.colorLayout.setMargin(0) + self.colorLayout.setSpacing(8) + self.colorLayout.setObjectName(u'colorLayout') + self.colorLabel = QtGui.QLabel(self.colorPage) + self.colorLabel.setMinimumSize(QtCore.QSize(103, 0)) + self.colorLabel.setAlignment(QtCore.Qt.AlignRight | + QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) + self.colorLabel.setObjectName(u'colorLabel') + self.colorLayout.setWidget(0, + QtGui.QFormLayout.LabelRole, self.colorLabel) + self.colorButton = QtGui.QPushButton(self.colorPage) + self.colorButton.setText(u'') + self.colorButton.setObjectName(u'colorButton') + self.colorLayout.setWidget(0, + QtGui.QFormLayout.FieldRole, self.colorButton) + self.backgroundStackedWidget.addWidget(self.colorPage) + self.gradientPage = QtGui.QWidget() + self.gradientPage.setObjectName(u'gradientPage') + self.gradientLayout = QtGui.QFormLayout(self.gradientPage) + self.gradientLayout.setMargin(0) + self.gradientLayout.setSpacing(8) + self.gradientLayout.setObjectName(u'gradientLayout') + self.gradientStartLabel = QtGui.QLabel(self.gradientPage) + self.gradientStartLabel.setMinimumSize(QtCore.QSize(103, 0)) + self.gradientStartLabel.setAlignment(QtCore.Qt.AlignRight | + QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) + self.gradientStartLabel.setObjectName(u'gradientStartLabel') + self.gradientLayout.setWidget(0, + QtGui.QFormLayout.LabelRole, self.gradientStartLabel) + self.gradientStartButton = QtGui.QPushButton(self.gradientPage) + self.gradientStartButton.setText(u'') + self.gradientStartButton.setObjectName(u'gradientStartButton') + self.gradientLayout.setWidget(0, + QtGui.QFormLayout.FieldRole, self.gradientStartButton) + self.gradientEndLabel = QtGui.QLabel(self.gradientPage) + self.gradientEndLabel.setMinimumSize(QtCore.QSize(103, 0)) + self.gradientEndLabel.setAlignment(QtCore.Qt.AlignRight | + QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) + self.gradientEndLabel.setObjectName(u'gradientEndLabel') + self.gradientLayout.setWidget(1, + QtGui.QFormLayout.LabelRole, self.gradientEndLabel) + self.gradientEndButton = QtGui.QPushButton(self.gradientPage) + self.gradientEndButton.setText(u'') + self.gradientEndButton.setObjectName(u'gradientEndButton') + self.gradientLayout.setWidget(1, + QtGui.QFormLayout.FieldRole, self.gradientEndButton) + self.gradientTypeLabel = QtGui.QLabel(self.gradientPage) + self.gradientTypeLabel.setMinimumSize(QtCore.QSize(103, 0)) + self.gradientTypeLabel.setAlignment(QtCore.Qt.AlignRight | + QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) + self.gradientTypeLabel.setObjectName(u'gradientTypeLabel') + self.gradientLayout.setWidget(2, + QtGui.QFormLayout.LabelRole, self.gradientTypeLabel) + self.gradientComboBox = QtGui.QComboBox(self.gradientPage) self.gradientComboBox.setObjectName(u'gradientComboBox') self.gradientComboBox.addItem(u'') self.gradientComboBox.addItem(u'') self.gradientComboBox.addItem(u'') self.gradientComboBox.addItem(u'') self.gradientComboBox.addItem(u'') - self.backgroundLayout.setWidget(4, QtGui.QFormLayout.FieldRole, - self.gradientComboBox) + self.gradientLayout.setWidget(2, + QtGui.QFormLayout.FieldRole, self.gradientComboBox) + self.backgroundStackedWidget.addWidget(self.gradientPage) + self.imagePage = QtGui.QWidget() + self.imagePage.setObjectName(u'imagePage') + self.imageLayout = QtGui.QFormLayout(self.imagePage) + self.imageLayout.setMargin(0) + self.imageLayout.setSpacing(8) + self.imageLayout.setObjectName(u'imageLayout') + self.imageLabel = QtGui.QLabel(self.imagePage) + self.imageLabel.setMinimumSize(QtCore.QSize(103, 0)) + self.imageLabel.setAlignment(QtCore.Qt.AlignRight | + QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) + self.imageLabel.setObjectName(u'imageLabel') + self.imageLayout.setWidget(0, + QtGui.QFormLayout.LabelRole, self.imageLabel) + self.imageFileLayout = QtGui.QHBoxLayout() + self.imageFileLayout.setSpacing(8) + self.imageFileLayout.setObjectName(u'imageFileLayout') + self.imageLineEdit = QtGui.QLineEdit(self.imagePage) + self.imageLineEdit.setObjectName(u'imageLineEdit') + self.imageFileLayout.addWidget(self.imageLineEdit) + self.imageBrowseButton = QtGui.QToolButton(self.imagePage) + self.imageBrowseButton.setText(u'') + self.imageBrowseButton.setIcon( + build_icon(u':/general/general_open.png')) + self.imageBrowseButton.setObjectName(u'imageBrowseButton') + self.imageFileLayout.addWidget(self.imageBrowseButton) + self.imageLayout.setLayout(0, + QtGui.QFormLayout.FieldRole, self.imageFileLayout) + self.backgroundStackedWidget.addWidget(self.imagePage) + self.backgroundLayout.addWidget(self.backgroundStackedWidget) ThemeWizard.addPage(self.backgroundPage) self.mainAreaPage = QtGui.QWizardPage() self.mainAreaPage.setObjectName(u'mainAreaPage') - self.formLayout = QtGui.QFormLayout(self.mainAreaPage) - self.formLayout.setFormAlignment( - QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop) - self.formLayout.setContentsMargins(-1, 20, 20, 20) - self.formLayout.setSpacing(8) - self.formLayout.setObjectName(u'formLayout') + self.mainAreaLayout = QtGui.QFormLayout(self.mainAreaPage) + self.mainAreaLayout.setFormAlignment(QtCore.Qt.AlignLeading | + QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop) + self.mainAreaLayout.setMargin(20) + self.mainAreaLayout.setSpacing(8) + self.mainAreaLayout.setObjectName(u'mainAreaLayout') self.mainFontLabel = QtGui.QLabel(self.mainAreaPage) + self.mainFontLabel.setMinimumSize(QtCore.QSize(103, 0)) + self.mainFontLabel.setAlignment(QtCore.Qt.AlignRight | + QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.mainFontLabel.setObjectName(u'mainFontLabel') - self.formLayout.setWidget(0, QtGui.QFormLayout.LabelRole, - self.mainFontLabel) + self.mainAreaLayout.setWidget(0, + QtGui.QFormLayout.LabelRole, self.mainFontLabel) self.mainFontComboBox = QtGui.QFontComboBox(self.mainAreaPage) self.mainFontComboBox.setObjectName(u'mainFontComboBox') - self.formLayout.setWidget(0, QtGui.QFormLayout.FieldRole, - self.mainFontComboBox) + self.mainAreaLayout.setWidget(0, + QtGui.QFormLayout.FieldRole, self.mainFontComboBox) self.mainColorLabel = QtGui.QLabel(self.mainAreaPage) self.mainColorLabel.setObjectName(u'mainColorLabel') - self.formLayout.setWidget(1, QtGui.QFormLayout.LabelRole, - self.mainColorLabel) + self.mainAreaLayout.setWidget(1, + QtGui.QFormLayout.LabelRole, self.mainColorLabel) + self.fontPropertiesLayout = QtGui.QHBoxLayout() + self.fontPropertiesLayout.setSpacing(24) + self.fontPropertiesLayout.setObjectName(u'fontPropertiesLayout') self.mainColorPushButton = QtGui.QPushButton(self.mainAreaPage) self.mainColorPushButton.setText(u'') self.mainColorPushButton.setObjectName(u'mainColorPushButton') - self.formLayout.setWidget(1, QtGui.QFormLayout.FieldRole, - self.mainColorPushButton) + self.fontPropertiesLayout.addWidget(self.mainColorPushButton) + self.boldCheckBox = QtGui.QCheckBox(self.mainAreaPage) + self.boldCheckBox.setObjectName(u'boldCheckBox') + self.fontPropertiesLayout.addWidget(self.boldCheckBox) + self.italicsCheckBox = QtGui.QCheckBox(self.mainAreaPage) + self.italicsCheckBox.setObjectName(u'italicsCheckBox') + self.fontPropertiesLayout.addWidget(self.italicsCheckBox) + self.mainAreaLayout.setLayout(1, + QtGui.QFormLayout.FieldRole, self.fontPropertiesLayout) self.mainSizeLabel = QtGui.QLabel(self.mainAreaPage) self.mainSizeLabel.setObjectName(u'mainSizeLabel') - self.formLayout.setWidget(2, QtGui.QFormLayout.LabelRole, - self.mainSizeLabel) + self.mainAreaLayout.setWidget(2, + QtGui.QFormLayout.LabelRole, self.mainSizeLabel) self.mainSizeLayout = QtGui.QHBoxLayout() self.mainSizeLayout.setSpacing(8) self.mainSizeLayout.setMargin(0) self.mainSizeLayout.setObjectName(u'mainSizeLayout') self.mainSizeSpinBox = QtGui.QSpinBox(self.mainAreaPage) - sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, - QtGui.QSizePolicy.Fixed) + sizePolicy = QtGui.QSizePolicy( + QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( @@ -193,22 +249,22 @@ class Ui_ThemeWizard(object): self.mainLineCountLabel = QtGui.QLabel(self.mainAreaPage) self.mainLineCountLabel.setObjectName(u'mainLineCountLabel') self.mainSizeLayout.addWidget(self.mainLineCountLabel) - self.formLayout.setLayout(2, QtGui.QFormLayout.FieldRole, - self.mainSizeLayout) + self.mainAreaLayout.setLayout(2, + QtGui.QFormLayout.FieldRole, self.mainSizeLayout) self.lineSpacingLabel = QtGui.QLabel(self.mainAreaPage) self.lineSpacingLabel.setObjectName(u'lineSpacingLabel') - self.formLayout.setWidget(3, QtGui.QFormLayout.LabelRole, - self.lineSpacingLabel) + self.mainAreaLayout.setWidget(3, + QtGui.QFormLayout.LabelRole, self.lineSpacingLabel) self.lineSpacingSpinBox = QtGui.QSpinBox(self.mainAreaPage) self.lineSpacingSpinBox.setMinimum(-50) self.lineSpacingSpinBox.setMaximum(50) self.lineSpacingSpinBox.setObjectName(u'lineSpacingSpinBox') - self.formLayout.setWidget(3, QtGui.QFormLayout.FieldRole, - self.lineSpacingSpinBox) + self.mainAreaLayout.setWidget(3, + QtGui.QFormLayout.FieldRole, self.lineSpacingSpinBox) self.outlineCheckBox = QtGui.QCheckBox(self.mainAreaPage) self.outlineCheckBox.setObjectName(u'outlineCheckBox') - self.formLayout.setWidget(4, QtGui.QFormLayout.LabelRole, - self.outlineCheckBox) + self.mainAreaLayout.setWidget(4, + QtGui.QFormLayout.LabelRole, self.outlineCheckBox) self.outlineLayout = QtGui.QHBoxLayout() self.outlineLayout.setObjectName(u'outlineLayout') self.outlineColorPushButton = QtGui.QPushButton(self.mainAreaPage) @@ -222,12 +278,12 @@ class Ui_ThemeWizard(object): self.outlineSizeSpinBox = QtGui.QSpinBox(self.mainAreaPage) self.outlineSizeSpinBox.setObjectName(u'outlineSizeSpinBox') self.outlineLayout.addWidget(self.outlineSizeSpinBox) - self.formLayout.setLayout(4, QtGui.QFormLayout.FieldRole, - self.outlineLayout) + self.mainAreaLayout.setLayout(4, + QtGui.QFormLayout.FieldRole, self.outlineLayout) self.shadowCheckBox = QtGui.QCheckBox(self.mainAreaPage) self.shadowCheckBox.setObjectName(u'shadowCheckBox') - self.formLayout.setWidget(5, QtGui.QFormLayout.LabelRole, - self.shadowCheckBox) + self.mainAreaLayout.setWidget(5, + QtGui.QFormLayout.LabelRole, self.shadowCheckBox) self.shadowLayout = QtGui.QHBoxLayout() self.shadowLayout.setObjectName(u'shadowLayout') self.shadowColorPushButton = QtGui.QPushButton(self.mainAreaPage) @@ -241,49 +297,44 @@ class Ui_ThemeWizard(object): self.shadowSizeSpinBox = QtGui.QSpinBox(self.mainAreaPage) self.shadowSizeSpinBox.setObjectName(u'shadowSizeSpinBox') self.shadowLayout.addWidget(self.shadowSizeSpinBox) - self.formLayout.setLayout(5, QtGui.QFormLayout.FieldRole, - self.shadowLayout) - self.boldCheckBox = QtGui.QCheckBox(self.mainAreaPage) - self.boldCheckBox.setObjectName(u'boldCheckBox') - self.formLayout.setWidget(6, QtGui.QFormLayout.FieldRole, - self.boldCheckBox) - self.italicsCheckBox = QtGui.QCheckBox(self.mainAreaPage) - self.italicsCheckBox.setObjectName(u'italicsCheckBox') - self.formLayout.setWidget(7, QtGui.QFormLayout.FieldRole, - self.italicsCheckBox) + self.mainAreaLayout.setLayout(5, + QtGui.QFormLayout.FieldRole, self.shadowLayout) ThemeWizard.addPage(self.mainAreaPage) self.footerAreaPage = QtGui.QWizardPage() self.footerAreaPage.setObjectName(u'footerAreaPage') self.footerLayout = QtGui.QFormLayout(self.footerAreaPage) self.footerLayout.setFieldGrowthPolicy( QtGui.QFormLayout.ExpandingFieldsGrow) - self.footerLayout.setContentsMargins(50, 20, 20, 20) + self.footerLayout.setMargin(20) self.footerLayout.setSpacing(8) self.footerLayout.setObjectName(u'footerLayout') self.footerFontLabel = QtGui.QLabel(self.footerAreaPage) + self.footerFontLabel.setMinimumSize(QtCore.QSize(103, 0)) + self.footerFontLabel.setAlignment(QtCore.Qt.AlignRight | + QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.footerFontLabel.setObjectName(u'footerFontLabel') - self.footerLayout.setWidget(0, QtGui.QFormLayout.LabelRole, - self.footerFontLabel) + self.footerLayout.setWidget(0, + QtGui.QFormLayout.LabelRole, self.footerFontLabel) self.footerFontComboBox = QtGui.QFontComboBox(self.footerAreaPage) self.footerFontComboBox.setObjectName(u'footerFontComboBox') - self.footerLayout.setWidget(0, QtGui.QFormLayout.FieldRole, - self.footerFontComboBox) + self.footerLayout.setWidget(0, + QtGui.QFormLayout.FieldRole, self.footerFontComboBox) self.footerColorLabel = QtGui.QLabel(self.footerAreaPage) self.footerColorLabel.setObjectName(u'footerColorLabel') - self.footerLayout.setWidget(1, QtGui.QFormLayout.LabelRole, - self.footerColorLabel) + self.footerLayout.setWidget(1, + QtGui.QFormLayout.LabelRole, self.footerColorLabel) self.footerColorPushButton = QtGui.QPushButton(self.footerAreaPage) self.footerColorPushButton.setText(u'') self.footerColorPushButton.setObjectName(u'footerColorPushButton') - self.footerLayout.setWidget(1, QtGui.QFormLayout.FieldRole, - self.footerColorPushButton) + self.footerLayout.setWidget(1, + QtGui.QFormLayout.FieldRole, self.footerColorPushButton) self.footerSizeLabel = QtGui.QLabel(self.footerAreaPage) self.footerSizeLabel.setObjectName(u'footerSizeLabel') - self.footerLayout.setWidget(2, QtGui.QFormLayout.LabelRole, - self.footerSizeLabel) + self.footerLayout.setWidget(2, + QtGui.QFormLayout.LabelRole, self.footerSizeLabel) self.footerSizeSpinBox = QtGui.QSpinBox(self.footerAreaPage) - sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, - QtGui.QSizePolicy.Fixed) + sizePolicy = QtGui.QSizePolicy( + QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( @@ -293,48 +344,52 @@ class Ui_ThemeWizard(object): self.footerSizeSpinBox.setMaximum(999) self.footerSizeSpinBox.setProperty(u'value', 10) self.footerSizeSpinBox.setObjectName(u'footerSizeSpinBox') - self.footerLayout.setWidget(2, QtGui.QFormLayout.FieldRole, - self.footerSizeSpinBox) + self.footerLayout.setWidget(2, + QtGui.QFormLayout.FieldRole, self.footerSizeSpinBox) ThemeWizard.addPage(self.footerAreaPage) self.alignmentPage = QtGui.QWizardPage() self.alignmentPage.setObjectName(u'alignmentPage') - self.formLayout_2 = QtGui.QFormLayout(self.alignmentPage) - self.formLayout_2.setMargin(20) - self.formLayout_2.setObjectName(u'formLayout_2') + self.alignmentLayout = QtGui.QFormLayout(self.alignmentPage) + self.alignmentLayout.setMargin(20) + self.alignmentLayout.setSpacing(8) + self.alignmentLayout.setObjectName(u'alignmentLayout') self.horizontalLabel = QtGui.QLabel(self.alignmentPage) + self.horizontalLabel.setMinimumSize(QtCore.QSize(103, 0)) + self.horizontalLabel.setAlignment(QtCore.Qt.AlignRight | + QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.horizontalLabel.setObjectName(u'horizontalLabel') - self.formLayout_2.setWidget(0, QtGui.QFormLayout.LabelRole, - self.horizontalLabel) + self.alignmentLayout.setWidget(0, + QtGui.QFormLayout.LabelRole, self.horizontalLabel) self.horizontalComboBox = QtGui.QComboBox(self.alignmentPage) self.horizontalComboBox.setEditable(False) self.horizontalComboBox.setObjectName(u'horizontalComboBox') self.horizontalComboBox.addItem(u'') self.horizontalComboBox.addItem(u'') self.horizontalComboBox.addItem(u'') - self.formLayout_2.setWidget(0, QtGui.QFormLayout.FieldRole, - self.horizontalComboBox) + self.alignmentLayout.setWidget(0, + QtGui.QFormLayout.FieldRole, self.horizontalComboBox) self.verticalLabel = QtGui.QLabel(self.alignmentPage) self.verticalLabel.setObjectName(u'verticalLabel') - self.formLayout_2.setWidget(1, QtGui.QFormLayout.LabelRole, - self.verticalLabel) + self.alignmentLayout.setWidget(1, + QtGui.QFormLayout.LabelRole, self.verticalLabel) self.verticalComboBox = QtGui.QComboBox(self.alignmentPage) self.verticalComboBox.setObjectName(u'verticalComboBox') self.verticalComboBox.addItem(u'') self.verticalComboBox.addItem(u'') self.verticalComboBox.addItem(u'') - self.formLayout_2.setWidget(1, QtGui.QFormLayout.FieldRole, - self.verticalComboBox) + self.alignmentLayout.setWidget(1, + QtGui.QFormLayout.FieldRole, self.verticalComboBox) self.transitionsCheckBox = QtGui.QCheckBox(self.alignmentPage) self.transitionsCheckBox.setObjectName(u'transitionsCheckBox') - self.formLayout_2.setWidget(2, QtGui.QFormLayout.FieldRole, - self.transitionsCheckBox) + self.alignmentLayout.setWidget(2, + QtGui.QFormLayout.FieldRole, self.transitionsCheckBox) ThemeWizard.addPage(self.alignmentPage) self.areaPositionPage = QtGui.QWizardPage() self.areaPositionPage.setObjectName(u'areaPositionPage') - self.gridLayout_2 = QtGui.QGridLayout(self.areaPositionPage) - self.gridLayout_2.setMargin(20) - self.gridLayout_2.setSpacing(8) - self.gridLayout_2.setObjectName(u'gridLayout_2') + self.areaPositionLayout = QtGui.QGridLayout(self.areaPositionPage) + self.areaPositionLayout.setMargin(20) + self.areaPositionLayout.setSpacing(8) + self.areaPositionLayout.setObjectName(u'areaPositionLayout') self.mainPositionGroupBox = QtGui.QGroupBox(self.areaPositionPage) self.mainPositionGroupBox.setMinimumSize(QtCore.QSize(248, 0)) self.mainPositionGroupBox.setObjectName(u'mainPositionGroupBox') @@ -342,8 +397,8 @@ class Ui_ThemeWizard(object): self.mainPositionLayout.setMargin(8) self.mainPositionLayout.setSpacing(8) self.mainPositionLayout.setObjectName(u'mainPositionLayout') - self.mainDefaultPositionCheckBox = \ - QtGui.QCheckBox(self.mainPositionGroupBox) + self.mainDefaultPositionCheckBox = QtGui.QCheckBox( + self.mainPositionGroupBox) self.mainDefaultPositionCheckBox.setChecked(True) self.mainDefaultPositionCheckBox.setTristate(False) self.mainDefaultPositionCheckBox.setObjectName( @@ -352,12 +407,12 @@ class Ui_ThemeWizard(object): self.mainDefaultPositionCheckBox) self.nainXLabel = QtGui.QLabel(self.mainPositionGroupBox) self.nainXLabel.setObjectName(u'nainXLabel') - self.mainPositionLayout.setWidget(1, QtGui.QFormLayout.LabelRole, - self.nainXLabel) + self.mainPositionLayout.setWidget(1, + QtGui.QFormLayout.LabelRole, self.nainXLabel) self.mainXSpinBox = QtGui.QSpinBox(self.mainPositionGroupBox) self.mainXSpinBox.setEnabled(False) - sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, - QtGui.QSizePolicy.Fixed) + sizePolicy = QtGui.QSizePolicy( + QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( @@ -367,12 +422,12 @@ class Ui_ThemeWizard(object): self.mainXSpinBox.setMaximum(9999) self.mainXSpinBox.setProperty(u'value', 0) self.mainXSpinBox.setObjectName(u'mainXSpinBox') - self.mainPositionLayout.setWidget(1, QtGui.QFormLayout.FieldRole, - self.mainXSpinBox) + self.mainPositionLayout.setWidget(1, + QtGui.QFormLayout.FieldRole, self.mainXSpinBox) self.mainYSpinBox = QtGui.QSpinBox(self.mainPositionGroupBox) self.mainYSpinBox.setEnabled(False) - sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, - QtGui.QSizePolicy.Fixed) + sizePolicy = QtGui.QSizePolicy( + QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( @@ -381,16 +436,16 @@ class Ui_ThemeWizard(object): self.mainYSpinBox.setMinimumSize(QtCore.QSize(78, 0)) self.mainYSpinBox.setMaximum(9999) self.mainYSpinBox.setObjectName(u'mainYSpinBox') - self.mainPositionLayout.setWidget(2, QtGui.QFormLayout.FieldRole, - self.mainYSpinBox) + self.mainPositionLayout.setWidget(2, + QtGui.QFormLayout.FieldRole, self.mainYSpinBox) self.mainYLabel = QtGui.QLabel(self.mainPositionGroupBox) self.mainYLabel.setObjectName(u'mainYLabel') - self.mainPositionLayout.setWidget(2, QtGui.QFormLayout.LabelRole, - self.mainYLabel) + self.mainPositionLayout.setWidget(2, + QtGui.QFormLayout.LabelRole, self.mainYLabel) self.mainWidthSpinBox = QtGui.QSpinBox(self.mainPositionGroupBox) self.mainWidthSpinBox.setEnabled(False) - sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, - QtGui.QSizePolicy.Fixed) + sizePolicy = QtGui.QSizePolicy( + QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( @@ -399,12 +454,12 @@ class Ui_ThemeWizard(object): self.mainWidthSpinBox.setMinimumSize(QtCore.QSize(78, 0)) self.mainWidthSpinBox.setMaximum(9999) self.mainWidthSpinBox.setObjectName(u'mainWidthSpinBox') - self.mainPositionLayout.setWidget(3, QtGui.QFormLayout.FieldRole, - self.mainWidthSpinBox) + self.mainPositionLayout.setWidget(3, + QtGui.QFormLayout.FieldRole, self.mainWidthSpinBox) self.mainWidthLabel = QtGui.QLabel(self.mainPositionGroupBox) self.mainWidthLabel.setObjectName(u'mainWidthLabel') - self.mainPositionLayout.setWidget(3, QtGui.QFormLayout.LabelRole, - self.mainWidthLabel) + self.mainPositionLayout.setWidget(3, + QtGui.QFormLayout.LabelRole, self.mainWidthLabel) self.mainHeightSpinBox = QtGui.QSpinBox(self.mainPositionGroupBox) self.mainHeightSpinBox.setEnabled(False) sizePolicy = QtGui.QSizePolicy( @@ -417,29 +472,30 @@ class Ui_ThemeWizard(object): self.mainHeightSpinBox.setMinimumSize(QtCore.QSize(78, 0)) self.mainHeightSpinBox.setMaximum(9999) self.mainHeightSpinBox.setObjectName(u'mainHeightSpinBox') - self.mainPositionLayout.setWidget(4, QtGui.QFormLayout.FieldRole, - self.mainHeightSpinBox) + self.mainPositionLayout.setWidget(4, + QtGui.QFormLayout.FieldRole, self.mainHeightSpinBox) self.mainHeightLabel = QtGui.QLabel(self.mainPositionGroupBox) self.mainHeightLabel.setObjectName(u'mainHeightLabel') - self.mainPositionLayout.setWidget(4, QtGui.QFormLayout.LabelRole, - self.mainHeightLabel) - self.gridLayout_2.addWidget(self.mainPositionGroupBox, 1, 0, 1, 1) + self.mainPositionLayout.setWidget(4, + QtGui.QFormLayout.LabelRole, self.mainHeightLabel) + self.areaPositionLayout.addWidget( + self.mainPositionGroupBox, 1, 0, 1, 1) self.footerPositionGroupBox = QtGui.QGroupBox(self.areaPositionPage) self.footerPositionGroupBox.setMinimumSize(QtCore.QSize(248, 0)) self.footerPositionGroupBox.setObjectName(u'footerPositionGroupBox') - self.footerPositionLayout = \ - QtGui.QFormLayout(self.footerPositionGroupBox) + self.footerPositionLayout = QtGui.QFormLayout( + self.footerPositionGroupBox) self.footerPositionLayout.setMargin(8) self.footerPositionLayout.setSpacing(8) self.footerPositionLayout.setObjectName(u'footerPositionLayout') self.footerXLabel = QtGui.QLabel(self.footerPositionGroupBox) self.footerXLabel.setObjectName(u'footerXLabel') - self.footerPositionLayout.setWidget(1, QtGui.QFormLayout.LabelRole, - self.footerXLabel) + self.footerPositionLayout.setWidget(1, + QtGui.QFormLayout.LabelRole, self.footerXLabel) self.footerXSpinBox = QtGui.QSpinBox(self.footerPositionGroupBox) self.footerXSpinBox.setEnabled(False) - sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, - QtGui.QSizePolicy.Fixed) + sizePolicy = QtGui.QSizePolicy( + QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( @@ -449,16 +505,16 @@ class Ui_ThemeWizard(object): self.footerXSpinBox.setMaximum(9999) self.footerXSpinBox.setProperty(u'value', 0) self.footerXSpinBox.setObjectName(u'footerXSpinBox') - self.footerPositionLayout.setWidget(1, QtGui.QFormLayout.FieldRole, - self.footerXSpinBox) + self.footerPositionLayout.setWidget(1, + QtGui.QFormLayout.FieldRole, self.footerXSpinBox) self.footerYLabel = QtGui.QLabel(self.footerPositionGroupBox) self.footerYLabel.setObjectName(u'footerYLabel') - self.footerPositionLayout.setWidget(2, QtGui.QFormLayout.LabelRole, - self.footerYLabel) + self.footerPositionLayout.setWidget(2, + QtGui.QFormLayout.LabelRole, self.footerYLabel) self.footerYSpinBox = QtGui.QSpinBox(self.footerPositionGroupBox) self.footerYSpinBox.setEnabled(False) - sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, - QtGui.QSizePolicy.Fixed) + sizePolicy = QtGui.QSizePolicy( + QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( @@ -468,218 +524,234 @@ class Ui_ThemeWizard(object): self.footerYSpinBox.setMaximum(9999) self.footerYSpinBox.setProperty(u'value', 0) self.footerYSpinBox.setObjectName(u'footerYSpinBox') - self.footerPositionLayout.setWidget(2, QtGui.QFormLayout.FieldRole, - self.footerYSpinBox) + self.footerPositionLayout.setWidget(2, + QtGui.QFormLayout.FieldRole, self.footerYSpinBox) self.footerWidthLabel = QtGui.QLabel(self.footerPositionGroupBox) self.footerWidthLabel.setObjectName(u'footerWidthLabel') - self.footerPositionLayout.setWidget(3, QtGui.QFormLayout.LabelRole, - self.footerWidthLabel) + self.footerPositionLayout.setWidget(3, + QtGui.QFormLayout.LabelRole, self.footerWidthLabel) self.footerWidthSpinBox = QtGui.QSpinBox(self.footerPositionGroupBox) self.footerWidthSpinBox.setEnabled(False) self.footerWidthSpinBox.setMinimumSize(QtCore.QSize(78, 0)) self.footerWidthSpinBox.setMaximum(9999) self.footerWidthSpinBox.setObjectName(u'footerWidthSpinBox') - self.footerPositionLayout.setWidget(3, QtGui.QFormLayout.FieldRole, - self.footerWidthSpinBox) + self.footerPositionLayout.setWidget(3, + QtGui.QFormLayout.FieldRole, self.footerWidthSpinBox) self.footerHeightLabel = QtGui.QLabel(self.footerPositionGroupBox) self.footerHeightLabel.setObjectName(u'footerHeightLabel') - self.footerPositionLayout.setWidget(4, QtGui.QFormLayout.LabelRole, - self.footerHeightLabel) + self.footerPositionLayout.setWidget(4, + QtGui.QFormLayout.LabelRole, self.footerHeightLabel) self.footerHeightSpinBox = QtGui.QSpinBox(self.footerPositionGroupBox) self.footerHeightSpinBox.setEnabled(False) self.footerHeightSpinBox.setMinimumSize(QtCore.QSize(78, 0)) self.footerHeightSpinBox.setMaximum(9999) self.footerHeightSpinBox.setObjectName(u'footerHeightSpinBox') - self.footerPositionLayout.setWidget(4, QtGui.QFormLayout.FieldRole, - self.footerHeightSpinBox) - self.footerDefaultPositionCheckBox = \ - QtGui.QCheckBox(self.footerPositionGroupBox) + self.footerPositionLayout.setWidget(4, + QtGui.QFormLayout.FieldRole, self.footerHeightSpinBox) + self.footerDefaultPositionCheckBox = QtGui.QCheckBox( + self.footerPositionGroupBox) self.footerDefaultPositionCheckBox.setChecked(True) self.footerDefaultPositionCheckBox.setObjectName( u'footerDefaultPositionCheckBox') self.footerPositionLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.footerDefaultPositionCheckBox) - self.gridLayout_2.addWidget(self.footerPositionGroupBox, 1, 1, 1, 1) + self.areaPositionLayout.addWidget(self.footerPositionGroupBox, 1, 1, 1, 1) ThemeWizard.addPage(self.areaPositionPage) self.previewPage = QtGui.QWizardPage() self.previewPage.setObjectName(u'previewPage') + self.previewLayout = QtGui.QVBoxLayout(self.previewPage) + self.previewLayout.setSpacing(8) + self.previewLayout.setMargin(20) + self.previewLayout.setObjectName(u'previewLayout') + self.themeNameLayout = QtGui.QHBoxLayout() + self.themeNameLayout.setSpacing(8) + self.themeNameLayout.setObjectName(u'themeNameLayout') self.themeNameLabel = QtGui.QLabel(self.previewPage) - self.themeNameLabel.setGeometry(QtCore.QRect(20, 10, 82, 16)) + self.themeNameLabel.setMinimumSize(QtCore.QSize(103, 0)) self.themeNameLabel.setTextFormat(QtCore.Qt.PlainText) + self.themeNameLabel.setAlignment(QtCore.Qt.AlignRight | + QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.themeNameLabel.setObjectName(u'themeNameLabel') - self.previewLabel = QtGui.QLabel(self.previewPage) - self.previewLabel.setGeometry(QtCore.QRect(250, 60, 48, 16)) - self.previewLabel.setAlignment(QtCore.Qt.AlignCenter) - self.previewLabel.setObjectName(u'previewLabel') + self.themeNameLayout.addWidget(self.themeNameLabel) self.themeNameEdit = QtGui.QLineEdit(self.previewPage) - self.themeNameEdit.setGeometry(QtCore.QRect(117, 4, 351, 23)) self.themeNameEdit.setObjectName(u'themeNameEdit') - self.groupBox = QtGui.QGroupBox(self.previewPage) - self.groupBox.setGeometry(QtCore.QRect(40, 80, 464, 214)) - self.groupBox.setTitle(u'') - self.groupBox.setObjectName(u'groupBox') - self.horizontalLayout = QtGui.QHBoxLayout(self.groupBox) - self.horizontalLayout.setObjectName(u'horizontalLayout') - spacerItem2 = QtGui.QSpacerItem(58, 20, QtGui.QSizePolicy.Expanding, - QtGui.QSizePolicy.Minimum) - self.horizontalLayout.addItem(spacerItem2) - self.previewBoxLabel = QtGui.QLabel(self.groupBox) - sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, - QtGui.QSizePolicy.Fixed) + self.themeNameLayout.addWidget(self.themeNameEdit) + self.previewLayout.addLayout(self.themeNameLayout) + self.previewPaneLayout = QtGui.QHBoxLayout() + self.previewPaneLayout.setSpacing(0) + self.previewPaneLayout.setObjectName(u'previewPaneLayout') + self.previewLeftSpacer = QtGui.QSpacerItem(58, 20, + QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) + self.previewPaneLayout.addItem(self.previewLeftSpacer) + self.previewBoxLabel = QtGui.QLabel(self.previewPage) + sizePolicy = QtGui.QSizePolicy( + QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.previewBoxLabel.sizePolicy().hasHeightForWidth()) self.previewBoxLabel.setSizePolicy(sizePolicy) - self.previewBoxLabel.setMinimumSize(QtCore.QSize(300, 200)) + self.previewBoxLabel.setMinimumSize(QtCore.QSize(100, 150)) self.previewBoxLabel.setFrameShape(QtGui.QFrame.WinPanel) self.previewBoxLabel.setFrameShadow(QtGui.QFrame.Sunken) self.previewBoxLabel.setLineWidth(1) self.previewBoxLabel.setText(u'') self.previewBoxLabel.setScaledContents(True) self.previewBoxLabel.setObjectName(u'previewBoxLabel') - self.horizontalLayout.addWidget(self.previewBoxLabel) - spacerItem3 = QtGui.QSpacerItem(78, 20, QtGui.QSizePolicy.Expanding, - QtGui.QSizePolicy.Minimum) - self.horizontalLayout.addItem(spacerItem3) + self.previewPaneLayout.addWidget(self.previewBoxLabel) + self.previewRightSpacer = QtGui.QSpacerItem(78, 20, + QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) + self.previewPaneLayout.addItem(self.previewRightSpacer) + self.previewLayout.addLayout(self.previewPaneLayout) ThemeWizard.addPage(self.previewPage) self.themeNameLabel.setBuddy(self.themeNameEdit) self.retranslateUi(ThemeWizard) - QtCore.QObject.connect(ThemeWizard, QtCore.SIGNAL(u'accepted()'), + self.backgroundStackedWidget.setCurrentIndex(0) + QtCore.QObject.connect( + ThemeWizard, + QtCore.SIGNAL(u'accepted()'), ThemeWizard.accept) + QtCore.QObject.connect( + self.backgroundTypeComboBox, + QtCore.SIGNAL(u'currentIndexChanged(int)'), + self.backgroundStackedWidget.setCurrentIndex) QtCore.QMetaObject.connectSlotsByName(ThemeWizard) def retranslateUi(self, ThemeWizard): - ThemeWizard.setWindowTitle(translate('OpenLP.ThemeForm', - 'Theme Wizard')) - self.titleLabel.setText(translate('OpenLP.ThemeForm', - '\n' - '
\n' - '' - 'Welcome to the Theme Wizard
')) - self.informationLabel.setText(translate('OpenLP.ThemeForm', - 'This wizard will help you to maintain Themes . Click the next ' - 'button below to start the process by setting up your background.')) - self.backgroundPage.setTitle(translate('OpenLP.ThemeForm', - 'Set Up Background')) - self.backgroundPage.setSubTitle(translate('OpenLP.ThemeForm', - 'Set up your theme\'s background according to the parameters ' - 'below.')) - self.backgroundTypeLabel.setText(translate('OpenLP.ThemeForm', - 'Background type:')) - self.backgroundTypeComboBox.setItemText(0, translate('OpenLP.ThemeForm', - 'Solid Color')) - self.backgroundTypeComboBox.setItemText(1, translate('OpenLP.ThemeForm', - 'Gradient')) - self.backgroundTypeComboBox.setItemText(2, translate('OpenLP.ThemeForm', - 'Image')) - self.color1Label.setText(translate('OpenLP.ThemeForm', '