diff --git a/openlp/core/ui/themeform.py b/openlp/core/ui/themeform.py index 1160d7645..21e6d0cac 100644 --- a/openlp/core/ui/themeform.py +++ b/openlp/core/ui/themeform.py @@ -58,49 +58,49 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard): self.updateThemeAllowed = True QtCore.QObject.connect(self.backgroundComboBox, QtCore.SIGNAL(u'currentIndexChanged(int)'), - self.onBackgroundComboBox) + self.onBackgroundComboBoxCurrentIndexChanged) QtCore.QObject.connect(self.gradientComboBox, QtCore.SIGNAL(u'currentIndexChanged(int)'), - self.onGradientComboBox) + self.onGradientComboBoxCurrentIndexChanged) QtCore.QObject.connect(self.colorButton, - QtCore.SIGNAL(u'pressed()'), + QtCore.SIGNAL(u'clicked()'), self.onColorButtonClicked) QtCore.QObject.connect(self.gradientStartButton, - QtCore.SIGNAL(u'pressed()'), + QtCore.SIGNAL(u'clicked()'), self.onGradientStartButtonClicked) QtCore.QObject.connect(self.gradientEndButton, - QtCore.SIGNAL(u'pressed()'), + QtCore.SIGNAL(u'clicked()'), self.onGradientEndButtonClicked) QtCore.QObject.connect(self.imageBrowseButton, - QtCore.SIGNAL(u'pressed()'), + QtCore.SIGNAL(u'clicked()'), self.onImageBrowseButtonClicked) QtCore.QObject.connect(self.mainColorButton, - QtCore.SIGNAL(u'pressed()'), - self.onMainColourButtonClicked) + QtCore.SIGNAL(u'clicked()'), + self.onMainColorButtonClicked) QtCore.QObject.connect(self.outlineColorButton, - QtCore.SIGNAL(u'pressed()'), - self.onOutlineColourButtonClicked) + QtCore.SIGNAL(u'clicked()'), + self.onOutlineColorButtonClicked) QtCore.QObject.connect(self.shadowColorButton, - QtCore.SIGNAL(u'pressed()'), - self.onShadowColourButtonClicked) + QtCore.SIGNAL(u'clicked()'), + self.onShadowColorButtonClicked) QtCore.QObject.connect(self.outlineCheckBox, QtCore.SIGNAL(u'stateChanged(int)'), - self.onOutlineCheckCheckBoxChanged) + self.onOutlineCheckCheckBoxStateChanged) QtCore.QObject.connect(self.shadowCheckBox, QtCore.SIGNAL(u'stateChanged(int)'), - self.onShadowCheckCheckBoxChanged) + self.onShadowCheckCheckBoxStateChanged) QtCore.QObject.connect(self.footerColorButton, - QtCore.SIGNAL(u'pressed()'), - self.onFooterColourButtonClicked) + QtCore.SIGNAL(u'clicked()'), + self.onFooterColorButtonClicked) QtCore.QObject.connect(self.mainPositionCheckBox, QtCore.SIGNAL(u'stateChanged(int)'), - self.onMainPositionCheckBox) + self.onMainPositionCheckBoxStateChanged) QtCore.QObject.connect(self.footerPositionCheckBox, QtCore.SIGNAL(u'stateChanged(int)'), - self.onFooterPositionCheckBox) + self.onFooterPositionCheckBoxStateChanged) QtCore.QObject.connect(self, QtCore.SIGNAL(u'currentIdChanged(int)'), - self.pageChanged) + self.onCurrentIdChanged) QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'theme_line_count'), self.updateLinesText) @@ -121,15 +121,6 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard): self.calculateLines) QtCore.QObject.connect(self, QtCore.SIGNAL(u'accepted()'), self.accept) - def pageChanged(self, pageId): - """ - Detects Page changes and updates as approprate. - """ - if self.page(pageId) == self.previewPage: - self.updateTheme() - frame = self.thememanager.generateImage(self.theme) - self.previewBoxLabel.setPixmap(QtGui.QPixmap.fromImage(frame)) - def setDefaults(self): """ Set up display at start of theme edit. @@ -224,7 +215,16 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard): self.mainLineCountLabel.setText(unicode(translate('OpenLP.ThemeForm', \ '(%d lines per slide)' % int(lines)))) - def onOutlineCheckCheckBoxChanged(self, state): + def onCurrentIdChanged(self, pageId): + """ + Detects Page changes and updates as approprate. + """ + if self.page(pageId) == self.previewPage: + self.updateTheme() + frame = self.thememanager.generateImage(self.theme) + self.previewBoxLabel.setPixmap(QtGui.QPixmap.fromImage(frame)) + + def onOutlineCheckCheckBoxStateChanged(self, state): """ Change state as Outline check box changed """ @@ -236,7 +236,7 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard): self.outlineSizeSpinBox.setEnabled(self.theme.font_main_outline) self.calculateLines() - def onShadowCheckCheckBoxChanged(self, state): + def onShadowCheckCheckBoxStateChanged(self, state): """ Change state as Shadow check box changed """ @@ -248,13 +248,13 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard): self.shadowSizeSpinBox.setEnabled(self.theme.font_main_shadow) self.calculateLines() - def onMainPositionCheckBox(self, value): + def onMainPositionCheckBoxStateChanged(self, value): """ Change state as Main Area Position check box changed """ self.theme.font_main_override = (value == QtCore.Qt.Checked) - def onFooterPositionCheckBox(self, value): + def onFooterPositionCheckBoxStateChanged(self, value): """ Change state as Footer Area Position check box changed """ @@ -403,14 +403,14 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard): self.themeNameEdit.setReadOnly(len(self.theme.theme_name) != 0) self.themeNameEdit.setFrame(len(self.theme.theme_name) == 0) - def onBackgroundComboBox(self, index): + def onBackgroundComboBoxCurrentIndexChanged(self, index): """ Background style Combo box has changed. """ self.theme.background_type = BackgroundType.to_string(index) self.setBackgroundTabValues() - def onGradientComboBox(self, index): + def onGradientComboBoxCurrentIndexChanged(self, index): """ Background gradient Combo box has changed. """ @@ -456,22 +456,22 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard): self.theme.background_filename = unicode(filename) self.setBackgroundTabValues() - def onMainColourButtonClicked(self): + def onMainColorButtonClicked(self): self.theme.font_main_color = \ self._colorButton(self.theme.font_main_color) self.setMainAreaTabValues() - def onOutlineColourButtonClicked(self): + def onOutlineColorButtonClicked(self): self.theme.font_main_outline_color = \ self._colorButton(self.theme.font_main_outline_color) self.setMainAreaTabValues() - def onShadowColourButtonClicked(self): + def onShadowColorButtonClicked(self): self.theme.font_main_shadow_color = \ self._colorButton(self.theme.font_main_shadow_color) self.setMainAreaTabValues() - def onFooterColourButtonClicked(self): + def onFooterColorButtonClicked(self): self.theme.font_footer_color = \ self._colorButton(self.theme.font_footer_color) self.setFooterAreaTabValues() @@ -573,4 +573,4 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard): QtGui.QColor(field), self) if new_color.isValid(): field = new_color.name() - return field \ No newline at end of file + return field diff --git a/openlp/core/ui/themewizard.py b/openlp/core/ui/themewizard.py index da25b0f37..a088bfd22 100644 --- a/openlp/core/ui/themewizard.py +++ b/openlp/core/ui/themewizard.py @@ -69,7 +69,7 @@ class Ui_ThemeWizard(object): self.backgroundComboBox) self.backgroundTypeSpacer = QtGui.QSpacerItem(10, 0, QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Minimum) - self.backgroundTypeLayout.setItem(1,QtGui.QFormLayout.LabelRole, + self.backgroundTypeLayout.setItem(1, QtGui.QFormLayout.LabelRole, self.backgroundTypeSpacer) self.backgroundLayout.addLayout(self.backgroundTypeLayout) self.backgroundStack = QtGui.QStackedLayout() @@ -84,7 +84,7 @@ class Ui_ThemeWizard(object): self.colorButton = QtGui.QPushButton(self.colorWidget) self.colorButton.setObjectName(u'ColorButton') self.colorLayout.addRow(self.colorLabel, self.colorButton) - self.colorSpacer = QtGui.QSpacerItem(10, 0, QtGui.QSizePolicy.Fixed, + self.colorSpacer = QtGui.QSpacerItem(10, 0, QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Minimum) self.colorLayout.setItem(1, QtGui.QFormLayout.LabelRole, self.colorSpacer) @@ -379,7 +379,6 @@ class Ui_ThemeWizard(object): ThemeWizard.addPage(self.previewPage) self.retranslateUi(ThemeWizard) - QtCore.QObject.connect(self.backgroundComboBox, QtCore.SIGNAL(u'currentIndexChanged(int)'), self.backgroundStack, QtCore.SLOT(u'setCurrentIndex(int)')) diff --git a/openlp/plugins/bibles/forms/bibleimportform.py b/openlp/plugins/bibles/forms/bibleimportform.py index b01a10ffb..7d8071faa 100644 --- a/openlp/plugins/bibles/forms/bibleimportform.py +++ b/openlp/plugins/bibles/forms/bibleimportform.py @@ -96,7 +96,7 @@ class BibleImportForm(QtGui.QWizard, Ui_BibleImportWizard): self.selectStack.setCurrentIndex(0) QtCore.QObject.connect(self.webSourceComboBox, QtCore.SIGNAL(u'currentIndexChanged(int)'), - self.onWebSourceComboBoxChanged) + self.onWebSourceComboBoxCurrentIndexChanged) QtCore.QObject.connect(self.osisBrowseButton, QtCore.SIGNAL(u'clicked()'), self.onOsisBrowseButtonClicked) @@ -223,7 +223,7 @@ class BibleImportForm(QtGui.QWizard, Ui_BibleImportWizard): if self.currentPage() == self.importPage: return True - def onWebSourceComboBoxChanged(self, index): + def onWebSourceComboBoxCurrentIndexChanged(self, index): """ Setup the list of Bibles when you select a different source on the web download page. @@ -332,7 +332,7 @@ class BibleImportForm(QtGui.QWizard, Ui_BibleImportWizard): QtCore.QVariant(self.copyrightEdit.text())) self.setField(u'license_permissions', QtCore.QVariant(self.permissionsEdit.text())) - self.onWebSourceComboBoxChanged(WebDownload.Crosswalk) + self.onWebSourceComboBoxCurrentIndexChanged(WebDownload.Crosswalk) settings.endGroup() def loadWebBibles(self): @@ -534,4 +534,4 @@ class BibleImportForm(QtGui.QWizard, Ui_BibleImportWizard): self.importProgressBar.setValue(self.importProgressBar.maximum()) self.finishButton.setVisible(True) self.cancelButton.setVisible(False) - Receiver.send_message(u'openlp_process_events') \ No newline at end of file + Receiver.send_message(u'openlp_process_events') diff --git a/resources/forms/themewizard.ui b/resources/forms/themewizard.ui index f6428cdc7..9e1f8f9e8 100644 --- a/resources/forms/themewizard.ui +++ b/resources/forms/themewizard.ui @@ -2,6 +2,14 @@ ThemeWizard + + + 0 + 0 + 550 + 386 + + Theme Wizard @@ -15,30 +23,51 @@ QWizard::IndependentPages|QWizard::NoBackButtonOnStartPage + + + + + + + + 8 + 0 - - - 0 - 0 - + + + 163 + 0 + + + + + 163 + 16777215 + + + + 0 + + + :/wizards/wizard_importbible.bmp + + 0 + - 6 - - - 12 + 8 @@ -49,9 +78,6 @@ p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> <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> - - true - @@ -73,11 +99,14 @@ p, li { white-space: pre-wrap; } - This wizard will help you to maintain Themes. Click the next button below to start the process by setting up your background. + This wizard will help you to maintain Themes . Click the next button below to start the process by setting up your background. true + + 10 + @@ -104,127 +133,256 @@ p, li { white-space: pre-wrap; } Set up your theme's background according to the parameters below. - - - 6 + + + 8 - 12 + 20 - - - - Background type: + + + + 8 - - - - - - Solid Color - - - - - Gradient - - - - - Image - - - - - - - - Color: - - - - - - - - - - Starting color: - - - - - - - - - - Ending color: - - - - - - - - - - Gradient: - - - - - - - - Horizontal - - - - - Vertical - - - - - Circular - - - - - Top Left - Bottom Right - - - - - Bottom Left - Top Right - - - - - - - - Image: - - - - - - - - - - - - - :/general/general_open.png:/general/general_open.png + + + Background type: + + + + + Solid Color + + + + + Gradient + + + + + Image + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + 0 + + + + + 8 + + + 8 + + + 0 + + + + + + 103 + 0 + + + + Color: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + + + + + + + 8 + + + 8 + + + 0 + + + + + + 103 + 0 + + + + Starting color: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + + + + + + 103 + 0 + + + + Ending color: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + + + + + + 103 + 0 + + + + Gradient: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + Horizontal + + + + + Vertical + + + + + Circular + + + + + Top Left - Bottom Right + + + + + Bottom Left - Top Right + + + + + + + + + + 8 + + + 8 + + + 0 + + + + + + 103 + 0 + + + + Image: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + 8 + + + + + + + + + + + + :/general/general_open.png:/general/general_open.png + + + + + + + + + @@ -235,17 +393,29 @@ p, li { white-space: pre-wrap; } Define the font and display characteristics for the Display text + + 8 + - 6 + 8 - 12 + 20 + + + 103 + 0 + + Font: + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + @@ -261,10 +431,14 @@ p, li { white-space: pre-wrap; } - 12 + 24 - + + + + + @@ -291,8 +465,26 @@ p, li { white-space: pre-wrap; } + + 8 + + + 0 + + + + 0 + 0 + + + + + 70 + 0 + + pt @@ -343,7 +535,14 @@ p, li { white-space: pre-wrap; } - + + + true + + + + + @@ -375,6 +574,9 @@ p, li { white-space: pre-wrap; } true + + + @@ -403,17 +605,32 @@ p, li { white-space: pre-wrap; } Define the font and display characteristics for the Footer text + + QFormLayout::ExpandingFieldsGrow + + + 8 + - 6 + 8 - 12 + 20 + + + 103 + 0 + + Font: + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + @@ -427,7 +644,11 @@ p, li { white-space: pre-wrap; } - + + + + + @@ -438,6 +659,18 @@ p, li { white-space: pre-wrap; } + + + 0 + 0 + + + + + 70 + 0 + + pt @@ -459,21 +692,36 @@ p, li { white-space: pre-wrap; } Allows additional display formatting information to be defined + + 8 + - 6 + 8 - 12 + 20 + + + 103 + 0 + + Horizontal Align: + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + false + Left @@ -535,16 +783,31 @@ p, li { white-space: pre-wrap; } - 12 + 20 + + + 8 + + + 248 + 0 + + &Main Area + + 8 + - 6 + 8 + + + 8 @@ -554,10 +817,13 @@ p, li { white-space: pre-wrap; } true + + false + - + X position: @@ -574,6 +840,12 @@ p, li { white-space: pre-wrap; } 0 + + + 78 + 0 + + px @@ -596,6 +868,12 @@ p, li { white-space: pre-wrap; } 0 + + + 78 + 0 + + px @@ -622,6 +900,12 @@ p, li { white-space: pre-wrap; } 0 + + + 78 + 0 + + px @@ -642,6 +926,18 @@ p, li { white-space: pre-wrap; } false + + + 0 + 0 + + + + + 78 + 0 + + px @@ -662,12 +958,24 @@ p, li { white-space: pre-wrap; } + + + 248 + 0 + + - &Footer Area + Footer Area + + 8 + - 6 + 8 + + + 8 @@ -681,6 +989,18 @@ p, li { white-space: pre-wrap; } false + + + 0 + 0 + + + + + 78 + 0 + + px @@ -704,6 +1024,18 @@ p, li { white-space: pre-wrap; } false + + + 0 + 0 + + + + + 78 + 0 + + px @@ -727,6 +1059,12 @@ p, li { white-space: pre-wrap; } false + + + 78 + 0 + + px @@ -747,6 +1085,12 @@ p, li { white-space: pre-wrap; } false + + + 78 + 0 + + px @@ -779,18 +1123,33 @@ p, li { white-space: pre-wrap; } - 6 + 8 - 12 + 20 + + 8 + + + + 103 + 0 + + Theme name: + + Qt::PlainText + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + themeNameEdit @@ -803,6 +1162,9 @@ p, li { white-space: pre-wrap; } + + 0 + @@ -810,7 +1172,7 @@ p, li { white-space: pre-wrap; } - 40 + 58 20 @@ -839,6 +1201,9 @@ p, li { white-space: pre-wrap; } 1 + + + true @@ -851,7 +1216,7 @@ p, li { white-space: pre-wrap; } - 40 + 78 20 @@ -882,5 +1247,21 @@ p, li { white-space: pre-wrap; } + + backgroundTypeComboBox + currentIndexChanged(int) + backgroundStackedWidget + setCurrentIndex(int) + + + 178 + 78 + + + 249 + 199 + + +