[PATCH 2/3]: wpa_gui-qt4: new layout for wpagui main network selection form
Kel Modderman
kel
Thu Jan 24 08:14:44 PST 2008
This patch changes substantially the layout of the main wpa_gui network
selection form.
* Adds new Networks menu, move some cruft from File menu here
* Removes Network combobox
* Adds Networks Box containing a network listview widget
* Also adds many useful buttons to View/Edit, Add/Remove, Enable/Disable and
Select any network that can be selected, without triggering select_network
command, from the network list with single mouse click.
* Double clicking on network list triggers set_network command for selected
network.
Some manual hacking of the ui file was required to clean up the drop down
menu items.
Signed-off-by: Kel Modderman <kel at otaku42.de>
---
--- a/wpa_supplicant/wpa_gui-qt4/wpagui.ui
+++ b/wpa_supplicant/wpa_gui-qt4/wpagui.ui
@@ -5,8 +5,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>289</width>
- <height>308</height>
+ <width>300</width>
+ <height>600</height>
</rect>
</property>
<property name="windowTitle" >
@@ -14,27 +14,74 @@
</property>
<widget class="QWidget" name="widget" >
<layout class="QGridLayout" >
- <item row="0" column="0" colspan="2" >
- <widget class="QLabel" name="textLabel16" >
+ <item row="0" column="0" >
+ <widget class="QLabel" name="adaptorLabel" >
<property name="text" >
- <string>Adapter:</string>
+ <string>Network Adaptor:</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignCenter</set>
</property>
</widget>
</item>
- <item row="0" column="2" colspan="2" >
- <widget class="QComboBox" name="adapterSelect" />
+ <item row="0" column="1" >
+ <widget class="QComboBox" name="adaptorSelect" />
</item>
<item row="1" column="0" colspan="2" >
- <widget class="QLabel" name="textLabel8" >
- <property name="text" >
- <string>Network:</string>
+ <widget class="QGroupBox" name="networksBox" >
+ <property name="title" >
+ <string>Networks</string>
</property>
+ <layout class="QGridLayout" >
+ <item row="0" column="0" colspan="2" >
+ <widget class="QListWidget" name="networkList" />
+ </item>
+ <item row="1" column="0" colspan="2" >
+ <widget class="QPushButton" name="editNetworkButton" >
+ <property name="text" >
+ <string>View/Edit</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0" >
+ <widget class="QPushButton" name="addNetworkButton" >
+ <property name="text" >
+ <string>Add</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1" >
+ <widget class="QPushButton" name="removeNetworkButton" >
+ <property name="text" >
+ <string>Remove</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0" >
+ <widget class="QPushButton" name="enableNetworkButton" >
+ <property name="text" >
+ <string>Enable</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1" >
+ <widget class="QPushButton" name="disableNetworkButton" >
+ <property name="text" >
+ <string>Disable</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="0" colspan="2" >
+ <widget class="QPushButton" name="selectAnyNetworkButton" >
+ <property name="text" >
+ <string>Select Any Network</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
</widget>
</item>
- <item row="1" column="2" colspan="2" >
- <widget class="QComboBox" name="networkSelect" />
- </item>
- <item row="2" column="0" colspan="4" >
+ <item row="2" column="0" colspan="2" >
<widget class="QFrame" name="frame3" >
<property name="frameShape" >
<enum>QFrame::NoFrame</enum>
@@ -144,43 +191,27 @@
</layout>
</widget>
</item>
- <item row="3" column="0" >
- <spacer>
- <property name="orientation" >
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeType" >
- <enum>QSizePolicy::Expanding</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>16</width>
- <height>16</height>
- </size>
+ <item row="3" column="0" colspan="2" >
+ <widget class="QPushButton" name="scanButton" >
+ <property name="text" >
+ <string>Scan</string>
</property>
- </spacer>
+ </widget>
</item>
- <item row="3" column="1" >
+ <item row="4" column="0" >
<widget class="QPushButton" name="connectButton" >
<property name="text" >
<string>Connect</string>
</property>
</widget>
</item>
- <item row="3" column="2" >
+ <item row="4" column="1" >
<widget class="QPushButton" name="disconnectButton" >
<property name="text" >
<string>Disconnect</string>
</property>
</widget>
</item>
- <item row="3" column="3" >
- <widget class="QPushButton" name="scanButton" >
- <property name="text" >
- <string>Scan</string>
- </property>
- </widget>
- </item>
</layout>
</widget>
<widget class="QMenuBar" name="MenuBar" >
@@ -188,7 +219,7 @@
<rect>
<x>0</x>
<y>0</y>
- <width>289</width>
+ <width>300</width>
<height>30</height>
</rect>
</property>
@@ -198,10 +229,6 @@
</property>
<addaction name="separator" />
<addaction name="fileEventHistoryAction" />
- <addaction name="fileAdd_NetworkAction" />
- <addaction name="fileEdit_networkAction" />
- <addaction name="fileEnableALLNetworksAction" />
- <addaction name="fileDisableALLNetworksAction" />
<addaction name="fileSaveConfig" />
<addaction name="separator" />
<addaction name="fileExitAction" />
@@ -215,135 +242,70 @@
<addaction name="separator" />
<addaction name="helpAboutAction" />
</widget>
+ <widget class="QMenu" name="menuNetworks" >
+ <property name="title" >
+ <string>&Networks</string>
+ </property>
+ <addaction name="networksEnableAllAction" />
+ <addaction name="networksDisableAllAction" />
+ <addaction name="networksRemoveAllAction" />
+ </widget>
<addaction name="fileMenu" />
+ <addaction name="menuNetworks" />
<addaction name="helpMenu" />
</widget>
- <action name="fileExitAction" >
+ <action name="fileEventHistoryAction" >
<property name="text" >
- <string>E&xit</string>
- </property>
- <property name="iconText" >
- <string>Exit</string>
- </property>
- <property name="shortcut" >
- <string>Ctrl+Q</string>
- </property>
- <property name="name" stdset="0" >
- <string>fileExitAction</string>
+ <string>Event &History</string>
</property>
</action>
- <action name="helpContentsAction" >
- <property name="enabled" >
- <bool>false</bool>
- </property>
+ <action name="fileSaveConfig" >
<property name="text" >
- <string>&Contents...</string>
- </property>
- <property name="iconText" >
- <string>Contents</string>
- </property>
- <property name="shortcut" >
- <string/>
- </property>
- <property name="name" stdset="0" >
- <string>helpContentsAction</string>
+ <string>&Save Configuration</string>
</property>
</action>
- <action name="helpIndexAction" >
- <property name="enabled" >
- <bool>false</bool>
- </property>
+ <action name="fileExitAction" >
<property name="text" >
- <string>&Index...</string>
- </property>
- <property name="iconText" >
- <string>Index</string>
+ <string>E&xit</string>
</property>
<property name="shortcut" >
- <string/>
- </property>
- <property name="name" stdset="0" >
- <string>helpIndexAction</string>
+ <string>Ctrl+Q</string>
</property>
</action>
- <action name="helpAboutAction" >
+ <action name="networksEnableAllAction" >
<property name="text" >
- <string>&About</string>
- </property>
- <property name="iconText" >
- <string>About</string>
- </property>
- <property name="shortcut" >
- <string/>
- </property>
- <property name="name" stdset="0" >
- <string>helpAboutAction</string>
+ <string>&Enable all networks</string>
</property>
</action>
- <action name="fileEventHistoryAction" >
+ <action name="networksDisableAllAction" >
<property name="text" >
- <string>Event &History</string>
- </property>
- <property name="iconText" >
- <string>Event History</string>
- </property>
- <property name="name" stdset="0" >
- <string>fileEventHistoryAction</string>
+ <string>&Disable all networks</string>
</property>
</action>
- <action name="fileAdd_NetworkAction" >
+ <action name="networksRemoveAllAction" >
<property name="text" >
- <string>&Add Network</string>
- </property>
- <property name="iconText" >
- <string>Add Network</string>
- </property>
- <property name="name" stdset="0" >
- <string>fileAdd_NetworkAction</string>
+ <string>&Remove all networks</string>
</property>
</action>
- <action name="fileEdit_networkAction" >
- <property name="text" >
- <string>&Edit Network</string>
- </property>
- <property name="iconText" >
- <string>Edit Network</string>
- </property>
- <property name="name" stdset="0" >
- <string>fileEdit_networkAction</string>
+ <action name="helpContentsAction" >
+ <property name="enabled" >
+ <bool>false</bool>
</property>
- </action>
- <action name="fileEnableALLNetworksAction" >
<property name="text" >
- <string>E&nable All Networks</string>
- </property>
- <property name="iconText" >
- <string>Enable All Networks</string>
- </property>
- <property name="name" stdset="0" >
- <string>fileEnableALLNetworksAction</string>
+ <string>&Contents...</string>
</property>
</action>
- <action name="fileDisableALLNetworksAction" >
- <property name="text" >
- <string>&Disable All Networks</string>
- </property>
- <property name="iconText" >
- <string>Disable All Networks</string>
+ <action name="helpIndexAction" >
+ <property name="enabled" >
+ <bool>false</bool>
</property>
- <property name="name" stdset="0" >
- <string>fileDisableALLNetworksAction</string>
+ <property name="text" >
+ <string>&Index...</string>
</property>
</action>
- <action name="fileSaveConfig" >
+ <action name="helpAboutAction" >
<property name="text" >
- <string>&Save Configuration</string>
- </property>
- <property name="iconText" >
- <string>Save Configuration</string>
- </property>
- <property name="name" stdset="0" >
- <string>fileSaveConfig</string>
+ <string>&About</string>
</property>
</action>
</widget>
---
More information about the Hostap
mailing list