projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
hx8347 lcd driver: missing BV() in PMC enable setting (ouch!)
[bertos.git]
/
wizard
/
BWizard.py
diff --git
a/wizard/BWizard.py
b/wizard/BWizard.py
index 11a2dd263b8fc70d584e7f781fe4c4d88865e1bc..b2bec3fff29c2e15cb92b154987a3bb395fed8f2 100644
(file)
--- a/
wizard/BWizard.py
+++ b/
wizard/BWizard.py
@@
-28,7
+28,6
@@
#
# Copyright 2008 Develer S.r.l. (http://www.develer.com/)
#
#
# Copyright 2008 Develer S.r.l. (http://www.develer.com/)
#
-# $Id$
#
# Author: Lorenzo Berni <duplo@develer.com>
#
#
# Author: Lorenzo Berni <duplo@develer.com>
#
@@
-38,15
+37,6
@@
import copy
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from PyQt4.QtCore import *
from PyQt4.QtGui import *
-import BFolderPage
-import BVersionPage
-import BCpuPage
-import BToolchainPage
-import BModulePage
-import BOutputPage
-import BCreationPage
-import BFinalPage
-
try:
from version import wizard_version
except ImportError:
try:
from version import wizard_version
except ImportError:
@@
-58,7
+48,13
@@
class BWizard(QWizard):
"""
def __init__(self, page_list):
"""
def __init__(self, page_list):
+ self._current = None
QWizard.__init__(self)
QWizard.__init__(self)
+ # Hardcoded default position (to avoid (0,0) origin)
+ geometry = QApplication.instance().settings.value("geometry", QVariant(QRect(QPoint(200, 200), QSize(800, 600))))
+ if geometry:
+ geometry = geometry.toRect()
+ self.setGeometry(geometry)
self.setWindowTitle(self.tr("Create a BeRTOS project - rev.%1").arg(wizard_version))
self.setWindowIcon(QIcon(":/images/appicon.png"))
self.setOption(QWizard.DisabledBackButtonOnLastPage, True)
self.setWindowTitle(self.tr("Create a BeRTOS project - rev.%1").arg(wizard_version))
self.setWindowIcon(QIcon(":/images/appicon.png"))
self.setOption(QWizard.DisabledBackButtonOnLastPage, True)
@@
-69,12
+65,13
@@
class BWizard(QWizard):
"""
Adds the pages in the wizard.
"""
"""
Adds the pages in the wizard.
"""
- self._page_list = page_list
- for i, page in enumerate(self._page_list):
+ self._page_dict = {}
+ for i, page in enumerate(page_list):
+ self._page_dict[page] = i
self.setPage(i, page())
def pageIndex(self, page_class):
self.setPage(i, page())
def pageIndex(self, page_class):
- return self._page_
list.index(page_class)
+ return self._page_
dict[page_class]
def connectSignals(self):
"""
def connectSignals(self):
"""
@@
-89,10
+86,16
@@
class BWizard(QWizard):
"""
page = self.page(pageId)
if page:
"""
page = self.page(pageId)
if page:
- page.reloadData()
+ page.reloadData(previous_id= self._current)
+ self._current = pageId
def project(self):
"""
Returns the BProject associated with the wizard.
"""
return copy.deepcopy(QApplication.instance().project)
def project(self):
"""
Returns the BProject associated with the wizard.
"""
return copy.deepcopy(QApplication.instance().project)
+
+ def done(self, result):
+ geometry = self.geometry()
+ QApplication.instance().settings.setValue("geometry", QVariant(geometry))
+ QWizard.done(self, result)