[PC-BSD Commits] r15749 - pcbsd/current/src-qt4/pc-netmanager/src/wificonfig

svn at pcbsd.org svn at pcbsd.org
Wed Mar 7 17:46:46 PST 2012


Author: kenmoore
Date: 2012-03-08 01:46:45 +0000 (Thu, 08 Mar 2012)
New Revision: 15749

Modified:
   pcbsd/current/src-qt4/pc-netmanager/src/wificonfig/wificonfigwidgetbase.cpp
   pcbsd/current/src-qt4/pc-netmanager/src/wificonfig/wificonfigwidgetbase.h
   pcbsd/current/src-qt4/pc-netmanager/src/wificonfig/wificonfigwidgetbase.ui
Log:
Add the capability to add a "hidden" wifi network from within the wifi GUI



Modified: pcbsd/current/src-qt4/pc-netmanager/src/wificonfig/wificonfigwidgetbase.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-netmanager/src/wificonfig/wificonfigwidgetbase.cpp	2012-03-07 21:09:01 UTC (rev 15748)
+++ pcbsd/current/src-qt4/pc-netmanager/src/wificonfig/wificonfigwidgetbase.cpp	2012-03-08 01:46:45 UTC (rev 15749)
@@ -13,6 +13,7 @@
 #include <QSettings>
 #include <QTextStream>
 #include <QDebug>
+#include <QInputDialog>
 
 #include <pcbsd-utils.h>
 #include <pcbsd-netif.h>
@@ -279,6 +280,7 @@
   connect( pushEditWifi, SIGNAL( clicked() ), this, SLOT( slotEditProfile() ) ); 
   connect( pushRemoveWifi, SIGNAL( clicked() ), this, SLOT( slotRemoveProfile() ) ); 
   connect( pushRescan, SIGNAL( clicked() ), this, SLOT( slotRescan() ) );
+  connect( pushAddHidden, SIGNAL( clicked() ), this, SLOT( slotAddHiddenProfile() ) );
 
   // Save the device name for later
   DeviceName = Device;
@@ -625,6 +627,16 @@
   
 }
 
+void wificonfigwidgetbase::slotAddHiddenProfile(){
+  //Prompt for the desired SSID
+  bool ok;
+  QString ssidc = QInputDialog::getText(this,tr("Network Name"),tr("Please enter the name of the network you wish to add"), QLineEdit::Normal,"",&ok);
+  //check if a name was given
+  if( ok && !ssidc.isEmpty()){
+    slotAddNewProfileSSID(ssidc);
+  }
+}
+
 void wificonfigwidgetbase::slotAddNewProfile()
 {
    //Get the selected SSID

Modified: pcbsd/current/src-qt4/pc-netmanager/src/wificonfig/wificonfigwidgetbase.h
===================================================================
--- pcbsd/current/src-qt4/pc-netmanager/src/wificonfig/wificonfigwidgetbase.h	2012-03-07 21:09:01 UTC (rev 15748)
+++ pcbsd/current/src-qt4/pc-netmanager/src/wificonfig/wificonfigwidgetbase.h	2012-03-08 01:46:45 UTC (rev 15749)
@@ -40,6 +40,7 @@
     void slotClose();
     void slotApply();
     void slotCheckDHCPBox();
+    void slotAddHiddenProfile();
     void slotAddNewProfile();
     void slotEditProfile();
     void slotRemoveProfile();

Modified: pcbsd/current/src-qt4/pc-netmanager/src/wificonfig/wificonfigwidgetbase.ui
===================================================================
--- pcbsd/current/src-qt4/pc-netmanager/src/wificonfig/wificonfigwidgetbase.ui	2012-03-07 21:09:01 UTC (rev 15748)
+++ pcbsd/current/src-qt4/pc-netmanager/src/wificonfig/wificonfigwidgetbase.ui	2012-03-08 01:46:45 UTC (rev 15749)
@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>341</width>
-    <height>440</height>
+    <width>370</width>
+    <height>427</height>
    </rect>
   </property>
   <property name="windowTitle">
@@ -232,28 +232,28 @@
          <item row="7" column="0">
           <layout class="QHBoxLayout" name="horizontalLayout_2">
            <item>
-            <widget class="QPushButton" name="pushAddWifi">
+            <widget class="QPushButton" name="pushRescan">
              <property name="text">
-              <string>Add To Profiles</string>
+              <string>Scan</string>
              </property>
              <property name="icon">
               <iconset resource="wificonfig.qrc">
-               <normaloff>:/list-add.png</normaloff>:/list-add.png</iconset>
+               <normaloff>:/scan-wifi.png</normaloff>:/scan-wifi.png</iconset>
              </property>
-             <property name="shortcut">
-              <string>Alt+S</string>
-             </property>
             </widget>
            </item>
            <item>
-            <widget class="QPushButton" name="pushRescan">
+            <widget class="QPushButton" name="pushAddWifi">
              <property name="text">
-              <string>Scan</string>
+              <string>Add Selected</string>
              </property>
              <property name="icon">
               <iconset resource="wificonfig.qrc">
-               <normaloff>:/scan-wifi.png</normaloff>:/scan-wifi.png</iconset>
+               <normaloff>:/list-add.png</normaloff>:/list-add.png</iconset>
              </property>
+             <property name="shortcut">
+              <string>Alt+S</string>
+             </property>
             </widget>
            </item>
            <item>
@@ -269,6 +269,17 @@
              </property>
             </spacer>
            </item>
+           <item>
+            <widget class="QPushButton" name="pushAddHidden">
+             <property name="text">
+              <string>Add Hidden</string>
+             </property>
+             <property name="icon">
+              <iconset resource="wificonfig.qrc">
+               <normaloff>:/list-add.png</normaloff>:/list-add.png</iconset>
+             </property>
+            </widget>
+           </item>
           </layout>
          </item>
         </layout>



More information about the Commits mailing list