[PC-BSD Commits] r5069 - pcbsd/trunk/SysInstaller

svn at pcbsd.org svn at pcbsd.org
Wed Nov 18 11:56:15 PST 2009


Author: kris
Date: 2009-11-18 11:56:14 -0800 (Wed, 18 Nov 2009)
New Revision: 5069

Modified:
   pcbsd/trunk/SysInstaller/sysinstaller.cpp
   pcbsd/trunk/SysInstaller/sysinstaller.h
   pcbsd/trunk/SysInstaller/sysinstaller.ui
Log:

Updated sysinstaller, added bunch of new UI stuff, got most of the install / upgrade / restore page finished
with all the respective options



Modified: pcbsd/trunk/SysInstaller/sysinstaller.cpp
===================================================================
--- pcbsd/trunk/SysInstaller/sysinstaller.cpp	2009-11-18 10:04:03 UTC (rev 5068)
+++ pcbsd/trunk/SysInstaller/sysinstaller.cpp	2009-11-18 19:56:14 UTC (rev 5069)
@@ -95,11 +95,19 @@
     listKbLayouts->clear();
     listKbLayouts->addItems(Scripts::Backend::keyLayouts());
 
+    // Connect buttons / slots
     connect(listKbLayouts, SIGNAL(currentRowChanged(int)), this, SLOT(slotCurrentKbLayoutChanged(int)));
     connect(listKbVariants,SIGNAL(currentRowChanged(int)), this, SLOT(slotCurrentKbVariantChanged(int)));
     connect(listKbLayouts, SIGNAL(itemSelectionChanged()), this, SLOT(slotSelectedKbItemChanged()));
     connect(listKbVariants,SIGNAL(itemSelectionChanged()), this, SLOT(slotSelectedKbItemChanged()));
     connect(checkKbDefault,SIGNAL(stateChanged(int)), this, SLOT(slotDefaultKbChecked(int)));
+    connect(radioInstall,SIGNAL(toggled(bool)), this, SLOT(slotChangedInstallType()));
+    connect(radioUpgrade,SIGNAL(toggled(bool)), this, SLOT(slotChangedInstallType()));
+    connect(radioRestore,SIGNAL(toggled(bool)), this, SLOT(slotChangedInstallType()));
+    connect(radioInstallPCBSD,SIGNAL(toggled(bool)), this, SLOT(slotChangedOS()));
+    connect(radioInstallFreeBSD,SIGNAL(toggled(bool)), this, SLOT(slotChangedOS()));
+    connect(radioDVDUSBInstall,SIGNAL(toggled(bool)), this, SLOT(slotChangedInstallSource()));
+    connect(radioNetworkInstall,SIGNAL(toggled(bool)), this, SLOT(slotChangedInstallSource()));
 
     setKbDefaults();
 
@@ -224,9 +232,27 @@
     listKbLayouts->setCurrentRow(0);
 }
 
-void SysInstaller::slotChangeOS()
+void SysInstaller::slotChangedOS()
 {
 
 }
 
+void SysInstaller::slotChangedInstallType()
+{
+   // Check the type of install we have selected, and show the right widgets for it
+   if ( radioInstall->isChecked())
+   { 
+     stackedWidgetInstallBox->setCurrentIndex(0);
+   } else if (radioUpgrade->isChecked() ) {
+     stackedWidgetInstallBox->setCurrentIndex(1);
+   } else if (radioRestore->isChecked()) {
+     stackedWidgetInstallBox->setCurrentIndex(2);
+   }
 
+}
+
+void SysInstaller::slotChangedInstallSource()
+{
+
+}
+

Modified: pcbsd/trunk/SysInstaller/sysinstaller.h
===================================================================
--- pcbsd/trunk/SysInstaller/sysinstaller.h	2009-11-18 10:04:03 UTC (rev 5068)
+++ pcbsd/trunk/SysInstaller/sysinstaller.h	2009-11-18 19:56:14 UTC (rev 5069)
@@ -66,7 +66,9 @@
     void slotCurrentKbVariantChanged(int);
     void slotSelectedKbItemChanged();
     void slotDefaultKbChecked(int);
-    void slotChangeOS();
+    void slotChangedInstallType();
+    void slotChangedOS();
+    void slotChangedInstallSource();
 
 private:
     void initSteps();

Modified: pcbsd/trunk/SysInstaller/sysinstaller.ui
===================================================================
--- pcbsd/trunk/SysInstaller/sysinstaller.ui	2009-11-18 10:04:03 UTC (rev 5068)
+++ pcbsd/trunk/SysInstaller/sysinstaller.ui	2009-11-18 19:56:14 UTC (rev 5069)
@@ -300,7 +300,7 @@
              <item>
               <widget class="QStackedWidget" name="anteInstallStack">
                <property name="currentIndex">
-                <number>3</number>
+                <number>2</number>
                </property>
                <widget class="QWidget" name="aiStep0">
                 <layout class="QVBoxLayout" name="verticalLayout_6">
@@ -665,20 +665,8 @@
                 </layout>
                </widget>
                <widget class="QWidget" name="aiStep2">
-                <layout class="QVBoxLayout" name="verticalLayout_18">
-                 <property name="leftMargin">
-                  <number>40</number>
-                 </property>
-                 <property name="topMargin">
-                  <number>40</number>
-                 </property>
-                 <property name="rightMargin">
-                  <number>40</number>
-                 </property>
-                 <property name="bottomMargin">
-                  <number>9</number>
-                 </property>
-                 <item>
+                <layout class="QGridLayout" name="gridLayout_9">
+                 <item row="0" column="0" colspan="3">
                   <widget class="QWidget" name="widget_3" native="true">
                    <property name="minimumSize">
                     <size>
@@ -687,8 +675,7 @@
                     </size>
                    </property>
                    <property name="styleSheet">
-                    <string>background-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(217, 230, 235, 230), stop:1 rgba(255, 255, 255, 255));
-background-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0.7, stop:0 rgba(217, 230, 235, 230), stop:1 rgba(255, 255, 255, 255));</string>
+                    <string notr="true"/>
                    </property>
                    <layout class="QHBoxLayout" name="horizontalLayout_10">
                     <property name="spacing">
@@ -720,7 +707,7 @@
                      </spacer>
                     </item>
                     <item>
-                     <widget class="QRadioButton" name="radioButton">
+                     <widget class="QRadioButton" name="radioInstall">
                       <property name="sizePolicy">
                        <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
                         <horstretch>0</horstretch>
@@ -743,8 +730,8 @@
                       </property>
                       <property name="iconSize">
                        <size>
-                        <width>30</width>
-                        <height>30</height>
+                        <width>25</width>
+                        <height>25</height>
                        </size>
                       </property>
                       <property name="checked">
@@ -753,7 +740,7 @@
                      </widget>
                     </item>
                     <item>
-                     <widget class="QRadioButton" name="radioButton_2">
+                     <widget class="QRadioButton" name="radioUpgrade">
                       <property name="sizePolicy">
                        <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
                         <horstretch>0</horstretch>
@@ -776,8 +763,8 @@
                       </property>
                       <property name="iconSize">
                        <size>
-                        <width>30</width>
-                        <height>30</height>
+                        <width>25</width>
+                        <height>25</height>
                        </size>
                       </property>
                      </widget>
@@ -785,7 +772,7 @@
                     <item>
                      <layout class="QVBoxLayout" name="verticalLayout_13">
                       <item>
-                       <widget class="QRadioButton" name="radioButton_3">
+                       <widget class="QRadioButton" name="radioRestore">
                         <property name="sizePolicy">
                          <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
                           <horstretch>0</horstretch>
@@ -808,8 +795,8 @@
                         </property>
                         <property name="iconSize">
                          <size>
-                          <width>30</width>
-                          <height>30</height>
+                          <width>25</width>
+                          <height>25</height>
                          </size>
                         </property>
                        </widget>
@@ -832,79 +819,439 @@
                    </layout>
                   </widget>
                  </item>
-                 <item>
-                  <spacer name="verticalSpacer_3">
+                 <item row="1" column="0" rowspan="3">
+                  <spacer name="horizontalSpacer_9">
                    <property name="orientation">
+                    <enum>Qt::Horizontal</enum>
+                   </property>
+                   <property name="sizeHint" stdset="0">
+                    <size>
+                     <width>183</width>
+                     <height>245</height>
+                    </size>
+                   </property>
+                  </spacer>
+                 </item>
+                 <item row="1" column="1">
+                  <spacer name="verticalSpacer_5">
+                   <property name="orientation">
                     <enum>Qt::Vertical</enum>
                    </property>
+                   <property name="sizeType">
+                    <enum>QSizePolicy::Minimum</enum>
+                   </property>
                    <property name="sizeHint" stdset="0">
                     <size>
-                     <width>20</width>
-                     <height>40</height>
+                     <width>378</width>
+                     <height>13</height>
                     </size>
                    </property>
                   </spacer>
                  </item>
-                 <item>
-                  <layout class="QVBoxLayout" name="verticalLayout_12"/>
+                 <item row="1" column="2" rowspan="3">
+                  <spacer name="horizontalSpacer_10">
+                   <property name="orientation">
+                    <enum>Qt::Horizontal</enum>
+                   </property>
+                   <property name="sizeHint" stdset="0">
+                    <size>
+                     <width>182</width>
+                     <height>245</height>
+                    </size>
+                   </property>
+                  </spacer>
                  </item>
-                 <item>
-                  <layout class="QHBoxLayout" name="horizontalLayout_11">
-                   <item>
-                    <spacer name="horizontalSpacer_11">
-                     <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="QWidget" name="widget_6" native="true">
-                     <property name="minimumSize">
-                      <size>
-                       <width>100</width>
-                       <height>0</height>
-                      </size>
-                     </property>
-                     <property name="styleSheet">
-                      <string>background-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(217, 230, 235, 230), stop:1 rgba(255, 255, 255, 255));
-background-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0.7, stop:0 rgba(217, 230, 235, 230), stop:1 rgba(255, 255, 255, 255));</string>
-                     </property>
-                    </widget>
-                   </item>
-                   <item>
-                    <spacer name="horizontalSpacer_10">
-                     <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 row="2" column="1">
+                  <widget class="QStackedWidget" name="stackedWidgetInstallBox">
+                   <property name="sizePolicy">
+                    <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+                     <horstretch>0</horstretch>
+                     <verstretch>0</verstretch>
+                    </sizepolicy>
+                   </property>
+                   <property name="minimumSize">
+                    <size>
+                     <width>100</width>
+                     <height>0</height>
+                    </size>
+                   </property>
+                   <property name="styleSheet">
+                    <string notr="true"/>
+                   </property>
+                   <property name="currentIndex">
+                    <number>0</number>
+                   </property>
+                   <widget class="QWidget" name="stackedWidgetInstallBoxPage1">
+                    <layout class="QGridLayout" name="gridLayout_3">
+                     <item row="0" column="1" colspan="2">
+                      <widget class="QLabel" name="label_3">
+                       <property name="text">
+                        <string>Select the system you wish to install</string>
+                       </property>
+                       <property name="alignment">
+                        <set>Qt::AlignCenter</set>
+                       </property>
+                      </widget>
+                     </item>
+                     <item row="3" column="0" colspan="4">
+                      <widget class="QLabel" name="label_9">
+                       <property name="text">
+                        <string>Tip: PC-BSD is designed for the desktop, while FreeBSD makes a great choice for servers</string>
+                       </property>
+                       <property name="wordWrap">
+                        <bool>true</bool>
+                       </property>
+                      </widget>
+                     </item>
+                     <item row="1" column="1">
+                      <widget class="QRadioButton" name="radioInstallPCBSD">
+                       <property name="text">
+                        <string>PC-BSD</string>
+                       </property>
+                       <property name="icon">
+                        <iconset resource="sysinstaller.qrc">
+                         <normaloff>:/PCBSD/images/pbidiricon.png</normaloff>:/PCBSD/images/pbidiricon.png</iconset>
+                       </property>
+                       <property name="iconSize">
+                        <size>
+                         <width>30</width>
+                         <height>30</height>
+                        </size>
+                       </property>
+                       <property name="checked">
+                        <bool>true</bool>
+                       </property>
+                      </widget>
+                     </item>
+                     <item row="1" column="2">
+                      <widget class="QRadioButton" name="radioInstallFreeBSD">
+                       <property name="text">
+                        <string>FreeBSD</string>
+                       </property>
+                       <property name="icon">
+                        <iconset resource="sysinstaller.qrc">
+                         <normaloff>:/modules/images/freebsd.png</normaloff>:/modules/images/freebsd.png</iconset>
+                       </property>
+                       <property name="iconSize">
+                        <size>
+                         <width>30</width>
+                         <height>30</height>
+                        </size>
+                       </property>
+                      </widget>
+                     </item>
+                     <item row="1" column="3">
+                      <spacer name="horizontalSpacer_20">
+                       <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 row="1" column="0">
+                      <spacer name="horizontalSpacer_21">
+                       <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 row="4" column="0" colspan="4">
+                      <spacer name="verticalSpacer_7">
+                       <property name="orientation">
+                        <enum>Qt::Vertical</enum>
+                       </property>
+                       <property name="sizeType">
+                        <enum>QSizePolicy::Preferred</enum>
+                       </property>
+                       <property name="sizeHint" stdset="0">
+                        <size>
+                         <width>20</width>
+                         <height>40</height>
+                        </size>
+                       </property>
+                      </spacer>
+                     </item>
+                    </layout>
+                   </widget>
+                   <widget class="QWidget" name="page_5">
+                    <layout class="QGridLayout" name="gridLayout">
+                     <item row="0" column="0">
+                      <widget class="QLabel" name="labelUpgradePartitions">
+                       <property name="text">
+                        <string>Upgradable Partitions</string>
+                       </property>
+                      </widget>
+                     </item>
+                     <item row="1" column="0">
+                      <widget class="QListWidget" name="listUpgrades">
+                       <property name="sizePolicy">
+                        <sizepolicy hsizetype="Expanding" vsizetype="Minimum">
+                         <horstretch>0</horstretch>
+                         <verstretch>0</verstretch>
+                        </sizepolicy>
+                       </property>
+                      </widget>
+                     </item>
+                    </layout>
+                   </widget>
+                   <widget class="QWidget" name="page_6">
+                    <layout class="QGridLayout" name="gridLayout_7">
+                     <item row="0" column="0" colspan="3">
+                      <widget class="QLabel" name="label_13">
+                       <property name="text">
+                        <string>Life Preserver Restore</string>
+                       </property>
+                       <property name="alignment">
+                        <set>Qt::AlignCenter</set>
+                       </property>
+                       <property name="wordWrap">
+                        <bool>false</bool>
+                       </property>
+                      </widget>
+                     </item>
+                     <item row="1" column="0">
+                      <widget class="QLabel" name="label_14">
+                       <property name="text">
+                        <string>Hostname</string>
+                       </property>
+                      </widget>
+                     </item>
+                     <item row="1" column="1" colspan="2">
+                      <widget class="QLineEdit" name="lineRsyncHost"/>
+                     </item>
+                     <item row="2" column="0">
+                      <widget class="QLabel" name="label_15">
+                       <property name="text">
+                        <string>Username</string>
+                       </property>
+                      </widget>
+                     </item>
+                     <item row="2" column="1" rowspan="2" colspan="2">
+                      <widget class="QLineEdit" name="lineRsyncUser"/>
+                     </item>
+                     <item row="4" column="0">
+                      <widget class="QLabel" name="label_16">
+                       <property name="text">
+                        <string>Port</string>
+                       </property>
+                      </widget>
+                     </item>
+                     <item row="4" column="1">
+                      <spacer name="horizontalSpacer_23">
+                       <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 row="3" column="2" rowspan="2">
+                      <widget class="QSpinBox" name="spinRsyncPort">
+                       <property name="maximum">
+                        <number>99999</number>
+                       </property>
+                       <property name="value">
+                        <number>22</number>
+                       </property>
+                      </widget>
+                     </item>
+                     <item row="5" column="0" colspan="3">
+                      <spacer name="verticalSpacer_3">
+                       <property name="orientation">
+                        <enum>Qt::Vertical</enum>
+                       </property>
+                       <property name="sizeHint" stdset="0">
+                        <size>
+                         <width>328</width>
+                         <height>46</height>
+                        </size>
+                       </property>
+                      </spacer>
+                     </item>
+                    </layout>
+                   </widget>
+                  </widget>
                  </item>
-                 <item>
-                  <spacer name="verticalSpacer_5">
+                 <item row="3" column="1" rowspan="2">
+                  <widget class="QStackedWidget" name="stackedWidgetSourceBox">
+                   <property name="sizePolicy">
+                    <sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
+                     <horstretch>0</horstretch>
+                     <verstretch>0</verstretch>
+                    </sizepolicy>
+                   </property>
+                   <property name="currentIndex">
+                    <number>0</number>
+                   </property>
+                   <widget class="QWidget" name="page_3">
+                    <layout class="QGridLayout" name="gridLayout_5">
+                     <item row="0" column="0" colspan="2">
+                      <widget class="QLabel" name="label_12">
+                       <property name="text">
+                        <string>Installation Source</string>
+                       </property>
+                       <property name="alignment">
+                        <set>Qt::AlignCenter</set>
+                       </property>
+                      </widget>
+                     </item>
+                     <item row="1" column="0">
+                      <widget class="QRadioButton" name="radioDVDUSBInstall">
+                       <property name="text">
+                        <string>DVD / USB</string>
+                       </property>
+                       <property name="icon">
+                        <iconset resource="sysinstaller.qrc">
+                         <normaloff>:/modules/images/cdrom_mount.png</normaloff>:/modules/images/cdrom_mount.png</iconset>
+                       </property>
+                       <property name="checked">
+                        <bool>true</bool>
+                       </property>
+                      </widget>
+                     </item>
+                     <item row="1" column="1">
+                      <widget class="QRadioButton" name="radioNetworkInstall">
+                       <property name="text">
+                        <string>Network / Internet</string>
+                       </property>
+                       <property name="icon">
+                        <iconset resource="sysinstaller.qrc">
+                         <normaloff>:/modules/images/install.png</normaloff>:/modules/images/install.png</iconset>
+                       </property>
+                      </widget>
+                     </item>
+                     <item row="2" column="0" colspan="2">
+                      <widget class="QWidget" name="widgetNetOptions" native="true">
+                       <layout class="QGridLayout" name="gridLayout_8">
+                        <item row="1" column="1">
+                         <widget class="QGroupBox" name="groupBox_2">
+                          <property name="title">
+                           <string/>
+                          </property>
+                          <layout class="QGridLayout" name="gridLayout_4">
+                           <item row="0" column="0">
+                            <widget class="QLabel" name="label_18">
+                             <property name="text">
+                              <string>Network Inferface</string>
+                             </property>
+                            </widget>
+                           </item>
+                           <item row="0" column="2">
+                            <spacer name="horizontalSpacer_22">
+                             <property name="orientation">
+                              <enum>Qt::Horizontal</enum>
+                             </property>
+                             <property name="sizeType">
+                              <enum>QSizePolicy::MinimumExpanding</enum>
+                             </property>
+                             <property name="sizeHint" stdset="0">
+                              <size>
+                               <width>101</width>
+                               <height>23</height>
+                              </size>
+                             </property>
+                            </spacer>
+                           </item>
+                           <item row="1" column="0">
+                            <widget class="QLabel" name="label_19">
+                             <property name="text">
+                              <string>IP Address</string>
+                             </property>
+                            </widget>
+                           </item>
+                           <item row="1" column="1" colspan="3">
+                            <widget class="QLineEdit" name="lineIP"/>
+                           </item>
+                           <item row="2" column="0">
+                            <widget class="QLabel" name="label_20">
+                             <property name="text">
+                              <string>Netmask</string>
+                             </property>
+                            </widget>
+                           </item>
+                           <item row="2" column="1" colspan="3">
+                            <widget class="QLineEdit" name="lineNetmask"/>
+                           </item>
+                           <item row="3" column="0">
+                            <widget class="QLabel" name="label_21">
+                             <property name="text">
+                              <string>Nameserver (DNS)</string>
+                             </property>
+                            </widget>
+                           </item>
+                           <item row="3" column="1" colspan="3">
+                            <widget class="QLineEdit" name="lineDNS"/>
+                           </item>
+                           <item row="4" column="0">
+                            <widget class="QLabel" name="label_22">
+                             <property name="text">
+                              <string>Gateway</string>
+                             </property>
+                            </widget>
+                           </item>
+                           <item row="4" column="1" colspan="3">
+                            <widget class="QLineEdit" name="lineDefaultRouter"/>
+                           </item>
+                           <item row="0" column="3">
+                            <widget class="QComboBox" name="comboSelectNic">
+                             <item>
+                              <property name="text">
+                               <string>AUTO-DHCP</string>
+                              </property>
+                             </item>
+                            </widget>
+                           </item>
+                          </layout>
+                         </widget>
+                        </item>
+                       </layout>
+                      </widget>
+                     </item>
+                    </layout>
+                   </widget>
+                  </widget>
+                 </item>
+                 <item row="4" column="0">
+                  <spacer name="horizontalSpacer_11">
                    <property name="orientation">
-                    <enum>Qt::Vertical</enum>
+                    <enum>Qt::Horizontal</enum>
                    </property>
                    <property name="sizeHint" stdset="0">
                     <size>
-                     <width>20</width>
-                     <height>80</height>
+                     <width>183</width>
+                     <height>164</height>
                     </size>
                    </property>
                   </spacer>
                  </item>
+                 <item row="4" column="2">
+                  <spacer name="horizontalSpacer_19">
+                   <property name="orientation">
+                    <enum>Qt::Horizontal</enum>
+                   </property>
+                   <property name="sizeHint" stdset="0">
+                    <size>
+                     <width>182</width>
+                     <height>164</height>
+                    </size>
+                   </property>
+                  </spacer>
+                 </item>
                 </layout>
                </widget>
                <widget class="QWidget" name="aiStep3">
@@ -1117,8 +1464,8 @@
                            <rect>
                             <x>0</x>
                             <y>0</y>
-                            <width>672</width>
-                            <height>114</height>
+                            <width>152</width>
+                            <height>30</height>
                            </rect>
                           </property>
                           <layout class="QGridLayout" name="gridLayout_2">



More information about the Commits mailing list