[PC-BSD Commits] r7813 - pcbsd/current/src-qt4/pc-sysinstaller

svn at pcbsd.org svn at pcbsd.org
Thu Oct 14 06:41:15 PDT 2010


Author: kris
Date: 2010-10-14 06:41:14 -0700 (Thu, 14 Oct 2010)
New Revision: 7813

Added:
   pcbsd/current/src-qt4/pc-sysinstaller/dialogHelp.cpp
   pcbsd/current/src-qt4/pc-sysinstaller/dialogHelp.h
   pcbsd/current/src-qt4/pc-sysinstaller/dialogHelp.ui
   pcbsd/current/src-qt4/pc-sysinstaller/helpText.h
Modified:
   pcbsd/current/src-qt4/pc-sysinstaller/pc-sysinstaller.pro
   pcbsd/current/src-qt4/pc-sysinstaller/sysinstaller.cpp
   pcbsd/current/src-qt4/pc-sysinstaller/sysinstaller.h
   pcbsd/current/src-qt4/pc-sysinstaller/sysinstaller.ui
Log:

Added help structure to pc-sysinstaller, now we can add detailed help text to each installer
page, and this will be put into Pootle for translation



Modified: pcbsd/current/src-qt4/pc-sysinstaller/pc-sysinstaller.pro
===================================================================
--- pcbsd/current/src-qt4/pc-sysinstaller/pc-sysinstaller.pro	2010-10-14 09:05:22 UTC (rev 7812)
+++ pcbsd/current/src-qt4/pc-sysinstaller/pc-sysinstaller.pro	2010-10-14 13:41:14 UTC (rev 7813)
@@ -15,14 +15,17 @@
     sys-pkgmgmt.cpp \
     sys-userwidget.cpp \
     dialogFileSystem.cpp \
+    dialogHelp.cpp \
     dialogSelectNet.cpp \
     dialogZFSMount.cpp \
     sysinstaller.cpp \
     backend.cpp
 HEADERS += sysinstaller.h \
     dialogFileSystem.h \
+    dialogHelp.h \
     dialogSelectNet.h \
     dialogZFSMount.h \
+    helpText.h \
     backend.h
 TRANSLATIONS =  i18n/SysInstaller_af.ts \
 		i18n/SysInstaller_ar.ts \
@@ -93,5 +96,5 @@
 
 INSTALLS += dotrans
 
-FORMS += sysinstaller.ui dialogFileSystem.ui dialogSelectNet.ui dialogZFSMount.ui
+FORMS += sysinstaller.ui dialogFileSystem.ui dialogHelp.ui dialogSelectNet.ui dialogZFSMount.ui
 RESOURCES += sysinstaller.qrc

Modified: pcbsd/current/src-qt4/pc-sysinstaller/sysinstaller.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-sysinstaller/sysinstaller.cpp	2010-10-14 09:05:22 UTC (rev 7812)
+++ pcbsd/current/src-qt4/pc-sysinstaller/sysinstaller.cpp	2010-10-14 13:41:14 UTC (rev 7813)
@@ -1,12 +1,14 @@
 #include "sysinstaller.h"
+#include "helpText.h"
 
 SysInstaller::SysInstaller(QWidget *parent) : QWidget(parent)
 {
     setupUi(this);
 
+    connect(abortButton, SIGNAL(clicked()), this, SLOT(slotAbort()));
+    connect(backButton, SIGNAL(clicked()), this, SLOT(slotBack()));
+    connect(helpButton, SIGNAL(clicked()), this, SLOT(slotHelp()));
     connect(nextButton, SIGNAL(clicked()), this, SLOT(slotNext()));
-    connect(backButton, SIGNAL(clicked()), this, SLOT(slotBack()));
-    connect(abortButton, SIGNAL(clicked()), this, SLOT(slotAbort()));
 
     initSteps();
 }
@@ -783,3 +785,42 @@
   textEditSummary->moveCursor(QTextCursor::Start);
 
 }
+
+void SysInstaller::slotHelp()
+{
+	pcHelp = new dialogHelp();
+	switch (stackWidget->currentIndex()) {
+	case 0:
+		pcHelp->dialogInit(HELPTEXT0);
+		break;
+	case 1:
+		pcHelp->dialogInit(HELPTEXT1);
+		break;
+	case 2:
+		pcHelp->dialogInit(HELPTEXT2);
+		break;
+	case 3:
+		pcHelp->dialogInit(HELPTEXT3);
+		break;
+	case 4:
+		pcHelp->dialogInit(HELPTEXT4);
+		break;
+	case 5:
+		pcHelp->dialogInit(HELPTEXT5);
+		break;
+	case 6:
+		pcHelp->dialogInit(HELPTEXT6);
+		break;
+	case 7:
+		pcHelp->dialogInit(HELPTEXT7);
+		break;
+	case 8:
+		pcHelp->dialogInit(HELPTEXT8);
+		break;
+	case 9:
+		pcHelp->dialogInit(HELPTEXT9);
+		break;
+	}
+	pcHelp->show();
+
+}

Modified: pcbsd/current/src-qt4/pc-sysinstaller/sysinstaller.h
===================================================================
--- pcbsd/current/src-qt4/pc-sysinstaller/sysinstaller.h	2010-10-14 09:05:22 UTC (rev 7812)
+++ pcbsd/current/src-qt4/pc-sysinstaller/sysinstaller.h	2010-10-14 13:41:14 UTC (rev 7813)
@@ -8,6 +8,7 @@
 
 #include "ui_sysinstaller.h"
 #include "dialogFileSystem.h"
+#include "dialogHelp.h"
 #include "dialogSelectNet.h"
 
 #include "backend.h"
@@ -60,9 +61,10 @@
     void changeLang(QString code);
 
 private slots:
+    void slotAbort();
+    void slotBack();
+    void slotHelp();
     void slotNext();
-    void slotBack();
-    void slotAbort();
     void slotFinished();
 
     void slotChangeLanguage();
@@ -197,6 +199,9 @@
     bool hasInstallOnMedia;
     QList<QStringList> listDeskPkgs; // QStringList for our available desktop pkgs
 
+    // Help Stuff
+    dialogHelp *pcHelp;
+
 };
 
 #endif // SYSINSTALLER_H

Modified: pcbsd/current/src-qt4/pc-sysinstaller/sysinstaller.ui
===================================================================
--- pcbsd/current/src-qt4/pc-sysinstaller/sysinstaller.ui	2010-10-14 09:05:22 UTC (rev 7812)
+++ pcbsd/current/src-qt4/pc-sysinstaller/sysinstaller.ui	2010-10-14 13:41:14 UTC (rev 7813)
@@ -993,7 +993,7 @@
                 </palette>
                </property>
                <property name="currentIndex">
-                <number>0</number>
+                <number>9</number>
                </property>
                <widget class="QWidget" name="aiStep0">
                 <property name="palette">
@@ -1796,7 +1796,7 @@
                    </item>
                   </layout>
                  </item>
-                 <item row="4" column="0" colspan="3">
+                 <item row="5" column="0" colspan="3">
                   <layout class="QHBoxLayout" name="horizontalLayout_14">
                    <item>
                     <spacer name="horizontalSpacer_46">
@@ -1880,9 +1880,22 @@
                    </item>
                   </layout>
                  </item>
-                 <item row="5" column="0" colspan="3">
+                 <item row="6" column="0" colspan="3">
                   <layout class="QVBoxLayout" name="verticalLayout_8">
                    <item>
+                    <spacer name="verticalSpacer_31">
+                     <property name="orientation">
+                      <enum>Qt::Vertical</enum>
+                     </property>
+                     <property name="sizeHint" stdset="0">
+                      <size>
+                       <width>20</width>
+                       <height>40</height>
+                      </size>
+                     </property>
+                    </spacer>
+                   </item>
+                   <item>
                     <widget class="QLabel" name="label_2">
                      <property name="font">
                       <font>
@@ -2088,14 +2101,25 @@
 &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:'Bitstream Vera 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;Welcome to PC-BSD! PC-BSD has been designed with the &amp;quot;casual&amp;quot; computer user in mind. Installing the system is simply a matter of a few clicks and a few minutes for the installation process to finish. &lt;/p&gt;
-&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&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;To get started, please select the language you wish to use, along with your local timezone. &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+&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;Welcome to PC-BSD! You may get started above, or click the Help button for more information on each screen. &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
                      </property>
                     </widget>
                    </item>
                   </layout>
                  </item>
+                 <item row="4" column="0">
+                  <spacer name="verticalSpacer_26">
+                   <property name="orientation">
+                    <enum>Qt::Vertical</enum>
+                   </property>
+                   <property name="sizeHint" stdset="0">
+                    <size>
+                     <width>20</width>
+                     <height>40</height>
+                    </size>
+                   </property>
+                  </spacer>
+                 </item>
                 </layout>
                </widget>
                <widget class="QWidget" name="aiStep1">
@@ -10050,6 +10074,16 @@
        <number>10</number>
       </property>
       <item>
+       <widget class="QPushButton" name="helpButton">
+        <property name="text">
+         <string>&amp;Help</string>
+        </property>
+        <property name="flat">
+         <bool>true</bool>
+        </property>
+       </widget>
+      </item>
+      <item>
        <spacer name="horizontalSpacer">
         <property name="orientation">
          <enum>Qt::Horizontal</enum>



More information about the Commits mailing list