forked from openlp/openlp
Add new dialog
This commit is contained in:
parent
648c5159a1
commit
9b5074991c
@ -230,7 +230,10 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
|
|||||||
Detects Page changes and updates as approprate.
|
Detects Page changes and updates as approprate.
|
||||||
"""
|
"""
|
||||||
if self.page(pageId) == self.areaPositionPage:
|
if self.page(pageId) == self.areaPositionPage:
|
||||||
|
self.setOption(QtGui.QWizard.HaveCustomButton1, True)
|
||||||
self._generate_layout()
|
self._generate_layout()
|
||||||
|
else:
|
||||||
|
self.setOption(QtGui.QWizard.HaveCustomButton1, False)
|
||||||
if self.page(pageId) == self.previewPage:
|
if self.page(pageId) == self.previewPage:
|
||||||
self.updateTheme()
|
self.updateTheme()
|
||||||
frame = self.thememanager.generateImage(self.theme)
|
frame = self.thememanager.generateImage(self.theme)
|
||||||
@ -250,10 +253,10 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
|
|||||||
paint.drawRect(self.thememanager.mainwindow.renderer.get_footer_rectangle(self.theme))
|
paint.drawRect(self.thememanager.mainwindow.renderer.get_footer_rectangle(self.theme))
|
||||||
paint.end()
|
paint.end()
|
||||||
pixmap = pixmap.scaledToHeight(150, QtCore.Qt.SmoothTransformation)
|
pixmap = pixmap.scaledToHeight(150, QtCore.Qt.SmoothTransformation)
|
||||||
self.themeLayoutLabel.setFixedSize(pixmap.width() + 2, pixmap.height() + 2)
|
#self.themeLayoutLabel.setFixedSize(pixmap.width() + 2, pixmap.height() + 2)
|
||||||
self.themeLayoutLabel.setPixmap(pixmap)
|
#self.themeLayoutLabel.setPixmap(pixmap)
|
||||||
self.displayAspectRatio = float(pixmap.width()) / pixmap.height()
|
#self.displayAspectRatio = float(pixmap.width()) / pixmap.height()
|
||||||
self.resizeEvent()
|
#self.resizeEvent()
|
||||||
|
|
||||||
def onOutlineCheckCheckBoxStateChanged(self, state):
|
def onOutlineCheckCheckBoxStateChanged(self, state):
|
||||||
"""
|
"""
|
||||||
|
@ -38,7 +38,8 @@ class Ui_ThemeWizard(object):
|
|||||||
themeWizard.setModal(True)
|
themeWizard.setModal(True)
|
||||||
themeWizard.setWizardStyle(QtGui.QWizard.ModernStyle)
|
themeWizard.setWizardStyle(QtGui.QWizard.ModernStyle)
|
||||||
themeWizard.setOptions(QtGui.QWizard.IndependentPages |
|
themeWizard.setOptions(QtGui.QWizard.IndependentPages |
|
||||||
QtGui.QWizard.NoBackButtonOnStartPage)
|
QtGui.QWizard.NoBackButtonOnStartPage |
|
||||||
|
QtGui.QWizard.HaveCustomButton1)
|
||||||
self.spacer = QtGui.QSpacerItem(10, 0,
|
self.spacer = QtGui.QSpacerItem(10, 0,
|
||||||
QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Minimum)
|
QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Minimum)
|
||||||
# Welcome Page
|
# Welcome Page
|
||||||
@ -336,21 +337,6 @@ class Ui_ThemeWizard(object):
|
|||||||
self.footerPositionLayout.addRow(self.footerHeightLabel,
|
self.footerPositionLayout.addRow(self.footerHeightLabel,
|
||||||
self.footerHeightSpinBox)
|
self.footerHeightSpinBox)
|
||||||
self.areaPositionLayout.addWidget(self.footerPositionGroupBox)
|
self.areaPositionLayout.addWidget(self.footerPositionGroupBox)
|
||||||
self.layoutArea = QtGui.QWidget(self.areaPositionPage)
|
|
||||||
self.layoutArea.setObjectName(u'LayoutArea')
|
|
||||||
self.themeLayoutPreview = QtGui.QGridLayout(self.layoutArea)
|
|
||||||
self.themeLayoutPreview.setMargin(0)
|
|
||||||
self.themeLayoutPreview.setColumnStretch(0, 1)
|
|
||||||
self.themeLayoutPreview.setRowStretch(0, 1)
|
|
||||||
self.themeLayoutLabel = QtGui.QLabel(self.areaPositionPage)
|
|
||||||
self.themeLayoutLabel.setObjectName(u'ThemeLayoutPreview')
|
|
||||||
self.themeLayoutLabel.setObjectName(u'ThemeLayoutPreview')
|
|
||||||
self.themeLayoutLabel = QtGui.QLabel(self.layoutArea)
|
|
||||||
self.themeLayoutLabel.setFrameShape(QtGui.QFrame.Box)
|
|
||||||
self.themeLayoutLabel.setScaledContents(True)
|
|
||||||
self.themeLayoutLabel.setObjectName(u'ThemeLayoutLabel')
|
|
||||||
self.areaPositionLayout.addWidget(self.themeLayoutLabel)
|
|
||||||
self.areaPositionLayout.addWidget(self.layoutArea)
|
|
||||||
themeWizard.addPage(self.areaPositionPage)
|
themeWizard.addPage(self.areaPositionPage)
|
||||||
# Preview Page
|
# Preview Page
|
||||||
self.previewPage = QtGui.QWizardPage()
|
self.previewPage = QtGui.QWizardPage()
|
||||||
@ -550,6 +536,9 @@ class Ui_ThemeWizard(object):
|
|||||||
translate('OpenLP.ThemeWizard', 'px'))
|
translate('OpenLP.ThemeWizard', 'px'))
|
||||||
self.footerPositionCheckBox.setText(
|
self.footerPositionCheckBox.setText(
|
||||||
translate('OpenLP.ThemeWizard', 'Use default location'))
|
translate('OpenLP.ThemeWizard', 'Use default location'))
|
||||||
|
themeWizard.setOption(QtGui.QWizard.HaveCustomButton1, False)
|
||||||
|
themeWizard.setButtonText(QtGui.QWizard.CustomButton1,
|
||||||
|
translate('OpenLP.ThemeWizard', 'Preview'))
|
||||||
self.previewPage.setTitle(
|
self.previewPage.setTitle(
|
||||||
translate('OpenLP.ThemeWizard', 'Save and Preview'))
|
translate('OpenLP.ThemeWizard', 'Save and Preview'))
|
||||||
self.previewPage.setSubTitle(
|
self.previewPage.setSubTitle(
|
||||||
|
Loading…
Reference in New Issue
Block a user