[PC-BSD Commits] r17643 - in pcbsd/current/src-qt4/pc-installgui: . images

svn at pcbsd.org svn at pcbsd.org
Thu Jul 5 11:26:48 PDT 2012


Author: kris
Date: 2012-07-05 18:26:48 +0000 (Thu, 05 Jul 2012)
New Revision: 17643

Added:
   pcbsd/current/src-qt4/pc-installgui/dialogCheckHardware.cpp
   pcbsd/current/src-qt4/pc-installgui/dialogCheckHardware.h
   pcbsd/current/src-qt4/pc-installgui/dialogCheckHardware.ui
   pcbsd/current/src-qt4/pc-installgui/images/failed.png
   pcbsd/current/src-qt4/pc-installgui/images/network_wifi.png
   pcbsd/current/src-qt4/pc-installgui/images/networkwired.png
   pcbsd/current/src-qt4/pc-installgui/images/randr.png
Modified:
   pcbsd/current/src-qt4/pc-installgui/installer.cpp
   pcbsd/current/src-qt4/pc-installgui/installer.h
   pcbsd/current/src-qt4/pc-installgui/installer.ui
   pcbsd/current/src-qt4/pc-installgui/main.cpp
   pcbsd/current/src-qt4/pc-installgui/pc-installgui.pro
   pcbsd/current/src-qt4/pc-installgui/sysinstaller.qrc
Log:

Add new "Detected Hardware Dialog"

This shows up as a button in the bottom left of the installer, and when clicked
it launches a new dialog that detects and displays info on the system about:

Video Driver
Video Resolution
Ethernet
Wifi
Sound

Each detected device name is displayed, along with a simple OK or failed icon,
giving the user a very quick way to boot the install media, and confirm that
the above devices work, or dont work. 

Also, the -checkhardware flag can launch this dialog directly, allowing us to
put it in the control panel. 





Index: pcbsd/current/src-qt4/pc-installgui/dialogCheckHardware.ui
===================================================================
--- pcbsd/current/src-qt4/pc-installgui/dialogCheckHardware.ui	2012-07-05 18:05:03 UTC (rev 17642)
+++ pcbsd/current/src-qt4/pc-installgui/dialogCheckHardware.ui	2012-07-05 18:26:48 UTC (rev 17643)

Property changes on: pcbsd/current/src-qt4/pc-installgui/dialogCheckHardware.ui
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/xml
Index: pcbsd/current/src-qt4/pc-installgui/images/failed.png
===================================================================
--- pcbsd/current/src-qt4/pc-installgui/images/failed.png	2012-07-05 18:05:03 UTC (rev 17642)
+++ pcbsd/current/src-qt4/pc-installgui/images/failed.png	2012-07-05 18:26:48 UTC (rev 17643)

Property changes on: pcbsd/current/src-qt4/pc-installgui/images/failed.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+image/png
Index: pcbsd/current/src-qt4/pc-installgui/images/network_wifi.png
===================================================================
--- pcbsd/current/src-qt4/pc-installgui/images/network_wifi.png	2012-07-05 18:05:03 UTC (rev 17642)
+++ pcbsd/current/src-qt4/pc-installgui/images/network_wifi.png	2012-07-05 18:26:48 UTC (rev 17643)

Property changes on: pcbsd/current/src-qt4/pc-installgui/images/network_wifi.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+image/png
Index: pcbsd/current/src-qt4/pc-installgui/images/networkwired.png
===================================================================
--- pcbsd/current/src-qt4/pc-installgui/images/networkwired.png	2012-07-05 18:05:03 UTC (rev 17642)
+++ pcbsd/current/src-qt4/pc-installgui/images/networkwired.png	2012-07-05 18:26:48 UTC (rev 17643)

Property changes on: pcbsd/current/src-qt4/pc-installgui/images/networkwired.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+image/png
Index: pcbsd/current/src-qt4/pc-installgui/images/randr.png
===================================================================
--- pcbsd/current/src-qt4/pc-installgui/images/randr.png	2012-07-05 18:05:03 UTC (rev 17642)
+++ pcbsd/current/src-qt4/pc-installgui/images/randr.png	2012-07-05 18:26:48 UTC (rev 17643)

Property changes on: pcbsd/current/src-qt4/pc-installgui/images/randr.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+image/png
Modified: pcbsd/current/src-qt4/pc-installgui/installer.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-installgui/installer.cpp	2012-07-05 18:05:03 UTC (rev 17642)
+++ pcbsd/current/src-qt4/pc-installgui/installer.cpp	2012-07-05 18:26:48 UTC (rev 17643)
@@ -17,6 +17,7 @@
     connect(helpButton, SIGNAL(clicked()), this, SLOT(slotHelp()));
     connect(pushTouchKeyboard, SIGNAL(clicked()), this, SLOT(slotPushVirtKeyboard()));
     connect(pushChangeKeyLayout, SIGNAL(clicked()), this, SLOT(slotPushKeyLayout()));
+    connect(pushHardware, SIGNAL(clicked()), this, SLOT(slotCheckHardware()));
 
     // Init the MBR to yes
     loadMBR = true;
@@ -47,6 +48,15 @@
     return false;
 }
 
+void Installer::slotCheckHardware()
+{
+  pcHardware = new dialogCheckHardware();
+  pcHardware->programInit();
+  pcHardware->setWindowModality(Qt::ApplicationModal);
+  pcHardware->show();
+  pcHardware->raise();
+}
+
 void Installer::slotPushKeyLayout()
 {
   wKey = new widgetKeyboard();

Modified: pcbsd/current/src-qt4/pc-installgui/installer.h
===================================================================
--- pcbsd/current/src-qt4/pc-installgui/installer.h	2012-07-05 18:05:03 UTC (rev 17642)
+++ pcbsd/current/src-qt4/pc-installgui/installer.h	2012-07-05 18:26:48 UTC (rev 17643)
@@ -12,6 +12,7 @@
 #include "dialogHelp.h"
 #include "dialogKeyboard.h"
 #include "dialogDesktopSelection.h"
+#include "dialogCheckHardware.h"
 #include "wizardFreeBSD.h"
 #include "wizardDisk.h"
 
@@ -41,6 +42,7 @@
     void slotNext();
     void slotFinished();
     void slotChangeLanguage();
+    void slotCheckHardware();
 
     // Disk slots
     void slotDiskCustomizeClicked();
@@ -63,6 +65,7 @@
     void slotSaveMetaChanges(QStringList);
     void slotSaveFBSDSettings(QString, QString, QString, QString, QString, QString, bool, bool, bool, QStringList);
 
+
 private:
 
     void startInstall(); // Function which begins the install process
@@ -125,6 +128,9 @@
     bool hasFreeBSDOnMedia;
     bool toggleKeyLayout;
 
+    // Hardware checker
+    dialogCheckHardware *pcHardware;
+
     // Help Stuff
     dialogHelp *pcHelp;
 

Modified: pcbsd/current/src-qt4/pc-installgui/installer.ui
===================================================================
(Binary files differ)

Modified: pcbsd/current/src-qt4/pc-installgui/main.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-installgui/main.cpp	2012-07-05 18:05:03 UTC (rev 17642)
+++ pcbsd/current/src-qt4/pc-installgui/main.cpp	2012-07-05 18:26:48 UTC (rev 17643)
@@ -7,6 +7,7 @@
 
 #include "installer.h"
 #include "backend.h"
+#include "dialogCheckHardware.h"
 
 int main(int argc, char *argv[])
 {
@@ -43,12 +44,30 @@
         langCode = "";
       }
 
+      if ( argc == 2)
+      {
+        QString flag = argv[1];
+        if ( flag == "-checkhardware" )
+        {
+          dialogCheckHardware d;
+          QDesktopWidget *desk = a.desktop();
+          QRect dimensions = desk->screenGeometry();
+          int wid = dimensions.width();     // returns desktop width
+          int hig = dimensions.height();    // returns desktop height
+          d.setGeometry((wid/2) - (355/2), (hig/2) - (151/2), 355, 151);
+          d.programInit();
+          d.show();
+          a.connect( &a, SIGNAL( lastWindowClosed() ), &a, SLOT( quit() ) );
+          return a.exec();
+        }
+      }
+
+
       // Show our splash screen, so the user doesn't freak that that it takes a few seconds to show up
       QPixmap pixmap(":/PCBSD/images/pcbsdheader.png");
       QSplashScreen splash(pixmap);
       splash.show();
 
-
       Installer w;
 
 

Modified: pcbsd/current/src-qt4/pc-installgui/pc-installgui.pro
===================================================================
--- pcbsd/current/src-qt4/pc-installgui/pc-installgui.pro	2012-07-05 18:05:03 UTC (rev 17642)
+++ pcbsd/current/src-qt4/pc-installgui/pc-installgui.pro	2012-07-05 18:26:48 UTC (rev 17643)
@@ -5,6 +5,7 @@
 DESTDIR=/usr/local/bin
 TEMPLATE = app
 SOURCES += main.cpp \
+    dialogCheckHardware.cpp \
     dialogDesktopSelection.cpp \
     dialogFSSize.cpp \
     dialogInfoBox.cpp \
@@ -15,6 +16,7 @@
     installer.cpp \
     backend.cpp
 HEADERS += installer.h \
+    dialogCheckHardware.h \
     dialogDesktopSelection.h \
     dialogFSSize.h \
     dialogInfoBox.h \
@@ -94,5 +96,5 @@
 
 INSTALLS += dotrans
 
-FORMS += installer.ui dialogDesktopSelection.ui dialogFSSize.ui dialogHelp.ui wizardFreeBSD.ui dialogKeyboard.ui wizardDisk.ui dialogInfoBox.ui
+FORMS += installer.ui dialogCheckHardware.ui dialogDesktopSelection.ui dialogFSSize.ui dialogHelp.ui wizardFreeBSD.ui dialogKeyboard.ui wizardDisk.ui dialogInfoBox.ui
 RESOURCES += sysinstaller.qrc

Modified: pcbsd/current/src-qt4/pc-installgui/sysinstaller.qrc
===================================================================
--- pcbsd/current/src-qt4/pc-installgui/sysinstaller.qrc	2012-07-05 18:05:03 UTC (rev 17642)
+++ pcbsd/current/src-qt4/pc-installgui/sysinstaller.qrc	2012-07-05 18:26:48 UTC (rev 17643)
@@ -1,5 +1,11 @@
 <RCC>
   <qresource prefix="/modules">
+    <file>images/ok.png</file>
+    <file>images/failed.png</file>
+    <file>images/system-config-sound.png</file>
+    <file>images/randr.png</file>
+    <file>images/networkwired.png</file>
+    <file>images/network_wifi.png</file>
     <file>images/backgroundimage.jpg</file>
     <file>images/basic.png</file>
     <file>images/advanced.png</file>



More information about the Commits mailing list