[PC-BSD Commits] r4270 - pbibuild/pbi-source/PBIsource

svn at pcbsd.org svn at pcbsd.org
Mon Jul 27 08:12:15 PDT 2009


Author: kris
Date: 2009-07-27 08:12:13 -0700 (Mon, 27 Jul 2009)
New Revision: 4270

Modified:
   pbibuild/pbi-source/PBIsource/pbi.cpp
   pbibuild/pbi-source/PBIsource/pbi.h
   pbibuild/pbi-source/PBIsource/pbi.ui
Log:

Finished up PBI installer for 8.0. Now the graphics line-up properly, spacing works. Ready to go!

Ken Kasina is going to be doing re-design for PBI installer down the road, will import that when
its ready. 



Modified: pbibuild/pbi-source/PBIsource/pbi.cpp
===================================================================
--- pbibuild/pbi-source/PBIsource/pbi.cpp	2009-07-24 15:11:48 UTC (rev 4269)
+++ pbibuild/pbi-source/PBIsource/pbi.cpp	2009-07-27 15:12:13 UTC (rev 4270)
@@ -37,22 +37,9 @@
     ExtractStarted = 0;
     
     // Set the fixed size
-    setFixedSize(510,315);
-    setMaximumWidth(510);
+    setFixedSize(500,315);
+    setMaximumWidth(500);
     setContentsMargins(0,0,0,0);
-    /*
-    gridLayout->setMargin(0);
-    gridLayout->setContentsMargins(0,0,0,0);
-    gridLayout->setSpacing(0);
-    gridLayout_2->setMargin(0);
-    gridLayout_2->setSpacing(0);
-    gridLayout_3->setMargin(0);
-    gridLayout_5->setMargin(0);
-    gridLayout_5->setSpacing(0);
-    gridLayout_6->setMargin(0);
-    gridLayout_6->setSpacing(0);
-    gridLayout->update();
-    */
 
 
     ProgramDir = ProgDir;
@@ -151,25 +138,32 @@
     {
        return;
     }
-    
-    //setHelpEnabled(currentPage(), FALSE);
-    //helpButton()->setHidden(TRUE);
 
-    QString PageName;
-    PageName = page(pageId)->subTitle();
+    // Make sure we set our wizard style
+    setWizardStyle(QWizard::ModernStyle);
 
-    if (PageName == tr("Welcome Screen") )
+    if ( pageId == 0 )
     {
 	button(QWizard::NextButton)->setEnabled(TRUE);
+        QPixmap pixmap1;
+	pixmap1.load("leftside.png");
+        setPixmap(QWizard::WatermarkPixmap, pixmap1);
+        QPixmap pixmap2;
+        setPixmap(QWizard::BannerPixmap, pixmap2);
+    } else {
+        QPixmap pixmap1;
+        setPixmap(QWizard::WatermarkPixmap, pixmap1);
+        page(pageId)->setSubTitle(" ");
+        setPixmap(QWizard::BannerPixmap, topbanner);
     }
     
-    if (PageName == tr("License Agreement") )
+    if ( pageId == 1 )
     {
 	 button(QWizard::NextButton)->setEnabled(FALSE);
          AgreeButtonSlot();
     }
 
-    if ( PageName == tr("Install Directory") )
+    if ( pageId == 2 )
     {
 	button(QWizard::BackButton)->setEnabled(TRUE);
 	button(QWizard::NextButton)->setEnabled(FALSE);
@@ -198,7 +192,7 @@
 	
     }
     
-    if ( PageName == tr("Install Software") )
+    if ( pageId == 3 )
     {
 	button(QWizard::BackButton)->setEnabled(FALSE);
 	button(QWizard::NextButton)->setEnabled(FALSE);
@@ -215,7 +209,7 @@
     }
 
     
-    if ( PageName == tr("Install Finished") )
+    if ( pageId == 4 )
     {
 	button(QWizard::BackButton)->setEnabled(FALSE);
 	button(QWizard::BackButton)->setHidden(TRUE);
@@ -1715,17 +1709,12 @@
      if (QFile::exists( "leftside.png" ) ) {
 	 QPixmap pixmap1;
 	 pixmap1.load("leftside.png");
-	 leftBarPixmap->setPixmap(pixmap1);
+         setPixmap(QWizard::WatermarkPixmap, pixmap1);
      }
     
          // Check if a custom leftside.png exists and load it
      if ( QFile::exists( "header.png" ) ) {
-	 QPixmap pixmap2;
-	 pixmap2.load("header.png");
-	 headerPixmap->setPixmap(pixmap2);
-	 headerPixmap3->setPixmap(pixmap2);
-	 headerPixmap4->setPixmap(pixmap2);
-	 headerPixmap5->setPixmap(pixmap2);
+	topbanner.load("header.png");
      }
      
       // Check if a custom icon.png exists and load it

Modified: pbibuild/pbi-source/PBIsource/pbi.h
===================================================================
--- pbibuild/pbi-source/PBIsource/pbi.h	2009-07-24 15:11:48 UTC (rev 4269)
+++ pbibuild/pbi-source/PBIsource/pbi.h	2009-07-27 15:12:13 UTC (rev 4270)
@@ -106,10 +106,8 @@
     QString ProgUpdateURL;
     int StepsTarFile;
     int GTKFound;
-    QLayout *mylayout;
     int ExeOwndir[100];
     QString ExeKdeCat[100];
-    QPixmap *hrline;
     int SafeCancel;
     int ExtractStarted;
     QString ExeTaskbar[100];
@@ -123,6 +121,7 @@
     QStringList IconScript;
     QStringList IconUnScript;
     bool Compat32PBI;
+    QPixmap topbanner;
 
 
 signals:

Modified: pbibuild/pbi-source/PBIsource/pbi.ui
===================================================================
--- pbibuild/pbi-source/PBIsource/pbi.ui	2009-07-24 15:11:48 UTC (rev 4269)
+++ pbibuild/pbi-source/PBIsource/pbi.ui	2009-07-27 15:12:13 UTC (rev 4270)
@@ -26,16 +26,16 @@
   <property name="wizardStyle">
    <enum>QWizard::ModernStyle</enum>
   </property>
-  <property name="options">
-   <set>QWizard::IgnoreSubTitles</set>
-  </property>
   <widget class="QWizardPage" name="wizardPage1">
    <property name="title">
     <string/>
    </property>
    <property name="subTitle">
-    <string>Welcome Screen</string>
+    <string/>
    </property>
+   <attribute name="pageId">
+    <string notr="true">0</string>
+   </attribute>
    <layout class="QGridLayout" name="gridLayout">
     <property name="margin">
      <number>0</number>
@@ -44,31 +44,6 @@
      <number>0</number>
     </property>
     <item row="0" column="0">
-     <widget class="QLabel" name="leftBarPixmap">
-      <property name="sizePolicy">
-       <sizepolicy hsizetype="Fixed" vsizetype="Maximum">
-        <horstretch>0</horstretch>
-        <verstretch>0</verstretch>
-       </sizepolicy>
-      </property>
-      <property name="maximumSize">
-       <size>
-        <width>150</width>
-        <height>300</height>
-       </size>
-      </property>
-      <property name="text">
-       <string/>
-      </property>
-      <property name="textFormat">
-       <enum>Qt::LogText</enum>
-      </property>
-      <property name="pixmap">
-       <pixmap resource="PBI.qrc">:/leftside.png</pixmap>
-      </property>
-     </widget>
-    </item>
-    <item row="0" column="1">
      <spacer name="spacer26">
       <property name="orientation">
        <enum>Qt::Horizontal</enum>
@@ -84,7 +59,7 @@
       </property>
      </spacer>
     </item>
-    <item row="0" column="2">
+    <item row="0" column="1">
      <layout class="QVBoxLayout" name="verticalLayout_3">
       <item>
        <layout class="QVBoxLayout" name="verticalLayout_2">
@@ -349,8 +324,11 @@
   </widget>
   <widget class="QWizardPage" name="wizardPage">
    <property name="subTitle">
-    <string>License Agreement</string>
+    <string/>
    </property>
+   <attribute name="pageId">
+    <string notr="true">1</string>
+   </attribute>
    <layout class="QGridLayout" name="gridLayout_2">
     <property name="margin">
      <number>0</number>
@@ -359,25 +337,6 @@
      <number>0</number>
     </property>
     <item row="0" column="0">
-     <widget class="QLabel" name="headerPixmap">
-      <property name="maximumSize">
-       <size>
-        <width>490</width>
-        <height>50</height>
-       </size>
-      </property>
-      <property name="pixmap">
-       <pixmap resource="PBI.qrc">:/header.png</pixmap>
-      </property>
-      <property name="scaledContents">
-       <bool>true</bool>
-      </property>
-      <property name="wordWrap">
-       <bool>false</bool>
-      </property>
-     </widget>
-    </item>
-    <item row="1" column="0">
      <spacer name="spacer31_3">
       <property name="orientation">
        <enum>Qt::Vertical</enum>
@@ -393,7 +352,7 @@
       </property>
      </spacer>
     </item>
-    <item row="2" column="0">
+    <item row="1" column="0">
      <layout class="QHBoxLayout" name="horizontalLayout_4">
       <property name="sizeConstraint">
        <enum>QLayout::SetMaximumSize</enum>
@@ -445,7 +404,7 @@
       </item>
      </layout>
     </item>
-    <item row="3" column="0">
+    <item row="2" column="0">
      <layout class="QHBoxLayout" name="horizontalLayout_5">
       <item>
        <spacer name="spacer28">
@@ -498,8 +457,11 @@
   </widget>
   <widget class="QWizardPage" name="wizardPage_2">
    <property name="subTitle">
-    <string>Install Directory</string>
+    <string/>
    </property>
+   <attribute name="pageId">
+    <string notr="true">2</string>
+   </attribute>
    <layout class="QGridLayout" name="gridLayout_3">
     <property name="margin">
      <number>0</number>
@@ -508,25 +470,6 @@
      <number>0</number>
     </property>
     <item row="0" column="0">
-     <widget class="QLabel" name="headerPixmap5">
-      <property name="maximumSize">
-       <size>
-        <width>490</width>
-        <height>50</height>
-       </size>
-      </property>
-      <property name="pixmap">
-       <pixmap resource="PBI.qrc">:/header.png</pixmap>
-      </property>
-      <property name="scaledContents">
-       <bool>true</bool>
-      </property>
-      <property name="wordWrap">
-       <bool>false</bool>
-      </property>
-     </widget>
-    </item>
-    <item row="1" column="0">
      <layout class="QGridLayout" name="_3">
       <item row="1" column="1">
        <widget class="QLabel" name="textLabel1">
@@ -591,7 +534,7 @@
       </item>
      </layout>
     </item>
-    <item row="2" column="0">
+    <item row="1" column="0">
      <layout class="QGridLayout" name="_2">
       <item row="0" column="1">
        <widget class="QLabel" name="textDesktopLinks_2">
@@ -714,7 +657,7 @@
       </item>
      </layout>
     </item>
-    <item row="3" column="0">
+    <item row="2" column="0">
      <spacer name="spacer46">
       <property name="orientation">
        <enum>Qt::Vertical</enum>
@@ -730,7 +673,7 @@
       </property>
      </spacer>
     </item>
-    <item row="4" column="0">
+    <item row="3" column="0">
      <layout class="QVBoxLayout" name="_4">
       <item>
        <widget class="QLabel" name="textDirectoryMessage">
@@ -757,7 +700,7 @@
       </item>
      </layout>
     </item>
-    <item row="5" column="0">
+    <item row="4" column="0">
      <layout class="QGridLayout" name="_5">
       <item row="1" column="2">
        <widget class="QLabel" name="textRemainSpace">
@@ -843,8 +786,11 @@
   </widget>
   <widget class="QWizardPage" name="wizardPage_4">
    <property name="subTitle">
-    <string>Install Software</string>
+    <string/>
    </property>
+   <attribute name="pageId">
+    <string notr="true">3</string>
+   </attribute>
    <layout class="QGridLayout" name="gridLayout_5">
     <property name="margin">
      <number>0</number>
@@ -855,31 +801,6 @@
     <item row="0" column="0" colspan="3">
      <layout class="QVBoxLayout" name="verticalLayout_4">
       <item>
-       <widget class="QLabel" name="headerPixmap3">
-        <property name="sizePolicy">
-         <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
-          <horstretch>0</horstretch>
-          <verstretch>0</verstretch>
-         </sizepolicy>
-        </property>
-        <property name="maximumSize">
-         <size>
-          <width>490</width>
-          <height>50</height>
-         </size>
-        </property>
-        <property name="pixmap">
-         <pixmap resource="PBI.qrc">:/header.png</pixmap>
-        </property>
-        <property name="scaledContents">
-         <bool>true</bool>
-        </property>
-        <property name="wordWrap">
-         <bool>false</bool>
-        </property>
-       </widget>
-      </item>
-      <item>
        <spacer name="spacer23_2">
         <property name="orientation">
          <enum>Qt::Vertical</enum>
@@ -1032,8 +953,11 @@
   </widget>
   <widget class="QWizardPage" name="wizardPage2">
    <property name="subTitle">
-    <string>Install Finished</string>
+    <string/>
    </property>
+   <attribute name="pageId">
+    <string notr="true">4</string>
+   </attribute>
    <layout class="QGridLayout" name="gridLayout_6">
     <property name="margin">
      <number>0</number>
@@ -1044,31 +968,6 @@
     <item row="0" column="0">
      <layout class="QVBoxLayout" name="verticalLayout_6">
       <item>
-       <widget class="QLabel" name="headerPixmap4">
-        <property name="sizePolicy">
-         <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
-          <horstretch>0</horstretch>
-          <verstretch>0</verstretch>
-         </sizepolicy>
-        </property>
-        <property name="maximumSize">
-         <size>
-          <width>490</width>
-          <height>50</height>
-         </size>
-        </property>
-        <property name="pixmap">
-         <pixmap resource="PBI.qrc">:/header.png</pixmap>
-        </property>
-        <property name="scaledContents">
-         <bool>true</bool>
-        </property>
-        <property name="wordWrap">
-         <bool>false</bool>
-        </property>
-       </widget>
-      </item>
-      <item>
        <spacer name="spacer29_2">
         <property name="orientation">
          <enum>Qt::Vertical</enum>



More information about the Commits mailing list