X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=wizard%2FBWizardPage.py;h=f6aeac67eeba83f9f7d1a3cdfa69a03b0d4fa058;hb=15810459b8f5fb09b12cef6f8e4d4e64d167087b;hp=980cb45cf788784321f848660d25086230d56753;hpb=df3bd7f742da8c015304fa21e01eb966ff76a089;p=bertos.git diff --git a/wizard/BWizardPage.py b/wizard/BWizardPage.py index 980cb45c..f6aeac67 100644 --- a/wizard/BWizardPage.py +++ b/wizard/BWizardPage.py @@ -28,17 +28,20 @@ # # Copyright 2008 Develer S.r.l. (http://www.develer.com/) # -# $Id$ # # Author: Lorenzo Berni # +import os + from PyQt4.QtCore import * from PyQt4.QtGui import * from PyQt4 import uic import qvariant_converter +import const + class BWizardPage(QWizardPage): """ Base class for all the wizard pages. It has the utility method used in all @@ -47,7 +50,7 @@ class BWizardPage(QWizardPage): def __init__(self, wizardGui, parent = None): QWizardPage.__init__(self, parent) - self.pageContent = uic.loadUi(wizardGui, None) + self.pageContent = uic.loadUi(os.path.join(const.DATA_DIR, wizardGui), None) layout = QVBoxLayout() layout.addWidget(self.pageContent) self.setLayout(layout) @@ -81,6 +84,7 @@ class BWizardPage(QWizardPage): """ return QApplication.instance().project.info(key) + @property def project(self): """ Returns the BProject instance. @@ -103,6 +107,18 @@ class BWizardPage(QWizardPage): Value is a QVariant and neet to be converted in a standard type. """ return QApplication.instance().settings.value(QString(key), QVariant()) + + def plugins(self): + """ + Returns the list of actived plugins. + """ + return qvariant_converter.getStringList(self.settingsRetrieve("plugins")) + + def setPlugins(self, plugins): + """ + Stores the given list of actived plugins. + """ + self.settingsStore("plugins", qvariant_converter.convertStringList(plugins)) def versions(self): """ @@ -168,7 +184,7 @@ class BWizardPage(QWizardPage): ## Methodo to be implemented in child classes when needed ## - def reloadData(self): + def reloadData(self, previous_id=None): """ Method called before the page is loaded. The pages that need to use this method have to implement it. @@ -191,4 +207,4 @@ class BWizardPage(QWizardPage): """ pass - #### \ No newline at end of file + ####