diff options
author | Kel Modderman <kel@otaku42.de> | 2011-11-19 20:10:37 +0200 |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2011-11-19 20:10:37 +0200 |
commit | ef992bbd3b044eeea68c6677ff878cb1d2ed29c1 (patch) | |
tree | 04520bbfcbbbf92b18c6266292b9779a52c0da2a /wpa_supplicant/wpa_gui-qt4/signalbar.h | |
parent | 88df0ef74fe7f61b7697115bb2f2f1bedd9c4f4d (diff) | |
download | external_wpa_supplicant_8_ti-ef992bbd3b044eeea68c6677ff878cb1d2ed29c1.zip external_wpa_supplicant_8_ti-ef992bbd3b044eeea68c6677ff878cb1d2ed29c1.tar.gz external_wpa_supplicant_8_ti-ef992bbd3b044eeea68c6677ff878cb1d2ed29c1.tar.bz2 |
wpa_gui-qt4: Improve scan results signal display
Display signal strength in dBm with visual indicator in the form of a
bar for scan results displayed by wpa_gui-qt4. Any signal > -35dBm is
treated as full signal bar, signals between range of -95<->-35dBm are
displayed linearly. Convert WEXT signal level value to scale that
nl80211 typically reports in dBm. The condition which differentiates
8-bit WEXT dBm and regular dBm is probably fragile, but there is
currently no way to know what the driver is going to report for signal
strength.
Signed-off-by: Kel Modderman <kel@otaku42.de>
Diffstat (limited to 'wpa_supplicant/wpa_gui-qt4/signalbar.h')
-rw-r--r-- | wpa_supplicant/wpa_gui-qt4/signalbar.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/wpa_supplicant/wpa_gui-qt4/signalbar.h b/wpa_supplicant/wpa_gui-qt4/signalbar.h new file mode 100644 index 0000000..3d5dec1 --- /dev/null +++ b/wpa_supplicant/wpa_gui-qt4/signalbar.h @@ -0,0 +1,34 @@ +/* + * wpa_gui - SignalBar class + * Copyright (c) 2011, Kel Modderman <kel@otaku42.de> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * Alternatively, this software may be distributed under the terms of BSD + * license. + * + * See README and COPYING for more details. + */ + +#ifndef SIGNALBAR_H +#define SIGNALBAR_H + +#include <QObject> +#include <QStyledItemDelegate> + +class SignalBar : public QStyledItemDelegate +{ + Q_OBJECT + +public: + SignalBar(QObject *parent = 0); + ~SignalBar(); + + virtual void paint(QPainter *painter, + const QStyleOptionViewItem &option, + const QModelIndex &index) const ; +}; + +#endif /* SIGNALBAR_H */ |