forked from openlp/openlp
- Finishes and tested rewrite of themewizard and bibleimportwizard
- Added exceptions to OpenSong and CSV bible import wich occur for invalid files
This commit is contained in:
parent
b0a53020f6
commit
6815ac3146
@ -56,7 +56,7 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
|
||||
self.registerFields()
|
||||
self.accepted = False
|
||||
self.updateThemeAllowed = True
|
||||
QtCore.QObject.connect(self.backgroundTypeComboBox,
|
||||
QtCore.QObject.connect(self.backgroundComboBox,
|
||||
QtCore.SIGNAL(u'currentIndexChanged(int)'),
|
||||
self.onBackgroundComboBox)
|
||||
QtCore.QObject.connect(self.gradientComboBox,
|
||||
@ -74,30 +74,30 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
|
||||
QtCore.QObject.connect(self.imageBrowseButton,
|
||||
QtCore.SIGNAL(u'pressed()'),
|
||||
self.onImageBrowseButtonClicked)
|
||||
QtCore.QObject.connect(self.mainColorPushButton,
|
||||
QtCore.QObject.connect(self.mainColorButton,
|
||||
QtCore.SIGNAL(u'pressed()'),
|
||||
self.onMainColourPushButtonClicked)
|
||||
QtCore.QObject.connect(self.outlineColorPushButton,
|
||||
self.onMainColourButtonClicked)
|
||||
QtCore.QObject.connect(self.outlineColorButton,
|
||||
QtCore.SIGNAL(u'pressed()'),
|
||||
self.onOutlineColourPushButtonClicked)
|
||||
QtCore.QObject.connect(self.shadowColorPushButton,
|
||||
self.onOutlineColourButtonClicked)
|
||||
QtCore.QObject.connect(self.shadowColorButton,
|
||||
QtCore.SIGNAL(u'pressed()'),
|
||||
self.onShadowColourPushButtonClicked)
|
||||
self.onShadowColourButtonClicked)
|
||||
QtCore.QObject.connect(self.outlineCheckBox,
|
||||
QtCore.SIGNAL(u'stateChanged(int)'),
|
||||
self.onOutlineCheckCheckBoxChanged)
|
||||
QtCore.QObject.connect(self.shadowCheckBox,
|
||||
QtCore.SIGNAL(u'stateChanged(int)'),
|
||||
self.onShadowCheckCheckBoxChanged)
|
||||
QtCore.QObject.connect(self.footerColorPushButton,
|
||||
QtCore.QObject.connect(self.footerColorButton,
|
||||
QtCore.SIGNAL(u'pressed()'),
|
||||
self.onFooterColourPushButtonClicked)
|
||||
QtCore.QObject.connect(self.mainDefaultPositionCheckBox,
|
||||
self.onFooterColourButtonClicked)
|
||||
QtCore.QObject.connect(self.mainPositionCheckBox,
|
||||
QtCore.SIGNAL(u'stateChanged(int)'),
|
||||
self.onMainDefaultPositionCheckBox)
|
||||
QtCore.QObject.connect(self.footerDefaultPositionCheckBox,
|
||||
self.onMainPositionCheckBox)
|
||||
QtCore.QObject.connect(self.footerPositionCheckBox,
|
||||
QtCore.SIGNAL(u'stateChanged(int)'),
|
||||
self.onFooterDefaultPositionCheckBox)
|
||||
self.onFooterPositionCheckBox)
|
||||
QtCore.QObject.connect(self,
|
||||
QtCore.SIGNAL(u'currentIdChanged(int)'),
|
||||
self.pageChanged)
|
||||
@ -107,36 +107,25 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
|
||||
QtCore.QObject.connect(self.mainSizeSpinBox,
|
||||
QtCore.SIGNAL(u'valueChanged(int)'),
|
||||
self.calculateLines)
|
||||
QtCore.QObject.connect(self.mainSizeSpinBox,
|
||||
QtCore.SIGNAL(u'editingFinished()'),
|
||||
self.calculateLines)
|
||||
QtCore.QObject.connect(self.lineSpacingSpinBox,
|
||||
QtCore.SIGNAL(u'valueChanged(int)'),
|
||||
self.calculateLines)
|
||||
QtCore.QObject.connect(self.lineSpacingSpinBox,
|
||||
QtCore.SIGNAL(u'editingFinished()'),
|
||||
self.calculateLines)
|
||||
QtCore.QObject.connect(self.outlineSizeSpinBox,
|
||||
QtCore.SIGNAL(u'valueChanged(int)'),
|
||||
self.calculateLines)
|
||||
QtCore.QObject.connect(self.outlineSizeSpinBox,
|
||||
QtCore.SIGNAL(u'editingFinished()'),
|
||||
self.calculateLines)
|
||||
QtCore.QObject.connect(self.shadowSizeSpinBox,
|
||||
QtCore.SIGNAL(u'valueChanged(int)'),
|
||||
self.calculateLines)
|
||||
QtCore.QObject.connect(self.shadowSizeSpinBox,
|
||||
QtCore.SIGNAL(u'editingFinished()'),
|
||||
self.calculateLines)
|
||||
QtCore.QObject.connect(self.mainFontComboBox,
|
||||
QtCore.SIGNAL(u'activated(int)'),
|
||||
self.calculateLines)
|
||||
QtCore.QObject.connect(self, QtCore.SIGNAL(u'accepted()'), self.accept)
|
||||
|
||||
def pageChanged(self, pageId):
|
||||
"""
|
||||
Detects Page changes and updates as approprate.
|
||||
"""
|
||||
if pageId == 6:
|
||||
if self.page(pageId) == self.previewPage:
|
||||
self.updateTheme()
|
||||
frame = self.thememanager.generateImage(self.theme)
|
||||
self.previewBoxLabel.setPixmap(QtGui.QPixmap.fromImage(frame))
|
||||
@ -159,7 +148,7 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
|
||||
Map field names to screen names,
|
||||
"""
|
||||
self.backgroundPage.registerField(
|
||||
u'background_type', self.backgroundTypeComboBox)
|
||||
u'background_type', self.backgroundComboBox)
|
||||
self.backgroundPage.registerField(
|
||||
u'color', self.colorButton)
|
||||
self.backgroundPage.registerField(
|
||||
@ -167,11 +156,11 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
|
||||
self.backgroundPage.registerField(
|
||||
u'grandient_end', self.gradientEndButton)
|
||||
self.backgroundPage.registerField(
|
||||
u'background_image', self.imageLineEdit)
|
||||
u'background_image', self.imageFileEdit)
|
||||
self.backgroundPage.registerField(
|
||||
u'gradient', self.gradientComboBox)
|
||||
self.mainAreaPage.registerField(
|
||||
u'mainColorPushButton', self.mainColorPushButton)
|
||||
u'mainColorButton', self.mainColorButton)
|
||||
self.mainAreaPage.registerField(
|
||||
u'mainSizeSpinBox', self.mainSizeSpinBox)
|
||||
self.mainAreaPage.registerField(
|
||||
@ -179,17 +168,17 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
|
||||
self.mainAreaPage.registerField(
|
||||
u'outlineCheckBox', self.outlineCheckBox)
|
||||
self.mainAreaPage.registerField(
|
||||
u'outlineColorPushButton', self.outlineColorPushButton)
|
||||
u'outlineColorPushButton', self.outlineColorButton)
|
||||
self.mainAreaPage.registerField(
|
||||
u'outlineSizeSpinBox', self.outlineSizeSpinBox)
|
||||
self.mainAreaPage.registerField(
|
||||
u'shadowCheckBox', self.shadowCheckBox)
|
||||
self.mainAreaPage.registerField(
|
||||
u'boldCheckBox', self.boldCheckBox)
|
||||
u'mainBoldCheckBox', self.mainBoldCheckBox)
|
||||
self.mainAreaPage.registerField(
|
||||
u'italicsCheckBox', self.italicsCheckBox)
|
||||
u'mainItalicsCheckBox', self.mainItalicsCheckBox)
|
||||
self.mainAreaPage.registerField(
|
||||
u'shadowColorPushButton', self.shadowColorPushButton)
|
||||
u'shadowColorButton', self.shadowColorButton)
|
||||
self.mainAreaPage.registerField(
|
||||
u'shadowSizeSpinBox', self.shadowSizeSpinBox)
|
||||
self.mainAreaPage.registerField(
|
||||
@ -224,7 +213,7 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
|
||||
Calculate the number of lines on a page by rendering text
|
||||
"""
|
||||
# Do not trigger on start up
|
||||
if self.page != 0:
|
||||
if self.currentPage != self.welcomePage:
|
||||
self.updateTheme()
|
||||
frame = self.thememanager.generateImage(self.theme, True)
|
||||
|
||||
@ -243,7 +232,7 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
|
||||
self.theme.font_main_outline = True
|
||||
else:
|
||||
self.theme.font_main_outline = False
|
||||
self.outlineColorPushButton.setEnabled(self.theme.font_main_outline)
|
||||
self.outlineColorButton.setEnabled(self.theme.font_main_outline)
|
||||
self.outlineSizeSpinBox.setEnabled(self.theme.font_main_outline)
|
||||
self.calculateLines()
|
||||
|
||||
@ -255,35 +244,21 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
|
||||
self.theme.font_main_shadow = True
|
||||
else:
|
||||
self.theme.font_main_shadow = False
|
||||
self.shadowColorPushButton.setEnabled(self.theme.font_main_shadow)
|
||||
self.shadowColorButton.setEnabled(self.theme.font_main_shadow)
|
||||
self.shadowSizeSpinBox.setEnabled(self.theme.font_main_shadow)
|
||||
self.calculateLines()
|
||||
|
||||
def onMainDefaultPositionCheckBox(self, value):
|
||||
def onMainPositionCheckBox(self, value):
|
||||
"""
|
||||
Change state as Main Area Position check box changed
|
||||
"""
|
||||
if value == QtCore.Qt.Checked:
|
||||
self.theme.font_main_override = False
|
||||
else:
|
||||
self.theme.font_main_override = True
|
||||
self.mainXSpinBox.setEnabled(self.theme.font_main_override)
|
||||
self.mainYSpinBox.setEnabled(self.theme.font_main_override)
|
||||
self.mainHeightSpinBox.setEnabled(self.theme.font_main_override)
|
||||
self.mainWidthSpinBox.setEnabled(self.theme.font_main_override)
|
||||
self.theme.font_main_override = (value == QtCore.Qt.Checked)
|
||||
|
||||
def onFooterDefaultPositionCheckBox(self, value):
|
||||
def onFooterPositionCheckBox(self, value):
|
||||
"""
|
||||
Change state as Footer Area Position check box changed
|
||||
"""
|
||||
if value == QtCore.Qt.Checked:
|
||||
self.theme.font_footer_override = False
|
||||
else:
|
||||
self.theme.font_footer_override = True
|
||||
self.footerXSpinBox.setEnabled(self.theme.font_footer_override)
|
||||
self.footerYSpinBox.setEnabled(self.theme.font_footer_override)
|
||||
self.footerHeightSpinBox.setEnabled(self.theme.font_footer_override)
|
||||
self.footerWidthSpinBox.setEnabled(self.theme.font_footer_override)
|
||||
self.theme.font_footer_override = (value == QtCore.Qt.Checked)
|
||||
|
||||
def exec_(self, edit=False):
|
||||
"""
|
||||
@ -302,16 +277,16 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
|
||||
Set up the pages for Initial run through dialog
|
||||
"""
|
||||
log.debug(u'initializePage %s' % id)
|
||||
self.page = id
|
||||
if id == 1:
|
||||
wizardPage = self.page(id)
|
||||
if wizardPage == self.backgroundPage:
|
||||
self.setBackgroundTabValues()
|
||||
elif id == 2:
|
||||
elif wizardPage == self.mainAreaPage:
|
||||
self.setMainAreaTabValues()
|
||||
elif id == 3:
|
||||
elif wizardPage == self.footerAreaPage:
|
||||
self.setFooterAreaTabValues()
|
||||
elif id == 4:
|
||||
elif wizardPage == self.alignmentPage:
|
||||
self.setAlignmentTabValues()
|
||||
elif id == 5:
|
||||
elif wizardPage == self.areaPositionPage:
|
||||
self.setPositionTabValues()
|
||||
|
||||
def setBackgroundTabValues(self):
|
||||
@ -331,7 +306,7 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
|
||||
self.theme.background_end_color)
|
||||
self.setField(u'background_type', QtCore.QVariant(1))
|
||||
else:
|
||||
self.imageLineEdit.setText(self.theme.background_filename)
|
||||
self.imageFileEdit.setText(self.theme.background_filename)
|
||||
self.setField(u'background_type', QtCore.QVariant(2))
|
||||
if self.theme.background_direction == \
|
||||
BackgroundGradientType.to_string(BackgroundGradientType.Horizontal):
|
||||
@ -354,41 +329,28 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
|
||||
"""
|
||||
self.mainFontComboBox.setCurrentFont(
|
||||
QtGui.QFont(self.theme.font_main_name))
|
||||
self.mainColorPushButton.setStyleSheet(u'background-color: %s' %
|
||||
self.mainColorButton.setStyleSheet(u'background-color: %s' %
|
||||
self.theme.font_main_color)
|
||||
self.setField(u'mainSizeSpinBox', \
|
||||
self.setField(u'mainSizeSpinBox',
|
||||
QtCore.QVariant(self.theme.font_main_size))
|
||||
self.setField(u'lineSpacingSpinBox', \
|
||||
self.setField(u'lineSpacingSpinBox',
|
||||
QtCore.QVariant(self.theme.font_main_line_adjustment))
|
||||
self.setField(u'outlineCheckBox', \
|
||||
self.setField(u'outlineCheckBox',
|
||||
QtCore.QVariant(self.theme.font_main_outline))
|
||||
self.outlineColorPushButton.setStyleSheet(u'background-color: %s' %
|
||||
self.outlineColorButton.setStyleSheet(u'background-color: %s' %
|
||||
self.theme.font_main_outline_color)
|
||||
self.setField(u'outlineSizeSpinBox', \
|
||||
self.setField(u'outlineSizeSpinBox',
|
||||
QtCore.QVariant(self.theme.font_main_outline_size))
|
||||
self.setField(u'shadowCheckBox', \
|
||||
self.setField(u'shadowCheckBox',
|
||||
QtCore.QVariant(self.theme.font_main_shadow))
|
||||
self.shadowColorPushButton.setStyleSheet(u'background-color: %s' %
|
||||
self.shadowColorButton.setStyleSheet(u'background-color: %s' %
|
||||
self.theme.font_main_shadow_color)
|
||||
self.setField(u'shadowSizeSpinBox', \
|
||||
self.setField(u'shadowSizeSpinBox',
|
||||
QtCore.QVariant(self.theme.font_main_shadow_size))
|
||||
self.setField(u'boldCheckBox', \
|
||||
self.setField(u'mainBoldCheckBox',
|
||||
QtCore.QVariant(self.theme.font_main_bold))
|
||||
self.setField(u'italicsCheckBox', \
|
||||
self.setField(u'mainItalicsCheckBox',
|
||||
QtCore.QVariant(self.theme.font_main_italics))
|
||||
# Set up field states
|
||||
if self.theme.font_main_outline:
|
||||
self.setField(u'outlineCheckBox', QtCore.QVariant(False))
|
||||
else:
|
||||
self.setField(u'outlineCheckBox', QtCore.QVariant(True))
|
||||
self.outlineColorPushButton.setEnabled(self.theme.font_main_outline)
|
||||
self.outlineSizeSpinBox.setEnabled(self.theme.font_main_outline)
|
||||
if self.theme.font_main_shadow:
|
||||
self.setField(u'shadowCheckBox', QtCore.QVariant(False))
|
||||
else:
|
||||
self.setField(u'shadowCheckBox', QtCore.QVariant(True))
|
||||
self.shadowColorPushButton.setEnabled(self.theme.font_main_shadow)
|
||||
self.shadowSizeSpinBox.setEnabled(self.theme.font_main_shadow)
|
||||
|
||||
def setFooterAreaTabValues(self):
|
||||
"""
|
||||
@ -396,9 +358,9 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
|
||||
"""
|
||||
self.footerFontComboBox.setCurrentFont(
|
||||
QtGui.QFont(self.theme.font_main_name))
|
||||
self.footerColorPushButton.setStyleSheet(u'background-color: %s' %
|
||||
self.footerColorButton.setStyleSheet(u'background-color: %s' %
|
||||
self.theme.font_footer_color)
|
||||
self.setField(u'footerSizeSpinBox', \
|
||||
self.setField(u'footerSizeSpinBox',
|
||||
QtCore.QVariant(self.theme.font_footer_size))
|
||||
|
||||
def setPositionTabValues(self):
|
||||
@ -406,49 +368,40 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
|
||||
Handle the display and State of the Position tab.
|
||||
"""
|
||||
# Main Area
|
||||
if self.theme.font_main_override:
|
||||
self.mainDefaultPositionCheckBox.setChecked(False)
|
||||
else:
|
||||
self.mainDefaultPositionCheckBox.setChecked(True)
|
||||
self.setField(u'mainPositionX', \
|
||||
QtCore.QVariant(self.theme.font_main_x))
|
||||
self.setField(u'mainPositionY', \
|
||||
QtCore.QVariant(self.theme.font_main_y))
|
||||
self.setField(u'mainPositionHeight', \
|
||||
self.mainPositionCheckBox.setChecked(not self.theme.font_main_override)
|
||||
self.setField(u'mainPositionX', QtCore.QVariant(self.theme.font_main_x))
|
||||
self.setField(u'mainPositionY', QtCore.QVariant(self.theme.font_main_y))
|
||||
self.setField(u'mainPositionHeight',
|
||||
QtCore.QVariant(self.theme.font_main_height))
|
||||
self.setField(u'mainPositionWidth', \
|
||||
self.setField(u'mainPositionWidth',
|
||||
QtCore.QVariant(self.theme.font_main_width))
|
||||
# Footer
|
||||
if self.theme.font_footer_override:
|
||||
self.footerDefaultPositionCheckBox.setChecked(False)
|
||||
else:
|
||||
self.footerDefaultPositionCheckBox.setChecked(True)
|
||||
self.setField(u'footerPositionX', \
|
||||
self.footerPositionCheckBox.setChecked(
|
||||
not self.theme.font_footer_override)
|
||||
self.setField(u'footerPositionX',
|
||||
QtCore.QVariant(self.theme.font_footer_x))
|
||||
self.setField(u'footerPositionY', \
|
||||
self.setField(u'footerPositionY',
|
||||
QtCore.QVariant(self.theme.font_footer_y))
|
||||
self.setField(u'footerPositionHeight', \
|
||||
self.setField(u'footerPositionHeight',
|
||||
QtCore.QVariant(self.theme.font_footer_height))
|
||||
self.setField(u'footerPositionWidth', \
|
||||
self.setField(u'footerPositionWidth',
|
||||
QtCore.QVariant(self.theme.font_footer_width))
|
||||
|
||||
def setAlignmentTabValues(self):
|
||||
"""
|
||||
Define the Tab Alignments Page
|
||||
"""
|
||||
self.setField(u'horizontal', \
|
||||
self.setField(u'horizontal',
|
||||
QtCore.QVariant(self.theme.display_horizontal_align))
|
||||
self.setField(u'vertical', \
|
||||
self.setField(u'vertical',
|
||||
QtCore.QVariant(self.theme.display_vertical_align))
|
||||
self.setField(u'slideTransition', \
|
||||
self.setField(u'slideTransition',
|
||||
QtCore.QVariant(self.theme.display_slide_transition))
|
||||
|
||||
def setPreviewTabValues(self):
|
||||
self.setField(u'name', QtCore.QVariant(self.theme.theme_name))
|
||||
if len(self.theme.theme_name) > 0:
|
||||
self.themeNameEdit.setEnabled(False)
|
||||
else:
|
||||
self.themeNameEdit.setEnabled(True)
|
||||
self.themeNameEdit.setReadOnly(len(self.theme.theme_name) != 0)
|
||||
self.themeNameEdit.setFrame(len(self.theme.theme_name) == 0)
|
||||
|
||||
def onBackgroundComboBox(self, index):
|
||||
"""
|
||||
@ -456,17 +409,6 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
|
||||
"""
|
||||
self.theme.background_type = BackgroundType.to_string(index)
|
||||
self.setBackgroundTabValues()
|
||||
self.colorLabel.setVisible(index == 0)
|
||||
self.colorButton.setVisible(index == 0)
|
||||
self.gradientStartLabel.setVisible(index == 1)
|
||||
self.gradientStartButton.setVisible(index == 1)
|
||||
self.gradientEndLabel.setVisible(index == 1)
|
||||
self.gradientEndButton.setVisible(index == 1)
|
||||
self.gradientTypeLabel.setVisible(index == 1)
|
||||
self.gradientComboBox.setVisible(index == 1)
|
||||
self.imageLabel.setVisible(index == 2)
|
||||
self.imageLineEdit.setVisible(index == 2)
|
||||
self.imageBrowseButton.setVisible(index == 2)
|
||||
|
||||
def onGradientComboBox(self, index):
|
||||
"""
|
||||
@ -514,22 +456,22 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
|
||||
self.theme.background_filename = unicode(filename)
|
||||
self.setBackgroundTabValues()
|
||||
|
||||
def onMainColourPushButtonClicked(self):
|
||||
def onMainColourButtonClicked(self):
|
||||
self.theme.font_main_color = \
|
||||
self._colorButton(self.theme.font_main_color)
|
||||
self.setMainAreaTabValues()
|
||||
|
||||
def onOutlineColourPushButtonClicked(self):
|
||||
def onOutlineColourButtonClicked(self):
|
||||
self.theme.font_main_outline_color = \
|
||||
self._colorButton(self.theme.font_main_outline_color)
|
||||
self.setMainAreaTabValues()
|
||||
|
||||
def onShadowColourPushButtonClicked(self):
|
||||
def onShadowColourButtonClicked(self):
|
||||
self.theme.font_main_shadow_color = \
|
||||
self._colorButton(self.theme.font_main_shadow_color)
|
||||
self.setMainAreaTabValues()
|
||||
|
||||
def onFooterColourPushButtonClicked(self):
|
||||
def onFooterColourButtonClicked(self):
|
||||
self.theme.font_footer_color = \
|
||||
self._colorButton(self.theme.font_footer_color)
|
||||
self.setFooterAreaTabValues()
|
||||
@ -554,9 +496,9 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
|
||||
self.theme.font_main_shadow_size = \
|
||||
self.field(u'shadowSizeSpinBox').toInt()[0]
|
||||
self.theme.font_main_bold = \
|
||||
self.field(u'boldCheckBox').toBool()
|
||||
self.field(u'mainBoldCheckBox').toBool()
|
||||
self.theme.font_main_italics = \
|
||||
self.field(u'italicsCheckBox').toBool()
|
||||
self.field(u'mainItalicsCheckBox').toBool()
|
||||
# footer page
|
||||
self.theme.font_footer_name = \
|
||||
unicode(self.footerFontComboBox.currentFont().family())
|
||||
|
@ -36,433 +36,389 @@ class Ui_ThemeWizard(object):
|
||||
ThemeWizard.setOptions(
|
||||
QtGui.QWizard.IndependentPages |
|
||||
QtGui.QWizard.NoBackButtonOnStartPage)
|
||||
# welcome page
|
||||
self.welcomePage = QtGui.QWizardPage()
|
||||
self.welcomePage.setPixmap(QtGui.QWizard.WatermarkPixmap,
|
||||
QtGui.QPixmap(u':/wizards/wizard_createtheme.bmp'))
|
||||
self.welcomePage.setObjectName(u'welcomePage')
|
||||
self.welcomePage.setObjectName(u'WelcomePage')
|
||||
self.welcomeLayout = QtGui.QVBoxLayout(self.welcomePage)
|
||||
self.welcomeLayout.setMargin(12)
|
||||
self.welcomeLayout.setSpacing(6)
|
||||
self.welcomeLayout.setObjectName(u'welcomeLayout')
|
||||
self.welcomeLayout.setObjectName(u'WelcomeLayout')
|
||||
self.titleLabel = QtGui.QLabel(self.welcomePage)
|
||||
self.titleLabel.setObjectName(u'titleLabel')
|
||||
self.titleLabel.setObjectName(u'TitleLabel')
|
||||
self.welcomeLayout.addWidget(self.titleLabel)
|
||||
self.welcomeTopSpacer = QtGui.QSpacerItem(20, 40,
|
||||
QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
|
||||
self.welcomeLayout.addItem(self.welcomeTopSpacer)
|
||||
self.welcomeLayout.addSpacing(40)
|
||||
self.informationLabel = QtGui.QLabel(self.welcomePage)
|
||||
self.informationLabel.setWordWrap(True)
|
||||
self.informationLabel.setObjectName(u'informationLabel')
|
||||
self.informationLabel.setObjectName(u'InformationLabel')
|
||||
self.welcomeLayout.addWidget(self.informationLabel)
|
||||
self.welcomeBottomSpacer = QtGui.QSpacerItem(20, 40,
|
||||
QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
|
||||
self.welcomeLayout.addItem(self.welcomeBottomSpacer)
|
||||
self.welcomeLayout.addStretch()
|
||||
ThemeWizard.addPage(self.welcomePage)
|
||||
# background page
|
||||
self.backgroundPage = QtGui.QWizardPage()
|
||||
self.backgroundPage.setObjectName(u'backgroundPage')
|
||||
self.backgroundLayout = QtGui.QFormLayout(self.backgroundPage)
|
||||
self.backgroundLayout.setMargin(12)
|
||||
self.backgroundLayout.setVerticalSpacing(6)
|
||||
self.backgroundLayout.setObjectName(u'backgroundLayout')
|
||||
self.backgroundTypeLabel = QtGui.QLabel(self.backgroundPage)
|
||||
self.backgroundTypeLabel.setObjectName(u'backgroundTypeLabel')
|
||||
self.backgroundLayout.setWidget(0, QtGui.QFormLayout.LabelRole,
|
||||
self.backgroundTypeLabel)
|
||||
self.backgroundTypeComboBox = QtGui.QComboBox(self.backgroundPage)
|
||||
self.backgroundTypeComboBox.addItem(u'')
|
||||
self.backgroundTypeComboBox.addItem(u'')
|
||||
self.backgroundTypeComboBox.addItem(u'')
|
||||
self.backgroundTypeComboBox.setObjectName(u'backgroundTypeComboBox')
|
||||
self.backgroundLayout.setWidget(0, QtGui.QFormLayout.FieldRole,
|
||||
self.backgroundTypeComboBox)
|
||||
self.colorLabel = QtGui.QLabel(self.backgroundPage)
|
||||
self.colorLabel.setObjectName(u'colorLabel')
|
||||
self.backgroundLayout.setWidget(1, QtGui.QFormLayout.LabelRole,
|
||||
self.colorLabel)
|
||||
self.colorButton = QtGui.QPushButton(self.backgroundPage)
|
||||
self.colorButton.setObjectName(u'colorButton')
|
||||
self.backgroundLayout.setWidget(1, QtGui.QFormLayout.FieldRole,
|
||||
self.colorButton)
|
||||
self.gradientStartLabel = QtGui.QLabel(self.backgroundPage)
|
||||
self.gradientStartLabel.setVisible(False)
|
||||
self.gradientStartLabel.setObjectName(u'gradientStartLabel')
|
||||
self.backgroundLayout.setWidget(2, QtGui.QFormLayout.LabelRole,
|
||||
self.gradientStartLabel)
|
||||
self.gradientStartButton = QtGui.QPushButton(self.backgroundPage)
|
||||
self.gradientStartButton.setVisible(False)
|
||||
self.gradientStartButton.setObjectName(u'gradientStartButton')
|
||||
self.backgroundLayout.setWidget(2, QtGui.QFormLayout.FieldRole,
|
||||
self.backgroundPage.setObjectName(u'BackgroundPage')
|
||||
self.backgroundLayout = QtGui.QVBoxLayout(self.backgroundPage)
|
||||
self.backgroundLayout.setObjectName(u'BackgroundLayout')
|
||||
self.backgroundTypeLayout = QtGui.QFormLayout()
|
||||
self.backgroundTypeLayout.setObjectName(u'BackgroundTypeLayout')
|
||||
self.backgroundLabel = QtGui.QLabel(self.backgroundPage)
|
||||
self.backgroundLabel.setObjectName(u'BackgroundLabel')
|
||||
self.backgroundComboBox = QtGui.QComboBox(self.backgroundPage)
|
||||
self.backgroundComboBox.addItems([u'', u'', u''])
|
||||
self.backgroundComboBox.setObjectName(u'BackgroundComboBox')
|
||||
self.backgroundTypeLayout.addRow(self.backgroundLabel,
|
||||
self.backgroundComboBox)
|
||||
self.backgroundTypeSpacer = QtGui.QSpacerItem(10, 0,
|
||||
QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Minimum)
|
||||
self.backgroundTypeLayout.setItem(1,QtGui.QFormLayout.LabelRole,
|
||||
self.backgroundTypeSpacer)
|
||||
self.backgroundLayout.addLayout(self.backgroundTypeLayout)
|
||||
self.backgroundStack = QtGui.QStackedLayout()
|
||||
self.backgroundStack.setObjectName(u'BackgroundStack')
|
||||
self.colorWidget = QtGui.QWidget(self.backgroundPage)
|
||||
self.colorWidget.setObjectName(u'ColorWidget')
|
||||
self.colorLayout = QtGui.QFormLayout(self.colorWidget)
|
||||
self.colorLayout.setMargin(0)
|
||||
self.colorLayout.setObjectName(u'ColorLayout')
|
||||
self.colorLabel = QtGui.QLabel(self.colorWidget)
|
||||
self.colorLabel.setObjectName(u'ColorLabel')
|
||||
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,
|
||||
QtGui.QSizePolicy.Minimum)
|
||||
self.colorLayout.setItem(1, QtGui.QFormLayout.LabelRole,
|
||||
self.colorSpacer)
|
||||
self.backgroundStack.addWidget(self.colorWidget)
|
||||
self.gradientWidget = QtGui.QWidget(self.backgroundPage)
|
||||
self.gradientWidget.setObjectName(u'GradientWidget')
|
||||
self.gradientLayout = QtGui.QFormLayout(self.gradientWidget)
|
||||
self.gradientLayout.setMargin(0)
|
||||
self.gradientLayout.setObjectName(u'GradientLayout')
|
||||
self.gradientStartLabel = QtGui.QLabel(self.gradientWidget)
|
||||
self.gradientStartLabel.setObjectName(u'GradientStartLabel')
|
||||
self.gradientStartButton = QtGui.QPushButton(self.gradientWidget)
|
||||
self.gradientStartButton.setObjectName(u'GradientStartButton')
|
||||
self.gradientLayout.addRow(self.gradientStartLabel,
|
||||
self.gradientStartButton)
|
||||
self.gradientEndLabel = QtGui.QLabel(self.backgroundPage)
|
||||
self.gradientEndLabel.setVisible(False)
|
||||
self.gradientEndLabel.setObjectName(u'gradientEndLabel')
|
||||
self.backgroundLayout.setWidget(3, QtGui.QFormLayout.LabelRole,
|
||||
self.gradientEndLabel)
|
||||
self.gradientEndButton = QtGui.QPushButton(self.backgroundPage)
|
||||
self.gradientEndButton.setVisible(False)
|
||||
self.gradientEndButton.setObjectName(u'gradientEndButton')
|
||||
self.backgroundLayout.setWidget(3, QtGui.QFormLayout.FieldRole,
|
||||
self.gradientEndLabel = QtGui.QLabel(self.gradientWidget)
|
||||
self.gradientEndLabel.setObjectName(u'GradientEndLabel')
|
||||
self.gradientEndButton = QtGui.QPushButton(self.gradientWidget)
|
||||
self.gradientEndButton.setObjectName(u'GradientEndButton')
|
||||
self.gradientLayout.addRow(self.gradientEndLabel,
|
||||
self.gradientEndButton)
|
||||
self.gradientTypeLabel = QtGui.QLabel(self.backgroundPage)
|
||||
self.gradientTypeLabel.setVisible(False)
|
||||
self.gradientTypeLabel.setObjectName(u'gradientTypeLabel')
|
||||
self.backgroundLayout.setWidget(4, QtGui.QFormLayout.LabelRole,
|
||||
self.gradientTypeLabel)
|
||||
self.gradientComboBox = QtGui.QComboBox(self.backgroundPage)
|
||||
self.gradientComboBox.setVisible(False)
|
||||
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.gradientTypeLabel = QtGui.QLabel(self.gradientWidget)
|
||||
self.gradientTypeLabel.setObjectName(u'GradientTypeLabel')
|
||||
self.gradientComboBox = QtGui.QComboBox(self.gradientWidget)
|
||||
self.gradientComboBox.setObjectName(u'GradientComboBox')
|
||||
self.gradientComboBox.addItems([u'', u'', u'', u'', u''])
|
||||
self.gradientLayout.addRow(self.gradientTypeLabel,
|
||||
self.gradientComboBox)
|
||||
self.imageLabel = QtGui.QLabel(self.backgroundPage)
|
||||
self.imageLabel.setVisible(False)
|
||||
self.imageLabel.setObjectName(u'imageLabel')
|
||||
self.backgroundLayout.setWidget(5, QtGui.QFormLayout.LabelRole,
|
||||
self.imageLabel)
|
||||
self.gradientSpacer = QtGui.QSpacerItem(10, 0, QtGui.QSizePolicy.Fixed,
|
||||
QtGui.QSizePolicy.Minimum)
|
||||
self.gradientLayout.setItem(3, QtGui.QFormLayout.LabelRole,
|
||||
self.gradientSpacer)
|
||||
self.backgroundStack.addWidget(self.gradientWidget)
|
||||
self.imageWidget = QtGui.QWidget(self.backgroundPage)
|
||||
self.imageWidget.setObjectName(u'ImageWidget')
|
||||
self.imageLayout = QtGui.QFormLayout(self.imageWidget)
|
||||
self.imageLayout.setMargin(0)
|
||||
self.imageLayout.setObjectName(u'ImageLayout')
|
||||
self.imageLabel = QtGui.QLabel(self.imageWidget)
|
||||
self.imageLabel.setObjectName(u'ImageLabel')
|
||||
self.imageFileLayout = QtGui.QHBoxLayout()
|
||||
self.imageFileLayout.setObjectName(u'imageFileLayout')
|
||||
self.imageLineEdit = QtGui.QLineEdit(self.backgroundPage)
|
||||
self.imageLineEdit.setVisible(False)
|
||||
self.imageLineEdit.setObjectName(u'imageLineEdit')
|
||||
self.imageFileLayout.addWidget(self.imageLineEdit)
|
||||
self.imageBrowseButton = QtGui.QToolButton(self.backgroundPage)
|
||||
self.imageBrowseButton.setVisible(False)
|
||||
self.imageBrowseButton.setObjectName(u'imageBrowseButton')
|
||||
self.imageFileLayout.setObjectName(u'ImageFileLayout')
|
||||
self.imageFileEdit = QtGui.QLineEdit(self.imageWidget)
|
||||
self.imageFileEdit.setObjectName(u'ImageFileEdit')
|
||||
self.imageFileLayout.addWidget(self.imageFileEdit)
|
||||
self.imageBrowseButton = QtGui.QToolButton(self.imageWidget)
|
||||
self.imageBrowseButton.setObjectName(u'ImageBrowseButton')
|
||||
self.imageBrowseButton.setIcon(
|
||||
build_icon(u':/general/general_open.png'))
|
||||
self.imageFileLayout.addWidget(self.imageBrowseButton)
|
||||
self.backgroundLayout.setLayout(5, QtGui.QFormLayout.FieldRole,
|
||||
self.imageFileLayout)
|
||||
self.imageLayout.addRow(self.imageLabel, self.imageFileLayout)
|
||||
self.imageSpacer = QtGui.QSpacerItem(10, 0, QtGui.QSizePolicy.Fixed,
|
||||
QtGui.QSizePolicy.Minimum)
|
||||
self.imageLayout.setItem(1, QtGui.QFormLayout.LabelRole,
|
||||
self.imageSpacer)
|
||||
self.backgroundStack.addWidget(self.imageWidget)
|
||||
self.backgroundLayout.addLayout(self.backgroundStack)
|
||||
ThemeWizard.addPage(self.backgroundPage)
|
||||
# main area page
|
||||
self.mainAreaPage = QtGui.QWizardPage()
|
||||
self.mainAreaPage.setObjectName(u'mainAreaPage')
|
||||
self.mainAreaPage.setObjectName(u'MainAreaPage')
|
||||
self.mainAreaLayout = QtGui.QFormLayout(self.mainAreaPage)
|
||||
self.mainAreaLayout.setMargin(12)
|
||||
self.mainAreaLayout.setVerticalSpacing(6)
|
||||
self.mainAreaLayout.setObjectName(u'mainAreaLayout')
|
||||
self.mainAreaLayout.setObjectName(u'MainAreaLayout')
|
||||
self.mainFontLabel = QtGui.QLabel(self.mainAreaPage)
|
||||
self.mainFontLabel.setObjectName(u'mainFontLabel')
|
||||
self.mainAreaLayout.setWidget(0,
|
||||
QtGui.QFormLayout.LabelRole, self.mainFontLabel)
|
||||
self.mainFontLabel.setObjectName(u'MainFontLabel')
|
||||
self.mainFontComboBox = QtGui.QFontComboBox(self.mainAreaPage)
|
||||
self.mainFontComboBox.setObjectName(u'mainFontComboBox')
|
||||
self.mainAreaLayout.setWidget(0,
|
||||
QtGui.QFormLayout.FieldRole, self.mainFontComboBox)
|
||||
self.mainFontComboBox.setObjectName(u'MainFontComboBox')
|
||||
self.mainAreaLayout.addRow(self.mainFontLabel, self.mainFontComboBox)
|
||||
self.mainColorLabel = QtGui.QLabel(self.mainAreaPage)
|
||||
self.mainColorLabel.setObjectName(u'mainColorLabel')
|
||||
self.mainAreaLayout.setWidget(1,
|
||||
QtGui.QFormLayout.LabelRole, self.mainColorLabel)
|
||||
self.fontPropertiesLayout = QtGui.QHBoxLayout()
|
||||
self.fontPropertiesLayout.setSpacing(12)
|
||||
self.fontPropertiesLayout.setObjectName(u'fontPropertiesLayout')
|
||||
self.mainColorPushButton = QtGui.QPushButton(self.mainAreaPage)
|
||||
self.mainColorPushButton.setObjectName(u'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.mainColorLabel.setObjectName(u'MainColorLabel')
|
||||
self.mainPropertiesLayout = QtGui.QHBoxLayout()
|
||||
self.mainPropertiesLayout.setObjectName(u'MainPropertiesLayout')
|
||||
self.mainColorButton = QtGui.QPushButton(self.mainAreaPage)
|
||||
self.mainColorButton.setObjectName(u'MainColorButton')
|
||||
self.mainPropertiesLayout.addWidget(self.mainColorButton)
|
||||
self.mainPropertiesLayout.addSpacing(20)
|
||||
self.mainBoldCheckBox = QtGui.QCheckBox(self.mainAreaPage)
|
||||
self.mainBoldCheckBox.setObjectName(u'MainBoldCheckBox')
|
||||
self.mainPropertiesLayout.addWidget(self.mainBoldCheckBox)
|
||||
self.mainPropertiesLayout.addSpacing(20)
|
||||
self.mainItalicsCheckBox = QtGui.QCheckBox(self.mainAreaPage)
|
||||
self.mainItalicsCheckBox.setObjectName(u'MainItalicsCheckBox')
|
||||
self.mainPropertiesLayout.addWidget(self.mainItalicsCheckBox)
|
||||
self.mainAreaLayout.addRow(self.mainColorLabel,
|
||||
self.mainPropertiesLayout)
|
||||
self.mainSizeLabel = QtGui.QLabel(self.mainAreaPage)
|
||||
self.mainSizeLabel.setObjectName(u'mainSizeLabel')
|
||||
self.mainAreaLayout.setWidget(2,
|
||||
QtGui.QFormLayout.LabelRole, self.mainSizeLabel)
|
||||
self.mainSizeLabel.setObjectName(u'MainSizeLabel')
|
||||
self.mainSizeLayout = QtGui.QHBoxLayout()
|
||||
self.mainSizeLayout.setObjectName(u'mainSizeLayout')
|
||||
self.mainSizeLayout.setObjectName(u'MainSizeLayout')
|
||||
self.mainSizeSpinBox = QtGui.QSpinBox(self.mainAreaPage)
|
||||
self.mainSizeSpinBox.setMaximum(999)
|
||||
self.mainSizeSpinBox.setProperty(u'value', 16)
|
||||
self.mainSizeSpinBox.setObjectName(u'mainSizeSpinBox')
|
||||
self.mainSizeSpinBox.setValue(16)
|
||||
self.mainSizeSpinBox.setObjectName(u'MainSizeSpinBox')
|
||||
self.mainSizeLayout.addWidget(self.mainSizeSpinBox)
|
||||
self.mainLineCountLabel = QtGui.QLabel(self.mainAreaPage)
|
||||
self.mainLineCountLabel.setObjectName(u'mainLineCountLabel')
|
||||
self.mainLineCountLabel.setObjectName(u'MainLineCountLabel')
|
||||
self.mainSizeLayout.addWidget(self.mainLineCountLabel)
|
||||
self.mainAreaLayout.setLayout(2,
|
||||
QtGui.QFormLayout.FieldRole, self.mainSizeLayout)
|
||||
self.mainAreaLayout.addRow(self.mainSizeLabel, self.mainSizeLayout)
|
||||
self.lineSpacingLabel = QtGui.QLabel(self.mainAreaPage)
|
||||
self.lineSpacingLabel.setObjectName(u'lineSpacingLabel')
|
||||
self.mainAreaLayout.setWidget(3,
|
||||
QtGui.QFormLayout.LabelRole, self.lineSpacingLabel)
|
||||
self.lineSpacingLabel.setObjectName(u'LineSpacingLabel')
|
||||
self.lineSpacingSpinBox = QtGui.QSpinBox(self.mainAreaPage)
|
||||
self.lineSpacingSpinBox.setMinimum(-50)
|
||||
self.lineSpacingSpinBox.setMaximum(50)
|
||||
self.lineSpacingSpinBox.setObjectName(u'lineSpacingSpinBox')
|
||||
self.mainAreaLayout.setWidget(3,
|
||||
QtGui.QFormLayout.FieldRole, self.lineSpacingSpinBox)
|
||||
self.lineSpacingSpinBox.setObjectName(u'LineSpacingSpinBox')
|
||||
self.mainAreaLayout.addRow(self.lineSpacingLabel,
|
||||
self.lineSpacingSpinBox)
|
||||
self.outlineCheckBox = QtGui.QCheckBox(self.mainAreaPage)
|
||||
self.outlineCheckBox.setObjectName(u'outlineCheckBox')
|
||||
self.mainAreaLayout.setWidget(4,
|
||||
QtGui.QFormLayout.LabelRole, self.outlineCheckBox)
|
||||
self.outlineCheckBox.setObjectName(u'OutlineCheckBox')
|
||||
self.outlineLayout = QtGui.QHBoxLayout()
|
||||
self.outlineLayout.setObjectName(u'outlineLayout')
|
||||
self.outlineColorPushButton = QtGui.QPushButton(self.mainAreaPage)
|
||||
self.outlineColorPushButton.setObjectName(u'outlineColorPushButton')
|
||||
self.outlineLayout.addWidget(self.outlineColorPushButton)
|
||||
self.outlineLayout.setObjectName(u'OutlineLayout')
|
||||
self.outlineColorButton = QtGui.QPushButton(self.mainAreaPage)
|
||||
self.outlineColorButton.setEnabled(False)
|
||||
self.outlineColorButton.setObjectName(u'OutlineColorButton')
|
||||
self.outlineLayout.addWidget(self.outlineColorButton)
|
||||
self.outlineLayout.addSpacing(20)
|
||||
self.outlineSizeLabel = QtGui.QLabel(self.mainAreaPage)
|
||||
self.outlineSizeLabel.setObjectName(u'outlineSizeLabel')
|
||||
self.outlineSizeLabel.setObjectName(u'OutlineSizeLabel')
|
||||
self.outlineLayout.addWidget(self.outlineSizeLabel)
|
||||
self.outlineSizeSpinBox = QtGui.QSpinBox(self.mainAreaPage)
|
||||
self.outlineSizeSpinBox.setObjectName(u'outlineSizeSpinBox')
|
||||
self.outlineSizeSpinBox.setEnabled(False)
|
||||
self.outlineSizeSpinBox.setObjectName(u'OutlineSizeSpinBox')
|
||||
self.outlineLayout.addWidget(self.outlineSizeSpinBox)
|
||||
self.mainAreaLayout.setLayout(4,
|
||||
QtGui.QFormLayout.FieldRole, self.outlineLayout)
|
||||
self.mainAreaLayout.addRow(self.outlineCheckBox, self.outlineLayout)
|
||||
self.shadowCheckBox = QtGui.QCheckBox(self.mainAreaPage)
|
||||
self.shadowCheckBox.setObjectName(u'shadowCheckBox')
|
||||
self.mainAreaLayout.setWidget(5,
|
||||
QtGui.QFormLayout.LabelRole, self.shadowCheckBox)
|
||||
self.shadowCheckBox.setObjectName(u'ShadowCheckBox')
|
||||
self.shadowLayout = QtGui.QHBoxLayout()
|
||||
self.shadowLayout.setObjectName(u'shadowLayout')
|
||||
self.shadowColorPushButton = QtGui.QPushButton(self.mainAreaPage)
|
||||
self.shadowColorPushButton.setObjectName(u'shadowColorPushButton')
|
||||
self.shadowLayout.addWidget(self.shadowColorPushButton)
|
||||
self.shadowLayout.setObjectName(u'ShadowLayout')
|
||||
self.shadowColorButton = QtGui.QPushButton(self.mainAreaPage)
|
||||
self.shadowColorButton.setEnabled(False)
|
||||
self.shadowColorButton.setObjectName(u'shadowColorButton')
|
||||
self.shadowLayout.addWidget(self.shadowColorButton)
|
||||
self.shadowLayout.addSpacing(20)
|
||||
self.shadowSizeLabel = QtGui.QLabel(self.mainAreaPage)
|
||||
self.shadowSizeLabel.setObjectName(u'shadowSizeLabel')
|
||||
self.shadowSizeLabel.setObjectName(u'ShadowSizeLabel')
|
||||
self.shadowLayout.addWidget(self.shadowSizeLabel)
|
||||
self.shadowSizeSpinBox = QtGui.QSpinBox(self.mainAreaPage)
|
||||
self.shadowSizeSpinBox.setObjectName(u'shadowSizeSpinBox')
|
||||
self.shadowSizeSpinBox.setEnabled(False)
|
||||
self.shadowSizeSpinBox.setObjectName(u'ShadowSizeSpinBox')
|
||||
self.shadowLayout.addWidget(self.shadowSizeSpinBox)
|
||||
self.mainAreaLayout.setLayout(5,
|
||||
QtGui.QFormLayout.FieldRole, self.shadowLayout)
|
||||
self.mainAreaLayout.addRow(self.shadowCheckBox, self.shadowLayout)
|
||||
ThemeWizard.addPage(self.mainAreaPage)
|
||||
# footer area page
|
||||
self.footerAreaPage = QtGui.QWizardPage()
|
||||
self.footerAreaPage.setObjectName(u'footerAreaPage')
|
||||
self.footerLayout = QtGui.QFormLayout(self.footerAreaPage)
|
||||
self.footerLayout.setMargin(12)
|
||||
self.footerLayout.setVerticalSpacing(6)
|
||||
self.footerLayout.setObjectName(u'footerLayout')
|
||||
self.footerAreaPage.setObjectName(u'FooterAreaPage')
|
||||
self.footerAreaLayout = QtGui.QFormLayout(self.footerAreaPage)
|
||||
self.footerAreaLayout.setObjectName(u'FooterAreaLayout')
|
||||
self.footerFontLabel = QtGui.QLabel(self.footerAreaPage)
|
||||
self.footerFontLabel.setObjectName(u'footerFontLabel')
|
||||
self.footerLayout.setWidget(0,
|
||||
QtGui.QFormLayout.LabelRole, self.footerFontLabel)
|
||||
self.footerFontLabel.setObjectName(u'FooterFontLabel')
|
||||
self.footerFontComboBox = QtGui.QFontComboBox(self.footerAreaPage)
|
||||
self.footerFontComboBox.setObjectName(u'footerFontComboBox')
|
||||
self.footerLayout.setWidget(0,
|
||||
QtGui.QFormLayout.FieldRole, self.footerFontComboBox)
|
||||
self.footerAreaLayout.addRow(self.footerFontLabel,
|
||||
self.footerFontComboBox)
|
||||
self.footerColorLabel = QtGui.QLabel(self.footerAreaPage)
|
||||
self.footerColorLabel.setObjectName(u'footerColorLabel')
|
||||
self.footerLayout.setWidget(1,
|
||||
QtGui.QFormLayout.LabelRole, self.footerColorLabel)
|
||||
self.footerColorPushButton = QtGui.QPushButton(self.footerAreaPage)
|
||||
self.footerColorPushButton.setObjectName(u'footerColorPushButton')
|
||||
self.footerLayout.setWidget(1,
|
||||
QtGui.QFormLayout.FieldRole, self.footerColorPushButton)
|
||||
self.footerColorLabel.setObjectName(u'FooterColorLabel')
|
||||
self.footerColorButton = QtGui.QPushButton(self.footerAreaPage)
|
||||
self.footerColorButton.setObjectName(u'footerColorButton')
|
||||
self.footerAreaLayout.addRow(self.footerColorLabel,
|
||||
self.footerColorButton)
|
||||
self.footerSizeLabel = QtGui.QLabel(self.footerAreaPage)
|
||||
self.footerSizeLabel.setObjectName(u'footerSizeLabel')
|
||||
self.footerLayout.setWidget(2,
|
||||
QtGui.QFormLayout.LabelRole, self.footerSizeLabel)
|
||||
self.footerSizeLabel.setObjectName(u'FooterSizeLabel')
|
||||
self.footerSizeSpinBox = QtGui.QSpinBox(self.footerAreaPage)
|
||||
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.footerSizeSpinBox.setValue(10)
|
||||
self.footerSizeSpinBox.setObjectName(u'FooterSizeSpinBox')
|
||||
self.footerAreaLayout.addRow(self.footerSizeLabel, self.footerSizeSpinBox)
|
||||
ThemeWizard.addPage(self.footerAreaPage)
|
||||
# alignment page
|
||||
self.alignmentPage = QtGui.QWizardPage()
|
||||
self.alignmentPage.setObjectName(u'alignmentPage')
|
||||
self.alignmentPage.setObjectName(u'AlignmentPage')
|
||||
self.alignmentLayout = QtGui.QFormLayout(self.alignmentPage)
|
||||
self.alignmentLayout.setMargin(12)
|
||||
self.alignmentLayout.setVerticalSpacing(6)
|
||||
self.alignmentLayout.setObjectName(u'alignmentLayout')
|
||||
self.alignmentLayout.setObjectName(u'AlignmentLayout')
|
||||
self.horizontalLabel = QtGui.QLabel(self.alignmentPage)
|
||||
self.horizontalLabel.setObjectName(u'horizontalLabel')
|
||||
self.alignmentLayout.setWidget(0,
|
||||
QtGui.QFormLayout.LabelRole, self.horizontalLabel)
|
||||
self.horizontalLabel.setObjectName(u'HorizontalLabel')
|
||||
self.horizontalComboBox = QtGui.QComboBox(self.alignmentPage)
|
||||
self.horizontalComboBox.setObjectName(u'horizontalComboBox')
|
||||
self.horizontalComboBox.addItem(u'')
|
||||
self.horizontalComboBox.addItem(u'')
|
||||
self.horizontalComboBox.addItem(u'')
|
||||
self.alignmentLayout.setWidget(0,
|
||||
QtGui.QFormLayout.FieldRole, self.horizontalComboBox)
|
||||
self.horizontalComboBox.addItems([u'', u'', u''])
|
||||
self.horizontalComboBox.setObjectName(u'HorizontalComboBox')
|
||||
self.alignmentLayout.addRow(self.horizontalLabel,
|
||||
self.horizontalComboBox)
|
||||
self.verticalLabel = QtGui.QLabel(self.alignmentPage)
|
||||
self.verticalLabel.setObjectName(u'verticalLabel')
|
||||
self.alignmentLayout.setWidget(1,
|
||||
QtGui.QFormLayout.LabelRole, self.verticalLabel)
|
||||
self.verticalLabel.setObjectName(u'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.alignmentLayout.setWidget(1,
|
||||
QtGui.QFormLayout.FieldRole, self.verticalComboBox)
|
||||
self.verticalComboBox.addItems([u'', u'', u''])
|
||||
self.verticalComboBox.setObjectName(u'VerticalComboBox')
|
||||
self.alignmentLayout.addRow(self.verticalLabel, self.verticalComboBox)
|
||||
self.transitionsCheckBox = QtGui.QCheckBox(self.alignmentPage)
|
||||
self.transitionsCheckBox.setObjectName(u'transitionsCheckBox')
|
||||
self.alignmentLayout.setWidget(2,
|
||||
QtGui.QFormLayout.FieldRole, self.transitionsCheckBox)
|
||||
self.transitionsCheckBox.setObjectName(u'TransitionsCheckBox')
|
||||
self.alignmentLayout.addRow(self.transitionsCheckBox)
|
||||
ThemeWizard.addPage(self.alignmentPage)
|
||||
# area position page
|
||||
self.areaPositionPage = QtGui.QWizardPage()
|
||||
self.areaPositionPage.setObjectName(u'areaPositionPage')
|
||||
self.areaPositionLayout = QtGui.QGridLayout(self.areaPositionPage)
|
||||
self.areaPositionLayout.setObjectName(u'areaPositionLayout')
|
||||
self.areaPositionPage.setObjectName(u'AreaPositionPage')
|
||||
self.areaPositionLayout = QtGui.QHBoxLayout(self.areaPositionPage)
|
||||
self.areaPositionLayout.setObjectName(u'AreaPositionLayout')
|
||||
self.mainPositionGroupBox = QtGui.QGroupBox(self.areaPositionPage)
|
||||
self.mainPositionGroupBox.setObjectName(u'mainPositionGroupBox')
|
||||
self.mainPositionGroupBox.setObjectName(u'MainPositionGroupBox')
|
||||
self.mainPositionLayout = QtGui.QFormLayout(self.mainPositionGroupBox)
|
||||
self.mainPositionLayout.setSpacing(6)
|
||||
self.mainPositionLayout.setObjectName(u'mainPositionLayout')
|
||||
self.mainDefaultPositionCheckBox = QtGui.QCheckBox(
|
||||
self.mainPositionGroupBox)
|
||||
self.mainDefaultPositionCheckBox.setChecked(True)
|
||||
self.mainDefaultPositionCheckBox.setObjectName(
|
||||
u'mainDefaultPositionCheckBox')
|
||||
self.mainPositionLayout.setWidget(0, QtGui.QFormLayout.FieldRole,
|
||||
self.mainDefaultPositionCheckBox)
|
||||
self.mainPositionLayout.setObjectName(u'MainPositionLayout')
|
||||
self.mainPositionCheckBox = QtGui.QCheckBox(self.mainPositionGroupBox)
|
||||
self.mainPositionCheckBox.setObjectName(u'MainPositionCheckBox')
|
||||
self.mainPositionLayout.addRow(self.mainPositionCheckBox)
|
||||
self.mainXLabel = QtGui.QLabel(self.mainPositionGroupBox)
|
||||
self.mainXLabel.setObjectName(u'mainXLabel')
|
||||
self.mainPositionLayout.setWidget(1,
|
||||
QtGui.QFormLayout.LabelRole, self.mainXLabel)
|
||||
self.mainXLabel.setObjectName(u'MainXLabel')
|
||||
self.mainXSpinBox = QtGui.QSpinBox(self.mainPositionGroupBox)
|
||||
self.mainXSpinBox.setEnabled(False)
|
||||
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.mainXSpinBox.setObjectName(u'MainXSpinBox')
|
||||
self.mainPositionLayout.addRow(self.mainXLabel, self.mainXSpinBox)
|
||||
self.mainYLabel = QtGui.QLabel(self.mainPositionGroupBox)
|
||||
self.mainYLabel.setObjectName(u'mainYLabel')
|
||||
self.mainPositionLayout.setWidget(2,
|
||||
QtGui.QFormLayout.LabelRole, self.mainYLabel)
|
||||
self.mainYLabel.setObjectName(u'MainYLabel')
|
||||
self.mainYSpinBox = QtGui.QSpinBox(self.mainPositionGroupBox)
|
||||
self.mainYSpinBox.setEnabled(False)
|
||||
self.mainYSpinBox.setMaximum(9999)
|
||||
self.mainYSpinBox.setObjectName(u'mainYSpinBox')
|
||||
self.mainPositionLayout.setWidget(2,
|
||||
QtGui.QFormLayout.FieldRole, self.mainYSpinBox)
|
||||
self.mainYSpinBox.setObjectName(u'MainYSpinBox')
|
||||
self.mainPositionLayout.addRow(self.mainYLabel, self.mainYSpinBox)
|
||||
self.mainWidthLabel = QtGui.QLabel(self.mainPositionGroupBox)
|
||||
self.mainWidthLabel.setObjectName(u'mainWidthLabel')
|
||||
self.mainPositionLayout.setWidget(3,
|
||||
QtGui.QFormLayout.LabelRole, self.mainWidthLabel)
|
||||
self.mainWidthLabel.setObjectName(u'MainWidthLabel')
|
||||
self.mainWidthSpinBox = QtGui.QSpinBox(self.mainPositionGroupBox)
|
||||
self.mainWidthSpinBox.setEnabled(False)
|
||||
self.mainWidthSpinBox.setMaximum(9999)
|
||||
self.mainWidthSpinBox.setObjectName(u'mainWidthSpinBox')
|
||||
self.mainPositionLayout.setWidget(3,
|
||||
QtGui.QFormLayout.FieldRole, self.mainWidthSpinBox)
|
||||
self.mainWidthSpinBox.setObjectName(u'MainWidthSpinBox')
|
||||
self.mainPositionLayout.addRow(self.mainWidthLabel,
|
||||
self.mainWidthSpinBox)
|
||||
self.mainHeightLabel = QtGui.QLabel(self.mainPositionGroupBox)
|
||||
self.mainHeightLabel.setObjectName(u'mainHeightLabel')
|
||||
self.mainPositionLayout.setWidget(4,
|
||||
QtGui.QFormLayout.LabelRole, self.mainHeightLabel)
|
||||
self.mainHeightLabel.setObjectName(u'MainHeightLabel')
|
||||
self.mainHeightSpinBox = QtGui.QSpinBox(self.mainPositionGroupBox)
|
||||
self.mainHeightSpinBox.setEnabled(False)
|
||||
self.mainHeightSpinBox.setMaximum(9999)
|
||||
self.mainHeightSpinBox.setObjectName(u'mainHeightSpinBox')
|
||||
self.mainPositionLayout.setWidget(4,
|
||||
QtGui.QFormLayout.FieldRole, self.mainHeightSpinBox)
|
||||
self.areaPositionLayout.addWidget(
|
||||
self.mainPositionGroupBox, 1, 0, 1, 1)
|
||||
self.mainHeightSpinBox.setObjectName(u'MainHeightSpinBox')
|
||||
self.mainPositionLayout.addRow(self.mainHeightLabel,
|
||||
self.mainHeightSpinBox)
|
||||
self.areaPositionLayout.addWidget(self.mainPositionGroupBox)
|
||||
self.footerPositionGroupBox = QtGui.QGroupBox(self.areaPositionPage)
|
||||
self.footerPositionGroupBox.setObjectName(u'footerPositionGroupBox')
|
||||
self.footerPositionLayout = QtGui.QFormLayout(
|
||||
self.footerPositionGroupBox)
|
||||
self.footerPositionLayout.setVerticalSpacing(6)
|
||||
self.footerPositionLayout.setObjectName(u'footerPositionLayout')
|
||||
self.footerPositionGroupBox.setObjectName(u'FooterPositionGroupBox')
|
||||
self.footerPositionLayout = QtGui.QFormLayout(self.footerPositionGroupBox)
|
||||
self.footerPositionLayout.setObjectName(u'FooterPositionLayout')
|
||||
self.footerPositionCheckBox = QtGui.QCheckBox(self.footerPositionGroupBox)
|
||||
self.footerPositionCheckBox.setObjectName(u'FooterPositionCheckBox')
|
||||
self.footerPositionLayout.addRow(self.footerPositionCheckBox)
|
||||
self.footerXLabel = QtGui.QLabel(self.footerPositionGroupBox)
|
||||
self.footerXLabel.setObjectName(u'footerXLabel')
|
||||
self.footerPositionLayout.setWidget(1,
|
||||
QtGui.QFormLayout.LabelRole, self.footerXLabel)
|
||||
self.footerXLabel.setObjectName(u'FooterXLabel')
|
||||
self.footerXSpinBox = QtGui.QSpinBox(self.footerPositionGroupBox)
|
||||
self.footerXSpinBox.setEnabled(False)
|
||||
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.footerXSpinBox.setObjectName(u'FooterXSpinBox')
|
||||
self.footerPositionLayout.addRow(self.footerXLabel, self.footerXSpinBox)
|
||||
self.footerYLabel = QtGui.QLabel(self.footerPositionGroupBox)
|
||||
self.footerYLabel.setObjectName(u'footerYLabel')
|
||||
self.footerPositionLayout.setWidget(2,
|
||||
QtGui.QFormLayout.LabelRole, self.footerYLabel)
|
||||
self.footerYLabel.setObjectName(u'FooterYLabel')
|
||||
self.footerYSpinBox = QtGui.QSpinBox(self.footerPositionGroupBox)
|
||||
self.footerYSpinBox.setEnabled(False)
|
||||
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.footerYSpinBox.setObjectName(u'FooterYSpinBox')
|
||||
self.footerPositionLayout.addRow(self.footerYLabel, self.footerYSpinBox)
|
||||
self.footerWidthLabel = QtGui.QLabel(self.footerPositionGroupBox)
|
||||
self.footerWidthLabel.setObjectName(u'footerWidthLabel')
|
||||
self.footerPositionLayout.setWidget(3,
|
||||
QtGui.QFormLayout.LabelRole, self.footerWidthLabel)
|
||||
self.footerWidthLabel.setObjectName(u'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.footerWidthSpinBox.setObjectName(u'FooterWidthSpinBox')
|
||||
self.footerPositionLayout.addRow(self.footerWidthLabel,
|
||||
self.footerWidthSpinBox)
|
||||
self.footerHeightLabel = QtGui.QLabel(self.footerPositionGroupBox)
|
||||
self.footerHeightLabel.setObjectName(u'footerHeightLabel')
|
||||
self.footerPositionLayout.setWidget(4,
|
||||
QtGui.QFormLayout.LabelRole, self.footerHeightLabel)
|
||||
self.footerHeightLabel.setObjectName(u'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.footerDefaultPositionCheckBox.setChecked(True)
|
||||
self.footerDefaultPositionCheckBox.setObjectName(
|
||||
u'footerDefaultPositionCheckBox')
|
||||
self.footerPositionLayout.setWidget(0, QtGui.QFormLayout.FieldRole,
|
||||
self.footerDefaultPositionCheckBox)
|
||||
self.areaPositionLayout.addWidget(
|
||||
self.footerPositionGroupBox, 1, 1, 1, 1)
|
||||
self.footerHeightSpinBox.setObjectName(u'FooterHeightSpinBox')
|
||||
self.footerPositionLayout.addRow(self.footerHeightLabel,
|
||||
self.footerHeightSpinBox)
|
||||
self.areaPositionLayout.addWidget(self.footerPositionGroupBox)
|
||||
ThemeWizard.addPage(self.areaPositionPage)
|
||||
# preview page
|
||||
self.previewPage = QtGui.QWizardPage()
|
||||
self.previewPage.setObjectName(u'previewPage')
|
||||
self.previewPage.setObjectName(u'PreviewPage')
|
||||
self.previewLayout = QtGui.QVBoxLayout(self.previewPage)
|
||||
self.previewLayout.setSpacing(6)
|
||||
self.previewLayout.setMargin(12)
|
||||
self.previewLayout.setObjectName(u'previewLayout')
|
||||
self.themeNameLayout = QtGui.QHBoxLayout()
|
||||
self.themeNameLayout.setObjectName(u'themeNameLayout')
|
||||
self.previewLayout.setObjectName(u'PreviewLayout')
|
||||
self.themeNameLayout = QtGui.QFormLayout()
|
||||
self.themeNameLayout.setObjectName(u'ThemeNameLayout')
|
||||
self.themeNameLabel = QtGui.QLabel(self.previewPage)
|
||||
self.themeNameLabel.setObjectName(u'themeNameLabel')
|
||||
self.themeNameLayout.addWidget(self.themeNameLabel)
|
||||
self.themeNameLabel.setObjectName(u'ThemeNameLabel')
|
||||
self.themeNameEdit = QtGui.QLineEdit(self.previewPage)
|
||||
self.themeNameEdit.setObjectName(u'themeNameEdit')
|
||||
self.themeNameLayout.addWidget(self.themeNameEdit)
|
||||
self.themeNameEdit.setObjectName(u'ThemeNameEdit')
|
||||
self.themeNameLayout.addRow(self.themeNameLabel, self.themeNameEdit)
|
||||
self.previewLayout.addLayout(self.themeNameLayout)
|
||||
self.previewPaneLayout = QtGui.QHBoxLayout()
|
||||
self.previewPaneLayout.setObjectName(u'previewPaneLayout')
|
||||
self.previewLeftSpacer = QtGui.QSpacerItem(40, 20,
|
||||
QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
|
||||
self.previewPaneLayout.addItem(self.previewLeftSpacer)
|
||||
self.previewPaneLayout.setObjectName(u'PreviewPaneLayout')
|
||||
self.previewPaneLayout.addStretch()
|
||||
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(100, 150))
|
||||
self.previewBoxLabel.setFrameShape(QtGui.QFrame.WinPanel)
|
||||
self.previewBoxLabel.setFrameShadow(QtGui.QFrame.Sunken)
|
||||
self.previewBoxLabel.setLineWidth(1)
|
||||
self.previewBoxLabel.setScaledContents(True)
|
||||
self.previewBoxLabel.setObjectName(u'previewBoxLabel')
|
||||
self.previewBoxLabel.setObjectName(u'PreviewBoxLabel')
|
||||
self.previewPaneLayout.addWidget(self.previewBoxLabel)
|
||||
self.previewRightSpacer = QtGui.QSpacerItem(40, 20,
|
||||
QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
|
||||
self.previewPaneLayout.addItem(self.previewRightSpacer)
|
||||
self.previewPaneLayout.addStretch()
|
||||
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()'),
|
||||
ThemeWizard.accept)
|
||||
|
||||
QtCore.QObject.connect(self.backgroundComboBox,
|
||||
QtCore.SIGNAL(u'currentIndexChanged(int)'), self.backgroundStack,
|
||||
QtCore.SLOT(u'setCurrentIndex(int)'))
|
||||
QtCore.QObject.connect(self.outlineCheckBox,
|
||||
QtCore.SIGNAL(u'toggled(bool)'), self.outlineColorButton,
|
||||
QtCore.SLOT(u'setEnabled(bool)'))
|
||||
QtCore.QObject.connect(self.outlineCheckBox,
|
||||
QtCore.SIGNAL(u'toggled(bool)'), self.outlineSizeSpinBox,
|
||||
QtCore.SLOT(u'setEnabled(bool)'))
|
||||
QtCore.QObject.connect(self.shadowCheckBox,
|
||||
QtCore.SIGNAL(u'toggled(bool)'), self.shadowColorButton,
|
||||
QtCore.SLOT(u'setEnabled(bool)'))
|
||||
QtCore.QObject.connect(self.shadowCheckBox,
|
||||
QtCore.SIGNAL(u'toggled(bool)'), self.shadowSizeSpinBox,
|
||||
QtCore.SLOT(u'setEnabled(bool)'))
|
||||
QtCore.QObject.connect(self.mainPositionCheckBox,
|
||||
QtCore.SIGNAL(u'toggled(bool)'), self.mainXSpinBox,
|
||||
QtCore.SLOT(u'setDisabled(bool)'))
|
||||
QtCore.QObject.connect(self.mainPositionCheckBox,
|
||||
QtCore.SIGNAL(u'toggled(bool)'), self.mainYSpinBox,
|
||||
QtCore.SLOT(u'setDisabled(bool)'))
|
||||
QtCore.QObject.connect(self.mainPositionCheckBox,
|
||||
QtCore.SIGNAL(u'toggled(bool)'), self.mainWidthSpinBox,
|
||||
QtCore.SLOT(u'setDisabled(bool)'))
|
||||
QtCore.QObject.connect(self.mainPositionCheckBox,
|
||||
QtCore.SIGNAL(u'toggled(bool)'), self.mainHeightSpinBox,
|
||||
QtCore.SLOT(u'setDisabled(bool)'))
|
||||
QtCore.QObject.connect(self.footerPositionCheckBox,
|
||||
QtCore.SIGNAL(u'toggled(bool)'), self.footerXSpinBox,
|
||||
QtCore.SLOT(u'setDisabled(bool)'))
|
||||
QtCore.QObject.connect(self.footerPositionCheckBox,
|
||||
QtCore.SIGNAL(u'toggled(bool)'), self.footerYSpinBox,
|
||||
QtCore.SLOT(u'setDisabled(bool)'))
|
||||
QtCore.QObject.connect(self.footerPositionCheckBox,
|
||||
QtCore.SIGNAL(u'toggled(bool)'), self.footerWidthSpinBox,
|
||||
QtCore.SLOT(u'setDisabled(bool)'))
|
||||
QtCore.QObject.connect(self.footerPositionCheckBox,
|
||||
QtCore.SIGNAL(u'toggled(bool)'), self.footerHeightSpinBox,
|
||||
QtCore.SLOT(u'setDisabled(bool)'))
|
||||
QtCore.QMetaObject.connectSlotsByName(ThemeWizard)
|
||||
|
||||
def retranslateUi(self, ThemeWizard):
|
||||
@ -480,13 +436,13 @@ class Ui_ThemeWizard(object):
|
||||
self.backgroundPage.setSubTitle(
|
||||
translate('OpenLP.ThemeWizard', 'Set up your theme\'s background '
|
||||
'according to the parameters below.'))
|
||||
self.backgroundTypeLabel.setText(
|
||||
self.backgroundLabel.setText(
|
||||
translate('OpenLP.ThemeWizard', 'Background type:'))
|
||||
self.backgroundTypeComboBox.setItemText(0,
|
||||
self.backgroundComboBox.setItemText(0,
|
||||
translate('OpenLP.ThemeWizard', 'Solid Color'))
|
||||
self.backgroundTypeComboBox.setItemText(1,
|
||||
self.backgroundComboBox.setItemText(1,
|
||||
translate('OpenLP.ThemeWizard', 'Gradient'))
|
||||
self.backgroundTypeComboBox.setItemText(2,
|
||||
self.backgroundComboBox.setItemText(2,
|
||||
translate('OpenLP.ThemeWizard', 'Image'))
|
||||
self.colorLabel.setText(translate('OpenLP.ThemeWizard', 'Color:'))
|
||||
self.gradientStartLabel.setText(
|
||||
@ -528,9 +484,9 @@ class Ui_ThemeWizard(object):
|
||||
self.shadowCheckBox.setText(translate('OpenLP.ThemeWizard', '&Shadow:'))
|
||||
self.shadowSizeLabel.setText(translate('OpenLP.ThemeWizard', 'Size:'))
|
||||
self.shadowSizeSpinBox.setSuffix(translate('OpenLP.ThemeWizard', 'pt'))
|
||||
self.boldCheckBox.setText(
|
||||
self.mainBoldCheckBox.setText(
|
||||
translate('OpenLP.ThemeWizard', 'Bold'))
|
||||
self.italicsCheckBox.setText(
|
||||
self.mainItalicsCheckBox.setText(
|
||||
translate('OpenLP.ThemeWizard', 'Italic'))
|
||||
self.footerAreaPage.setTitle(
|
||||
translate('OpenLP.ThemeWizard', 'Footer Area Font Details'))
|
||||
@ -571,7 +527,7 @@ class Ui_ThemeWizard(object):
|
||||
' main and footer areas.'))
|
||||
self.mainPositionGroupBox.setTitle(
|
||||
translate('OpenLP.ThemeWizard', '&Main Area'))
|
||||
self.mainDefaultPositionCheckBox.setText(
|
||||
self.mainPositionCheckBox.setText(
|
||||
translate('OpenLP.ThemeWizard', '&Use default location'))
|
||||
self.mainXLabel.setText(translate('OpenLP.ThemeWizard', 'X position:'))
|
||||
self.mainXSpinBox.setSuffix(translate('OpenLP.ThemeWizard', 'px'))
|
||||
@ -598,7 +554,7 @@ class Ui_ThemeWizard(object):
|
||||
translate('OpenLP.ThemeWizard', 'Height:'))
|
||||
self.footerHeightSpinBox.setSuffix(
|
||||
translate('OpenLP.ThemeWizard', 'px'))
|
||||
self.footerDefaultPositionCheckBox.setText(
|
||||
self.footerPositionCheckBox.setText(
|
||||
translate('OpenLP.ThemeWizard', 'Use default location'))
|
||||
self.previewPage.setTitle(
|
||||
translate('OpenLP.ThemeWizard', 'Save and Preview'))
|
||||
@ -608,3 +564,18 @@ class Ui_ThemeWizard(object):
|
||||
'new theme'))
|
||||
self.themeNameLabel.setText(
|
||||
translate('OpenLP.ThemeWizard', 'Theme name:'))
|
||||
# Align all QFormLayouts towards each other
|
||||
width = max(self.backgroundLabel.minimumSizeHint().width(),
|
||||
self.colorLabel.minimumSizeHint().width())
|
||||
width = max(width, self.gradientStartLabel.minimumSizeHint().width())
|
||||
width = max(width, self.gradientEndLabel.minimumSizeHint().width())
|
||||
width = max(width, self.gradientTypeLabel.minimumSizeHint().width())
|
||||
width = max(width, self.imageLabel.minimumSizeHint().width())
|
||||
self.backgroundTypeSpacer.changeSize(width, 0, QtGui.QSizePolicy.Fixed,
|
||||
QtGui.QSizePolicy.Fixed)
|
||||
self.colorSpacer.changeSize(width, 0, QtGui.QSizePolicy.Fixed,
|
||||
QtGui.QSizePolicy.Fixed)
|
||||
self.gradientSpacer.changeSize(width, 0, QtGui.QSizePolicy.Fixed,
|
||||
QtGui.QSizePolicy.Fixed)
|
||||
self.imageSpacer.changeSize(width, 0, QtGui.QSizePolicy.Fixed,
|
||||
QtGui.QSizePolicy.Fixed)
|
||||
|
@ -79,8 +79,12 @@ class BibleImportForm(QtGui.QWizard, Ui_BibleImportWizard):
|
||||
QtGui.QWizard.__init__(self, parent)
|
||||
self.setupUi(self)
|
||||
self.registerFields()
|
||||
self.hasOpenlp1Import = \
|
||||
BibleFormat.get_availability(BibleFormat.OpenLP1)
|
||||
if BibleFormat.get_availability(BibleFormat.OpenLP1):
|
||||
self.openlp1DisabledLabel.hide()
|
||||
else:
|
||||
self.openlp1FileLabel.hide()
|
||||
self.openlp1FileEdit.hide()
|
||||
self.openlp1BrowseButton.hide()
|
||||
self.finishButton = self.button(QtGui.QWizard.FinishButton)
|
||||
self.cancelButton = self.button(QtGui.QWizard.CancelButton)
|
||||
self.manager = manager
|
||||
@ -88,27 +92,26 @@ class BibleImportForm(QtGui.QWizard, Ui_BibleImportWizard):
|
||||
self.manager.set_process_dialog(self)
|
||||
self.web_bible_list = {}
|
||||
self.loadWebBibles()
|
||||
QtCore.QObject.connect(self.formatComboBox,
|
||||
QtCore.SIGNAL(u'currentIndexChanged(int)'),
|
||||
self.onFormatComboBoxChanged)
|
||||
self.restart()
|
||||
self.selectStack.setCurrentIndex(0)
|
||||
QtCore.QObject.connect(self.webSourceComboBox,
|
||||
QtCore.SIGNAL(u'currentIndexChanged(int)'),
|
||||
self.onWebSourceComboBoxChanged)
|
||||
QtCore.QObject.connect(self.osisFileButton,
|
||||
QtCore.QObject.connect(self.osisBrowseButton,
|
||||
QtCore.SIGNAL(u'clicked()'),
|
||||
self.onOsisFileButtonClicked)
|
||||
self.onOsisBrowseButtonClicked)
|
||||
QtCore.QObject.connect(self.csvBooksButton,
|
||||
QtCore.SIGNAL(u'clicked()'),
|
||||
self.onBooksFileButtonClicked)
|
||||
self.onBooksBrowseButtonClicked)
|
||||
QtCore.QObject.connect(self.csvVersesButton,
|
||||
QtCore.SIGNAL(u'clicked()'),
|
||||
self.onCsvVersesFileButtonClicked)
|
||||
QtCore.QObject.connect(self.openSongFileButton,
|
||||
self.onCsvVersesBrowseButtonClicked)
|
||||
QtCore.QObject.connect(self.openSongBrowseButton,
|
||||
QtCore.SIGNAL(u'clicked()'),
|
||||
self.onOpenSongBrowseButtonClicked)
|
||||
QtCore.QObject.connect(self.openlp1FileButton,
|
||||
QtCore.QObject.connect(self.openlp1BrowseButton,
|
||||
QtCore.SIGNAL(u'clicked()'),
|
||||
self.onOpenlp1FileButtonClicked)
|
||||
self.onOpenlp1BrowseButtonClicked)
|
||||
QtCore.QObject.connect(self,
|
||||
QtCore.SIGNAL(u'currentIdChanged(int)'),
|
||||
self.onCurrentIdChanged)
|
||||
@ -125,7 +128,7 @@ class BibleImportForm(QtGui.QWizard, Ui_BibleImportWizard):
|
||||
Stop the import on cancel button, close button or ESC key.
|
||||
"""
|
||||
log.debug('Import canceled by user.')
|
||||
if self.currentId() == 3:
|
||||
if self.currentPage() == self.importPage:
|
||||
Receiver.send_message(u'bibles_stop_import')
|
||||
self.done(QtGui.QDialog.Rejected)
|
||||
|
||||
@ -133,11 +136,9 @@ class BibleImportForm(QtGui.QWizard, Ui_BibleImportWizard):
|
||||
"""
|
||||
Validate the current page before moving on to the next page.
|
||||
"""
|
||||
if self.currentId() == 0:
|
||||
# Welcome page
|
||||
if self.currentPage() == self.welcomePage:
|
||||
return True
|
||||
elif self.currentId() == 1:
|
||||
# Select page
|
||||
elif self.currentPage() == self.selectPage:
|
||||
if self.field(u'source_format').toInt()[0] == BibleFormat.OSIS:
|
||||
if not self.field(u'osis_location').toString():
|
||||
QtGui.QMessageBox.critical(self,
|
||||
@ -146,7 +147,7 @@ class BibleImportForm(QtGui.QWizard, Ui_BibleImportWizard):
|
||||
translate('BiblesPlugin.ImportWizardForm',
|
||||
'You need to specify a file to import your '
|
||||
'Bible from.'))
|
||||
self.OSISLocationEdit.setFocus()
|
||||
self.osisFileEdit.setFocus()
|
||||
return False
|
||||
elif self.field(u'source_format').toInt()[0] == BibleFormat.CSV:
|
||||
if not self.field(u'csv_booksfile').toString():
|
||||
@ -156,7 +157,7 @@ class BibleImportForm(QtGui.QWizard, Ui_BibleImportWizard):
|
||||
translate('BiblesPlugin.ImportWizardForm',
|
||||
'You need to specify a file with books of '
|
||||
'the Bible to use in the import.'))
|
||||
self.booksLocationEdit.setFocus()
|
||||
self.csvBooksEdit.setFocus()
|
||||
return False
|
||||
elif not self.field(u'csv_versefile').toString():
|
||||
QtGui.QMessageBox.critical(self,
|
||||
@ -165,7 +166,7 @@ class BibleImportForm(QtGui.QWizard, Ui_BibleImportWizard):
|
||||
translate('BiblesPlugin.ImportWizardForm',
|
||||
'You need to specify a file of Bible '
|
||||
'verses to import.'))
|
||||
self.csvVerseLocationEdit.setFocus()
|
||||
self.csvVersesEdit.setFocus()
|
||||
return False
|
||||
elif self.field(u'source_format').toInt()[0] == \
|
||||
BibleFormat.OpenSong:
|
||||
@ -186,11 +187,10 @@ class BibleImportForm(QtGui.QWizard, Ui_BibleImportWizard):
|
||||
translate('BiblesPlugin.ImportWizardForm',
|
||||
'You need to specify a file to import your '
|
||||
'Bible from.'))
|
||||
self.openlp1LocationEdit.setFocus()
|
||||
self.openlp1FileEdit.setFocus()
|
||||
return False
|
||||
return True
|
||||
elif self.currentId() == 2:
|
||||
# License details
|
||||
elif self.currentPage() == self.licenseDetailsPage:
|
||||
license_version = unicode(self.field(u'license_version').toString())
|
||||
license_copyright = \
|
||||
unicode(self.field(u'license_copyright').toString())
|
||||
@ -220,31 +220,9 @@ class BibleImportForm(QtGui.QWizard, Ui_BibleImportWizard):
|
||||
self.versionNameEdit.setFocus()
|
||||
return False
|
||||
return True
|
||||
if self.currentId() == 3:
|
||||
# Progress page
|
||||
if self.currentPage() == self.importPage:
|
||||
return True
|
||||
|
||||
def onFormatComboBoxChanged(self, index):
|
||||
"""
|
||||
Set Widgets for the selected import format visible.
|
||||
|
||||
``index``
|
||||
The index of the combo box.
|
||||
"""
|
||||
self.osisFileLabel.setVisible(index == 0)
|
||||
self.osisFileWidget.setVisible(index == 0)
|
||||
self.csvBooksLabel.setVisible(index == 1)
|
||||
self.csvBooksWidget.setVisible(index == 1)
|
||||
self.csvVersesLabel.setVisible(index == 1)
|
||||
self.csvVersesWidget.setVisible(index == 1)
|
||||
self.openSongFileLabel.setVisible(index == 2)
|
||||
self.openSongFileWidget.setVisible(index == 2)
|
||||
self.webTabWidget.setVisible(index == 3)
|
||||
self.openlp1FileLabel.setVisible(index == 4 and self.hasOpenlp1Import)
|
||||
self.openlp1FileWidget.setVisible(index == 4 and self.hasOpenlp1Import)
|
||||
self.openlp1DisabledLabel.setVisible(index == 4 and
|
||||
not self.hasOpenlp1Import)
|
||||
|
||||
def onWebSourceComboBoxChanged(self, index):
|
||||
"""
|
||||
Setup the list of Bibles when you select a different source on the web
|
||||
@ -256,10 +234,9 @@ class BibleImportForm(QtGui.QWizard, Ui_BibleImportWizard):
|
||||
self.webTranslationComboBox.clear()
|
||||
bibles = self.web_bible_list[index].keys()
|
||||
bibles.sort()
|
||||
for bible in bibles:
|
||||
self.webTranslationComboBox.addItem(bible)
|
||||
self.webTranslationComboBox.addItems(bibles)
|
||||
|
||||
def onOsisFileButtonClicked(self):
|
||||
def onOsisBrowseButtonClicked(self):
|
||||
"""
|
||||
Show the file open dialog for the OSIS file.
|
||||
"""
|
||||
@ -267,7 +244,7 @@ class BibleImportForm(QtGui.QWizard, Ui_BibleImportWizard):
|
||||
translate('BiblesPlugin.ImportWizardForm', 'Open OSIS File'),
|
||||
self.osisFileEdit)
|
||||
|
||||
def onBooksFileButtonClicked(self):
|
||||
def onBooksBrowseButtonClicked(self):
|
||||
"""
|
||||
Show the file open dialog for the books CSV file.
|
||||
"""
|
||||
@ -276,7 +253,7 @@ class BibleImportForm(QtGui.QWizard, Ui_BibleImportWizard):
|
||||
self.csvBooksEdit, u'%s (*.csv)'
|
||||
% translate('BiblesPlugin.ImportWizardForm', 'CSV File'))
|
||||
|
||||
def onCsvVersesFileButtonClicked(self):
|
||||
def onCsvVersesBrowseButtonClicked(self):
|
||||
"""
|
||||
Show the file open dialog for the verses CSV file.
|
||||
"""
|
||||
@ -292,7 +269,7 @@ class BibleImportForm(QtGui.QWizard, Ui_BibleImportWizard):
|
||||
translate('BiblesPlugin.ImportWizardForm', 'Open OpenSong Bible'),
|
||||
self.openSongFileEdit)
|
||||
|
||||
def onOpenlp1FileButtonClicked(self):
|
||||
def onOpenlp1BrowseButtonClicked(self):
|
||||
"""
|
||||
Show the file open dialog for the openlp.org 1.x file.
|
||||
"""
|
||||
@ -303,7 +280,7 @@ class BibleImportForm(QtGui.QWizard, Ui_BibleImportWizard):
|
||||
'openlp.org 1.x bible'))
|
||||
|
||||
def onCurrentIdChanged(self, pageId):
|
||||
if pageId == 3:
|
||||
if self.page(pageId) == self.importPage:
|
||||
self.preImport()
|
||||
self.performImport()
|
||||
self.postImport()
|
||||
@ -510,7 +487,7 @@ class BibleImportForm(QtGui.QWizard, Ui_BibleImportWizard):
|
||||
# Import a bible from the web.
|
||||
self.importProgressBar.setMaximum(1)
|
||||
download_location = self.field(u'web_location').toInt()[0]
|
||||
bible_version = unicode(self.bibleComboBox.currentText())
|
||||
bible_version = unicode(self.webTranslationComboBox.currentText())
|
||||
if download_location == WebDownload.Crosswalk:
|
||||
bible = \
|
||||
self.web_bible_list[WebDownload.Crosswalk][bible_version]
|
||||
|
@ -43,36 +43,26 @@ class Ui_BibleImportWizard(object):
|
||||
QtGui.QPixmap(u':/wizards/wizard_importbible.bmp'))
|
||||
self.welcomePage.setObjectName(u'WelcomePage')
|
||||
self.welcomeLayout = QtGui.QVBoxLayout(self.welcomePage)
|
||||
self.welcomeLayout.setMargin(12)
|
||||
self.welcomeLayout.setSpacing(6)
|
||||
self.welcomeLayout.setObjectName(u'WelcomeLayout')
|
||||
self.titleLabel = QtGui.QLabel(self.welcomePage)
|
||||
self.titleLabel.setObjectName(u'TitleLabel')
|
||||
self.welcomeLayout.addWidget(self.titleLabel)
|
||||
self.welcomeTopSpacer = QtGui.QSpacerItem(20, 40,
|
||||
QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
|
||||
self.welcomeLayout.addItem(self.welcomeTopSpacer)
|
||||
self.welcomeLayout.addSpacing(40)
|
||||
self.informationLabel = QtGui.QLabel(self.welcomePage)
|
||||
self.informationLabel.setWordWrap(True)
|
||||
self.informationLabel.setObjectName(u'InformationLabel')
|
||||
self.welcomeLayout.addWidget(self.informationLabel)
|
||||
self.welcomeBottomSpacer = QtGui.QSpacerItem(20, 40,
|
||||
QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
|
||||
self.welcomeLayout.addItem(self.welcomeBottomSpacer)
|
||||
self.welcomeLayout.addStretch()
|
||||
bibleImportWizard.addPage(self.welcomePage)
|
||||
# Select page
|
||||
self.selectPage = QtGui.QWizardPage()
|
||||
self.selectPage.setObjectName(u'SelectPage')
|
||||
self.selectPageLayout = QtGui.QVBoxLayout(self.selectPage)
|
||||
self.selectPageLayout.setMargin(12)
|
||||
self.selectPageLayout.setObjectName(u'SelectPageLayout')
|
||||
self.selectFormLayout = QtGui.QFormLayout()
|
||||
self.selectFormLayout.setVerticalSpacing(6)
|
||||
self.selectFormLayout.setObjectName(u'SelectFormLayout')
|
||||
self.selectPageLayout.setObjectName(u'SelectFormLayout')
|
||||
self.formatLayout = QtGui.QFormLayout()
|
||||
self.formatLayout.setObjectName(u'FormatLayout')
|
||||
self.formatLabel = QtGui.QLabel(self.selectPage)
|
||||
self.formatLabel.setObjectName(u'FormatLabel')
|
||||
self.selectFormLayout.setWidget(0, QtGui.QFormLayout.LabelRole,
|
||||
self.formatLabel)
|
||||
self.formatComboBox = QtGui.QComboBox(self.selectPage)
|
||||
self.formatComboBox.addItem(u'')
|
||||
self.formatComboBox.addItem(u'')
|
||||
@ -80,122 +70,96 @@ class Ui_BibleImportWizard(object):
|
||||
self.formatComboBox.addItem(u'')
|
||||
self.formatComboBox.addItem(u'')
|
||||
self.formatComboBox.setObjectName(u'FormatComboBox')
|
||||
self.selectFormLayout.setWidget(0, QtGui.QFormLayout.FieldRole,
|
||||
self.formatComboBox)
|
||||
self.osisFileLabel = QtGui.QLabel(self.selectPage)
|
||||
self.formatLayout.addRow(self.formatLabel, self.formatComboBox)
|
||||
self.formatSpacer = QtGui.QSpacerItem(10, 0,
|
||||
QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Minimum)
|
||||
self.formatLayout.setItem(1, QtGui.QFormLayout.LabelRole,
|
||||
self.formatSpacer)
|
||||
self.selectPageLayout.addLayout(self.formatLayout)
|
||||
self.selectStack = QtGui.QStackedLayout()
|
||||
self.osisWidget = QtGui.QWidget(self.selectPage)
|
||||
self.osisWidget.setObjectName(u'OsisWidget')
|
||||
self.osisLayout = QtGui.QFormLayout(self.osisWidget)
|
||||
self.osisLayout.setMargin(0)
|
||||
self.osisLayout.setObjectName(u'OsisLayout')
|
||||
self.osisFileLabel = QtGui.QLabel(self.osisWidget)
|
||||
self.osisFileLabel.setObjectName(u'OsisFileLabel')
|
||||
self.selectFormLayout.setWidget(1, QtGui.QFormLayout.LabelRole,
|
||||
self.osisFileLabel)
|
||||
self.osisFileWidget = QtGui.QWidget(self.selectPage)
|
||||
self.osisFileWidget.setObjectName(u'OsisFileWidget')
|
||||
self.osisFileLayout = QtGui.QHBoxLayout(self.osisFileWidget)
|
||||
self.osisFileLayout.setMargin(0)
|
||||
self.osisFileLayout = QtGui.QHBoxLayout()
|
||||
self.osisFileLayout.setObjectName(u'OsisFileLayout')
|
||||
self.osisFileEdit = QtGui.QLineEdit(self.osisFileWidget)
|
||||
self.osisFileEdit = QtGui.QLineEdit(self.osisWidget)
|
||||
self.osisFileEdit.setObjectName(u'OsisFileEdit')
|
||||
self.osisFileLayout.addWidget(self.osisFileEdit)
|
||||
self.osisFileButton = QtGui.QToolButton(self.osisFileWidget)
|
||||
self.osisFileButton.setIcon(build_icon(u':/general/general_open.png'))
|
||||
self.osisFileButton.setObjectName(u'OsisFileButton')
|
||||
self.osisFileLayout.addWidget(self.osisFileButton)
|
||||
self.selectFormLayout.setWidget(1, QtGui.QFormLayout.FieldRole,
|
||||
self.osisFileWidget)
|
||||
self.csvBooksLabel = QtGui.QLabel(self.selectPage)
|
||||
self.csvBooksLabel.setVisible(False)
|
||||
self.osisBrowseButton = QtGui.QToolButton(self.osisWidget)
|
||||
self.osisBrowseButton.setIcon(build_icon(u':/general/general_open.png'))
|
||||
self.osisBrowseButton.setObjectName(u'OsisBrowseButton')
|
||||
self.osisFileLayout.addWidget(self.osisBrowseButton)
|
||||
self.osisLayout.addRow(self.osisFileLabel, self.osisFileLayout)
|
||||
self.osisSpacer = QtGui.QSpacerItem(10, 0, QtGui.QSizePolicy.Fixed,
|
||||
QtGui.QSizePolicy.Minimum)
|
||||
self.osisLayout.setItem(1, QtGui.QFormLayout.LabelRole, self.osisSpacer)
|
||||
self.selectStack.addWidget(self.osisWidget)
|
||||
self.csvWidget = QtGui.QWidget(self.selectPage)
|
||||
self.csvWidget.setObjectName(u'CsvWidget')
|
||||
self.csvLayout = QtGui.QFormLayout(self.csvWidget)
|
||||
self.csvLayout.setMargin(0)
|
||||
self.csvLayout.setObjectName(u'CsvLayout')
|
||||
self.csvBooksLabel = QtGui.QLabel(self.csvWidget)
|
||||
self.csvBooksLabel.setObjectName(u'CsvBooksLabel')
|
||||
self.selectFormLayout.setWidget(2, QtGui.QFormLayout.LabelRole,
|
||||
self.csvBooksLabel)
|
||||
self.csvBooksWidget = QtGui.QWidget(self.selectPage)
|
||||
self.csvBooksWidget.setVisible(False)
|
||||
self.csvBooksWidget.setObjectName(u'CsvBooksWidget')
|
||||
self.csvBooksLayout = QtGui.QHBoxLayout(self.csvBooksWidget)
|
||||
self.csvBooksLayout.setMargin(0)
|
||||
self.csvBooksLayout = QtGui.QHBoxLayout()
|
||||
self.csvBooksLayout.setObjectName(u'CsvBooksLayout')
|
||||
self.csvBooksEdit = QtGui.QLineEdit(self.csvBooksWidget)
|
||||
self.csvBooksEdit = QtGui.QLineEdit(self.csvWidget)
|
||||
self.csvBooksEdit.setObjectName(u'CsvBooksEdit')
|
||||
self.csvBooksLayout.addWidget(self.csvBooksEdit)
|
||||
self.csvBooksButton = QtGui.QToolButton(self.csvBooksWidget)
|
||||
self.csvBooksButton = QtGui.QToolButton(self.csvWidget)
|
||||
self.csvBooksButton.setIcon(build_icon(u':/general/general_open.png'))
|
||||
self.csvBooksButton.setObjectName(u'CsvBooksButton')
|
||||
self.csvBooksLayout.addWidget(self.csvBooksButton)
|
||||
self.selectFormLayout.setWidget(2, QtGui.QFormLayout.FieldRole,
|
||||
self.csvBooksWidget)
|
||||
self.csvVersesLabel = QtGui.QLabel(self.selectPage)
|
||||
self.csvVersesLabel.setVisible(False)
|
||||
self.csvLayout.addRow(self.csvBooksLabel, self.csvBooksLayout)
|
||||
self.csvVersesLabel = QtGui.QLabel(self.csvWidget)
|
||||
self.csvVersesLabel.setObjectName(u'CsvVersesLabel')
|
||||
self.selectFormLayout.setWidget(3, QtGui.QFormLayout.LabelRole,
|
||||
self.csvVersesLabel)
|
||||
self.csvVersesWidget = QtGui.QWidget(self.selectPage)
|
||||
self.csvVersesWidget.setVisible(False)
|
||||
self.csvVersesWidget.setObjectName(u'CsvVersesWidget')
|
||||
self.csvVersesLayout = QtGui.QHBoxLayout(self.csvVersesWidget)
|
||||
self.csvVersesLayout.setMargin(0)
|
||||
self.csvVersesLayout = QtGui.QHBoxLayout()
|
||||
self.csvVersesLayout.setObjectName(u'CsvVersesLayout')
|
||||
self.csvVersesEdit = QtGui.QLineEdit(self.csvVersesWidget)
|
||||
self.csvVersesEdit = QtGui.QLineEdit(self.csvWidget)
|
||||
self.csvVersesEdit.setObjectName(u'CsvVersesEdit')
|
||||
self.csvVersesLayout.addWidget(self.csvVersesEdit)
|
||||
self.csvVersesButton = QtGui.QToolButton(self.csvVersesWidget)
|
||||
self.csvVersesButton = QtGui.QToolButton(self.csvWidget)
|
||||
self.csvVersesButton.setIcon(build_icon(u':/general/general_open.png'))
|
||||
self.csvVersesButton.setObjectName(u'CsvVersesButton')
|
||||
self.csvVersesLayout.addWidget(self.csvVersesButton)
|
||||
self.selectFormLayout.setWidget(3, QtGui.QFormLayout.FieldRole,
|
||||
self.csvVersesWidget)
|
||||
self.openSongFileLabel = QtGui.QLabel(self.selectPage)
|
||||
self.openSongFileLabel.setVisible(False)
|
||||
self.csvLayout.addRow(self.csvVersesLabel, self.csvVersesLayout)
|
||||
self.csvSpacer = QtGui.QSpacerItem(10, 0, QtGui.QSizePolicy.Fixed,
|
||||
QtGui.QSizePolicy.Minimum)
|
||||
self.csvLayout.setItem(2, QtGui.QFormLayout.LabelRole, self.csvSpacer)
|
||||
self.selectStack.addWidget(self.csvWidget)
|
||||
self.openSongWidget = QtGui.QWidget(self.selectPage)
|
||||
self.openSongWidget.setObjectName(u'OpenSongWidget')
|
||||
self.openSongLayout = QtGui.QFormLayout(self.openSongWidget)
|
||||
self.openSongLayout.setMargin(0)
|
||||
self.openSongLayout.setObjectName(u'OpenSongLayout')
|
||||
self.openSongFileLabel = QtGui.QLabel(self.openSongWidget)
|
||||
self.openSongFileLabel.setObjectName(u'OpenSongFileLabel')
|
||||
self.selectFormLayout.setWidget(4, QtGui.QFormLayout.LabelRole,
|
||||
self.openSongFileLabel)
|
||||
self.openSongFileWidget = QtGui.QWidget(self.selectPage)
|
||||
self.openSongFileWidget.setVisible(False)
|
||||
self.openSongFileWidget.setObjectName(u'OpenSongFileWidget')
|
||||
self.openSongFileLayout = QtGui.QHBoxLayout(self.openSongFileWidget)
|
||||
self.openSongFileLayout.setMargin(0)
|
||||
self.openSongFileLayout = QtGui.QHBoxLayout()
|
||||
self.openSongFileLayout.setObjectName(u'OpenSongFileLayout')
|
||||
self.openSongFileEdit = QtGui.QLineEdit(self.openSongFileWidget)
|
||||
self.openSongFileEdit = QtGui.QLineEdit(self.openSongWidget)
|
||||
self.openSongFileEdit.setObjectName(u'OpenSongFileEdit')
|
||||
self.openSongFileLayout.addWidget(self.openSongFileEdit)
|
||||
self.openSongFileButton = QtGui.QToolButton(self.openSongFileWidget)
|
||||
self.openSongFileButton.setIcon(
|
||||
self.openSongBrowseButton = QtGui.QToolButton(self.openSongWidget)
|
||||
self.openSongBrowseButton.setIcon(
|
||||
build_icon(u':/general/general_open.png'))
|
||||
self.openSongFileButton.setObjectName(u'OpenSongFileButton')
|
||||
self.openSongFileLayout.addWidget(self.openSongFileButton)
|
||||
self.selectFormLayout.setWidget(4, QtGui.QFormLayout.FieldRole,
|
||||
self.openSongFileWidget)
|
||||
self.openlp1FileLabel = QtGui.QLabel(self.selectPage)
|
||||
self.openlp1FileLabel.setVisible(False)
|
||||
self.openlp1FileLabel.setObjectName(u'Openlp1FileLabel')
|
||||
self.selectFormLayout.setWidget(5, QtGui.QFormLayout.LabelRole,
|
||||
self.openlp1FileLabel)
|
||||
self.openlp1FileWidget = QtGui.QWidget(self.selectPage)
|
||||
self.openlp1FileWidget.setVisible(False)
|
||||
self.openlp1FileWidget.setObjectName(u'Openlp1FileWidget')
|
||||
self.openlp1FileLayout = QtGui.QHBoxLayout(self.openlp1FileWidget)
|
||||
self.openlp1FileLayout.setMargin(0)
|
||||
self.openlp1FileLayout.setObjectName(u'Openlp1FileLayout')
|
||||
self.openlp1FileEdit = QtGui.QLineEdit(self.openlp1FileWidget)
|
||||
self.openlp1FileEdit.setObjectName(u'Openlp1FileEdit')
|
||||
self.openlp1FileLayout.addWidget(self.openlp1FileEdit)
|
||||
self.openlp1FileButton = QtGui.QToolButton(self.openlp1FileWidget)
|
||||
self.openlp1FileButton.setIcon(
|
||||
build_icon(u':/general/general_open.png'))
|
||||
self.openlp1FileButton.setObjectName(u'Openlp1FileButton')
|
||||
self.openlp1FileLayout.addWidget(self.openlp1FileButton)
|
||||
self.selectFormLayout.setWidget(5, QtGui.QFormLayout.FieldRole,
|
||||
self.openlp1FileWidget)
|
||||
self.selectPageLayout.addItem(self.selectFormLayout)
|
||||
self.openlp1DisabledLabel = QtGui.QLabel(self.selectPage)
|
||||
self.openlp1DisabledLabel.setVisible(False)
|
||||
self.openlp1DisabledLabel.setObjectName(u'Openlp1DisabledLabel')
|
||||
self.selectPageLayout.addWidget(self.openlp1DisabledLabel)
|
||||
self.openSongBrowseButton.setObjectName(u'OpenSongBrowseButton')
|
||||
self.openSongFileLayout.addWidget(self.openSongBrowseButton)
|
||||
self.openSongLayout.addRow(self.openSongFileLabel,
|
||||
self.openSongFileLayout)
|
||||
self.openSongSpacer = QtGui.QSpacerItem(10, 0, QtGui.QSizePolicy.Fixed,
|
||||
QtGui.QSizePolicy.Minimum)
|
||||
self.openSongLayout.setItem(1, QtGui.QFormLayout.LabelRole,
|
||||
self.openSongSpacer)
|
||||
self.selectStack.addWidget(self.openSongWidget)
|
||||
self.webTabWidget = QtGui.QTabWidget(self.selectPage)
|
||||
self.webTabWidget.setSizePolicy(QtGui.QSizePolicy.MinimumExpanding,
|
||||
QtGui.QSizePolicy.MinimumExpanding)
|
||||
self.webTabWidget.setVisible(False)
|
||||
self.webTabWidget.setObjectName(u'WebTabWidget')
|
||||
self.webBibleTab = QtGui.QWidget()
|
||||
self.webBibleTab.setObjectName(u'WebBibleTab')
|
||||
self.webBibleLayout = QtGui.QFormLayout(self.webBibleTab)
|
||||
self.webBibleLayout.setVerticalSpacing(6)
|
||||
self.webBibleLayout.setObjectName(u'WebBibleLayout')
|
||||
self.webSourceLabel = QtGui.QLabel(self.webBibleTab)
|
||||
self.webSourceLabel.setObjectName(u'WebSourceLabel')
|
||||
@ -213,17 +177,15 @@ class Ui_BibleImportWizard(object):
|
||||
self.webBibleLayout.setWidget(1, QtGui.QFormLayout.LabelRole,
|
||||
self.webTranslationLabel)
|
||||
self.webTranslationComboBox = QtGui.QComboBox(self.webBibleTab)
|
||||
self.webTranslationComboBox.setSizeAdjustPolicy(
|
||||
QtGui.QComboBox.AdjustToContents)
|
||||
self.webTranslationComboBox.setObjectName(u'WebTranslationComboBox')
|
||||
self.webTranslationComboBox.addItem(u'')
|
||||
self.webTranslationComboBox.addItem(u'')
|
||||
self.webTranslationComboBox.addItem(u'')
|
||||
self.webBibleLayout.setWidget(1, QtGui.QFormLayout.FieldRole,
|
||||
self.webTranslationComboBox)
|
||||
self.webTabWidget.addTab(self.webBibleTab, u'')
|
||||
self.webProxyTab = QtGui.QWidget()
|
||||
self.webProxyTab.setObjectName(u'WebProxyTab')
|
||||
self.webProxyLayout = QtGui.QFormLayout(self.webProxyTab)
|
||||
self.webProxyLayout.setVerticalSpacing(6)
|
||||
self.webProxyLayout.setObjectName(u'WebProxyLayout')
|
||||
self.webServerLabel = QtGui.QLabel(self.webProxyTab)
|
||||
self.webServerLabel.setObjectName(u'WebServerLabel')
|
||||
@ -250,14 +212,40 @@ class Ui_BibleImportWizard(object):
|
||||
self.webProxyLayout.setWidget(2, QtGui.QFormLayout.FieldRole,
|
||||
self.webPasswordEdit)
|
||||
self.webTabWidget.addTab(self.webProxyTab, u'')
|
||||
self.selectPageLayout.addWidget(self.webTabWidget)
|
||||
self.selectStack.addWidget(self.webTabWidget)
|
||||
self.openlp1Widget = QtGui.QWidget(self.selectPage)
|
||||
self.openlp1Widget.setObjectName(u'Openlp1Widget')
|
||||
self.openlp1Layout = QtGui.QFormLayout(self.openlp1Widget)
|
||||
self.openlp1Layout.setMargin(0)
|
||||
self.openlp1Layout.setObjectName(u'Openlp1Layout')
|
||||
self.openlp1FileLabel = QtGui.QLabel(self.openlp1Widget)
|
||||
self.openlp1FileLabel.setObjectName(u'Openlp1FileLabel')
|
||||
self.openlp1FileLayout = QtGui.QHBoxLayout()
|
||||
self.openlp1FileLayout.setObjectName(u'Openlp1FileLayout')
|
||||
self.openlp1FileEdit = QtGui.QLineEdit(self.openlp1Widget)
|
||||
self.openlp1FileEdit.setObjectName(u'Openlp1FileEdit')
|
||||
self.openlp1FileLayout.addWidget(self.openlp1FileEdit)
|
||||
self.openlp1BrowseButton = QtGui.QToolButton(self.openlp1Widget)
|
||||
self.openlp1BrowseButton.setIcon(
|
||||
build_icon(u':/general/general_open.png'))
|
||||
self.openlp1BrowseButton.setObjectName(u'Openlp1BrowseButton')
|
||||
self.openlp1FileLayout.addWidget(self.openlp1BrowseButton)
|
||||
self.openlp1Layout.addRow(self.openlp1FileLabel, self.openlp1FileLayout)
|
||||
self.openlp1DisabledLabel = QtGui.QLabel(self.openlp1Widget)
|
||||
self.openlp1DisabledLabel.setWordWrap(True)
|
||||
self.openlp1DisabledLabel.setObjectName(u'Openlp1DisabledLabel')
|
||||
self.openlp1Layout.addRow(self.openlp1DisabledLabel)
|
||||
self.openlp1Spacer = QtGui.QSpacerItem(10, 0, QtGui.QSizePolicy.Fixed,
|
||||
QtGui.QSizePolicy.Minimum)
|
||||
self.openlp1Layout.setItem(1, QtGui.QFormLayout.LabelRole,
|
||||
self.openlp1Spacer)
|
||||
self.selectStack.addWidget(self.openlp1Widget)
|
||||
self.selectPageLayout.addLayout(self.selectStack)
|
||||
bibleImportWizard.addPage(self.selectPage)
|
||||
# License page
|
||||
self.licenseDetailsPage = QtGui.QWizardPage()
|
||||
self.licenseDetailsPage.setObjectName(u'LicenseDetailsPage')
|
||||
self.licenseDetailsLayout = QtGui.QFormLayout(self.licenseDetailsPage)
|
||||
self.licenseDetailsLayout.setMargin(12)
|
||||
self.licenseDetailsLayout.setVerticalSpacing(6)
|
||||
self.licenseDetailsLayout.setObjectName(u'LicenseDetailsLayout')
|
||||
self.versionNameLabel = QtGui.QLabel(self.licenseDetailsPage)
|
||||
self.versionNameLabel.setObjectName(u'VersionNameLabel')
|
||||
@ -288,7 +276,6 @@ class Ui_BibleImportWizard(object):
|
||||
self.importPage = QtGui.QWizardPage()
|
||||
self.importPage.setObjectName(u'ImportPage')
|
||||
self.importLayout = QtGui.QVBoxLayout(self.importPage)
|
||||
self.importLayout.setSpacing(6)
|
||||
self.importLayout.setMargin(48)
|
||||
self.importLayout.setObjectName(u'ImportLayout')
|
||||
self.importProgressLabel = QtGui.QLabel(self.importPage)
|
||||
@ -299,7 +286,10 @@ class Ui_BibleImportWizard(object):
|
||||
self.importLayout.addWidget(self.importProgressBar)
|
||||
bibleImportWizard.addPage(self.importPage)
|
||||
self.retranslateUi(bibleImportWizard)
|
||||
self.webTabWidget.setCurrentIndex(0)
|
||||
QtCore.QMetaObject.connectSlotsByName(bibleImportWizard)
|
||||
QtCore.QObject.connect(self.formatComboBox,
|
||||
QtCore.SIGNAL(u'currentIndexChanged(int)'), self.selectStack,
|
||||
QtCore.SLOT(u'setCurrentIndex(int)'))
|
||||
|
||||
def retranslateUi(self, bibleImportWizard):
|
||||
bibleImportWizard.setWindowTitle(
|
||||
@ -387,3 +377,20 @@ class Ui_BibleImportWizard(object):
|
||||
'importer has been disabled due to a missing Python module. If '
|
||||
'you want to use this importer, you will need to install the '
|
||||
'"python-sqlite" module.'))
|
||||
# Align all QFormLayouts towards each other
|
||||
width = max(self.formatLabel.minimumSizeHint().width(),
|
||||
self.osisFileLabel.minimumSizeHint().width())
|
||||
width = max(width, self.csvBooksLabel.minimumSizeHint().width())
|
||||
width = max(width, self.csvVersesLabel.minimumSizeHint().width())
|
||||
width = max(width, self.openSongFileLabel.minimumSizeHint().width())
|
||||
width = max(width, self.openlp1FileLabel.minimumSizeHint().width())
|
||||
self.formatSpacer.changeSize(width, 0, QtGui.QSizePolicy.Fixed,
|
||||
QtGui.QSizePolicy.Fixed)
|
||||
self.osisSpacer.changeSize(width, 0, QtGui.QSizePolicy.Fixed,
|
||||
QtGui.QSizePolicy.Fixed)
|
||||
self.csvSpacer.changeSize(width, 0, QtGui.QSizePolicy.Fixed,
|
||||
QtGui.QSizePolicy.Fixed)
|
||||
self.openSongSpacer.changeSize(width, 0, QtGui.QSizePolicy.Fixed,
|
||||
QtGui.QSizePolicy.Fixed)
|
||||
self.openlp1Spacer.changeSize(width, 0, QtGui.QSizePolicy.Fixed,
|
||||
QtGui.QSizePolicy.Fixed)
|
||||
|
@ -72,7 +72,7 @@ class CSVBible(BibleDB):
|
||||
self.create_book(unicode(line[1], details['encoding']),
|
||||
line[2], int(line[0]))
|
||||
Receiver.send_message(u'openlp_process_events')
|
||||
except IOError:
|
||||
except IOError, IndexError:
|
||||
log.exception(u'Loading books from file failed')
|
||||
success = False
|
||||
finally:
|
||||
|
@ -88,7 +88,7 @@ class OpenSongBible(BibleDB):
|
||||
translate('BiblesPlugin.Opensong', 'Importing'),
|
||||
db_book.name, chapter.attrib[u'n']))
|
||||
self.session.commit()
|
||||
except IOError:
|
||||
except IOError, AttributeError:
|
||||
log.exception(u'Loading bible from OpenSong file failed')
|
||||
success = False
|
||||
finally:
|
||||
|
Loading…
Reference in New Issue
Block a user