Add stub of new interface with radio for custom/predefined boards.
authorduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Wed, 31 Mar 2010 09:43:44 +0000 (09:43 +0000)
committerduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Wed, 31 Mar 2010 09:43:44 +0000 (09:43 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3339 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/BFolderPage.py
wizard/ui/dir_select.ui

index 3b34f14af6e5bcbf4619d18e6866b8a24c53b4ef..7e5dcca1115bac9ba30540f8b3102f84290b3e4c 100644 (file)
@@ -39,6 +39,8 @@ from PyQt4.QtGui import *
 from BWizardPage import *
 import bertos_utils
 
+from BVersionPage import BVersionPage
+
 from const import *
 
 class BFolderPage(BWizardPage):
@@ -65,6 +67,13 @@ class BFolderPage(BWizardPage):
             return True
         else:
             return False
+
+    def nextId(self):
+        """
+        Overload of the QWizardPage nextId method.
+        """
+        return self.wizard().pageIndex(self.next_page)
+        
     
     ####
 
@@ -121,6 +130,19 @@ class BFolderPage(BWizardPage):
             self.pageContent.directoryEdit.setText(QDir.toNativeSeparators(directory))
 
     ####
+
+    @property
+    def next_page(self):
+        """
+        Contains the next page class.
+        """
+        # Actually it does nothing.
+        if self.pageContent.customButton.isChecked():
+            return BVersionPage
+        else:
+            # TODO: change it with the predefined board selection page.
+            # return BBoardPage
+            return BVersionPage
     
     def initializeAttributes(self):
         """
index 39d389f0a369d74bdd1f97f9055fe41501e5dcc6..a0f2d5bd07282a4152cabb22211329a9a7e045bb 100644 (file)
@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>381</width>
-    <height>146</height>
+    <width>401</width>
+    <height>250</height>
    </rect>
   </property>
   <property name="sizePolicy">
@@ -19,7 +19,7 @@
   <property name="windowTitle">
    <string>Form</string>
   </property>
-  <layout class="QVBoxLayout" name="verticalLayout_3">
+  <layout class="QVBoxLayout" name="verticalLayout_4">
    <item>
     <layout class="QHBoxLayout" name="horizontalLayout_4">
      <item>
      </property>
     </widget>
    </item>
+   <item>
+    <widget class="QGroupBox" name="groupBox">
+     <property name="title">
+      <string>Board type</string>
+     </property>
+     <property name="checkable">
+      <bool>false</bool>
+     </property>
+     <layout class="QVBoxLayout" name="verticalLayout_3">
+      <item>
+       <widget class="QRadioButton" name="customButton">
+        <property name="text">
+         <string>Custom board</string>
+        </property>
+        <property name="checked">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QRadioButton" name="predefinedButton">
+        <property name="text">
+         <string>Predefined board</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
   </layout>
  </widget>
  <resources>