Add introduction page.
authorduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Fri, 23 Oct 2009 10:18:47 +0000 (10:18 +0000)
committerduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Fri, 23 Oct 2009 10:18:47 +0000 (10:18 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3093 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/BIntroPage.py [new file with mode: 0644]
wizard/bertos.py
wizard/bertos.qrc
wizard/images/logo.png [new file with mode: 0644]
wizard/ui/intro_page.ui [new file with mode: 0644]

diff --git a/wizard/BIntroPage.py b/wizard/BIntroPage.py
new file mode 100644 (file)
index 0000000..764d561
--- /dev/null
@@ -0,0 +1,62 @@
+#!/usr/bin/env python
+# encoding: utf-8
+#
+# This file is part of BeRTOS.
+#
+# 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 2008 Develer S.r.l. (http://www.develer.com/)
+#
+# $Id: BFolderPage.py 2669 2009-04-25 07:58:45Z duplo $
+#
+# Author: Lorenzo Berni <duplo@develer.com>
+#
+
+import os
+
+from PyQt4.QtGui import *
+from BWizardPage import *
+
+from const import *
+
+class BIntroPage(BWizardPage):
+    """
+    Initial page of the wizard. Permit to select the project name and the directory
+    where the project will be created.
+    """
+    
+    def __init__(self):
+        BWizardPage.__init__(self, UI_LOCATION + "/intro_page.ui")
+        self.setTitle(self.tr("Welcome in BeRTOS Wizard!"))
+    
+    ## Overloaded QWizardPage methods ##
+
+    def isComplete(self):
+        """
+        Overload of the QWizardPage isComplete method.
+        """
+        return True
+    
+    ####
+
index edb131d67663c3f27282f592222dbefe158febf5..05ecf7af3c927fab08717f255d356d0681fda27c 100755 (executable)
@@ -47,6 +47,7 @@ import BProject
 import BStartPage
 import BWizard
 
+from BIntroPage import BIntroPage
 from BFolderPage import BFolderPage
 from BOpenPage import BOpenPage
 from BVersionPage import BVersionPage
@@ -64,7 +65,7 @@ import bertos_utils
 from LoadException import VersionException, ToolchainException
 
 def newProject():
-    page_list = [BFolderPage, BVersionPage, BCpuPage, BToolchainPage, BModulePage, BOutputPage, BCreationPage, BFinalPage]
+    page_list = [BIntroPage, BFolderPage, BVersionPage, BCpuPage, BToolchainPage, BModulePage, BOutputPage, BCreationPage, BFinalPage]
     wizard = BWizard.BWizard(page_list)
     wizard.show()
     wizard.exec_()
index 3664fec6afd35c2acfe275778e8803823e143029..c1aba5c19062a0e99a41e429c046f72991b2ec4a 100644 (file)
@@ -9,5 +9,6 @@
        <file>images/error.png</file>
        <file>images/folderopen.png</file>
        <file>images/appicon.png</file>
+       <file>images/logo.png</file>
   </qresource>
 </RCC>
diff --git a/wizard/images/logo.png b/wizard/images/logo.png
new file mode 100644 (file)
index 0000000..b265646
Binary files /dev/null and b/wizard/images/logo.png differ
diff --git a/wizard/ui/intro_page.ui b/wizard/ui/intro_page.ui
new file mode 100644 (file)
index 0000000..2de10d2
--- /dev/null
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>Form</class>
+ <widget class="QWidget" name="Form">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>455</width>
+    <height>345</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Form</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout" stretch="0,1,0">
+   <item>
+    <layout class="QHBoxLayout" name="horizontalLayout">
+     <property name="sizeConstraint">
+      <enum>QLayout::SetFixedSize</enum>
+     </property>
+     <item>
+      <spacer name="horizontalSpacer">
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" stdset="0">
+        <size>
+         <width>40</width>
+         <height>20</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QLabel" name="imageLabel">
+       <property name="maximumSize">
+        <size>
+         <width>16777215</width>
+         <height>115</height>
+        </size>
+       </property>
+       <property name="text">
+        <string/>
+       </property>
+       <property name="pixmap">
+        <pixmap resource="../bertos.qrc">:/images/logo.png</pixmap>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <spacer name="horizontalSpacer_2">
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" stdset="0">
+        <size>
+         <width>40</width>
+         <height>20</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+    </layout>
+   </item>
+   <item>
+    <widget class="QLabel" name="introLabel">
+     <property name="text">
+      <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
+p, li { white-space: pre-wrap; }
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Quickly &lt;span style=&quot; font-weight:600;&quot;&gt;create and modify&lt;/span&gt; your projects with the graphical wizard, with a step-by-step procedure:&lt;/p&gt;
+&lt;ol&gt;
+&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Select&lt;/span&gt; which BeRTOS version you want to use in your project;&lt;/li&gt;
+&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Choose&lt;/span&gt; Toolchain or microcontroller you want to use;&lt;/li&gt;
+&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Insert&lt;/span&gt; the modules needed by your application directly from the graphical interface;&lt;/li&gt;
+&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Generate&lt;/span&gt; a project ready for CodeLite o GNU Make!&lt;/li&gt;
+&lt;/ol&gt;&lt;/body&gt;&lt;/html&gt;</string>
+     </property>
+     <property name="wordWrap">
+      <bool>true</bool>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <spacer name="verticalSpacer">
+     <property name="orientation">
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeHint" stdset="0">
+      <size>
+       <width>20</width>
+       <height>39</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+  </layout>
+ </widget>
+ <resources>
+  <include location="../bertos.qrc"/>
+ </resources>
+ <connections/>
+</ui>