Updates to screen handling

This commit is contained in:
Tim Bentley 2010-10-24 20:23:12 +01:00
parent 39f7b3b4d8
commit 1da9d5629d

View File

@ -148,16 +148,29 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeDialog):
self.setDefaults() self.setDefaults()
return QtGui.QWizard.exec_(self) return QtGui.QWizard.exec_(self)
def initializePage(self, id):
print id
if id == 0:
self.setBackgroundTabValues()
elif id == 1:
self.setMainAreaTabValues()
elif id == 2:
self.setFooterAreaTabValues()
elif id == 3:
self.setAlignmentTabValues()
elif id == 4:
self.setPositionTabValues()
elif id == 5:
frame = self.thememanager.generateImage(self.theme)
self.previewBoxLabel.setPixmap(QtGui.QPixmap.fromImage(frame))
def validateCurrentPage(self): def validateCurrentPage(self):
""" """
Handle Tab specific code when moving between Tabs. Handle Tab specific code when moving between Tabs.
""" """
print "CURRENT id", self.currentId() print "CURRENT id", self.currentId()
# Preview Screen # Preview Screen
if self.currentId() == 5: self.updateTheme()
self.updateTheme()
frame = self.thememanager.generateImage(self.theme)
self.previewBoxLabel.setPixmap(QtGui.QPixmap.fromImage(frame))
return True return True
def setBackgroundTabValues(self): def setBackgroundTabValues(self):
@ -273,7 +286,6 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeDialog):
""" """
Handle the display and State of the Position tab. Handle the display and State of the Position tab.
""" """
print "setPosTabValues"
if self.theme.font_main_override: if self.theme.font_main_override:
self.setField(u'mainDefaultPosition', QtCore.QVariant(False)) self.setField(u'mainDefaultPosition', QtCore.QVariant(False))
else: else:
@ -505,7 +517,6 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeDialog):
# preview page # preview page
self.theme.theme_name = \ self.theme.theme_name = \
unicode(self.field(u'name').toString()) unicode(self.field(u'name').toString())
print self.theme
def _colorButton(self, field): def _colorButton(self, field):
""" """