From: duplo Date: Wed, 31 Mar 2010 10:08:55 +0000 (+0000) Subject: Add stub for board selection page. X-Git-Tag: 2.5.0~568 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=cc03eb93224f06debc7f426acd9374076e8be834;p=bertos.git Add stub for board selection page. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3340 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/wizard/BBoardPage.py b/wizard/BBoardPage.py new file mode 100644 index 00000000..6b8dddff --- /dev/null +++ b/wizard/BBoardPage.py @@ -0,0 +1,48 @@ +#!/usr/bin/env python +# encoding: utf-8 +# +# This file is part of slimqc. +# +# Bertos is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# As a special exception, you may use this file as part of a free software +# library without restriction. Specifically, if other files instantiate +# templates or use macros or inline functions from this file, or you compile +# this file and link it with other files to produce an executable, this +# file does not by itself cause the resulting executable to be covered by +# the GNU General Public License. This exception does not however +# invalidate any other reasons why the executable file might be covered by +# the GNU General Public License. +# +# Copyright 2010 Develer S.r.l. (http://www.develer.com/) +# +# $Id$ +# +# Author: Lorenzo Berni +# + +from BWizardPage import BWizardPage + +from const import * + +class BBoardPage(BWizardPage): + """ + Initial page of the alternative route. Permit to select one of the + predefined projects for supported board. + """ + + def __init__(self): + BWizardPage.__init__(self, UI_LOCATION + "/board_select.ui") + self.setTitle(self.tr("Select the board from the predefined ones")) diff --git a/wizard/BFolderPage.py b/wizard/BFolderPage.py index 7e5dcca1..7caf4382 100644 --- a/wizard/BFolderPage.py +++ b/wizard/BFolderPage.py @@ -40,6 +40,7 @@ from BWizardPage import * import bertos_utils from BVersionPage import BVersionPage +from BBoardPage import BBoardPage from const import * @@ -136,13 +137,10 @@ class BFolderPage(BWizardPage): """ 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 + return BBoardPage def initializeAttributes(self): """ diff --git a/wizard/bertos.py b/wizard/bertos.py index b5659ab3..2d4b523d 100755 --- a/wizard/bertos.py +++ b/wizard/bertos.py @@ -49,6 +49,7 @@ import BWizard from BIntroPage import BIntroPage from BFolderPage import BFolderPage +from BBoardPage import BBoardPage from BOpenPage import BOpenPage from BVersionPage import BVersionPage from BCpuPage import BCpuPage @@ -66,7 +67,7 @@ import const from LoadException import VersionException, ToolchainException def newProject(): - page_list = [BIntroPage, BFolderPage, BVersionPage, BCpuPage, BToolchainPage, BModulePage, BOutputPage, BCreationPage, BFinalPage] + page_list = [BIntroPage, BFolderPage, BBoardPage, BVersionPage, BCpuPage, BToolchainPage, BModulePage, BOutputPage, BCreationPage, BFinalPage] wizard = BWizard.BWizard(page_list) wizard.show() wizard.exec_() diff --git a/wizard/ui/board_select.ui b/wizard/ui/board_select.ui new file mode 100644 index 00000000..d14e5ffe --- /dev/null +++ b/wizard/ui/board_select.ui @@ -0,0 +1,58 @@ + + + Form + + + + 0 + 0 + 607 + 378 + + + + Form + + + + + + + 0 + 0 + + + + + + + + + + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus enim nisl, interdum ut venenatis in, suscipit in dolor. Integer a nisi sed libero ultrices commodo. Duis vitae nibh id arcu ullamcorper auctor non et metus. Cras ut justo ac dolor porttitor feugiat eget vitae velit. Fusce et rhoncus metus. Quisque vel mauris et augue elementum volutpat. Phasellus dolor dui, ultricies sit amet dictum ut, commodo et lacus. Proin eu ullamcorper purus. Aliquam in risus in lorem tempor condimentum ac quis erat. Mauris semper dui a urna facilisis vitae porttitor urna dictum. Nunc metus leo, iaculis non dignissim at, mollis at. + + + true + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + +