mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-28 10:18:21 -05:00
wpa_gui: Add AP and laptop icons for peer dialog
The peer entries are now using different icons based on their type. As a starting point, a separate AP and laptop icons are used. More icons may be added in the future to mark different device types (e.g., based on primary device type information from WPS).
This commit is contained in:
parent
720e23b2ae
commit
1949f53481
@ -1,5 +1,7 @@
|
||||
<RCC>
|
||||
<qresource prefix="/icons" >
|
||||
<file alias="wpa_gui.svg">icons/wpa_gui.svg</file>
|
||||
<file alias="ap.svg">icons/ap.svg</file>
|
||||
<file alias="laptop.svg">icons/laptop.svg</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/usr/bin/make -f
|
||||
|
||||
NAMES := wpa_gui
|
||||
NAMES := wpa_gui ap laptop
|
||||
SIZES := 16x16 22x22 32x32 48x48 64x64 128x128
|
||||
ICONS := $(addsuffix .png, $(foreach name, $(NAMES), $(foreach size, $(SIZES), $(size)/$(name))))
|
||||
ICONS += $(addsuffix .xpm, $(NAMES))
|
||||
|
@ -1,7 +1,39 @@
|
||||
wpa_gui icon files
|
||||
|
||||
To convert the svg icons to other formats, make sure inkscape and imagemagick
|
||||
are installed and use `make' to create various sized png and xpm icons.
|
||||
|
||||
|
||||
wpa_gui.svg
|
||||
-----------
|
||||
|
||||
Copyright (c) 2008 Bernard Gray <bernard.gray@gmail.com>
|
||||
|
||||
The wpa_gui icon is licensed under the GPL version 2. Alternatively, the icon
|
||||
may be distributed under the terms of BSD license.
|
||||
|
||||
To convert the svg icon to other formats, make sure inkscape and imagemagick
|
||||
are installed and use `make' to create various sized png and xpm icons.
|
||||
|
||||
ap.svg
|
||||
------
|
||||
|
||||
mystica_Wireless_Router.svg
|
||||
|
||||
http://openclipart.org/media/files/mystica/8390
|
||||
Wireless Router
|
||||
by: mystica
|
||||
last change: April 20, 2008 10:32 pm (File added)
|
||||
date: April 20, 2008 10:31 pm
|
||||
license: PD
|
||||
|
||||
|
||||
laptop.svg
|
||||
----------
|
||||
|
||||
metalmarious_Laptop.svg
|
||||
|
||||
http://openclipart.org/media/files/metalmarious/4056
|
||||
Laptop
|
||||
by: metalmarious
|
||||
last change: May 18, 2008 07:04 pm (File added)
|
||||
date: August 27, 2007 04:44 am
|
||||
license: PD
|
||||
|
832
wpa_supplicant/wpa_gui-qt4/icons/ap.svg
Normal file
832
wpa_supplicant/wpa_gui-qt4/icons/ap.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 67 KiB |
1568
wpa_supplicant/wpa_gui-qt4/icons/laptop.svg
Normal file
1568
wpa_supplicant/wpa_gui-qt4/icons/laptop.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 289 KiB |
@ -1,5 +1,7 @@
|
||||
<RCC>
|
||||
<qresource prefix="/icons" >
|
||||
<file alias="wpa_gui.png">icons/hicolor/16x16/apps/wpa_gui.png</file>
|
||||
<file alias="ap.png">icons/hicolor/32x32/apps/ap.png</file>
|
||||
<file alias="laptop.png">icons/hicolor/32x32/apps/laptop.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
@ -48,9 +48,15 @@ Peers::Peers(QWidget *parent, const char *, bool, Qt::WFlags)
|
||||
setupUi(this);
|
||||
|
||||
if (QImageReader::supportedImageFormats().contains(QByteArray("svg")))
|
||||
{
|
||||
default_icon = new QIcon(":/icons/wpa_gui.svg");
|
||||
else
|
||||
ap_icon = new QIcon(":/icons/ap.svg");
|
||||
laptop_icon = new QIcon(":/icons/laptop.svg");
|
||||
} else {
|
||||
default_icon = new QIcon(":/icons/wpa_gui.png");
|
||||
ap_icon = new QIcon(":/icons/ap.png");
|
||||
laptop_icon = new QIcon(":/icons/laptop.png");
|
||||
}
|
||||
|
||||
peers->setModel(&model);
|
||||
peers->setResizeMode(QListView::Adjust);
|
||||
@ -73,6 +79,8 @@ void Peers::setWpaGui(WpaGui *_wpagui)
|
||||
Peers::~Peers()
|
||||
{
|
||||
delete default_icon;
|
||||
delete ap_icon;
|
||||
delete laptop_icon;
|
||||
}
|
||||
|
||||
|
||||
@ -194,7 +202,7 @@ void Peers::add_station(QString info)
|
||||
if (name.isEmpty())
|
||||
name = lines[0];
|
||||
|
||||
QStandardItem *item = new QStandardItem(*default_icon, name);
|
||||
QStandardItem *item = new QStandardItem(*laptop_icon, name);
|
||||
if (item) {
|
||||
item->setData(lines[0], peer_role_address);
|
||||
item->setData(PEER_TYPE_ASSOCIATED_STATION,
|
||||
@ -306,7 +314,7 @@ void Peers::add_scan_results()
|
||||
if (name.isEmpty())
|
||||
name = ssid + "\n" + bssid;
|
||||
|
||||
QStandardItem *item = new QStandardItem(*default_icon, name);
|
||||
QStandardItem *item = new QStandardItem(*ap_icon, name);
|
||||
if (item) {
|
||||
item->setData(bssid, peer_role_address);
|
||||
if (flags.contains("[WPS"))
|
||||
@ -400,7 +408,7 @@ void Peers::event_notify(WpaMsg msg)
|
||||
}
|
||||
}
|
||||
|
||||
item = new QStandardItem(*default_icon, name);
|
||||
item = new QStandardItem(*laptop_icon, name);
|
||||
if (item) {
|
||||
item->setData(addr, peer_role_address);
|
||||
item->setData(PEER_TYPE_WPS_PIN_NEEDED,
|
||||
@ -458,7 +466,7 @@ void Peers::event_notify(WpaMsg msg)
|
||||
if (item)
|
||||
return;
|
||||
|
||||
item = new QStandardItem(*default_icon, items[1]);
|
||||
item = new QStandardItem(*ap_icon, items[1]);
|
||||
if (item) {
|
||||
item->setData(items[0], peer_role_uuid);
|
||||
item->setData(PEER_TYPE_WPS_ER_AP, peer_role_type);
|
||||
@ -514,7 +522,7 @@ void Peers::event_notify(WpaMsg msg)
|
||||
remove_enrollee_uuid(uuid);
|
||||
|
||||
QStandardItem *item;
|
||||
item = new QStandardItem(*default_icon, name);
|
||||
item = new QStandardItem(*laptop_icon, name);
|
||||
if (item) {
|
||||
item->setData(uuid, peer_role_uuid);
|
||||
item->setData(addr, peer_role_address);
|
||||
|
@ -56,6 +56,8 @@ private:
|
||||
WpaGui *wpagui;
|
||||
QStandardItemModel model;
|
||||
QIcon *default_icon;
|
||||
QIcon *ap_icon;
|
||||
QIcon *laptop_icon;
|
||||
QStandardItem *ctx_item;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user