settingscreen: Added a button to the bottom of the network tab to invoke the SDK...
authordgerlach <d-gerlach@ti.com>
Tue, 20 Nov 2012 22:15:45 +0000 (16:15 -0600)
committerdgerlach <d-gerlach@ti.com>
Tue, 20 Nov 2012 22:15:45 +0000 (16:15 -0600)
* Same script that is called from matrix

settingscreen.cpp
settingscreen.h

index 2f19ae426160936b00c15f962bf45e00c6301b1d..112a075ae44789f2b0580d58d597ff0074e0f796 100644 (file)
@@ -121,23 +121,20 @@ QWidget* SettingScreen::buildNetworkSettingsWidget()
     QGroupBox* proxySettingsGroupBox = new QGroupBox("Proxy Settings");
     proxySettingsGroupBox->setLayout(proxyVBoxLayout);
 
+    configureWifiButton = new QPushButton("Configure Wifi");
 
-    QLabel *m_remoteListenPort = new QLabel("Remote Listen Port: ", this);
-    m_remoteListenPortLineEdit = new QKeyboardLineEdit;
-
-    QFormLayout* remoteListenLayout = new QFormLayout;
-    remoteListenLayout->addRow(m_remoteListenPort, m_remoteListenPortLineEdit);
-
-    QGroupBox* remoteSettingsGroupBox = new QGroupBox("Remote Settings");
-    remoteSettingsGroupBox->setLayout(remoteListenLayout);
+    connect(configureWifiButton, SIGNAL(clicked()), this, SLOT(launchWifiConfigure()));
+    configureWifiButton->setFocusPolicy(Qt::NoFocus);
 
     QVBoxLayout *networkSettingsLayout = new QVBoxLayout(this);
     networkSettingsLayout->addWidget(proxySettingsGroupBox);
-    //networkSettingsLayout->addWidget(remoteSettingsGroupBox);
+    networkSettingsLayout->addWidget(configureWifiButton);
     networkSettingsLayout->addStretch();
 
     networkSettingsWidget->setLayout(networkSettingsLayout);
 
+    connect(&m_wifiConfigureProcess, SIGNAL(finished(int,QProcess::ExitStatus)), this, SLOT(wifiConfigureFinished(int, QProcess::ExitStatus)));
+
     return networkSettingsWidget;
 }
 
@@ -308,3 +305,14 @@ void SettingScreen::commitChanges()
 
     close();
 }
+
+void SettingScreen::launchWifiConfigure()
+{
+    configureWifiButton->setEnabled(false);
+    m_wifiConfigureProcess.start("wpatest.sh wpa_gui-e -geometry 480x240+0+0");
+}
+
+void SettingScreen::wifiConfigureFinished(int, QProcess::ExitStatus)
+{
+    configureWifiButton->setEnabled(true);
+}
index 4edf175725dc9258a933a3d6982d7dc62a16d811..02e635cac4b3fc9eae5f2748058e9d64189ba036 100644 (file)
@@ -28,6 +28,9 @@ public slots:
     void commitChanges();
     void fillSettingValues();
 
+    void launchWifiConfigure();
+    void wifiConfigureFinished(int, QProcess::ExitStatus);
+
 protected:
     void showEvent(QShowEvent *);
 
@@ -41,6 +44,8 @@ private:
     QPushButton *Button12h;
     QPushButton *Button24h;
 
+    QPushButton *configureWifiButton;
+
     QKeyboardLineEdit* m_proxyHostLineEdit;
     QKeyboardLineEdit* m_proxyPortLineEdit;
     QKeyboardLineEdit* m_remoteListenPortLineEdit;
@@ -50,6 +55,8 @@ private:
     QWidget* buildNetworkSettingsWidget();
     QWidget* buildGeneralSettingsWidget();
     QWidget* buildFormatSettingsWidget();
+
+    QProcess m_wifiConfigureProcess;
     
 };