diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | bcb704366cb5e333a626c18c308c7e0448a8e69f (patch) | |
tree | f0d6ab7d78ecdd9207cf46536376b44b91a1ca71 /wifi | |
download | tdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.tar.gz tdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'wifi')
86 files changed, 11699 insertions, 0 deletions
diff --git a/wifi/Makefile.am b/wifi/Makefile.am new file mode 100644 index 00000000..22c1a4c2 --- /dev/null +++ b/wifi/Makefile.am @@ -0,0 +1,56 @@ +# Yow, Emacs, this is a -*- makefile -*- + +xdg_apps_DATA = kwifimanager.desktop + +EXTRA_DIST = $(xdg_apps_DATA) +INCLUDES = $(all_includes) + +SUBDIRS = kcmwifi kwireless pixmaps locations + +bin_PROGRAMS = kwifimanager + +kwifimanager_SOURCES = interface_wireless.cpp \ + interface_wireless_wirelessextensions.cpp \ + interface_dcop.skel \ + networkscanning.cpp \ + kwifimanager.cpp \ + locator.cpp \ + main.cpp \ + picture.cpp \ + speed.cpp \ + statistics.cpp \ + status.cpp \ + strength.cpp \ + asusled.cpp + +kwifimanager_LDFLAGS = $(all_libraries) + +if include_ARTS +ARTS_LIBS = -lartsflow -lmcop +endif + +kwifimanager_LDADD = $(ARTS_LIBS) -liw $(LIB_KDEUI) + +noinst_HEADERS = interface_wireless.h \ + interface_wireless_wirelessextensions.h \ + interface_dcop.h \ + networkscanning.h \ + kwifimanager.h \ + locator.h \ + picture.h \ + speed.h \ + statistics.h \ + status.h \ + strength.h \ + asusled.h + +METASOURCES = AUTO + +KDE_ICON = AUTO + +appdir=$(kde_datadir)/kwifimanager +app_DATA = kwifimanagerui.rc + +messages: rc.cpp + $(XGETTEXT) *.cpp -o $(podir)/kwifimanager.pot + diff --git a/wifi/asusled.cpp b/wifi/asusled.cpp new file mode 100644 index 00000000..19784c16 --- /dev/null +++ b/wifi/asusled.cpp @@ -0,0 +1,78 @@ + +/*************************************************************************** + led.cpp - description + ------------------- + begin : wo okt 8 2003 + copyright : (C) 2003 by Stefan Winter + email : [email protected] + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include <fstream> +#include "asusled.h" + +#include <kdebug.h> + +Led::Led () +{ + led = new std::ofstream ("/proc/acpi/asus/wled"); + + // If there is no LED, just give a one time warning on cerr + if (!(*led)) + { + static bool error_given = false; + if (!error_given) + { + kdDebug () << + "No Asus WLAN LED found, disabling LED updates" << endl; + error_given = true; + } + } + Off (); + // if Asusled not present, state never gets initialised, so we do it once here + // so that valgrind doesn't complain. + state = false; +} + +Led::~Led () +{ + + Off (); + delete led; + +} + + +void +Led::On (void) +{ + + if (*led) + { + *led << 1; + led->flush (); + state = true; + } + +} + +void +Led::Off (void) +{ + + if (*led) + { + *led << 0; + led->flush (); + state = false; + } + +} diff --git a/wifi/asusled.h b/wifi/asusled.h new file mode 100644 index 00000000..40ca079b --- /dev/null +++ b/wifi/asusled.h @@ -0,0 +1,40 @@ +/*************************************************************************** + led.h - description + ------------------- + begin : wo okt 8 2003 + copyright : (C) 2003 by Stefan Winter + email : [email protected] + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef ASUSLED_H +#define ASUSLED_H + +#include <fstream> + +/** + *@author Roeland Merks + */ + +class Led +{ +public: + Led (); + ~Led (); + void On (void); + void Off (void); + bool state; + +private: + std::ofstream * led; +}; + +#endif diff --git a/wifi/configure.in.in b/wifi/configure.in.in new file mode 100644 index 00000000..f796f816 --- /dev/null +++ b/wifi/configure.in.in @@ -0,0 +1,71 @@ +AC_ARG_WITH(wifi, + [AC_HELP_STRING(--with-wifi, + [enable support for wireless tools @<:@default=check@:>@])], + [], with_wifi=check) + +kde_libiw_installed=no +if test "x$with_wifi" != xno; then + AC_LANG_SAVE + AC_LANG_CPLUSPLUS + AC_MSG_CHECKING([if wireless tools >= 25 are installed]) + AC_TRY_COMPILE( + [ + #include <iwlib.h> + ], + [ + const char *s = PROC_NET_DEV; + iw_enum_devices(0, 0, 0, 0); + ], + kde_libiw_installed=yes + AC_MSG_RESULT(yes) + , + kde_libiw_installed=no + AC_MSG_RESULT(no) + ) + + AC_MSG_CHECKING([if wireless tools >= 27 are installed]) + AC_TRY_COMPILE( + [ + #include <iwlib.h> + ], + [ + // checking how many arguments does it iw_get_stats want + // the result is unimportant + struct wireless_info info; + char * stupid; + iw_get_stats(iw_sockets_open(), stupid, &(info.stats)); + + ], AC_MSG_RESULT(no) + , + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_IW_27, 1, [Define if you have iwlib newer than 26]) + + AC_MSG_CHECKING([if wireless tools >= 27pre19 are installed]) + AC_TRY_COMPILE( + [ + #include <iwlib.h> + ], + [ + // checking if wireless_info got a b.has_freq field + struct wireless_info info; + info.b.freq = 1; + + ], [AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_IW_27pre19, 1, [Define if you have iwlib newer than 27pre18]) + + ], + AC_MSG_RESULT(no) + ) + + ) + + AC_LANG_RESTORE + + if test "x$with_wifi" != xcheck && test "x$kde_libiw_installed" = xno; then + AC_MSG_ERROR([--with-wifi was given, but test for wireless-tools failed]) + fi +fi + +if test "$kde_libiw_installed" = "no"; then + DO_NOT_COMPILE="$DO_NOT_COMPILE wifi" +fi diff --git a/wifi/hi128-app-kwifimanager.png b/wifi/hi128-app-kwifimanager.png Binary files differnew file mode 100644 index 00000000..3403b7d3 --- /dev/null +++ b/wifi/hi128-app-kwifimanager.png diff --git a/wifi/hi16-app-kwifimanager.png b/wifi/hi16-app-kwifimanager.png Binary files differnew file mode 100644 index 00000000..4578f397 --- /dev/null +++ b/wifi/hi16-app-kwifimanager.png diff --git a/wifi/hi22-app-kwifimanager.png b/wifi/hi22-app-kwifimanager.png Binary files differnew file mode 100644 index 00000000..79e54eac --- /dev/null +++ b/wifi/hi22-app-kwifimanager.png diff --git a/wifi/hi32-app-kwifimanager.png b/wifi/hi32-app-kwifimanager.png Binary files differnew file mode 100644 index 00000000..497a6038 --- /dev/null +++ b/wifi/hi32-app-kwifimanager.png diff --git a/wifi/hi48-app-kwifimanager.png b/wifi/hi48-app-kwifimanager.png Binary files differnew file mode 100644 index 00000000..61fe614e --- /dev/null +++ b/wifi/hi48-app-kwifimanager.png diff --git a/wifi/hi64-app-kwifimanager.png b/wifi/hi64-app-kwifimanager.png Binary files differnew file mode 100644 index 00000000..72bf83c9 --- /dev/null +++ b/wifi/hi64-app-kwifimanager.png diff --git a/wifi/hisc-app-kwifimanager.svgz b/wifi/hisc-app-kwifimanager.svgz Binary files differnew file mode 100644 index 00000000..867562ee --- /dev/null +++ b/wifi/hisc-app-kwifimanager.svgz diff --git a/wifi/interface_dcop.h b/wifi/interface_dcop.h new file mode 100644 index 00000000..9a4149c0 --- /dev/null +++ b/wifi/interface_dcop.h @@ -0,0 +1,15 @@ +#ifndef INTERFACE_DCOP_H +#define INTERFACE_DCOP_H + +#include <dcopobject.h> + +class dcop_interface : virtual public DCOPObject + { + K_DCOP + k_dcop: + + virtual QString interface() const = 0; + }; + +#endif + diff --git a/wifi/interface_wireless.cpp b/wifi/interface_wireless.cpp new file mode 100644 index 00000000..5ece6301 --- /dev/null +++ b/wifi/interface_wireless.cpp @@ -0,0 +1,210 @@ +/*************************************************************************** + stuff.cpp - description + ------------------- + begin : Sun May 6 2001 + copyright : (C) 2001 by Stefan Winter + email : [email protected] + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include "interface_wireless.h" +#include <qdir.h> +#include <qfile.h> +#include <qstringlist.h> + +#ifndef WITHOUT_ARTS +#include <arts/artsflow.h> +#include <arts/connect.h> +#include <arts/iomanager.h> +#include <arts/referenceclean.h> +#endif // WITHOUT_ARTS + +#include <iostream> +#include <string> +#include <klocale.h> +#include <kprocio.h> +#include <kdebug.h> +#include <qstring.h> +#include <arpa/inet.h> + +Interface_wireless::Interface_wireless (QStringList * ignoreInterfaces) +{ + this->ignoreInterfaces = ignoreInterfaces; + has_frequency = false; + frequency = 0.; + has_mode = false; + mode = 0; + has_key = 0; + key = ""; + key_size = 0; + key_flags = 0; + essid = ""; + access_point_address = ""; + ip_address = ""; + bitrate = 0.; + socket = -1; + has_range = false; + for (int i = 0; i < MAX_HISTORY; i++) + { + sigLevel[i] = -255; + noiseLevel[i] = -255; + qual[i] = -255; + valid[i] = false; + } + current = 0; + sigLevelMin = 32000; + noiseLevelMin = 32000; + sigLevelMax = -32000; + noiseLevelMax = -32000; + + already_warned = false; +} + +bool Interface_wireless::get_device_freq (double &freq) +{ + if (has_frequency) + { + freq = frequency; + return true; + } + else + { + return false; + } +} + +bool Interface_wireless::get_mode (int &ext_mode) +{ + if (has_mode) + { + ext_mode = mode; + return true; + } + else + { + return false; + } +} + +bool Interface_wireless::get_key (QString & ext_key, + int &ext_size, + int &ext_flags) +{ + if (has_key) + { + ext_key = key; + ext_size = key_size; + ext_flags = key_flags; + return true; + } + else + { + return false; + } +} + +QString Interface_wireless::get_essid () +{ + return essid; +} + +bool Interface_wireless::get_has_txpower() +{ + return has_txpower; +} + +int Interface_wireless::get_txpower_disabled() +{ + return txpower_disabled; +} + +bool Interface_wireless::get_AP_info (QString & mac, QString &/*ip*/) +{ + mac = access_point_address; + return false; +} + +QString Interface_wireless::get_IP_info () +{ + return ip_address; +} + +double Interface_wireless::get_bitrate () +{ + return bitrate; +} + +QString Interface_wireless::get_interface_name () +{ + return interface_name; +} + +bool Interface_wireless::get_current_quality (int &sig, + int &noi, + int &qua) +{ + if (valid[current]) + { + sig = sigLevel[current]; + noi = noiseLevel[current]; + qua = qual[current]; + return true; + } + else + return false; +} + +#ifndef WITHOUT_ARTS + +void +sinus_wave (double frequency) +{ + using namespace Arts; + StdIOManager *limiter = new StdIOManager; + Dispatcher dispatcher (limiter); + MyTimeNotify *zeit = new MyTimeNotify (&dispatcher); + Synth_FREQUENCY freq; + Synth_WAVE_SIN sin; + Synth_PLAY play; + setValue (freq, frequency); + connect (freq, sin); + connect (sin, play, "invalue_left"); + freq.start (); + sin.start (); + play.start (); + limiter->addTimer (240, zeit); + dispatcher.run (); + play.stop (); + sin.stop (); + freq.stop (); +} + +void +MyTimeNotify::notifyTime () +{ + test->terminate (); +} + +#endif + +QString +whois (const char *MAC_ADR, QStringList APList) +{ + for (QStringList::Iterator it = APList.begin (); it != APList.end (); + (it++)++) + { + if ((*it) == (QString) MAC_ADR) + return *(++it); + } + return i18n ("UNKNOWN"); +} + +#include "interface_wireless.moc" diff --git a/wifi/interface_wireless.h b/wifi/interface_wireless.h new file mode 100644 index 00000000..029a8156 --- /dev/null +++ b/wifi/interface_wireless.h @@ -0,0 +1,125 @@ +/*************************************************************************** + stuff.h - description + ------------------- + begin : Mon Aug 19 2002 + copyright : (C) 2002 by Stefan Winter + email : [email protected] + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef INTERFACE_WIRELESS_H +#define INTERFACE_WIRELESS_H + +#include "config.h" + +#include <qobject.h> +#include <qstring.h> +#include <qtable.h> + +#ifndef WITHOUT_ARTS +#include <arts/iomanager.h> +#include <arts/dispatcher.h> +#endif + +const int POLL_DELAY_MS = 250; // how much time between device polls +const int MAX_HISTORY = 240; // number of device states to be saved + +class Interface_wireless:public QObject +{ +Q_OBJECT public: + Interface_wireless (QStringList * ignoreInterfaces); + virtual ~ Interface_wireless() { }; + + virtual bool get_device_freq (double &freq); + // true: device returned valid frequency + virtual bool get_mode (int &mode); + // true: device returned valid mode info + virtual bool get_key (QString & key, int &size, int &flags); + // true: device has set up a valid crypto key + virtual QString get_essid (); + virtual bool get_AP_info (QString & mac, QString & ip); + // true: could retrieve IP, false: returned IP info invalid + virtual QString get_IP_info (); + virtual double get_bitrate (); + virtual QString get_interface_name (); + // if no device is attached, return empty QString + virtual bool get_current_quality (int &sig, int &noi, int &qua); + // quality info is only valid when true + virtual QTable* get_available_networks () = 0; + virtual bool get_has_txpower(); + virtual int get_txpower_disabled(); + virtual void setActiveDevice( QString device ) = 0; + // stats + int sigLevel[MAX_HISTORY]; + int sigLevelMin, sigLevelMax; + int noiseLevel[MAX_HISTORY]; + int noiseLevelMin, noiseLevelMax; + int qual[MAX_HISTORY]; + bool valid[MAX_HISTORY]; + int current; + +public slots: + virtual bool poll_device_info () = 0; + +signals: + void interfaceChanged (); + void strengthChanged (); + void statusChanged (); + void modeChanged (); + void speedChanged (); + void essidChanged (QString essid); + void txPowerChanged (); + void statsUpdated (); +protected: + bool already_warned; + // device info + bool has_frequency; + float frequency; + bool has_mode; + int mode; + bool has_key; + QString key; + int key_size; + int key_flags; + QString essid; + QString access_point_address; + QString ip_address; + double bitrate; + QString interface_name; + int socket; + bool has_range; + int range; + QStringList * ignoreInterfaces; + bool has_txpower; + int txpower_disabled; +}; + +#ifndef WITHOUT_ARTS + +void sinus_wave (double frequency); + +class MyTimeNotify:public + Arts::TimeNotify +{ +public: + Arts::Dispatcher * test; + MyTimeNotify (Arts::Dispatcher * siff) + { + test = siff; + }; + void notifyTime (); +}; + +#endif + +QString whois (const char *MAC_ADR, QStringList APList); + +#endif /* INTERFACE_WIRELESS_H */ diff --git a/wifi/interface_wireless_wirelessextensions.cpp b/wifi/interface_wireless_wirelessextensions.cpp new file mode 100644 index 00000000..58abe9c9 --- /dev/null +++ b/wifi/interface_wireless_wirelessextensions.cpp @@ -0,0 +1,636 @@ +/*************************************************************************** + interface_wireless_wirelessextensions.cpp - description + ------------------- + begin : Sun May 6 2001 + copyright : (C) 2001 by Stefan Winter + email : [email protected] + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include "interface_wireless_wirelessextensions.h" +#include <iwlib.h> +#include <qdir.h> +#include <qfile.h> +#include <qtable.h> + +#include <kmessagebox.h> + +#ifndef WITHOUT_ARTS +#include <arts/artsflow.h> +#include <arts/connect.h> +#include <arts/iomanager.h> +#include <arts/referenceclean.h> +#endif + +#include <iostream> +#include <string> +#include <klocale.h> +#include <kstandarddirs.h> +#include <kprocio.h> +#include <kdebug.h> +#include <qstring.h> +#include <arpa/inet.h> +#include <sys/socket.h> +#include <netinet/in.h> +#include <unistd.h> + + +// domi:the wireless-tools people managed to change their interfaces +// around. Someone with more knowledge of this code should look into +// moving to use the new iw_range interfaces. +#ifdef HAVE_IW_27 + +#ifndef HAVE_IW_27pre19 +#define WIFI_CONFIG(config,field) config.field +#define WIFI_EXTRACT_EVENT_STREAM(stream, event) \ + iw_extract_event_stream(stream, event) +#else +#define WIFI_CONFIG(config,field) config.b.field +#define WIFI_EXTRACT_EVENT_STREAM(stream, event) \ + iw_extract_event_stream(stream, event, WIRELESS_EXT) +#endif + +#define WIFI_GET_STATS(skfd, ifname, stats) \ + iw_get_stats (skfd, ifname, stats, 0, 0) +#define WIFI_PRINT_STATS(buff, event) \ + iw_print_stats(buffer, sizeof(buffer), &event->u.qual, 0, 0); + +#else // HAVE_IW_25 +#define WIFI_CONFIG(config,field) config.field +#define WIFI_EXTRACT_EVENT_STREAM(stream, event) \ + iw_extract_event_stream(stream, event) +#define WIFI_GET_STATS(skfd, ifname, stats) \ + iw_get_stats (skfd, ifname, stats) +#define WIFI_PRINT_STATS(buff, event) \ + iw_print_stats(buffer, &event->u.qual, 0, 0); +#endif + +/* ================================== FROM IWCONFIG.C ================================== */ +int +Interface_wireless_wirelessextensions::get_info (int skfd, const QString& interface, + struct wireless_info& info) +{ + struct iwreq wrq; + char ifname[20]; + snprintf(ifname, sizeof(ifname), "%s", interface.latin1() ); + memset (&info, 0, sizeof(info)); + + /* Get wireless name */ + if (iw_get_ext (skfd, ifname, SIOCGIWNAME, &wrq) < 0) + { + /* If no wireless name : no wireless extensions */ + /* But let's check if the interface exists at all */ + struct ifreq ifr; + + strcpy (ifr.ifr_name, ifname); + if (ioctl (skfd, SIOCGIFFLAGS, &ifr) < 0) + return (-ENODEV); + else + return (-ENOTSUP); + } + else + { + strncpy (WIFI_CONFIG(info,name), wrq.u.name, IFNAMSIZ); + WIFI_CONFIG(info,name)[IFNAMSIZ] = '\0'; + } + + /* Get ranges */ + if (iw_get_range_info (skfd, ifname, &(info.range)) >= 0) + info.has_range = 1; + + /* Get network ID */ + if (iw_get_ext (skfd, ifname, SIOCGIWNWID, &wrq) >= 0) + { + WIFI_CONFIG(info,has_nwid) = 1; + memcpy (&(WIFI_CONFIG(info,nwid)), &(wrq.u.nwid), sizeof (iwparam)); + } + + /* Get frequency / channel */ + if (iw_get_ext (skfd, ifname, SIOCGIWFREQ, &wrq) >= 0) + { + WIFI_CONFIG(info,has_freq) = 1; + WIFI_CONFIG(info,freq) = iw_freq2float (&(wrq.u.freq)); + } + + /* Get sensitivity */ + if (iw_get_ext (skfd, ifname, SIOCGIWSENS, &wrq) >= 0) + { + info.has_sens = 1; + memcpy (&(info.sens), &(wrq.u.sens), sizeof (iwparam)); + } + + /* Get encryption information */ + wrq.u.data.pointer = (caddr_t) WIFI_CONFIG(info,key); + wrq.u.data.length = IW_ENCODING_TOKEN_MAX; + wrq.u.data.flags = 0; + if (iw_get_ext (skfd, ifname, SIOCGIWENCODE, &wrq) >= 0) + { + WIFI_CONFIG(info,has_key) = 1; + WIFI_CONFIG(info,key_size) = wrq.u.data.length; + WIFI_CONFIG(info,key_flags) = wrq.u.data.flags; + } + + /* Get ESSID */ + /* prepare NULL-terminated buffer in case the string returned by SIOCGIWESSID is NOT NULL-terminated */ + memset(wrq.u.essid.pointer, '\0', IW_ESSID_MAX_SIZE + 1); + wrq.u.essid.pointer = (caddr_t) WIFI_CONFIG(info,essid); + wrq.u.essid.length = IW_ESSID_MAX_SIZE + 1; + wrq.u.essid.flags = 0; + if (iw_get_ext (skfd, ifname, SIOCGIWESSID, &wrq) >= 0) + { + WIFI_CONFIG(info,has_essid) = 1; + WIFI_CONFIG(info,essid_on) = wrq.u.data.flags; + } + + /* Get AP address */ + if (iw_get_ext (skfd, ifname, SIOCGIWAP, &wrq) >= 0) + { + info.has_ap_addr = 1; + memcpy (&(info.ap_addr), &(wrq.u.ap_addr), sizeof (sockaddr)); + } + + /* Get NickName */ + wrq.u.essid.pointer = (caddr_t) info.nickname; + wrq.u.essid.length = IW_ESSID_MAX_SIZE + 1; + wrq.u.essid.flags = 0; + if (iw_get_ext (skfd, ifname, SIOCGIWNICKN, &wrq) >= 0) + if (wrq.u.data.length > 1) + info.has_nickname = 1; + + /* Get bit rate */ + if (iw_get_ext (skfd, ifname, SIOCGIWRATE, &wrq) >= 0) + { + info.has_bitrate = 1; + memcpy (&(info.bitrate), &(wrq.u.bitrate), sizeof (iwparam)); + } + + /* Get RTS threshold */ + if (iw_get_ext (skfd, ifname, SIOCGIWRTS, &wrq) >= 0) + { + info.has_rts = 1; + memcpy (&(info.rts), &(wrq.u.rts), sizeof (iwparam)); + } + + /* Get fragmentation threshold */ + if (iw_get_ext (skfd, ifname, SIOCGIWFRAG, &wrq) >= 0) + { + info.has_frag = 1; + memcpy (&(info.frag), &(wrq.u.frag), sizeof (iwparam)); + } + + /* Get operation mode */ + if (iw_get_ext (skfd, ifname, SIOCGIWMODE, &wrq) >= 0) + { + WIFI_CONFIG(info,mode) = wrq.u.mode; + if ((WIFI_CONFIG(info,mode) < IW_NUM_OPER_MODE) && (WIFI_CONFIG(info,mode) >= 0)) + WIFI_CONFIG(info,has_mode) = 1; + } + + /* Get Power Management settings */ + wrq.u.power.flags = 0; + if (iw_get_ext (skfd, ifname, SIOCGIWPOWER, &wrq) >= 0) + { + info.has_power = 1; + memcpy (&(info.power), &(wrq.u.power), sizeof (iwparam)); + } + +#if WIRELESS_EXT > 9 + /* Get Transmit Power and check if it is disabled */ + bool emitTXPowerChanged = false; + if (iw_get_ext (skfd, ifname, SIOCGIWTXPOW, &wrq) >= 0) + { + if (txpower_disabled != info.txpower.disabled) + { + emitTXPowerChanged = true; + } + + info.has_txpower = 1; + memcpy (&(info.txpower), &(wrq.u.txpower), sizeof (iwparam)); + } + has_txpower = info.has_txpower; + txpower_disabled = ( int )info.txpower.disabled; + if (emitTXPowerChanged) + { + emit txPowerChanged(); + } +#endif + +#if WIRELESS_EXT > 10 + /* Get retry limit/lifetime */ + if (iw_get_ext (skfd, ifname, SIOCGIWRETRY, &wrq) >= 0) + { + info.has_retry = 1; + memcpy (&(info.retry), &(wrq.u.retry), sizeof (iwparam)); + } +#endif /* WIRELESS_EXT > 10 */ + + /* Get stats */ + if (WIFI_GET_STATS (skfd, (char *) ifname, &(info.stats)) >= 0) + { + info.has_stats = 1; + } + + return (0); +} + +/* ================================ END IWCONFIG.C ================================ */ + + +Interface_wireless_wirelessextensions::Interface_wireless_wirelessextensions (QStringList * ignoreInterfaces) + : Interface_wireless(ignoreInterfaces) +{ +} + +bool Interface_wireless_wirelessextensions::isSocketOpen() +{ + if (socket <= 0) + socket = iw_sockets_open (); + + return (socket > 0); +} + +void Interface_wireless_wirelessextensions::setActiveDevice( QString device ) +{ + kdDebug () << "activating wireless device " << device << endl; + interface_name = device; + + if (!isSocketOpen()) + return; + + emit interfaceChanged (); + emit strengthChanged (); + emit statusChanged (); + emit modeChanged (); + emit speedChanged (); + valid[current] = false; + emit statsUpdated (); +} + +void Interface_wireless_wirelessextensions::setNoActiveDevice( ) +{ + // interface has disappeared - unplugged? + // reset all info except stats + has_frequency = false; + frequency = 0.0; + has_mode = false; + mode = 0; + has_key = 0; + key = QString::null; + key_size = 0; + key_flags = 0; + essid = QString::null; + access_point_address = QString::null; + ip_address = QString::null; + bitrate = 0; + has_range = false; + has_txpower = false; + txpower_disabled = 0; + + // propagate the changes + setActiveDevice( QString::null ); +} + +QStringList Interface_wireless_wirelessextensions::available_wifi_devices() +{ + QFile procnetdev(PROC_NET_DEV); + procnetdev.open (IO_ReadOnly); + + kdDebug () << "Autodetecting..." << endl; + + QStringList liste; + QString device; + while (!procnetdev.atEnd()) { + procnetdev.readLine (device, 9999); + int pos = device.find (':'); + if (pos == -1) + continue; + device = device.left(pos).stripWhiteSpace(); + if (device.isEmpty()) + continue; + // Some drivers create two interfaces, ethX and wifiX. The + // wifiX device are not useful to users because they only + // control the physical wlan settings, not the logical ones. If + // we find a wifiX device then we move it to the start of the + // list which means the first instance of KWifiManger will pick + // up the ethX and only the second instance will pick up the + // wifiX. + if (device.startsWith("wifi")) + liste.prepend(device); + else + liste.append(device); + } + + + if (liste.isEmpty()) + kdDebug () << "No wireless interface found." << endl; + + return liste; +} + +bool Interface_wireless_wirelessextensions::autodetect_device() +{ + if (!isSocketOpen()) + return false; + + QStringList liste = available_wifi_devices(); + + for (QStringList::Iterator it = liste.begin (); it != liste.end (); ++it) + { + QString device = *it; + kdDebug () << "[ " << device << " ] " << endl; + wireless_info info; + int result = get_info (socket, device, info); + if ((result != -ENODEV) && (result != -ENOTSUP) && + (!ignoreInterfaces || ignoreInterfaces->findIndex(device)==-1)) + { + setActiveDevice(device); + } + } + + if (interface_name.isEmpty()) + { + close(socket); + socket = -1; + return false; + } + + return true; +} + +bool Interface_wireless_wirelessextensions::poll_device_info () +{ + if (current < MAX_HISTORY-1) + ++current; + else + current = 0; + + if (interface_name.isEmpty()) + if (!autodetect_device()) + return false; + + wireless_info info; + int result = get_info (socket, interface_name, info); + if ((result == -ENODEV) || (result == -ENOTSUP)) + { + // interface has disappeared - unplugged? + // reset all info except stats + setNoActiveDevice(); + + close(socket); + socket = -1; + + return false; + } + + bool + emitStatusChanged = false, emitModeChanged = false, emitEssidChanged = + false, emitSpeedChanged = false, emitStrengthChanged = false; + + iwstats tempic2; + WIFI_GET_STATS (socket, (char *) interface_name.latin1(), &tempic2); + has_frequency = WIFI_CONFIG(info,has_freq); + if (has_frequency) + { + if (frequency != WIFI_CONFIG(info,freq)) + emitStatusChanged = true; + frequency = WIFI_CONFIG(info,freq); + } + has_mode = WIFI_CONFIG(info,has_mode); + if (has_mode) + { + if (mode != WIFI_CONFIG(info,mode)) + emitModeChanged = true; + mode = WIFI_CONFIG(info,mode); + } + has_key = WIFI_CONFIG(info,has_key); + if (has_key) + { + if ((key != (char *) WIFI_CONFIG(info,key)) || (key_size != WIFI_CONFIG(info,key_size)) + || (key_flags != WIFI_CONFIG(info,key_flags))) + emitStatusChanged = true; + key = (char *) WIFI_CONFIG(info,key); + key_size = WIFI_CONFIG(info,key_size); + key_flags = WIFI_CONFIG(info,key_flags); + } + if (essid != WIFI_CONFIG(info,essid)) + { + emitStatusChanged = true; + emitEssidChanged = true; + } + essid = (WIFI_CONFIG(info,essid_on) ? WIFI_CONFIG(info,essid) : "any"); + char + ap_addr[256]; + iw_ether_ntop ( (const ether_addr *) info.ap_addr.sa_data, ap_addr); + if (access_point_address != ap_addr) + emitStatusChanged = true; + access_point_address = ap_addr; + if (bitrate != info.bitrate.value) + emitSpeedChanged = true; + bitrate = info.bitrate.value; + has_range = info.has_range; + + sigLevel[current] = tempic2.qual.level; + noiseLevel[current] = tempic2.qual.noise; + + if (has_range) { + + range = info.range.max_qual.qual; + + // the following checks adjust values for sig levels that are in dBm + // according to iwlib.c. If offset is applied, the resulting + // value is negative and the GUI knows it can add the scale + // unit dBm. + + if (tempic2.qual.level > info.range.max_qual.level) { + sigLevel[current] = tempic2.qual.level - 0x100; + noiseLevel[current] = tempic2.qual.noise - 0x100; + } + } + + if (sigLevel[current] < sigLevelMin) + sigLevelMin = sigLevel[current]; + if (sigLevel[current] > sigLevelMax) + sigLevelMax = sigLevel[current]; + + if (noiseLevel[current] < noiseLevelMin) + noiseLevelMin = noiseLevel[current]; + if (noiseLevel[current] > noiseLevelMax) + noiseLevelMax = noiseLevel[current]; + int + tempqual = tempic2.qual.qual; + if (has_range && (range != 0)) + tempqual = tempqual * 100 / range; + if ( qual[current != 0 ? current - 1 : MAX_HISTORY-1] != tempqual) + emitStrengthChanged = true; + + qual[current] = ( tempqual <= 100 ? tempqual : 100 ); + valid[current] = true; + + // try to get our local IP address + struct sockaddr * + sa; + struct sockaddr_in * + sin; + struct ifreq + ifr; + /* Copy the interface name into the buffer */ + strncpy (ifr.ifr_name, interface_name.latin1 (), IFNAMSIZ); + + if (ioctl (socket, SIOCGIFADDR, &ifr) == -1) + { + if (ip_address != "unavailable") + emitStatusChanged = true; + ip_address = "unavailable"; + } + /* Now the buffer will contain the information we requested */ + sa = (struct sockaddr *) &(ifr.ifr_addr); + if (sa->sa_family == AF_INET) + { + sin = (struct sockaddr_in *) sa; + if (ip_address != (QString) inet_ntoa (sin->sin_addr)) + emitStatusChanged = true; + ip_address = (QString) inet_ntoa (sin->sin_addr); + } + else + { + ip_address = "unavailable"; + } + if (emitStatusChanged) + emit statusChanged (); + if (emitStrengthChanged) + emit strengthChanged (); + if (emitModeChanged) + emit modeChanged (); + if (emitSpeedChanged) + emit speedChanged (); + if (emitEssidChanged) + emit essidChanged (essid); + emit statsUpdated (); + return true; +} + +QTable* Interface_wireless_wirelessextensions::get_available_networks () +{ + + networks = new QTable(0,4,0); + networks->horizontalHeader()->setLabel( 0, i18n("Network Name") ); + networks->horizontalHeader()->setLabel( 1, i18n("Mode") ); + networks->horizontalHeader()->setLabel( 2, i18n("Quality") ); + networks->horizontalHeader()->setLabel( 3, i18n("WEP") ); + + KProcIO *iwlist = new KProcIO; + QString iwlist_bin = KStandardDirs::findExe("iwlist"); + if(iwlist_bin.isEmpty()) + iwlist_bin = KStandardDirs::findExe("iwlist", "/usr/local/sbin:/usr/sbin:/sbin"); + if(iwlist_bin.isEmpty()) + iwlist_bin = "iwlist"; // try our best ;/ + + *iwlist << iwlist_bin << interface_name << "scanning"; + +// connect ( iwlist, SIGNAL ( readReady ( KProcIO * ) ), this, SLOT ( parseScanData ( KProcIO * ) ) ); + + if ( !iwlist->start ( KProcess::Block ) ) + KMessageBox::sorry ( 0, i18n ( "Unable to perform the scan. Please make sure the executable \"iwlist\" is in your $PATH." ), + i18n ( "Scanning not possible" ) ); + + // this should never happen. But there was a report about Block not being as blocking as it should, so let's be safe about it + while (iwlist->isRunning()) sleep ( 1 ); + + parseScanData ( iwlist ); + + for (int i = 0; i<4; i++ ) networks->adjustColumn(i); + + return networks; +} + +void +Interface_wireless_wirelessextensions::parseScanData ( KProcIO * iwlist ) +{ + QString data; + int cellcount = 0, iteratecount = 0; + bool ignoreRemainingBits = false; + while ( iwlist->readln ( data, true ) >= 0 ) + { + kdDebug ( ) << "iwlist: " << data << "\n"; + if ( data.contains ( "does not support scanning" ) ) + KMessageBox::sorry ( 0, + i18n + ( "Your card does not support scanning. The results window will not contain any results." ), + i18n ( "Scanning not possible" ) ); + if ( data.contains ( "Scan completed" ) ) + cellcount = 0; // at the very beginning of a scan + if ( data.contains ( "Cell" ) ) { + cellcount++; // new cell discovered + networks->setNumRows ( networks->numRows() +1 ); + ignoreRemainingBits = false; + } + if ( data.contains ( "ESSID:" ) ) + { + QString ssid = data.mid ( data.find ( "\"" ) + 1, data.length ( ) - data.find ( "\"" ) - 2 ); + if ((ssid=="") || (ssid==" ")) ssid = "(hidden cell)"; + networks->setText ( cellcount - 1, 0, ssid ); + } + if ( data.contains ( "Mode:" ) ) + { + if ( data.contains ( "Master" ) ) + networks->setText ( cellcount - 1, 1, QString ( i18n ( "Managed" ) ) ); + if ( data.contains ( "Ad-Hoc" ) ) + networks->setText ( cellcount - 1, 1, QString ( i18n ( "Ad-Hoc" ) ) ); + // if could be that this cell belongs to an SSID already discovered, or that there are more than one + // hidden cells, which doesn't give any new information. So, we first search for duplicates and delete + // this row if it's a duplicate. If the same SSID is there once as Managed and once as Ad-Hoc it is no + // duplicate of course, but "something completely different" + for (iteratecount = 0; iteratecount < cellcount - 1; iteratecount++) + { + kdDebug() << "Comparing <" << networks->text(cellcount - 1, 0) << "," << networks->text(iteratecount,0) << " and <" + << networks->text(cellcount - 1, 1) << "," << networks->text(iteratecount,1) << ">.\n"; + if ((networks->text(cellcount - 1 , 0) == networks->text(iteratecount,0)) && + (networks->text(cellcount - 1 , 1) == networks->text(iteratecount,1)) ) + { + networks->setNumRows ( networks->numRows() - 1 ); + cellcount--; + ignoreRemainingBits = true; + } + } + } + if ( !ignoreRemainingBits && data.contains ( "Encryption key:" ) ) + { + if ( data.contains ( "off" ) ) + networks->setText ( cellcount - 1, 3, QString ( "off" ) ); + else + networks->setText ( cellcount - 1, 3, QString ( "on" ) ); + } + if ( !ignoreRemainingBits && data.contains ( "Quality:" ) ) + { + QString quality = data.mid ( data.find ( ":" ) + 1, data.find ( "/" ) - data.find ( ":" ) - 1 ); + networks->setText ( cellcount - 1, 2, quality ); + } + + if ( !ignoreRemainingBits && data.contains ( "Quality=" ) ) + { + QString quality = data.mid ( data.find ( "=" ) + 1, data.find ( "/" ) - data.find ( "=" ) - 1 ); + networks->setText ( cellcount - 1, 2, quality ); + } + + if ( !ignoreRemainingBits && data.contains ( "wpa_ie" ) ) + { + networks->setText ( cellcount - 1, 3, QString ( "WPA" ) ); + } + + if ( !ignoreRemainingBits && data.contains ( "rsn_ie" ) ) + { + networks->setText ( cellcount - 1, 3, QString ( "WPA2" ) ); + } + + } +} + +#include "interface_wireless_wirelessextensions.moc" diff --git a/wifi/interface_wireless_wirelessextensions.h b/wifi/interface_wireless_wirelessextensions.h new file mode 100644 index 00000000..96d91566 --- /dev/null +++ b/wifi/interface_wireless_wirelessextensions.h @@ -0,0 +1,66 @@ +/*************************************************************************** + interface_wireless_wirelessextensions.h - description + ------------------- + begin : Mon Aug 19 2002 + copyright : (C) 2002 by Stefan Winter + email : [email protected] + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef INTERFACE_WIRELESS_WIRELESSEXTENSIONS_H +#define INTERFACE_WIRELESS_WIRELESSEXTENSIONS_H + +#include "config.h" + +#include <qstring.h> +#include <qtable.h> + +#ifndef WITHOUT_ARTS +#include <arts/iomanager.h> +#include <arts/dispatcher.h> +#endif + +#include "interface_wireless.h" + +class QTable; +class KProcIO; + +extern "C" +{ +#include <iwlib.h> +} + +class Interface_wireless_wirelessextensions:public Interface_wireless +{ +Q_OBJECT public: + Interface_wireless_wirelessextensions (QStringList * ignoreInterfaces); + QTable* get_available_networks (); + +public: + void setActiveDevice( QString device ); + +public slots: + bool poll_device_info (); + +private: + bool isSocketOpen(); + void setNoActiveDevice( ); + QStringList available_wifi_devices(); + bool autodetect_device(); + + QString print_scanning_token (struct iw_event *event); + int get_info (int skfd, const QString& interface, struct wireless_info& info); + QTable* networks; +private slots: + void parseScanData ( KProcIO * iwlist ); +}; + +#endif /* INTERFACE_WIRELESS_WIRELESSEXTENSIONS_H */ diff --git a/wifi/kcmwifi/Makefile.am b/wifi/kcmwifi/Makefile.am new file mode 100644 index 00000000..50a3bc62 --- /dev/null +++ b/wifi/kcmwifi/Makefile.am @@ -0,0 +1,19 @@ +## Makefile.am for kcmwifi + +INCLUDES= $(all_includes) + +kde_module_LTLIBRARIES = kcm_wifi.la +kcm_wifi_la_SOURCES = wificonfig.cpp kcmwifi.cpp configcrypto.ui \ + ifconfigpagebase.ui configpower.ui mainconfigbase.ui \ + mainconfig.cpp ifconfigpage.cpp vendorconfig.cpp +kcm_wifi_la_LDFLAGS = -module -avoid-version $(all_libraries) -no-undefined +kcm_wifi_la_LIBADD = $(LIB_KIO) + +METASOURCES = AUTO + +noinst_HEADERS = + +messages: rc.cpp + $(XGETTEXT) *.cpp -o $(podir)/kcmwifi.pot + +xdg_apps_DATA = kcmwifi.desktop diff --git a/wifi/kcmwifi/configadvanced.ui b/wifi/kcmwifi/configadvanced.ui new file mode 100644 index 00000000..beeda9fe --- /dev/null +++ b/wifi/kcmwifi/configadvanced.ui @@ -0,0 +1,145 @@ +<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> +<class>Form1</class> +<widget class="QWidget"> + <property name="name"> + <cstring>Form1</cstring> + </property> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>600</width> + <height>480</height> + </rect> + </property> + <widget class="KComboBox"> + <property name="name"> + <cstring>cmb_channel</cstring> + </property> + <property name="geometry"> + <rect> + <x>120</x> + <y>23</y> + <width>99</width> + <height>24</height> + </rect> + </property> + </widget> + <widget class="QLabel"> + <property name="name"> + <cstring>lbl_channel</cstring> + </property> + <property name="geometry"> + <rect> + <x>9</x> + <y>33</y> + <width>70</width> + <height>17</height> + </rect> + </property> + <property name="text"> + <string>Channel:</string> + </property> + </widget> + <widget class="QLabel"> + <property name="name"> + <cstring>lbl_txPower</cstring> + </property> + <property name="geometry"> + <rect> + <x>6</x> + <y>60</y> + <width>107</width> + <height>17</height> + </rect> + </property> + <property name="text"> + <string>Transmit power:</string> + </property> + </widget> + <widget class="KComboBox"> + <property name="name"> + <cstring>cmb_txPower</cstring> + </property> + <property name="geometry"> + <rect> + <x>121</x> + <y>58</y> + <width>99</width> + <height>24</height> + </rect> + </property> + </widget> + <widget class="QCheckBox"> + <property name="name"> + <cstring>cb_forceAP</cstring> + </property> + <property name="geometry"> + <rect> + <x>9</x> + <y>91</y> + <width>268</width> + <height>22</height> + </rect> + </property> + <property name="text"> + <string>Force registration to an access point</string> + </property> + </widget> + <spacer> + <property name="name"> + <cstring>spacer1</cstring> + </property> + <property name="orientation"> + <enum>Horizontal</enum> + </property> + <property name="sizeType"> + <enum>Expanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + <property name="geometry"> + <rect> + <x>10</x> + <y>120</y> + <width>40</width> + <height>20</height> + </rect> + </property> + </spacer> + <widget class="QLabel"> + <property name="name"> + <cstring>lbl_apMAC</cstring> + </property> + <property name="geometry"> + <rect> + <x>64</x> + <y>124</y> + <width>89</width> + <height>17</height> + </rect> + </property> + <property name="text"> + <string>MAC address:</string> + </property> + </widget> + <widget class="KLineEdit"> + <property name="name"> + <cstring>kLineEdit1</cstring> + </property> + <property name="geometry"> + <rect> + <x>193</x> + <y>128</y> + <width>140</width> + <height>24</height> + </rect> + </property> + </widget> +</widget> +<layoutdefaults spacing="6" margin="11"/> +</UI> diff --git a/wifi/kcmwifi/configcrypto.ui b/wifi/kcmwifi/configcrypto.ui new file mode 100644 index 00000000..7ef18da2 --- /dev/null +++ b/wifi/kcmwifi/configcrypto.ui @@ -0,0 +1,365 @@ +<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> +<class>ConfigCrypto</class> +<widget class="QWidget"> + <property name="name"> + <cstring>ConfigCrypto</cstring> + </property> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>360</width> + <height>236</height> + </rect> + </property> + <grid> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <property name="margin"> + <number>0</number> + </property> + <widget class="QGroupBox" row="2" column="0" rowspan="1" colspan="3"> + <property name="name"> + <cstring>gb_keys</cstring> + </property> + <property name="sizePolicy"> + <sizepolicy> + <hsizetype>5</hsizetype> + <vsizetype>5</vsizetype> + <horstretch>0</horstretch> + <verstretch>1</verstretch> + </sizepolicy> + </property> + <property name="title"> + <string>Crypto Keys</string> + </property> + <grid> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="QLabel" row="0" column="0"> + <property name="name"> + <cstring>lb_key1</cstring> + </property> + <property name="text"> + <string>Key 1:</string> + </property> + <property name="toolTip" stdset="0"> + <string>The first encryption key. 5 or 13 characters are ASCII keys, 10 or 26 characters are hexadecimal keys.</string> + </property> + </widget> + <widget class="QLabel" row="2" column="0"> + <property name="name"> + <cstring>lb_key3</cstring> + </property> + <property name="text"> + <string>Key 3:</string> + </property> + <property name="toolTip" stdset="0"> + <string>The third encryption key. 5 or 13 characters are ASCII keys, 10 or 26 characters are hexadecimal keys.</string> + </property> + </widget> + <widget class="QLabel" row="1" column="0"> + <property name="name"> + <cstring>lb_key2</cstring> + </property> + <property name="text"> + <string>Key 2:</string> + </property> + <property name="toolTip" stdset="0"> + <string>The second encryption key. 5 or 13 characters are ASCII keys, 10 or 26 characters are hexadecimal keys.</string> + </property> + </widget> + <widget class="QLabel" row="3" column="0"> + <property name="name"> + <cstring>lb_key4</cstring> + </property> + <property name="text"> + <string>Key 4:</string> + </property> + <property name="toolTip" stdset="0"> + <string>The fourth encryption key. 5 or 13 characters are ASCII keys, 10 or 26 characters are hexadecimal keys.</string> + </property> + </widget> + <widget class="QLabel" row="0" column="2"> + <property name="name"> + <cstring>format_1</cstring> + </property> + <property name="sizePolicy"> + <sizepolicy> + <hsizetype>7</hsizetype> + <vsizetype>5</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string><font color="#ff0000">unrecognized</font></string> + </property> + <property name="textFormat"> + <enum>RichText</enum> + </property> + </widget> + <widget class="QLabel" row="1" column="2"> + <property name="name"> + <cstring>format_2</cstring> + </property> + <property name="sizePolicy"> + <sizepolicy> + <hsizetype>7</hsizetype> + <vsizetype>5</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string><font color="#ff0000">unrecognised</font></string> + </property> + <property name="textFormat"> + <enum>RichText</enum> + </property> + </widget> + <widget class="KLineEdit" row="0" column="1"> + <property name="name"> + <cstring>le_key1</cstring> + </property> + <property name="sizePolicy"> + <sizepolicy> + <hsizetype>0</hsizetype> + <vsizetype>0</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + </widget> + <widget class="KLineEdit" row="1" column="1"> + <property name="name"> + <cstring>le_key2</cstring> + </property> + <property name="sizePolicy"> + <sizepolicy> + <hsizetype>0</hsizetype> + <vsizetype>0</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + </widget> + <widget class="QLabel" row="2" column="2"> + <property name="name"> + <cstring>format_3</cstring> + </property> + <property name="sizePolicy"> + <sizepolicy> + <hsizetype>7</hsizetype> + <vsizetype>5</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string><font color="#ff0000">unrecognised</font></string> + </property> + <property name="textFormat"> + <enum>RichText</enum> + </property> + </widget> + <widget class="KLineEdit" row="2" column="1"> + <property name="name"> + <cstring>le_key3</cstring> + </property> + <property name="sizePolicy"> + <sizepolicy> + <hsizetype>0</hsizetype> + <vsizetype>0</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + </widget> + <widget class="QLabel" row="3" column="2"> + <property name="name"> + <cstring>format_4</cstring> + </property> + <property name="sizePolicy"> + <sizepolicy> + <hsizetype>7</hsizetype> + <vsizetype>5</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string><font color="#ff0000">unrecognised</font></string> + </property> + <property name="textFormat"> + <enum>RichText</enum> + </property> + </widget> + <widget class="KLineEdit" row="3" column="1"> + <property name="name"> + <cstring>le_key4</cstring> + </property> + <property name="sizePolicy"> + <sizepolicy> + <hsizetype>0</hsizetype> + <vsizetype>0</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + </widget> + </grid> + </widget> + <widget class="QButtonGroup" row="1" column="0" rowspan="1" colspan="3"> + <property name="name"> + <cstring>bg_cryptoMode</cstring> + </property> + <property name="title"> + <string>Crypto Mode</string> + </property> + <property name="toolTip" stdset="0"> + <string>Sets which types of packets the card will accept.</string> + </property> + <hbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="QRadioButton"> + <property name="name"> + <cstring>rb_openMode</cstring> + </property> + <property name="text"> + <string>Ope&n</string> + </property> + <property name="toolTip" stdset="0"> + <string>Makes the card accept encrypted and unencrypted packets.</string> + </property> + </widget> + <widget class="QRadioButton"> + <property name="name"> + <cstring>rb_restrictMode</cstring> + </property> + <property name="text"> + <string>Restricted</string> + </property> + <property name="toolTip" stdset="0"> + <string>Makes the card only accept encrypted packets.</string> + </property> + </widget> + </hbox> + </widget> + <spacer row="0" column="2"> + <property name="name"> + <cstring>spacer3</cstring> + </property> + <property name="orientation"> + <enum>Horizontal</enum> + </property> + <property name="sizeType"> + <enum>Expanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>80</width> + <height>20</height> + </size> + </property> + </spacer> + <widget class="QLabel" row="0" column="0"> + <property name="name"> + <cstring>lb_useKey</cstring> + </property> + <property name="text"> + <string>Key to use:</string> + </property> + <property name="toolTip" stdset="0"> + <string>Sets which of the four keys is to be used for transmitting packets.</string> + </property> + </widget> + <widget class="QComboBox" row="0" column="1"> + <item> + <property name="text"> + <string>Key 1</string> + </property> + </item> + <item> + <property name="text"> + <string>Key 2</string> + </property> + </item> + <item> + <property name="text"> + <string>Key 3</string> + </property> + </item> + <item> + <property name="text"> + <string>Key 4</string> + </property> + </item> + <property name="name"> + <cstring>cmb_activeKey</cstring> + </property> + </widget> + </grid> +</widget> +<connections> + <connection> + <sender>le_key1</sender> + <signal>textChanged(const QString&)</signal> + <receiver>ConfigCrypto</receiver> + <slot>slotUpdateKey1Status(const QString&)</slot> + </connection> + <connection> + <sender>le_key2</sender> + <signal>textChanged(const QString&)</signal> + <receiver>ConfigCrypto</receiver> + <slot>slotUpdateKey2Status(const QString&)</slot> + </connection> + <connection> + <sender>le_key3</sender> + <signal>textChanged(const QString&)</signal> + <receiver>ConfigCrypto</receiver> + <slot>slotUpdateKey3Status(const QString&)</slot> + </connection> + <connection> + <sender>le_key4</sender> + <signal>textChanged(const QString&)</signal> + <receiver>ConfigCrypto</receiver> + <slot>slotUpdateKey4Status(const QString&)</slot> + </connection> +</connections> +<tabstops> + <tabstop>cmb_activeKey</tabstop> + <tabstop>rb_openMode</tabstop> + <tabstop>rb_restrictMode</tabstop> + <tabstop>le_key1</tabstop> + <tabstop>le_key2</tabstop> + <tabstop>le_key3</tabstop> + <tabstop>le_key4</tabstop> +</tabstops> +<includes> + <include location="local" impldecl="in declaration">wificonfig.h</include> + <include location="local" impldecl="in implementation">configcrypto.ui.h</include> +</includes> +<slots> + <slot>slotUpdateKey1Status( const QString & key )</slot> + <slot>slotUpdateKey2Status( const QString & key )</slot> + <slot>slotUpdateKey3Status( const QString & key )</slot> + <slot>slotUpdateKey4Status( const QString & key )</slot> +</slots> +<functions> + <function specifier="non virtual">load( const IfConfig & ifconfig )</function> + <function specifier="non virtual">save( IfConfig & ifconfig )</function> +</functions> +<layoutdefaults spacing="6" margin="11"/> +<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> +<includehints> + <includehint>klineedit.h</includehint> + <includehint>klineedit.h</includehint> + <includehint>klineedit.h</includehint> + <includehint>klineedit.h</includehint> +</includehints> +</UI> diff --git a/wifi/kcmwifi/configcrypto.ui.h b/wifi/kcmwifi/configcrypto.ui.h new file mode 100644 index 00000000..6ada4aa4 --- /dev/null +++ b/wifi/kcmwifi/configcrypto.ui.h @@ -0,0 +1,157 @@ +/**************************************************************************** +** ui.h extension file, included from the uic-generated form implementation. +** +** If you wish to add, delete or rename functions or slots use +** Qt Designer which will update this file, preserving your code. Create an +** init() function in place of a constructor, and a destroy() function in +** place of a destructor. +*****************************************************************************/ +#include <kdebug.h> +#include "wificonfig.h" + +void ConfigCrypto::load( const IfConfig &ifconfig) +{ + cmb_activeKey->setCurrentItem( ifconfig.m_activeKey-1 ); + bg_cryptoMode->setButton( ifconfig.m_cryptoMode ); + + le_key1->setText( ifconfig.m_keys[0].key() ); + le_key2->setText( ifconfig.m_keys[1].key() ); + le_key3->setText( ifconfig.m_keys[2].key() ); + le_key4->setText( ifconfig.m_keys[3].key() ); +} + +void ConfigCrypto::save( IfConfig &ifconfig ) +{ + ifconfig.m_activeKey = cmb_activeKey->currentItem()+1; + ifconfig.m_cryptoMode = (IfConfig::CryptoMode)bg_cryptoMode->selectedId(); + + ifconfig.m_keys[0].setKey( le_key1->text() ); + ifconfig.m_keys[1].setKey( le_key2->text() ); + ifconfig.m_keys[2].setKey( le_key3->text() ); + ifconfig.m_keys[3].setKey( le_key4->text() ); +} + + +void ConfigCrypto::slotUpdateKey1Status(const QString& key) +{ + KeyStates status = ::Key::isValid( key ); + switch (status) { + case INVALID: + format_1->setText("<font color=\"#ff0000\">unrecognised</font>"); + break; + case EMPTY: + format_1->setText("<font color=\"#000000\">slot empty</font>"); + break; + case HEX_64: + format_1->setText("<font color=\"#00b000\">WEP 64-Bit hex</font>"); + break; + case HEX_128: + format_1->setText("<font color=\"#00b000\">WEP 128-Bit hex</font>"); + break; + case HEX_256: + format_1->setText("<font color=\"#00b000\">WEP 256-Bit hex</font>"); + break; + case STRING_64: + format_1->setText("<font color=\"#00b000\">WEP 64-Bit string</font>"); + break; + case STRING_128: + format_1->setText("<font color=\"#00b000\">WEP 128-Bit string</font>"); + break; + case STRING_256: + format_1->setText("<font color=\"#00b000\">WEP 256-Bit string</font>"); + break; + } +} + +void ConfigCrypto::slotUpdateKey2Status(const QString& key) +{ + KeyStates status = ::Key::isValid( key ); + switch (status) { + case INVALID: + format_2->setText("<font color=\"#ff0000\">unrecognised</font>"); + break; + case EMPTY: + format_2->setText("<font color=\"#000000\">slot empty</font>"); + break; + case HEX_64: + format_2->setText("<font color=\"#00b000\">WEP 64-Bit hex</font>"); + break; + case HEX_128: + format_2->setText("<font color=\"#00b000\">WEP 128-Bit hex</font>"); + break; + case HEX_256: + format_2->setText("<font color=\"#00b000\">WEP 256-Bit hex</font>"); + break; + case STRING_64: + format_2->setText("<font color=\"#00b000\">WEP 64-Bit string</font>"); + break; + case STRING_128: + format_2->setText("<font color=\"#00b000\">WEP 128-Bit string</font>"); + break; + case STRING_256: + format_2->setText("<font color=\"#00b000\">WEP 256-Bit string</font>"); + break; + } +} + +void ConfigCrypto::slotUpdateKey3Status(const QString& key) +{ + KeyStates status = ::Key::isValid( key ); + switch (status) { + case INVALID: + format_3->setText("<font color=\"#ff0000\">unrecognised</font>"); + break; + case EMPTY: + format_3->setText("<font color=\"#000000\">slot empty</font>"); + break; + case HEX_64: + format_3->setText("<font color=\"#00b000\">WEP 64-Bit hex</font>"); + break; + case HEX_128: + format_3->setText("<font color=\"#00b000\">WEP 128-Bit hex</font>"); + break; + case HEX_256: + format_3->setText("<font color=\"#00b000\">WEP 256-Bit hex</font>"); + break; + case STRING_64: + format_3->setText("<font color=\"#00b000\">WEP 64-Bit string</font>"); + break; + case STRING_128: + format_3->setText("<font color=\"#00b000\">WEP 128-Bit string</font>"); + break; + case STRING_256: + format_3->setText("<font color=\"#00b000\">WEP 256-Bit string</font>"); + break; + } +} + +void ConfigCrypto::slotUpdateKey4Status(const QString& key) +{ + KeyStates status = ::Key::isValid( key ); + switch (status) { + case INVALID: + format_4->setText("<font color=\"#ff0000\">unrecognised</font>"); + break; + case EMPTY: + format_4->setText("<font color=\"#000000\">slot empty</font>"); + break; + case HEX_64: + format_4->setText("<font color=\"#00b000\">WEP 64-Bit hex</font>"); + break; + case HEX_128: + format_4->setText("<font color=\"#00b000\">WEP 128-Bit hex</font>"); + break; + case HEX_256: + format_4->setText("<font color=\"#00b000\">WEP 256-Bit hex</font>"); + break; + case STRING_64: + format_4->setText("<font color=\"#00b000\">WEP 64-Bit string</font>"); + break; + case STRING_128: + format_4->setText("<font color=\"#00b000\">WEP 128-Bit string</font>"); + break; + case STRING_256: + format_4->setText("<font color=\"#00b000\">WEP 256-Bit string</font>"); + break; + } +} diff --git a/wifi/kcmwifi/configpower.ui b/wifi/kcmwifi/configpower.ui new file mode 100644 index 00000000..fa44c928 --- /dev/null +++ b/wifi/kcmwifi/configpower.ui @@ -0,0 +1,158 @@ +<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> +<class>ConfigPower</class> +<widget class="QWidget"> + <property name="name"> + <cstring>ConfigPower</cstring> + </property> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>318</width> + <height>186</height> + </rect> + </property> + <grid> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <property name="margin"> + <number>0</number> + </property> + <widget class="QLabel" row="0" column="0"> + <property name="name"> + <cstring>lb_sleepTimeout</cstring> + </property> + <property name="text"> + <string>Sleep timeout:</string> + </property> + <property name="toolTip"> + <string>Sets how long the card will be offline before looking for new packages again.</string> + </property> + </widget> + <widget class="KIntNumInput" row="0" column="1"> + <property name="name"> + <cstring>sb_sleepTimeout</cstring> + </property> + <property name="enabled"> + <bool>true</bool> + </property> + <property name="sizePolicy"> + <sizepolicy> + <hsizetype>1</hsizetype> + <vsizetype>0</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minValue"> + <number>0</number> + </property> + <property name="maxValue"> + <number>60</number> + </property> + <property name="suffix"> + <string> sec</string> + </property> + </widget> + <widget class="QLabel" row="1" column="0"> + <property name="name"> + <cstring>lb_wakeupPeriod</cstring> + </property> + <property name="text"> + <string>Wakeup period:</string> + </property> + <property name="toolTip"> + <string>Sets how long the card will be online and looking for new packages before it falls asleep.</string> + </property> + </widget> + <widget class="QButtonGroup" row="2" column="0" rowspan="1" colspan="2"> + <property name="name"> + <cstring>bg_packets</cstring> + </property> + <property name="title"> + <string>Receive Packets</string> + </property> + <property name="toolTip"> + <string>Sets which sort of packets to listen to.</string> + </property> + <vbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="QRadioButton"> + <property name="name"> + <cstring>bg_allPackets</cstring> + </property> + <property name="text"> + <string>All</string> + </property> + <property name="toolTip"> + <string>Listen to all packet types.</string> + </property> + </widget> + <widget class="QRadioButton"> + <property name="name"> + <cstring>rb_unicastOnly</cstring> + </property> + <property name="text"> + <string>Unicast only</string> + </property> + <property name="toolTip"> + <string>Listen to Unicast packets only.</string> + </property> + </widget> + <widget class="QRadioButton"> + <property name="name"> + <cstring>rb_multicastOnly</cstring> + </property> + <property name="text"> + <string>Multicast/Broadcast only</string> + </property> + <property name="toolTip"> + <string>Listen to Multicast and Broadcast packets only.</string> + </property> + </widget> + </vbox> + </widget> + <widget class="KIntNumInput" row="1" column="1"> + <property name="name"> + <cstring>sb_wakeupPeriod</cstring> + </property> + <property name="sizePolicy"> + <sizepolicy> + <hsizetype>1</hsizetype> + <vsizetype>0</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minValue"> + <number>0</number> + </property> + <property name="maxValue"> + <number>60</number> + </property> + <property name="suffix"> + <string> sec</string> + </property> + </widget> + </grid> +</widget> +<customwidgets> +</customwidgets> +<includes> + <include location="local" impldecl="in declaration">wificonfig.h</include> + <include location="local" impldecl="in implementation">configpower.ui.h</include> +</includes> +<slots> + <slot>load( const IfConfig & ifconfig )</slot> + <slot>save( IfConfig & ifconfig )</slot> +</slots> +<layoutdefaults spacing="6" margin="11"/> +<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> +<includehints> + <includehint>knuminput.h</includehint> + <includehint>knuminput.h</includehint> +</includehints> +</UI> diff --git a/wifi/kcmwifi/configpower.ui.h b/wifi/kcmwifi/configpower.ui.h new file mode 100644 index 00000000..feb0906f --- /dev/null +++ b/wifi/kcmwifi/configpower.ui.h @@ -0,0 +1,22 @@ +/**************************************************************************** +** ui.h extension file, included from the uic-generated form implementation. +** +** If you wish to add, delete or rename functions or slots use +** Qt Designer which will update this file, preserving your code. Create an +** init() function in place of a constructor, and a destroy() function in +** place of a destructor. +*****************************************************************************/ + +void ConfigPower::load( const IfConfig &ifconfig) +{ + sb_sleepTimeout->setValue(ifconfig.m_sleepTimeout); + sb_wakeupPeriod->setValue(ifconfig.m_wakeupPeriod); + bg_packets->setButton(ifconfig.m_pmMode); +} + +void ConfigPower::save( IfConfig &ifconfig) +{ + ifconfig.m_sleepTimeout = sb_sleepTimeout->value(); + ifconfig.m_wakeupPeriod = sb_wakeupPeriod->value(); + ifconfig.m_pmMode = (IfConfig::PowerMode)bg_packets->selectedId(); +} diff --git a/wifi/kcmwifi/ifconfigpage.cpp b/wifi/kcmwifi/ifconfigpage.cpp new file mode 100644 index 00000000..a7306255 --- /dev/null +++ b/wifi/kcmwifi/ifconfigpage.cpp @@ -0,0 +1,173 @@ +/* This file is part of the KDE project + Copyright (C) 2004 Nadeem Hasan <[email protected]> + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to + the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + +#include <kdebug.h> +#include <kdialogbase.h> +#include <klineedit.h> +#include <klocale.h> +#include <kurlrequester.h> + +#include <qcheckbox.h> +#include <qcombobox.h> +#include <qlabel.h> +#include <qpushbutton.h> +#include <qradiobutton.h> + +#include "configcrypto.h" +#include "configpower.h" +#include "ifconfigpage.h" +#include "wificonfig.h" + +#include <unistd.h> +#include <sys/types.h> + +IfConfigPage::IfConfigPage( int configNum, QWidget *parent, const char *name ) + : IfConfigPageBase( parent, name ), + m_configNum( configNum ) +{ + connect( cb_pmEnabled, SIGNAL( toggled( bool ) ), SIGNAL( changed() ) ); + connect( cb_useCrypto, SIGNAL( toggled( bool ) ), SIGNAL( changed() ) ); + connect( le_networkName, SIGNAL( textChanged( const QString & ) ), + SIGNAL( changed() ) ); + connect( cmb_wifiMode, SIGNAL( activated( int ) ), SIGNAL( changed() ) ); + connect( cmb_speed, SIGNAL( activated( int ) ), SIGNAL( changed() ) ); + connect( cb_runScript, SIGNAL( toggled( bool ) ), SIGNAL( changed() ) ); + connect( url_connectScript, SIGNAL( textChanged( const QString & ) ), + SIGNAL( changed() ) ); + connect( cb_Autodetect, SIGNAL( toggled( bool ) ), SIGNAL( changed() ) ); + connect( le_interface, SIGNAL( textChanged( const QString & ) ), + SIGNAL( changed() ) ); + + connect( pb_setupPower, SIGNAL( clicked() ), SLOT( slotSetupPower() ) ); + connect( pb_setupCrypto, SIGNAL( clicked() ), SLOT( slotSetupCrypto() ) ); + + connect( cb_useCrypto, SIGNAL( toggled( bool ) ), + pb_setupCrypto, SLOT( setEnabled( bool ) ) ); + connect( cb_pmEnabled, SIGNAL( toggled( bool ) ), + pb_setupPower, SLOT( setEnabled( bool ) ) ); + connect( cb_runScript, SIGNAL( toggled( bool ) ), + lb_connectScript, SLOT( setEnabled( bool ) ) ); + connect( cb_runScript, SIGNAL( toggled( bool ) ), + lb_connectScript, SLOT( setEnabled( bool ) ) ); + connect( cb_runScript, SIGNAL( toggled( bool ) ), + lb_connectScript, SLOT( setEnabled( bool ) ) ); + connect( cb_Autodetect, SIGNAL( toggled( bool ) ), + le_interface, SLOT( setDisabled( bool ) ) ); + + connect( cb_Autodetect, SIGNAL( toggled( bool ) ), + this, SLOT ( slotResetInterface( bool ) ) ); +} + +void IfConfigPage::slotResetInterface( bool checked ) +{ + if ( checked ) + { + WifiConfig *config = WifiConfig::instance(); + le_interface->setText( config->autoDetectInterface() ); + } +} + +void IfConfigPage::load() +{ + WifiConfig *config = WifiConfig::instance(); + IfConfig ifConfig = config->m_ifConfig[ m_configNum ]; + + le_networkName->setText( ifConfig.m_networkName ); + if ( ! ifConfig.m_interface.isEmpty() ) + { + le_interface->setText( ifConfig.m_interface ); + cb_Autodetect->setChecked( false ); + } + else + { + if ( geteuid()==0 ) + le_interface->setText( config->autoDetectInterface() ); + cb_Autodetect->setChecked( true ); + } + + cmb_wifiMode->setCurrentItem( ifConfig.m_wifiMode ); + cmb_speed->setCurrentItem( ifConfig.m_speed ); + cb_runScript->setChecked( ifConfig.m_runScript ); + url_connectScript->setURL( ifConfig.m_connectScript ); + cb_useCrypto->setChecked( ifConfig.m_useCrypto ); + cb_pmEnabled->setChecked( ifConfig.m_pmEnabled ); + + pb_setupCrypto->setEnabled( ifConfig.m_useCrypto ); + pb_setupPower->setEnabled( ifConfig.m_pmEnabled ); + lb_connectScript->setEnabled( ifConfig.m_runScript ); + url_connectScript->setEnabled( ifConfig.m_runScript ); +} + +void IfConfigPage::save() +{ + WifiConfig *config = WifiConfig::instance(); + IfConfig &ifconfig = config->m_ifConfig[ m_configNum ]; + + ifconfig.m_networkName = le_networkName->text(); + ifconfig.m_interface = cb_Autodetect->isChecked()? QString::null : + le_interface->text(); + ifconfig.m_wifiMode = ( IfConfig::WifiMode ) cmb_wifiMode->currentItem(); + ifconfig.m_speed = ( IfConfig::Speed ) cmb_speed->currentItem(); + ifconfig.m_runScript = cb_runScript->isChecked(); + ifconfig.m_connectScript = url_connectScript->url(); + ifconfig.m_useCrypto = cb_useCrypto->isChecked(); + ifconfig.m_pmEnabled = cb_pmEnabled->isChecked(); +} + +void IfConfigPage::slotSetupPower() +{ + KDialogBase *dlg = new KDialogBase( this, "ConfigPower", true, + i18n( "Configure Power Mode" ), KDialogBase::Ok|KDialogBase::Cancel, + KDialogBase::Ok ); + ConfigPower *power = new ConfigPower( dlg, "ConfigPower" ); + + WifiConfig *config = WifiConfig::instance(); + IfConfig &ifconfig = config->m_ifConfig[ m_configNum ]; + power->load( ifconfig ); + + dlg->setMainWidget( power ); + + if ( dlg->exec() == KDialog::Accepted ) + { + power->save( ifconfig ); + emit changed(); + } +} + +void IfConfigPage::slotSetupCrypto() +{ + KDialogBase *dlg = new KDialogBase( this, "ConfigCrypto", true, + i18n( "Configure Encryption" ), KDialogBase::Ok|KDialogBase::Cancel, + KDialogBase::Ok ); + ConfigCrypto *crypto = new ConfigCrypto( dlg, "ConfigCrypto" ); + + WifiConfig *config = WifiConfig::instance(); + IfConfig &ifconfig = config->m_ifConfig[ m_configNum ]; + crypto->load( ifconfig ); + + dlg->setMainWidget( crypto ); + + if ( dlg->exec() == KDialog::Accepted ) + { + crypto->save( ifconfig ); + emit changed(); + } +} + +#include "ifconfigpage.moc" diff --git a/wifi/kcmwifi/ifconfigpage.h b/wifi/kcmwifi/ifconfigpage.h new file mode 100644 index 00000000..05ae61c0 --- /dev/null +++ b/wifi/kcmwifi/ifconfigpage.h @@ -0,0 +1,51 @@ +/* This file is part of the KDE project + Copyright (C) 2004 Nadeem Hasan <[email protected]> + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to + the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + +#ifndef IFCONFIGPAGE_H +#define IFCONFIGPAGE_H + +#include "ifconfigpagebase.h" +#include "wificonfig.h" + +class IfConfigPage : public IfConfigPageBase +{ + Q_OBJECT + + public: + IfConfigPage( int configNum, QWidget *parent, const char *name ); + ~IfConfigPage() {} + + void load(); + void save(); + + protected slots: + void slotSetupPower(); + void slotSetupCrypto(); + void slotResetInterface( bool checked ); + + signals: + void changed(); + void setupCrypto(); + void setupPower(); + + private: + int m_configNum; +}; + +#endif // IFCONFIGPAGE_H diff --git a/wifi/kcmwifi/ifconfigpagebase.ui b/wifi/kcmwifi/ifconfigpagebase.ui new file mode 100644 index 00000000..45df9e19 --- /dev/null +++ b/wifi/kcmwifi/ifconfigpagebase.ui @@ -0,0 +1,500 @@ +<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> +<class>IfConfigPageBase</class> +<widget class="QWidget"> + <property name="name"> + <cstring>IfConfigPageBase</cstring> + </property> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>626</width> + <height>242</height> + </rect> + </property> + <grid> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="QLayoutWidget" row="0" column="0"> + <property name="name"> + <cstring>layout16</cstring> + </property> + <hbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="QLabel"> + <property name="name"> + <cstring>lb_netName</cstring> + </property> + <property name="text"> + <string>Network name:</string> + </property> + <property name="toolTip" stdset="0"> + <string>SSID of the network to connect to. "any" means "arbitrary available network".</string> + </property> + </widget> + <widget class="KLineEdit"> + <property name="name"> + <cstring>le_networkName</cstring> + </property> + </widget> + <widget class="QLabel"> + <property name="name"> + <cstring>lb_ifName</cstring> + </property> + <property name="text"> + <string>Interface:</string> + </property> + <property name="toolTip" stdset="0"> + <string>SSID of the network to connect to. "any" means "arbitrary available network".</string> + </property> + </widget> + <widget class="QLineEdit"> + <property name="name"> + <cstring>le_interface</cstring> + </property> + <property name="enabled"> + <bool>false</bool> + </property> + </widget> + <widget class="QCheckBox"> + <property name="name"> + <cstring>cb_Autodetect</cstring> + </property> + <property name="text"> + <string>Autodetect</string> + </property> + <property name="checked"> + <bool>true</bool> + </property> + </widget> + <spacer> + <property name="name"> + <cstring>spacer16</cstring> + </property> + <property name="orientation"> + <enum>Horizontal</enum> + </property> + <property name="sizeType"> + <enum>Expanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>226</width> + <height>20</height> + </size> + </property> + </spacer> + </hbox> + </widget> + <widget class="QLayoutWidget" row="4" column="0"> + <property name="name"> + <cstring>layout13</cstring> + </property> + <hbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="QLabel"> + <property name="name"> + <cstring>lb_connectScript</cstring> + </property> + <property name="text"> + <string>Script:</string> + </property> + <property name="toolTip" stdset="0"> + <string>Command to perform after the connection is established, e.g. for obtaining a DHCP lease.</string> + </property> + </widget> + <widget class="KURLRequester"> + <property name="name"> + <cstring>url_connectScript</cstring> + </property> + <property name="enabled"> + <bool>false</bool> + </property> + </widget> + <spacer> + <property name="name"> + <cstring>spacer18</cstring> + </property> + <property name="orientation"> + <enum>Horizontal</enum> + </property> + <property name="sizeType"> + <enum>Expanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>196</width> + <height>20</height> + </size> + </property> + </spacer> + </hbox> + </widget> + <widget class="QLayoutWidget" row="5" column="0"> + <property name="name"> + <cstring>layout11</cstring> + </property> + <hbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="QCheckBox"> + <property name="name"> + <cstring>cb_pmEnabled</cstring> + </property> + <property name="text"> + <string>Enable power management</string> + </property> + <property name="toolTip" stdset="0"> + <string>Enables advanced power management settings.</string> + </property> + </widget> + <widget class="QPushButton"> + <property name="name"> + <cstring>pb_setupPower</cstring> + </property> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="text"> + <string>Configure...</string> + </property> + <property name="toolTip" stdset="0"> + <string>Clicking this button opens the Power Management menu.</string> + </property> + </widget> + <spacer> + <property name="name"> + <cstring>spacer4</cstring> + </property> + <property name="orientation"> + <enum>Horizontal</enum> + </property> + <property name="sizeType"> + <enum>Expanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>285</width> + <height>20</height> + </size> + </property> + </spacer> + </hbox> + </widget> + <widget class="QLayoutWidget" row="2" column="0"> + <property name="name"> + <cstring>layout6</cstring> + </property> + <hbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="QLabel"> + <property name="name"> + <cstring>textLabel2</cstring> + </property> + <property name="text"> + <string>Speed:</string> + </property> + <property name="toolTip" stdset="0"> + <string>Sets the connection speed. Not all cards support this.</string> + </property> + </widget> + <widget class="QComboBox"> + <item> + <property name="text"> + <string>Auto</string> + </property> + </item> + <item> + <property name="text"> + <string>1 Mb/s</string> + </property> + </item> + <item> + <property name="text"> + <string>2 Mb/s</string> + </property> + </item> + <item> + <property name="text"> + <string>5.5 Mb/s</string> + </property> + </item> + <item> + <property name="text"> + <string>6 Mb/s</string> + </property> + </item> + <item> + <property name="text"> + <string>9 Mb/s</string> + </property> + </item> + <item> + <property name="text"> + <string>11 Mb/s</string> + </property> + </item> + <item> + <property name="text"> + <string>12 Mb/s</string> + </property> + </item> + <item> + <property name="text"> + <string>18 Mb/s</string> + </property> + </item> + <item> + <property name="text"> + <string>24 Mb/s</string> + </property> + </item> + <item> + <property name="text"> + <string>36 Mb/s</string> + </property> + </item> + <item> + <property name="text"> + <string>48 Mb/s</string> + </property> + </item> + <item> + <property name="text"> + <string>54 Mb/s</string> + </property> + </item> + <property name="name"> + <cstring>cmb_speed</cstring> + </property> + </widget> + <spacer> + <property name="name"> + <cstring>spacer6</cstring> + </property> + <property name="orientation"> + <enum>Horizontal</enum> + </property> + <property name="sizeType"> + <enum>Expanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>190</width> + <height>20</height> + </size> + </property> + </spacer> + </hbox> + </widget> + <widget class="QLayoutWidget" row="1" column="0"> + <property name="name"> + <cstring>layout5</cstring> + </property> + <hbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="QLabel"> + <property name="name"> + <cstring>lb_opMode</cstring> + </property> + <property name="text"> + <string>Operation mode:</string> + </property> + <property name="toolTip" stdset="0"> + <string>Operation mode of the card. For standard infrastructure networks, "Managed" is appropriate.</string> + </property> + </widget> + <widget class="QComboBox"> + <item> + <property name="text"> + <string>Ad-Hoc</string> + </property> + </item> + <item> + <property name="text"> + <string>Managed</string> + </property> + </item> + <item> + <property name="text"> + <string>Repeater</string> + </property> + </item> + <item> + <property name="text"> + <string>Master</string> + </property> + </item> + <item> + <property name="text"> + <string>Secondary</string> + </property> + </item> + <property name="name"> + <cstring>cmb_wifiMode</cstring> + </property> + </widget> + <spacer> + <property name="name"> + <cstring>spacer5_2</cstring> + </property> + <property name="orientation"> + <enum>Horizontal</enum> + </property> + <property name="sizeType"> + <enum>Expanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>413</width> + <height>20</height> + </size> + </property> + </spacer> + </hbox> + </widget> + <widget class="QLayoutWidget" row="3" column="0"> + <property name="name"> + <cstring>layout14</cstring> + </property> + <hbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="QCheckBox"> + <property name="name"> + <cstring>cb_runScript</cstring> + </property> + <property name="text"> + <string>Execute script on connect</string> + </property> + <property name="toolTip" stdset="0"> + <string>Activates a script to perform arbitrary operations after associating with the network.</string> + </property> + </widget> + <spacer> + <property name="name"> + <cstring>spacer19</cstring> + </property> + <property name="orientation"> + <enum>Horizontal</enum> + </property> + <property name="sizeType"> + <enum>Expanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>131</width> + <height>20</height> + </size> + </property> + </spacer> + </hbox> + </widget> + <widget class="QLayoutWidget" row="6" column="0"> + <property name="name"> + <cstring>layout17</cstring> + </property> + <hbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="QCheckBox"> + <property name="name"> + <cstring>cb_useCrypto</cstring> + </property> + <property name="text"> + <string>Use encryption</string> + </property> + <property name="toolTip" stdset="0"> + <string>Enables WEP encryption.</string> + </property> + </widget> + <widget class="QPushButton"> + <property name="name"> + <cstring>pb_setupCrypto</cstring> + </property> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="text"> + <string>Configure...</string> + </property> + <property name="toolTip" stdset="0"> + <string>Clicking this button opens the Encryption menu.</string> + </property> + </widget> + <spacer> + <property name="name"> + <cstring>spacer5</cstring> + </property> + <property name="orientation"> + <enum>Horizontal</enum> + </property> + <property name="sizeType"> + <enum>Expanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>396</width> + <height>20</height> + </size> + </property> + </spacer> + </hbox> + </widget> + </grid> +</widget> +<connections> + <connection> + <sender>cb_Autodetect</sender> + <signal>toggled(bool)</signal> + <receiver>le_interface</receiver> + <slot>setDisabled(bool)</slot> + </connection> + <connection> + <sender>cb_runScript</sender> + <signal>toggled(bool)</signal> + <receiver>lb_connectScript</receiver> + <slot>setDisabled(bool)</slot> + </connection> + <connection> + <sender>cb_runScript</sender> + <signal>toggled(bool)</signal> + <receiver>url_connectScript</receiver> + <slot>setEnabled(bool)</slot> + </connection> +</connections> +<tabstops> + <tabstop>le_networkName</tabstop> + <tabstop>cmb_wifiMode</tabstop> + <tabstop>cmb_speed</tabstop> + <tabstop>cb_runScript</tabstop> + <tabstop>url_connectScript</tabstop> + <tabstop>cb_pmEnabled</tabstop> + <tabstop>pb_setupPower</tabstop> + <tabstop>cb_useCrypto</tabstop> + <tabstop>pb_setupCrypto</tabstop> +</tabstops> +<includes> + <include location="global" impldecl="in implementation">kdialog.h</include> +</includes> +<layoutdefaults spacing="6" margin="11"/> +<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> +<includehints> + <includehint>klineedit.h</includehint> + <includehint>kurlrequester.h</includehint> + <includehint>klineedit.h</includehint> + <includehint>kpushbutton.h</includehint> +</includehints> +</UI> diff --git a/wifi/kcmwifi/indent-options b/wifi/kcmwifi/indent-options new file mode 100644 index 00000000..b79f4fbb --- /dev/null +++ b/wifi/kcmwifi/indent-options @@ -0,0 +1 @@ +-prs -l120 diff --git a/wifi/kcmwifi/kcmwifi.cpp b/wifi/kcmwifi/kcmwifi.cpp new file mode 100644 index 00000000..55920dad --- /dev/null +++ b/wifi/kcmwifi/kcmwifi.cpp @@ -0,0 +1,382 @@ +/* + Copyright (C) 2004 Nadeem Hasan <[email protected]> + (C) 2001-2004 by Stefan Winter <[email protected]> + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this library; see the file COPYING. If not, write to + the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + +#include <qlayout.h> +#include <qtabwidget.h> +#include <qcombobox.h> +#include <qcheckbox.h> + +#include <kaboutdata.h> +#include <kdebug.h> +#include <kdialog.h> +#include <kgenericfactory.h> +#include <klocale.h> +#include <kmessagebox.h> +#include <kprocio.h> +#include <klineedit.h> + +#include "kcmwifi.h" +#include "ifconfigpage.h" +#include "mainconfig.h" +#include "configcrypto.h" +#include "wificonfig.h" +#include "vendorconfig.h" + +typedef KGenericFactory < KCMWifi, QWidget > KWiFiFactory; +K_EXPORT_COMPONENT_FACTORY (kcm_wifi, KWiFiFactory("kcmwifi") ) + +KCMWifi::KCMWifi(QWidget * parent, const char *name, const QStringList &) + : KCModule (parent, name) +{ + tabs = new QTabWidget (this, "tabs"); + + m_mainConfig = new MainConfig(this, "m_mainConfig"); + + WifiConfig *config = WifiConfig::instance(); + + for ( int i=0; i<config->m_numConfigs; ++i ) + { + IfConfigPage *ifConfigPage = new IfConfigPage( i, tabs, "m_configPage" ); + tabs->addTab(ifConfigPage, i18n ("Config &%1").arg( i+1 )); + connect(ifConfigPage, SIGNAL(changed()), SLOT( slotChanged() ) ); + + m_ifConfigPage[ i ] = ifConfigPage; + } + + QVBoxLayout *top = new QVBoxLayout (this, 0, KDialog::spacingHint()); + top->addWidget( tabs ); + top->addWidget( m_mainConfig ); + top->addStretch(); + + connect(m_mainConfig, SIGNAL(changed()), SLOT( slotChanged() ) ); + connect(m_mainConfig, SIGNAL(activateClicked()), SLOT(slotActivate())); + + if ( geteuid() != 0 ) + { + tabs->setEnabled( false ); + m_mainConfig->setEnabled( false ); + } + else + { + KProcess iwconfigtest; + iwconfigtest << "iwconfig"; + if (!iwconfigtest.start(KProcess::DontCare)) + { + KMessageBox::sorry(0, i18n("Error executing iwconfig. WLAN " + "configurations can only be altered if the wireless tools are " + "properly installed."), i18n ("No Wireless Tools")); + + tabs->setEnabled( false ); + m_mainConfig->setEnabled( false ); + } + } + + load(); + + m_activeVendorCount = 0; + VendorConfig vendors( this ); + vendors.initAll(); +} + + +KCMWifi::~KCMWifi() +{ +} + +void KCMWifi::load() +{ + WifiConfig *config = WifiConfig::instance(); + + for ( int i=0; i<config->m_numConfigs; ++i ) + m_ifConfigPage[ i ]->load(); + + m_mainConfig->load(); +} + +void KCMWifi::save() +{ + WifiConfig *config = WifiConfig::instance(); + for ( int i=0; i<config->m_numConfigs; ++i ) + m_ifConfigPage[ i ]->save(); + + m_mainConfig->save(); + + config->save(); +} + +void KCMWifi::slotActivate() +{ + save(); + activate(); +} + +void KCMWifi::defaults() +{ +} + +void KCMWifi::slotChanged() +{ + emit changed( true ); +} + +IfConfigPage* KCMWifi::addConfigTab( int count, bool vendor ) +{ + + WifiConfig *config = WifiConfig::instance(); + + IfConfigPage* retval = NULL; + + if (vendor) + { + IfConfigPage *ifConfigPage = new IfConfigPage( vendorBase + m_activeVendorCount, tabs, "m_configPage" ); + tabs->addTab(ifConfigPage, i18n ("Vendor %1").arg( m_activeVendorCount+1 ) ); + connect(ifConfigPage, SIGNAL(changed()), SLOT( slotChanged() ) ); + m_ifConfigPage[ vendorBase+m_activeVendorCount ] = ifConfigPage; + m_mainConfig->registerConfig( vendorBase+m_activeVendorCount ); + m_activeVendorCount++; + retval = ifConfigPage; + + // these configs are read-only, so disable all widgets + // the content shall only be modified by VendorConfig code + retval->cb_Autodetect->setEnabled( false ); + retval->le_networkName->setReadOnly( true ); + retval->cmb_wifiMode->setEnabled( false ); + retval->cmb_speed->setEnabled( false ); + retval->cb_runScript->setEnabled( false ); + retval->cb_useCrypto->setEnabled( false ); + retval->cb_pmEnabled->setEnabled( false ); + + } + else + { + for ( int i=config->m_numConfigs; i<config->m_numConfigs+count; i++ ) + { + IfConfigPage *ifConfigPage = new IfConfigPage( i, tabs, "m_configPage" ); + tabs->insertTab(ifConfigPage, i18n ("Config &%1").arg( i+1 ), i ); + connect(ifConfigPage, SIGNAL(changed()), SLOT( slotChanged() ) ); + m_ifConfigPage[ i ] = ifConfigPage; + m_mainConfig->registerConfig( i+1 ); + retval = ifConfigPage; + } + config->m_numConfigs += count; + } + + // if more than one was constructed, only the last is returned + return retval; +} + +void KCMWifi::delConfigTab( int count ) +{ + WifiConfig *config = WifiConfig::instance(); + + for ( int i=config->m_numConfigs-1; i>(config->m_numConfigs)-count-1; i-- ) + { + tabs->setTabEnabled(m_ifConfigPage[ i ], false); + m_ifConfigPage[ i ]->deleteLater(); + + m_mainConfig->unregisterConfig( i+1 ); + + } + + config->m_numConfigs -= count; + +} + +void KCMWifi::activate() +{ + KProcess proc; + + QStringList failedParts; + + WifiConfig *config = WifiConfig::instance(); + int index; + if ( config->m_presetConfig >= config->m_numConfigs ) + { + index = vendorBase+config->m_presetConfig-config->m_numConfigs; + } else + { + index = config->m_presetConfig; + } + + kdDebug() << "I was told to use array slot number " << index << ".\n"; + + IfConfig ifconfig = config->m_ifConfig[ index ]; + + QString tempInterface; + + if ( ifconfig.m_interface.isEmpty() ) { + tempInterface = config->autoDetectInterface(); + kdDebug() << "Autodetecting interface...\n"; + } else + { + tempInterface = ifconfig.m_interface; + } + + proc << "ifconfig" + << tempInterface + << "down"; + kdDebug() << "Command: " << proc.args() << endl; + proc.start (KProcess::Block); + + if ( (!proc.normalExit()) || (proc.exitStatus() != 0) ) + failedParts << i18n("Interface could not be shut down. It is likely that your settings have not been applied."); + + proc.clearArguments(); + + proc << "iwconfig" + << tempInterface; + proc << "essid" + << ifconfig.m_networkName; + + kdDebug() << "Command: " << proc.args() << endl; + proc.start (KProcess::Block); + + if ( (!proc.normalExit()) || (proc.exitStatus() != 0) ) + failedParts << i18n("SSID could not be set."); + + proc.clearArguments(); + + proc << "iwconfig" + << tempInterface; + proc << "mode" + << ifconfig.wifimodeAsString(); + + kdDebug() << "Command: " << proc.args() << endl; + proc.start (KProcess::Block); + + if ( (!proc.normalExit()) || (proc.exitStatus() != 0) ) + failedParts << i18n("Operation mode could not be set."); + + proc.clearArguments(); + + proc << "iwconfig" + << tempInterface; + proc << "rate" + << ifconfig.speedAsString(); + + kdDebug() << "Command: " << proc.args() << endl; + proc.start (KProcess::Block); + + if ( (!proc.normalExit()) || (proc.exitStatus() != 0) ) + failedParts << i18n("Speed settings could not be modified."); + + + proc.clearArguments(); + + proc << "iwconfig" + << tempInterface; + + if (!ifconfig.m_useCrypto ) + { + proc << "key" + << "off"; + } + else + { + for ( int i=0; i<4; ++i ) + { + if ( ifconfig.m_keys[ i ].isValid( ifconfig.m_keys[ i ].key() ) > INVALID ) + { + proc << "key" + << QString( "[%1]").arg( i+1 ) + << QString( "%1").arg( ifconfig.m_keys[ i ].rawKey() ); + } + } + + // kdDebug() << "All appropriate keys have been fed into iwconfig.\n"; + + if ( ifconfig.activeKey().isValid( ifconfig.activeKey().key() ) > INVALID ) + { + // kdDebug() << "Entering final phase of key setup.\n"; + proc << "key" + << ifconfig.cryptomodeAsString(); + proc << "key" + << QString( "[%1]" ).arg( ifconfig.activeKeyId() ); + proc << "key" + << "on"; + } + } + + kdDebug() << "Command: " << proc.args() << endl; + proc.start (KProcess::Block); + + if ( (ifconfig.m_useCrypto) && ((!proc.normalExit()) || (proc.exitStatus() != 0)) ) + failedParts << i18n("Encryption settings could not be set."); + + proc.clearArguments(); + + proc << "iwconfig" + << tempInterface; + + if ( !ifconfig.m_pmEnabled ) + { + proc << "power" + << "off"; + } + else + { + proc << "power" + << "period" + << QString( "%1" ).arg( ifconfig.m_wakeupPeriod ); + proc << "power" + << "timeout" + << QString( "%1" ).arg( ifconfig.m_sleepTimeout ); + proc << ifconfig.powermodeAsString(); + } + + kdDebug() << "Command: " << proc.args() << endl; + proc.start (KProcess::Block); + + if ( (ifconfig.m_pmEnabled) && ((!proc.normalExit()) || (proc.exitStatus() != 0)) ) + failedParts << i18n("Power management settings could not be set."); + + proc.clearArguments(); + proc << "ifconfig" + << tempInterface + << "up"; + + kdDebug() << "Command: " << proc.args() << endl; + proc.start (KProcess::Block); + + if ( (!proc.normalExit()) || (proc.exitStatus() != 0) ) + failedParts << i18n("Interface could not be re-enabled."); + + if ( ifconfig.m_runScript ) + { + proc.clearArguments(); + proc << QStringList::split( " ", ifconfig.m_connectScript ); + + proc.start(KProcess::DontCare); + } + +if (!failedParts.empty()) KMessageBox::informationList(0,i18n("The following settings could not be applied:"),failedParts); + +} + +extern "C" +{ + void init_wifi() + { + KCMWifi::activate(); + } +} + + +#include "kcmwifi.moc" diff --git a/wifi/kcmwifi/kcmwifi.desktop b/wifi/kcmwifi/kcmwifi.desktop new file mode 100644 index 00000000..15d506dc --- /dev/null +++ b/wifi/kcmwifi/kcmwifi.desktop @@ -0,0 +1,162 @@ +[Desktop Entry] +Icon=kwifimanager +Type=Application +Exec=kcmshell kcmwifi +DocPath= +X-KDE-ModuleType=Library +X-KDE-Library=wifi +X-KDE-RootOnly=true +Name=Wireless Network +Name[ar]=شبكة لاسلكية +Name[bg]=Безжична мрежа +Name[bn]=ওয়্যারলেস নেটওয়ার্ক +Name[br]=Rouedad hep neud +Name[bs]=Bežična mreža +Name[ca]=Xarxa sense fils +Name[cs]=Bezdrátová síť +Name[cy]=Rhwydwaith Di-Wifren +Name[da]=Trådløst netværk +Name[de]=Drahtloses Netzwerk +Name[el]=Ασύρματο δίκτυο +Name[eo]=Sendrata reto +Name[es]=Red inalámbrica +Name[et]=Traadita võrk +Name[eu]=Kablerik gabeko sarea +Name[fa]=شبکۀ بیسیم +Name[fi]=Langaton verkko +Name[fr]=Réseau sans fil +Name[ga]=Gréasán gan sreang +Name[gl]=Rede inalámbrica +Name[he]=רשת אלחוטית +Name[hi]=वायरलेस नेटवर्क +Name[hr]=Bežična mreža +Name[hu]=Vezeték nélküli hálózat +Name[is]=Þráðlaus nettenging +Name[it]=Rete senza fili +Name[ja]=ワイヤレスネットワーク +Name[ka]=უკაბელო ქსელი +Name[kk]=Сымсыз желі +Name[km]=បណ្ដាញឥតខ្សែ +Name[lt]=Bevielis tinklas +Name[mk]=Безжична мрежа +Name[ms]=Jaringan Tanpa Wayar +Name[nb]=Trådløst nettverk +Name[nds]=WLAN-Nettwark +Name[ne]=तारविहिन सञ्जाल +Name[nl]=Draadloos netwerk +Name[nn]=Trådlaust nettverk +Name[pa]=ਬੇਤਾਰ ਨੈੱਟਵਰਕ +Name[pl]=Sieć bezprzewodowa +Name[pt]=Rede Sem Fios +Name[pt_BR]=Rede Sem Fio +Name[ru]=Беспроводная сеть +Name[se]=Jođaskeahttes fierpmádat +Name[sk]=Bezdrôtová sieť +Name[sl]=Brezžično omrežje +Name[sr]=Бежична мрежа +Name[sr@Latn]=Bežična mreža +Name[sv]=Trådlöst nätverk +Name[ta]=கம்பியில்லா பிணையம் +Name[tg]=Шабакаи Беноқил +Name[tr]=Telsiz Ağ +Name[uk]=Радіомережа +Name[uz]=Simsiz tarmoq +Name[uz@cyrillic]=Симсиз тармоқ +Name[zh_CN]=无线网 +Name[zh_HK]=無線網絡 +Name[zh_TW]=無線網路 +Comment=Set up your wireless LAN +Comment[ar]=ركب شبكة LAN الاسلكية الخاصةبك +Comment[bg]=Настройване на безжична локална мрежа +Comment[bn]=আপনার ওয়্যারলেস ল্যান স্থাপন করুন +Comment[br]=Lakaat ho roueded hep neud +Comment[bs]=Podesite vaš bežični LAN +Comment[ca]=Configureu la vostra xarxa local sense fils +Comment[cs]=Nastavte si svou bezdrátovou síť +Comment[cy]=Gosod eich LAN di-wifren +Comment[da]=Opsætning af trådløst LAN +Comment[de]=Einrichtung eines drahtlosen Netzwerkes +Comment[el]=Ρυθμίστε το ασύρματο δίκτυό σας +Comment[es]=Configure su red inalámbrica local +Comment[et]=Traadita võrgu seadistamine +Comment[eu]=Konfiguratu zure kablerik gabeko LAN-a +Comment[fa]=تنظیم شبکۀ داخلی بیسیم شما +Comment[fi]=Aseta langaton lähiverkko +Comment[fr]=Configuration de votre réseau sans fil +Comment[gl]=Configura a túa rede inalámbrica +Comment[he]=הגדרת רשת ה- LAN האלחוטית שלך +Comment[hi]=आपके बेतार लैन सेट अप करे +Comment[hr]=Podešavamke vaše bežične lokalne mrežu +Comment[hu]=A vezeték nélküli (WiFi) hálózat beállításai +Comment[is]=Uppsetning á þráðlausu staðarneti +Comment[it]=Configura la tua rete LAN senza fili +Comment[ja]=ワイヤレス LAN をセットアップ +Comment[ka]=თქვენი უკაბელო LAN-ის გამართვა +Comment[kk]=Сымсыз желіңізді баптау +Comment[km]=រៀបចំបណ្ដាញមូលដ្ឋានឥតខ្សែរបស់អ្នក +Comment[lt]=Nustatyti bevielio ryšio tinklą +Comment[mk]=Поставете ја вашата безжична локална мрежа +Comment[ms]=Pasang LAN tanpa wayar +Comment[nb]=Sett opp trådløst nettverk +Comment[nds]=Dien Funk-Nettwark instellen +Comment[ne]=तपाईँको तारविहिन LAN सेटअप गर्नुहोस् +Comment[nl]=Stel hier uw draadloos netwerk in +Comment[nn]=Set opp trådlaust nettverk +Comment[pl]=Ustawienia sieci bezprzewodowej +Comment[pt]=Configuração da rede sem fios +Comment[pt_BR]=Configurar a sua rede local sem fio +Comment[ru]=Настройка беспроводной сети +Comment[se]=Heivet iežat jođaskeahttes LAN:a +Comment[sk]=Nastavte si vašu bezdrôtovu sieť LAN +Comment[sl]=Nastavite svoje brezžično lokalno omrežje +Comment[sr]=Подесите вашу бежичну локалну мрежу +Comment[sr@Latn]=Podesite vašu bežičnu lokalnu mrežu +Comment[sv]=Anpassa trådlöst nätverk +Comment[ta]=உங்கள் கம்பியில்லா LAN ஐ அமைக்கிறது +Comment[tg]=Барпосозии шабакаи беноқили маҳаллии шумо +Comment[tr]=Telsiz ağı yapılandır +Comment[uk]=Налаштування локальної радіо мережі +Comment[uz]=Simsiz tarmoqni oʻrnatish +Comment[uz@cyrillic]=Симсиз тармоқни ўрнатиш +Comment[zh_CN]=设置您的无线局域网 +Comment[zh_HK]=設定您的無線網絡 +Comment[zh_TW]=設定您的無線網路 +Keywords=network,orinoco,wireless,wlan,wlan-ng,wifi,Ad-Hoc +Keywords[bg]=мрежа, безжична, настройки, локална, споделяне, network, orinoco, wireless, wlan, wlan-ng +Keywords[ca]=xarxa,orinoco,sense fils,wlan,wlan-ng,wifi,Ad-Hoc +Keywords[cs]=síť,orinoco,bezdrát,wlan,wlan-ng,wifi,adhoc +Keywords[da]=network,orinoco,trådløs,wlan,wlan-ng, wifi,Ad-Hoc +Keywords[de]=Netzwerk,orinoco,drahtlos,wlan,wlan-ng,wifi,Ad-Hoc +Keywords[el]=δίκτυο,orinoco,ασύρματο,wlan,wlan-ng,wifi,Ad-Hoc +Keywords[es]=red,orinoco,inalámbrica,wlan,wlan-ng,wifi,Ad-Hoc +Keywords[et]=võrk,orinoco,traadita,wlan,wlan-ng,wifi,Ad-Hoc +Keywords[eu]=sarea,orinoco,kablerik gabe,wlan,wlan-ng,ad-hoc +Keywords[fa]=شبکه، orinoco، بیسیم، شبکۀ محلی بیسیم، wlan-ng، wifi، Ad-Hoc +Keywords[fi]=verkko,orinoco,langaton,wlan,wlan-ng,wifi,Ad-Hoc +Keywords[fr]=network,orinoco,wireless,wlan,wlan-ng,sans fil,Ad-Hoc +Keywords[gl]=rede,orinoco,sen fíos,wlan,wlan-ng,wifi,Ad-Hoc +Keywords[he]=network,orinoco,wireless,wlan,wlan-ng,wifi,Ad-Hoc, רשת אלחוטי +Keywords[hu]=hálózat,orinoco,vezeték nélküli,wlan,wlan-ng,wifi,ad-hoc +Keywords[is]=network,orinoco,wireless,wlan,wlan-ng,wifi,Ad-Hoc,þráðlaust,net +Keywords[it]=rete,orinoco,senza fili,wlan,wlan-ng,wifi,Ad-Hoc +Keywords[ja]=ネットワーク,orinoco,ワイヤレス,wlan,wlan-ng,wifi,Ad-Hoc +Keywords[km]=បណ្ដាញ,orinoco,ឥតខ្សែ,wlan,wlan-ng,wifi,Ad-Hoc +Keywords[lt]=network,orinoco,wireless,wlan,wlan-ng,wifi,Ad-Hoc,tinklas,bevielis,bevielis ryšys +Keywords[nb]=nettverk,orinoco,trådløst,wlan,wlan-ng +Keywords[nds]=nettwark,orinoco,drahtloos,wlan,wlan-ng,wifi,Ad-Hoc +Keywords[ne]=सञ्जाल,ओरिनोको,तारविहिन,wlan,wlan-ng,wifi,Ad-Hoc +Keywords[nl]=netwerk,orinoco,wireless,wlan,wlan-ng,draadloos,wifi,ad-hoc +Keywords[nn]=nettverk,orinoco,trådlaust,wlan,wlan-ng,wifi,ad-hoc +Keywords[pl]=sieć,orinoco,bezprzewodowy,bezprzewodowa,wi-fi,wlan,wlan-ng,wifi,ad-hoc,adhoc +Keywords[pt]=rede,orinoco,wireless,wlan,wlan-ng,sem fios,wifi,ad-hoc +Keywords[pt_BR]=rede,orinoco,sem fio,wlan,wlan-ng,wifi,Ad-Hoc +Keywords[sl]=omrežje,orinoco,brezžično,wlan,wlan-ng,wifi,Ad-Hoc +Keywords[sr]=network,orinoco,wireless,wlan,wlan-ng,wifi,Ad-Hoc,мрежа,ориноко,бежична,бежично +Keywords[sr@Latn]=network,orinoco,wireless,wlan,wlan-ng,wifi,Ad-Hoc,mreža,orinoko,bežična,bežično +Keywords[sv]=nätverk,orinoco,trådlöst,wlan,wlan-ng,wifi,ad-hoc +Keywords[uk]=мережа,orinoco,радіо,бездротовий,зв'язок,wlan,wlan-ng,wifi,Ad-Hoc +Keywords[uz]=tarmoq,orinoco,simsiz,wlan,wlan-ng,simsiz tarmoq,wifi,Ad-Hoc +Keywords[uz@cyrillic]=тармоқ,orinoco,симсиз,wlan,wlan-ng,симсиз тармоқ,wifi,Ad-Hoc +Keywords[zh_CN]=network,orinoco,wireless,wlan,wlan-ng,wifi,Ad-Hoc,网络,无线,无线网络 + +Categories=Qt;KDE;X-KDE-settings-network;Settings; diff --git a/wifi/kcmwifi/kcmwifi.h b/wifi/kcmwifi/kcmwifi.h new file mode 100644 index 00000000..747688ec --- /dev/null +++ b/wifi/kcmwifi/kcmwifi.h @@ -0,0 +1,62 @@ +/* + Copyright (C) 2004 Nadeem Hasan <[email protected]> + (C) 2001 by Stefan Winter <[email protected]> + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this library; see the file COPYING. If not, write to + the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + +#ifndef KCMWIFI_H +#define KCMWIFI_H + +#include <kcmodule.h> + +#include <qstring.h> + +class IfConfigPage; +class MainConfig; +class QTabWidget; +class KProcIO; + +class KCMWifi : public KCModule +{ + Q_OBJECT +public: + KCMWifi (QWidget * parent, const char *name, const QStringList &); + ~KCMWifi (); + + void load(); + void save(); + void defaults(); + int buttons(); + + static void activate(); + IfConfigPage* addConfigTab( int count, bool vendor ); + void delConfigTab( int count ); + + static const int vendorBase = 10; + +protected slots: + void slotActivate(); + void slotChanged(); + +private: + MainConfig *m_mainConfig; + IfConfigPage *m_ifConfigPage[ 15 ]; // that makes 5 vendor configs + QTabWidget* tabs; + int m_activeVendorCount; +}; + +#endif // KCMWIFI_H diff --git a/wifi/kcmwifi/mainconfig.cpp b/wifi/kcmwifi/mainconfig.cpp new file mode 100644 index 00000000..506d1f02 --- /dev/null +++ b/wifi/kcmwifi/mainconfig.cpp @@ -0,0 +1,108 @@ +/* This file is part of the KDE project + Copyright (C) 2004 Nadeem Hasan <[email protected]> + (C) 2001-2004 by Stefan Winter <[email protected]> + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to + the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + +#include "mainconfig.h" +#include "wificonfig.h" +#include "kcmwifi.h" + +#include <kcombobox.h> +#include <klineedit.h> +#include <klocale.h> +#include <kmessagebox.h> +#include <kprocio.h> +#include <kpushbutton.h> +#include <knuminput.h> + +#include <qcheckbox.h> +#include <qfile.h> + +MainConfig::MainConfig( QWidget *parent, const char *name ) + : MainConfigBase( parent, name ) +{ + WifiConfig *config = WifiConfig::instance(); + + for (int i=1;i<=config->m_numConfigs;i++) { + cmb_presetConfig->insertItem( i18n( "Config %1" ).arg( i ) ); + } + + + connect( cb_usePreset, SIGNAL( toggled( bool ) ), SIGNAL( changed() ) ); + connect( cmb_presetConfig, SIGNAL( activated( int ) ), SIGNAL( changed() ) ); + connect( sb_numConfigs, SIGNAL( valueChanged( int ) ), SIGNAL( changed() ) ); + + connect( pb_activate, SIGNAL( clicked() ), SIGNAL( activateClicked() ) ); + connect( sb_numConfigs, SIGNAL( valueChanged( int ) ), SLOT( slotChangeNumConfigs( int ) ) ); + +} + +void MainConfig::load() +{ + WifiConfig *config = WifiConfig::instance(); + + cb_usePreset->setChecked( config->m_usePreset ); + cmb_presetConfig->setCurrentItem( config->m_presetConfig ); + sb_numConfigs->setValue( config->m_numConfigs ); +} + +void MainConfig::save() +{ + WifiConfig *config = WifiConfig::instance(); + + config->m_usePreset = cb_usePreset->isChecked(); + config->m_presetConfig = cmb_presetConfig->currentItem(); + config->m_numConfigs = sb_numConfigs->value(); +} + +void MainConfig::slotChangeNumConfigs( int newnumber ) +{ + + WifiConfig* config = WifiConfig::instance(); + + if ( config->m_numConfigs < newnumber ) // number of configs raised + { + int diff = newnumber - config->m_numConfigs; + ( (KCMWifi*)parentWidget() )->addConfigTab( diff, false ); + } + else // number of configs lowered + { + int diff = config->m_numConfigs - newnumber; + ( (KCMWifi*)parentWidget() )->delConfigTab( diff ); + } +} + +void MainConfig::registerConfig( int number ) +{ + if ( number >= KCMWifi::vendorBase ) + { + cmb_presetConfig->insertItem( i18n( "Vendor %1" ).arg( number-KCMWifi::vendorBase+1 ) ); + } + else + { + WifiConfig* config = WifiConfig::instance(); + cmb_presetConfig->insertItem( i18n( "Config %1" ).arg( number ), number-1 ); + } +} + +void MainConfig::unregisterConfig( int number ) +{ + cmb_presetConfig->removeItem( number-1 ); +} + +#include "mainconfig.moc" diff --git a/wifi/kcmwifi/mainconfig.h b/wifi/kcmwifi/mainconfig.h new file mode 100644 index 00000000..83b014ac --- /dev/null +++ b/wifi/kcmwifi/mainconfig.h @@ -0,0 +1,51 @@ +/* This file is part of the KDE project + Copyright (C) 2004 Nadeem Hasan <[email protected]> + (C) 2001-2004 by Stefan Winter <[email protected]> + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. If not, write to + the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + +#ifndef CONFIGMAIN_H +#define CONFIGMAIN_H + +#include "mainconfigbase.h" + +class KProcIO; + +class MainConfig : public MainConfigBase +{ + Q_OBJECT + + public: + MainConfig( QWidget *parent, const char *name=0 ); + ~MainConfig() {} + + void load(); + void save(); + + void registerConfig( int number ); + void unregisterConfig( int number ); + + signals: + void changed(); + void activateClicked(); + + protected slots: + void slotChangeNumConfigs( int newnumber ); +}; + +#endif // CONFIGMAIN_H + diff --git a/wifi/kcmwifi/mainconfigbase.ui b/wifi/kcmwifi/mainconfigbase.ui new file mode 100644 index 00000000..f7ecef24 --- /dev/null +++ b/wifi/kcmwifi/mainconfigbase.ui @@ -0,0 +1,166 @@ +<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> +<class>MainConfigBase</class> +<widget class="QWidget"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>581</width> + <height>135</height> + </rect> + </property> + <vbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <property name="margin"> + <number>0</number> + </property> + <widget class="QGroupBox"> + <property name="name"> + <cstring>grpGeneralSettings</cstring> + </property> + <property name="title"> + <string>General Settings</string> + </property> + <grid> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="KPushButton" row="1" column="2" rowspan="1" colspan="2"> + <property name="name"> + <cstring>pb_activate</cstring> + </property> + <property name="text"> + <string>&Activate</string> + </property> + <property name="toolTip" stdset="0"> + <string>Applies the configuration to the interface.</string> + </property> + </widget> + <spacer row="2" column="2" rowspan="1" colspan="3"> + <property name="name"> + <cstring>spacerrow2</cstring> + </property> + <property name="orientation"> + <enum>Horizontal</enum> + </property> + <property name="sizeType"> + <enum>Expanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>146</width> + <height>20</height> + </size> + </property> + </spacer> + <widget class="QLabel" row="2" column="0"> + <property name="name"> + <cstring>lb_numConfig</cstring> + </property> + <property name="text"> + <string>Number of configurations:</string> + </property> + <property name="toolTip" stdset="0"> + <string>Modifies the number of configurations that this tool should provide.</string> + </property> + </widget> + <widget class="KComboBox" row="1" column="1"> + <property name="name"> + <cstring>cmb_presetConfig</cstring> + </property> + <property name="toolTip" stdset="0"> + <string>Selects which of the configurations is to be applied.</string> + </property> + </widget> + <widget class="KIntNumInput" row="2" column="1"> + <property name="name"> + <cstring>sb_numConfigs</cstring> + </property> + <property name="enabled"> + <bool>true</bool> + </property> + <property name="sizePolicy"> + <sizepolicy> + <hsizetype>1</hsizetype> + <vsizetype>0</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minValue"> + <number>1</number> + </property> + <property name="maxValue"> + <number>10</number> + </property> + </widget> + <widget class="QLabel" row="1" column="0"> + <property name="name"> + <cstring>lb_config</cstring> + </property> + <property name="text"> + <string>Configuration to load:</string> + </property> + <property name="toolTip" stdset="0"> + <string>Selects which of the configurations is to be applied.</string> + </property> + </widget> + <spacer row="0" column="3" rowspan="1" colspan="2"> + <property name="name"> + <cstring>spacer1</cstring> + </property> + <property name="orientation"> + <enum>Horizontal</enum> + </property> + <property name="sizeType"> + <enum>Expanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>106</width> + <height>20</height> + </size> + </property> + </spacer> + <spacer row="1" column="4"> + <property name="name"> + <cstring>spacer2</cstring> + </property> + <property name="orientation"> + <enum>Horizontal</enum> + </property> + <property name="sizeType"> + <enum>Expanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>66</width> + <height>20</height> + </size> + </property> + </spacer> + <widget class="QCheckBox" row="0" column="0" rowspan="1" colspan="3"> + <property name="name"> + <cstring>cb_usePreset</cstring> + </property> + <property name="text"> + <string>Load preset &configuration on startup</string> + </property> + <property name="toolTip" stdset="0"> + <string>When this box is checked, your settings are applied when you launch the Control Center module.</string> + </property> + </widget> + </grid> + </widget> + </vbox> +</widget> +<layoutdefaults spacing="6" margin="11"/> +<includehints> + <includehint>kpushbutton.h</includehint> + <includehint>kcombobox.h</includehint> + <includehint>knuminput.h</includehint> + <includehint>knuminput.h</includehint> +</includehints> +</UI> diff --git a/wifi/kcmwifi/vendorconfig.cpp b/wifi/kcmwifi/vendorconfig.cpp new file mode 100644 index 00000000..b237f4cc --- /dev/null +++ b/wifi/kcmwifi/vendorconfig.cpp @@ -0,0 +1,271 @@ +/* + Copyright (C) 2005 Stefan Winter <[email protected]> + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this library; see the file COPYING. If not, write to + the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + +#include <qdir.h> +#include <qstringlist.h> +#include <qbuttongroup.h> +#include <qradiobutton.h> +#include <qcombobox.h> +#include <qcheckbox.h> + +#include <kdebug.h> +#include <klineedit.h> +#include <kcombobox.h> + +#include "kcmwifi.h" +#include "vendorconfig.h" +#include "ifconfigpage.h" +#include "configcrypto.h" +#include "wificonfig.h" + +VendorConfig::VendorConfig ( KCMWifi * caller ) +{ + m_caller = caller; + m_totalConfigs = 0; +} + +void +VendorConfig::initAll ( ) +{ + initSuSE_92plus ( ); + initDebian ( ); +} + +void +VendorConfig::initSuSE_92plus ( ) +{ + + /* configurations are located in /etc/sysconfig/network/ifcfg-wlan* + there can be more than one if there are multiple wireless interfaces */ + + QDir filelist ( "/etc/sysconfig/network", "ifcfg-wlan*" ); + QStringList files = filelist.entryList ( ); + + if ( files.count() == 0 ) + { + return; + } + + for ( QStringList::Iterator it = files.begin ( ); it != files.end ( ); ++it ) + { + if ( ( ( *it ).endsWith ( "~" ) ) == false ) + { // ignore backup files + QFile configfile ( QString ( "/etc/sysconfig/network/%1" ).arg ( *it ) ); + configfile.open ( IO_ReadOnly ); + kdDebug ( ) << "Opened SuSE configuration file " << configfile.name ( ) << "\n"; + + IfConfigPage *newtab = m_caller->addConfigTab ( 1, true ); + /* this config tab gets automagically stored in an array, the first + starting at position vendorBase. We need to construct its power + and crypto settings and therefore need the array index, which is + vendorBase+m_totalConfigs. It is _essential_ that m_totalConfigs + is incremented _after_ successful setup of each given config. */ + + // init crypto entries + ConfigCrypto *crypto = new ConfigCrypto ( 0, "ConfigCrypto" ); + WifiConfig *config = WifiConfig::instance ( ); + IfConfig & ifconfig = config->m_ifConfig[KCMWifi::vendorBase + m_totalConfigs]; + + QString buffer; + while ( configfile.readLine ( buffer, 255 ) != -1 ) + { + // lines look like WIRELESS_ESSID='bla', so split it into WIRELESS_ESSID and bla + QString var = buffer.section ( '=', 0, 0 ); + QString value = buffer.section ( '=', 1, 1 ); + value = value.mid ( 1, value.length ( ) - 3 ); + kdDebug ( ) << "Variable " << var << " contains " << value << ".\n"; + // evaluate the meaningful lines + if ( var == "WIRELESS_ESSID" ) + { + newtab->le_networkName->setText ( value ); + } + else if ( var == "WIRELESS_MODE" ) + { + newtab->cmb_wifiMode->setCurrentItem ( IfConfig::convertToWifiModeFromString ( value ) ); + } + else if ( var == "WIRELESS_BITRATE" ) + { + newtab->cmb_speed->setCurrentItem ( IfConfig::convertToSpeedFromString ( value ) ); + } + else if ( var == "WIRELESS_DEFAULT_KEY" ) + { + crypto->cmb_activeKey->setCurrentItem ( value.toInt ( ) ); + } + else if ( var == "WIRELESS_AUTH_MODE" ) + { + if ( value == "shared" || value == "sharedkey" || value == "restricted" ) + { + crypto->rb_restrictMode->setChecked ( true ); + newtab->cb_useCrypto->setChecked ( true ); + } + if ( value == "open" || value == "opensystem" || value == "" ) + { + crypto->rb_openMode->setChecked ( true ); + newtab->cb_useCrypto->setChecked ( false ); + } + } + else if ( var == "WIRELESS_KEY_0" ) + { + if ( value.startsWith ( "s:" ) ) + value = value.right ( value.length ( ) - 2 ); + crypto->le_key1->setText ( value ); + } + else if ( var == "WIRELESS_KEY_1" ) + { + if ( value.startsWith ( "s:" ) ) + value = value.right ( value.length ( ) - 2 ); + crypto->le_key2->setText ( value ); + } + else if ( var == "WIRELESS_KEY_2" ) + { + if ( value.startsWith ( "s:" ) ) + value = value.right ( value.length ( ) - 2 ); + crypto->le_key3->setText ( value ); + } + else if ( var == "WIRELESS_KEY_3" ) + { + if ( value.startsWith ( "s:" ) ) + value = value.right ( value.length ( ) - 2 ); + crypto->le_key4->setText ( value ); + } + } + newtab->save ( ); + crypto->save ( ifconfig ); + configfile.close ( ); + m_totalConfigs++; + } + } + +} + +void +VendorConfig::initDebian ( ) +{ + QFile configfile ( QString ( "/etc/network/interfaces" ) ); + if ( !configfile.open ( IO_ReadOnly ) ) + { + return; + } + + kdDebug ( ) << "Opened Debian configuration file " << configfile.name ( ) << "\n"; + + IfConfigPage *newtab = m_caller->addConfigTab ( 1, true ); +/* this config tab gets automagically stored in an array, the first +starting at position vendorBase. We need to construct its power +and crypto settings and therefore need the array index, which is +vendorBase+m_totalConfigs. It is _essential_ that m_totalConfigs +is incremented _after_ successful setup of each given config. */ +// init crypto entries + ConfigCrypto *crypto = new ConfigCrypto ( 0, "ConfigCrypto" ); + WifiConfig *config = WifiConfig::instance ( ); + IfConfig & ifconfig = config->m_ifConfig[KCMWifi::vendorBase + m_totalConfigs]; + + QString buffer; + while ( configfile.readLine ( buffer, 255 ) != -1 ) + { +// lines look like wireless-defaultkey bla, so split it into wireless-defaultkey and bla + QString var = buffer.section ( ' ', 0, 0 ); + QString value = buffer.section ( ' ', 1, 1 ); + kdDebug ( ) << "Variable " << var << " contains " << value << ".\n"; +// evaluate the meaningful lines + if ( var.startsWith ( "wireless", false ) ) + { + if ( var.endsWith ( "essid" ) ) + { + newtab->le_networkName->setText ( value ); + } + + else if ( var.endsWith ( "mode" ) && !var.contains ( "key" ) ) + + { + newtab->cmb_wifiMode->setCurrentItem ( IfConfig::convertToWifiModeFromString ( value ) ); + } + + else if ( var.endsWith ( "rate" ) ) + + { + newtab->cmb_speed->setCurrentItem ( IfConfig::convertToSpeedFromString ( value ) ); + } + + else if ( var.contains ( "key" ) ) + { +// Could be any of key, key1, key2, ..., or defaultkey + if ( var.contains ( "default" ) ) + { + crypto->cmb_activeKey->setCurrentItem ( value.toInt ( ) ); + } + + else if ( var.contains ( "mode" ) ) + { + if ( value == "shared" || value == "sharedkey" || value == "restricted" ) + { + crypto->rb_restrictMode->setChecked ( true ); + newtab->cb_useCrypto->setChecked ( true ); + } + } + + else if ( value == "open" || value == "opensystem" || value == "" ) + { + crypto->rb_openMode->setChecked ( true ); + newtab->cb_useCrypto->setChecked ( false ); + } + + else if ( var.right ( 1 ) == "1" ) + { + if ( value.startsWith ( "s:" ) ) + value = value.right ( value.length ( ) - 2 ); + crypto->le_key1->setText ( value ); + } + + else if ( var.right ( 1 ) == "2" ) + { + if ( value.startsWith ( "s:" ) ) + value = value.right ( value.length ( ) - 2 ); + crypto->le_key2->setText ( value ); + } + + else if ( var.right ( 1 ) == "3" ) + { + if ( value.startsWith ( "s:" ) ) + value = value.right ( value.length ( ) - 2 ); + crypto->le_key3->setText ( value ); + } + + else if ( var.right ( 1 ) == "4" ) + { + if ( value.startsWith ( "s:" ) ) + value = value.right ( value.length ( ) - 2 ); + crypto->le_key4->setText ( value ); + } + + else + { +// does not contain a number. It's the only one. + if ( value.startsWith ( "s:" ) ) + value = value.right ( value.length ( ) - 2 ); + crypto->le_key1->setText ( value ); + } + } + } + } + newtab->save ( ); + crypto->save ( ifconfig ); + configfile.close ( ); + m_totalConfigs++; +} diff --git a/wifi/kcmwifi/vendorconfig.h b/wifi/kcmwifi/vendorconfig.h new file mode 100644 index 00000000..e9a8a9a2 --- /dev/null +++ b/wifi/kcmwifi/vendorconfig.h @@ -0,0 +1,36 @@ +/* + Copyright (C) 2005 Stefan Winter <[email protected]> + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this library; see the file COPYING. If not, write to + the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + +#ifndef VENDORCONFIG_H +#define VENDORCONFIG_H + +class KCMWifi; + +class VendorConfig { + public: + VendorConfig( KCMWifi* caller); + void initAll (); + void initSuSE_92plus (); + void initDebian (); + protected: + KCMWifi* m_caller; + int m_totalConfigs; +}; + +#endif // VENDORCONFIG_H diff --git a/wifi/kcmwifi/wificonfig.cpp b/wifi/kcmwifi/wificonfig.cpp new file mode 100644 index 00000000..c5bafba3 --- /dev/null +++ b/wifi/kcmwifi/wificonfig.cpp @@ -0,0 +1,369 @@ +/* + Copyright (C) 2004 Nadeem Hasan <[email protected]> + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this library; see the file COPYING. If not, write to + the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + +#include <qfile.h> + +#include <ksimpleconfig.h> +#include <kglobal.h> +#include <kdebug.h> +#include <kprocio.h> +#include <kmessagebox.h> +#include <klocale.h> + +#include "wificonfig.h" + +static QStringList speedList; +static QStringList wifiModeList; +static QStringList cryptoModeList; +static QStringList powerModeList; + +Key::Key() +{ +} + +Key::Key( const QString &key ) +{ + setKey( key ); +} + +QString Key::rawKey() const +{ + QString s = m_key; + + if ( isValid( m_key ) >= STRING_64 ) + s = "s:" + s; + + return s; +} + +void Key::setKey( const QString &key ) +{ + m_key = key; +} + +KeyStates Key::isValid ( QString keyCandidate ) +{ + if (keyCandidate.isEmpty()) { + kdDebug() << "Ignoring key: empty.\n"; + return EMPTY; + } + + if (keyCandidate.length() == 5) + return STRING_64; + + if (keyCandidate.length() == 10) + return HEX_64; + + if (keyCandidate.length() == 13) + return STRING_128; + + if (keyCandidate.length() == 26) + return HEX_128; + + if (keyCandidate.length() == 32) + return STRING_256; + + if (keyCandidate.length() == 64) + return HEX_256; + + return INVALID; +} + +IfConfig::IfConfig() +{ + + // initialise all config items... + + m_networkName = ""; + m_interface = ""; + m_wifiMode = Managed; + m_speed = AUTO; + m_runScript = false; + m_connectScript = ""; + + m_useCrypto = false; + m_cryptoMode = Open; + m_activeKey = 1; + for (int i=0; i<4; i++) + m_keys[ i ].setKey( "" ); + + m_pmEnabled = false; + m_pmMode = AllPackets; + m_sleepTimeout = 1; + m_wakeupPeriod = 1; + + speedList << "Auto" << "1M" << "2M" << "5.5M" << "6M" << "9M" << "11M" << "12M" << "18M" << "24M" << "36M" << "48M" << "54M"; + wifiModeList << "Ad-Hoc" << "Managed" << "Repeater" + << "Master" << "Secondary"; + cryptoModeList << "Open" << "Restricted"; + powerModeList << "All" << "UnicastOnly" << "MulticastOnly"; +} + +void IfConfig::load( KConfig *config, int i ) +{ + QString entry; + + QString group = QString( "Configuration %1" ).arg( i+1 ); + config->setGroup( group ); + + m_networkName = config->readEntry( "NetworkName" ); + m_interface = config->readEntry( "InterfaceName" ); + + entry = config->readEntry( "WifiMode", "Managed" ); + wifimodeFromString( entry ); + entry = config->readEntry( "Speed", "Auto" ); + speedFromString( entry ); + m_runScript = config->readBoolEntry( "RunScript", false ); + m_connectScript = config->readEntry( "ScriptName" ); + + m_useCrypto = config->readBoolEntry( "UseCrypto", false ); + entry = config->readEntry( "CryptoMode", "Open" ); + cryptomodeFromString( entry ); + m_activeKey = config->readNumEntry( "ActiveKey", 1 ); + m_keys[ 0 ].setKey( config->readEntry( "Key1" ) ); + m_keys[ 1 ].setKey( config->readEntry( "Key2" ) ); + m_keys[ 2 ].setKey( config->readEntry( "Key3" ) ); + m_keys[ 3 ].setKey( config->readEntry( "Key4" ) ); + + m_pmEnabled = config->readBoolEntry( "PMEnabled", false ); + entry = config->readEntry( "PMMode", "All" ); + powermodeFromString( entry ); + m_sleepTimeout = config->readNumEntry( "SleepTimeout", 30 ); + m_wakeupPeriod = config->readNumEntry( "WakeupPeriod", 20 ); +} + +void IfConfig::save( KConfig *config, int i ) +{ + QString group = QString( "Configuration %1" ).arg( i+1 ); + config->setGroup( group ); + + config->writeEntry( "NetworkName", m_networkName ); + config->writeEntry( "InterfaceName", m_interface ); + config->writeEntry( "WifiMode", wifimodeAsString() ); + config->writeEntry( "Speed", speedAsString() ); + config->writeEntry( "RunScript", m_runScript ); + config->writeEntry( "ScriptName", m_connectScript ); + + config->writeEntry( "UseCrypto", m_useCrypto ); + config->writeEntry( "CryptoMode", cryptomodeAsString() ); + config->writeEntry( "ActiveKey", m_activeKey ); + config->writeEntry( "Key1", m_keys[ 0 ].key() ); + config->writeEntry( "Key2", m_keys[ 1 ].key() ); + config->writeEntry( "Key3", m_keys[ 2 ].key() ); + config->writeEntry( "Key4", m_keys[ 3 ].key() ); + + config->writeEntry( "PMEnabled", m_pmEnabled ); + config->writeEntry( "PMMode", powermodeAsString() ); + config->writeEntry( "SleepTimeout", m_sleepTimeout ); + config->writeEntry( "WakeupPeriod", m_wakeupPeriod ); +} + +WifiConfig *WifiConfig::m_instance = 0; + +WifiConfig *WifiConfig::instance() +{ + if ( m_instance == 0 ) + m_instance = new WifiConfig(); + + return m_instance; +} + +WifiConfig::WifiConfig() +{ + //m_config = KGlobal::config(); + m_config = new KSimpleConfig( "kcmwifirc" ); + + load(); +} + +WifiConfig::~WifiConfig() +{ + delete m_config; +} + +void WifiConfig::load() +{ + m_config->setGroup( "General" ); + + m_usePreset = m_config->readBoolEntry( "UsePreset", false ); + m_presetConfig = m_config->readNumEntry( "PresetConfig", 1 )-1; + m_numConfigs = m_config->readNumEntry( "NumberConfigs", 4 ); + + for ( int i=0; i<m_numConfigs; ++i ) + { + m_ifConfig[ i ].load( m_config, i ); + } +} + +void WifiConfig::save() +{ + m_config->setGroup( "General" ); + + m_config->writeEntry( "UsePreset", m_usePreset ); + m_config->writeEntry( "PresetConfig", m_presetConfig+1 ); + m_config->writeEntry( "NumberConfigs", m_numConfigs ); + + for ( int i=0; i<m_numConfigs; ++i ) + { + m_ifConfig[ i ].save( m_config, i ); + } + + m_config->sync(); +} + +QString WifiConfig::autoDetectInterface() +{ + m_detectedInterface.truncate( 0 ); + + QFile procFile ( "/proc/net/dev" ); + + if ( !procFile.open( IO_ReadOnly ) ) + { + KMessageBox::sorry( 0, + i18n( "Unable to autodetect wireless interface." ) ); + return m_detectedInterface; + } + + QStringList list; + QString line; + + while ( !procFile.atEnd() ) + { + procFile.readLine( line, 9999 ); + if ( line.find( ":" ) > 0 ) + { + line.truncate ( line.find( ":" ) ); + list.append( line.stripWhiteSpace() ); + } + } + + procFile.close(); + + if ( list.empty() ) + { + KMessageBox::sorry( 0, + i18n( "Unable to autodetect wireless interface." ) ); + return m_detectedInterface; + } + + for ( QStringList::Iterator it = list.begin (); it != list.end (); ++it ) + { + if ( ((*it).contains("wifi"))==0 ) { // if the name is wifiX, ignore + KProcIO test; + test << "iwconfig"; + test << *it; + connect( &test, SIGNAL( readReady( KProcIO * ) ), + this, SLOT( slotTestInterface( KProcIO * ) ) ); + test.start ( KProcess::Block ); + } + } + + if ( m_detectedInterface.isEmpty() ) + { + KMessageBox::sorry( 0, + i18n( "Unable to autodetect wireless interface." ) ); + return m_detectedInterface; + } + + return m_detectedInterface; +} + +void WifiConfig::slotTestInterface( KProcIO *proc ) +{ + QString output; + proc->readln( output ); + if ( output.find ( "no wireless extensions" ) == -1 ) + { + output.truncate( output.find ( " " ) ); + m_detectedInterface = output.stripWhiteSpace(); + } +} + +QString IfConfig::speedAsString() +{ + return speedList[ m_speed ]; +} + +QString IfConfig::wifimodeAsString() +{ + return wifiModeList[ m_wifiMode ]; +} + +QString IfConfig::cryptomodeAsString() +{ + return cryptoModeList[ m_cryptoMode ]; +} + +QString IfConfig::powermodeAsString() +{ + return powerModeList[ m_pmMode ]; +} + +int IfConfig::activeKeyId() +{ + return m_activeKey; +} + +Key IfConfig::activeKey() +{ + return m_keys[ m_activeKey-1 ]; +} + +IfConfig::Speed IfConfig::convertToSpeedFromString( const QString &s ) +{ + return ( IfConfig::Speed )speedList.findIndex( s ); +} + +void IfConfig::speedFromString( const QString &s ) +{ + m_speed = convertToSpeedFromString( s ); +} + +IfConfig::WifiMode IfConfig::convertToWifiModeFromString( const QString &s ) +{ + return ( IfConfig::WifiMode )wifiModeList.findIndex( s ); +} + +void IfConfig::wifimodeFromString( const QString &s ) +{ + m_wifiMode = convertToWifiModeFromString( s ); +} + +IfConfig::CryptoMode IfConfig::convertToCryptoModeFromString( const QString &s ) +{ + return ( IfConfig::CryptoMode )cryptoModeList.findIndex( s ); +} + +void IfConfig::cryptomodeFromString( const QString &s ) +{ + m_cryptoMode = convertToCryptoModeFromString( s ); +} + +IfConfig::PowerMode IfConfig::convertToPowerModeFromString( const QString &s ) +{ + return ( IfConfig::PowerMode )powerModeList.findIndex( s ); +} + +void IfConfig::powermodeFromString( const QString &s ) +{ + m_pmMode = convertToPowerModeFromString( s ); +} + +#include "wificonfig.moc" + diff --git a/wifi/kcmwifi/wificonfig.h b/wifi/kcmwifi/wificonfig.h new file mode 100644 index 00000000..452732b2 --- /dev/null +++ b/wifi/kcmwifi/wificonfig.h @@ -0,0 +1,126 @@ +/* + Copyright (C) 2004 Nadeem Hasan <[email protected]> + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this library; see the file COPYING. If not, write to + the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + +#ifndef WIFICONFIG_H +#define WIFICONFIG_H + +#include <qstring.h> +#include <qvaluelist.h> + +#include "kcmwifi.h" + +class KConfig; +class KSimpleConfig; + +enum KeyStates { EMPTY=0, INVALID=1, HEX_64=2, HEX_128=3, HEX_256=4, STRING_64=5, STRING_128=6, STRING_256=7 }; + +class Key +{ + public: + Key( const QString &key ); + Key(); + + QString key() const { return m_key; } + static KeyStates isValid( QString keyCandidate ); + QString rawKey() const; + + void setKey( const QString &key ); + + protected: + QString m_key; +}; + +typedef QValueList<Key> KeyList; + +class IfConfig +{ + public: + IfConfig(); + + enum Speed { AUTO=0, M1, M2, M55, M6, M9, M11, M12, M18, M24, M36, M48, M54 }; + enum WifiMode { AdHoc=0, Managed, Repeater, Master, Secondary }; + enum PowerMode { AllPackets=0, UnicastOnly, MulticastOnly }; + enum CryptoMode { Open=0, Restricted }; + + void load( KConfig *config, int i ); + void save( KConfig *config, int i ); + + QString speedAsString(); + QString wifimodeAsString(); + QString cryptomodeAsString(); + QString powermodeAsString(); + int activeKeyId(); + Key activeKey(); + + static Speed convertToSpeedFromString( const QString &s ); + static WifiMode convertToWifiModeFromString( const QString &s ); + static PowerMode convertToPowerModeFromString( const QString &s ); + static CryptoMode convertToCryptoModeFromString( const QString &s ); + + void speedFromString( const QString &s ); + void wifimodeFromString( const QString &s ); + void powermodeFromString( const QString &s ); + void cryptomodeFromString( const QString &s ); + + QString m_networkName; + QString m_interface; + WifiMode m_wifiMode; + Speed m_speed; + bool m_runScript; + QString m_connectScript; + + bool m_useCrypto; + CryptoMode m_cryptoMode; + int m_activeKey; + Key m_keys[ 4 ]; + + bool m_pmEnabled; + PowerMode m_pmMode; + int m_sleepTimeout; + int m_wakeupPeriod; +}; + +class WifiConfig : QObject +{ + Q_OBJECT + public: + static WifiConfig *instance(); + QString autoDetectInterface(); + ~WifiConfig(); + + void load(); + void save(); + + IfConfig m_ifConfig[ KCMWifi::vendorBase+5 ]; + bool m_usePreset; + int m_presetConfig; + int m_numConfigs; + + private slots: + void slotTestInterface( KProcIO *proc ); + + private: + WifiConfig(); + + KSimpleConfig *m_config; + static WifiConfig *m_instance; + QString m_detectedInterface; +}; + +#endif // WIFICONFIG_H diff --git a/wifi/kwifimanager.cpp b/wifi/kwifimanager.cpp new file mode 100644 index 00000000..5e64a683 --- /dev/null +++ b/wifi/kwifimanager.cpp @@ -0,0 +1,637 @@ +/*************************************************************************** + kwifimanager.cpp - description + ------------------- + begin : Sam Apr 7 11:44:20 CEST 2001 + copyright : (C) 2001 by Stefan Winter + email : [email protected] + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +// include files for C++ +#include <iostream> +#include <fstream> + +// include files for QT +#include <qdatetime.h> +#include <qdir.h> +#include <qlayout.h> +#include <qtooltip.h> +#include <qimage.h> +#include <qbitmap.h> +#include <qtimer.h> +#include <qpushbutton.h> + +// include files for KDE +#include <kapplication.h> +#include <kconfig.h> +#include <kmenubar.h> +#include <klocale.h> +#include <kstdaction.h> +#include <kstandarddirs.h> +#include <kpopupmenu.h> +#include <kaction.h> +#include <kdebug.h> +#include <kstdguiitem.h> +#include <kmessagebox.h> +#include <ksystemtray.h> +#include <kprocess.h> +#include <dcopclient.h> +#include <dcopref.h> +#include <kdialog.h> + +// application specific includes +#include "asusled.h" +#include "networkscanning.h" +#include "kwifimanager.h" +#include "interface_wireless.h" +#include "interface_wireless_wirelessextensions.h" +#include "status.h" +#include "locator.h" +#include "picture.h" +#include "strength.h" +#include "speed.h" +#include "statistics.h" + +#define ID_STATUS_MSG 1 + +QStringList APs; +bool useAlternateStrengthCalc; + +KWiFiManagerApp::KWiFiManagerApp (QWidget *, const char *name): +DCOPObject("dcop_interface"), KMainWindow (0, name), device(0), m_shuttingDown(false), m_iconSize( 22 ) +{ + statistik = 0; + disablePower = 0; + useAlternateStrengthCalc = false; + init_whois_db (); + + QStringList *ignoreInterfaces; + if (kapp->isRestored()) + ignoreInterfaces = new QStringList(); + else + ignoreInterfaces = new QStringList( usedInterfacesList() ); + + // substitute the following line with a different interface if required + device = new Interface_wireless_wirelessextensions (ignoreInterfaces); + + //This setting gets here from the kdeglobals config + KConfig* config = kapp->config(); + if (config->hasGroup("System Tray")) + config->setGroup("System Tray"); + m_iconSize=config->readNumEntry("systrayIconWidth", 22); + + /* initView updates the main widget, system tray icon and the ASUS led if applicable + it needs to called before initActions() because that uses some icons that get + initialized by initView() */ + + initView (); + + initActions (); + +#if WIRELESS_EXT > 9 + fileDisableRadio->setEnabled (true); +#else + fileDisableRadio->setEnabled (false); +#endif + + counter = new QTimer (this); + connect (counter, SIGNAL (timeout ()), device, SLOT (poll_device_info())); + counter->start (1000); + + tricorder_trigger = new QTimer (); + connect (tricorder_trigger, SIGNAL (timeout ()), this, + SLOT (tricorder_beep ())); + connect (trayicon, SIGNAL (quitSelected ()), this, SLOT (slotFileQuit ())); + slotToggleTric(); //set to value saved by KConfig + + setAutoSaveSettings(); + kapp->setMainWidget(this); +} + + +void +KWiFiManagerApp::slotChangeWindowCaption () +{ + if (device->get_interface_name().isEmpty()) + { + this->setCaption (i18n ("No Interface")); + } + else + { + this->setCaption (i18n ("Interface %1"). + arg (device->get_interface_name ())); + } +} + +KWiFiManagerApp::~KWiFiManagerApp () +{ + kdDebug () << + "Thank you for using KWiFiManager. You have made a simple program very happy." << endl; + delete statistik; + delete tricorder_trigger; +} + +void +KWiFiManagerApp::init_whois_db () +{ + KStandardDirs finder; + QString kdedir = + finder.findResourceDir ("data", "kwifimanager/locations/NOWHERE.loc"); + kdedir += "kwifimanager/locations/"; + QDir *locations = new QDir (kdedir); + if (!locations->exists ()) + kdDebug () << + "A grave error occurred while searching for files with AccessPoint information." << endl; + QStringList *entries = new QStringList (locations->entryList ()); + QString content; + QString content2; + for (QStringList::Iterator it = entries->begin (); it != entries->end (); + it++) + { + if ((*it) != "." && (*it) != "..") + { + QFile datei (kdedir + (*it)); + datei.open (IO_ReadOnly); + while (datei.readLine (content, 255) != -1) + { + QString temp (content); + content.truncate (content.find (' ')); + content = content.upper (); + content2 = temp.right (temp.length () - temp.find (' ') - 1); + content2.truncate (content2.length () - 1); + APs << content << content2; + } + datei.close (); + } + } + delete entries; + delete locations; +} + +void +KWiFiManagerApp::slotLogESSID (QString essid) +{ + QFile log_file( locateLocal( "data", "kwifimanager/kwifimanager.log", true ) ); + kdDebug() << "Log file is " << log_file.name() << endl; + if (!log_file.open (IO_WriteOnly | IO_Append)) + kdDebug () << "Logging failed!" << endl; + QTextStream stream (&log_file); + stream << QDateTime::currentDateTime().toString ().latin1 (); + stream << " Entering network: " << essid.latin1() << endl; + log_file.close (); +} + +void +KWiFiManagerApp::slotTXPowerChanged () +{ + fileDisableRadio->setChecked( device->get_txpower_disabled() ); +} + +void +KWiFiManagerApp::slotChangeTrayIcon () +{ + QPixmap* ICON; + int sig, noi, str; + double freq = 0.; + bool validdata = device->get_current_quality (sig, noi, str); + if ( settingsUseAlternateCalc->isChecked() ) str = sig - noi; + int mode; + QLabel sstrength2( i18n("N/A"), 0, 0 ); + + if ( ( device->get_txpower_disabled() ) || ( !device->get_device_freq ( freq ) ) ) + { + ICON = strength->NOT_CON_OFFLINE_ADHOC; + if (led->state == true) + led->Off (); + } + else if (device->get_mode(mode) && mode == 1) + { + ICON = strength->NOT_CON_OFFLINE_ADHOC; + if (led->state == true) + led->Off (); + } + else if (validdata && (str > 45)) + { + sstrength2.setText( QString::number(str) ); + ICON = strength->EXCELLENT; + if (led->state == false) + led->On (); + } + else if (validdata && (str > 35)) + { + sstrength2.setText( QString::number(str) ); + ICON = strength->EXCELLENT; + if (led->state == false) + led->On (); + } + else if (validdata && (str > 25)) + { + sstrength2.setText( QString::number(str) ); + ICON = strength->EXCELLENT; + if (led->state == false) + led->On (); + } + else if (validdata && (str > 15)) + { + sstrength2.setText( QString::number(str) ); + ICON = strength->GOOD; + if (led->state == false) + led->On (); + } + else if (validdata && (str > 5)) + { + sstrength2.setText( QString::number(str) ); + ICON = strength->MARGINAL; + if (led->state == false) + led->On (); + } + else if (validdata && (str > 0)) + { + sstrength2.setText( QString::number(str) ); + ICON = strength->OOR_MINIMUM; + if (led->state == true) + led->Off (); + } + else if (((str == 0) && (mode == 2)) || (!validdata)) + { + sstrength2.setText( QString::fromLatin1("0") ); + ICON = strength->OOR_DOWN; + if (led->state == true) + led->Off (); + } + else + { + ICON = strength->NOT_CON_OFFLINE_ADHOC; + if (led->state == true) + led->Off (); + } + + QPixmap temp (m_iconSize+8, m_iconSize+8); + QPainter bla (&temp); + bla.fillRect (0, 0, m_iconSize+8, m_iconSize+8, backgroundBrush ()); + bla.drawPixmap ( QRect(1, 4, m_iconSize+2,m_iconSize+2), *ICON ); + + if (showStrength) { + static QFont labelfont ( "Helvetica", 10 ); + + labelfont.setStyleHint( QFont::SansSerif ); + labelfont.setStretch( QFont::Condensed ); + labelfont.setBold( true ); + sstrength2.setFont( labelfont ); + sstrength2.setFixedSize( sstrength2.sizeHint() ); + } + QPixmap labeltemp = QPixmap::grabWidget( &sstrength2 ); + labeltemp.setMask( labeltemp.createHeuristicMask() ); + bla.drawPixmap (0, 0, labeltemp ); + temp.setMask (temp.createHeuristicMask() ); + trayicon->setPixmap ( temp ); + this->setIcon( temp ); + + QToolTip::add( trayicon, "SSID: "+device->get_essid() ); +} + +void +KWiFiManagerApp::initActions () +{ + KConfig* config = kapp->config(); + if (config->hasGroup("General")) + config->setGroup("General"); + fileDisableRadio = new KToggleAction (i18n ("&Disable Radio"), 0, this, + SLOT (slotDisableRadio ()), actionCollection (), "disable_radio"); + fileDisableRadio->setChecked( false ); + + settingsUseAlternateCalc = + new KToggleAction (i18n ("&Use Alternate Strength Calculation"), 0, this, + SLOT (slotToggleStrengthCalc ()), actionCollection (), "use_alt_calculation"); + + settingsUseAlternateCalc->setChecked( config->readBoolEntry("useAlternateStrengthCalculation") ); + slotToggleStrengthCalc(); //set to value saved by KConfig + + settingsShowStatsNoise = + new KToggleAction (i18n ("Show &Noise Graph in Statistics Window"), 0, this, + SLOT (slotShowStatsNoise ()), actionCollection (), "show_stats_noise"); + + settingsShowStatsNoise->setChecked( config->readBoolEntry("showStatsNoise") ); + slotShowStatsNoise(); //set to value saved by KConfig + + settingsShowStrengthNumber = new KToggleAction (i18n ("&Show Strength Number in System Tray"), 0, this, + SLOT (slotToggleShowStrengthNumber ()), actionCollection (), "show_strength_number_in_tray"); + settingsShowStrengthNumber->setChecked( config->readBoolEntry("showStrengthNumberInTray") ); + slotToggleShowStrengthNumber (); //set to value saved by KConfig + + KStdAction::quit (this, SLOT (slotFileQuit ()), actionCollection ()); + + new KAction (i18n ("Configuration &Editor..."), 0, this, + SLOT (slotStartConfigEditor ()), actionCollection (), "configuration_editor"); + new KAction (i18n ("Connection &Statistics"), 0, this, + SLOT (slotStartStatViewer ()), actionCollection (), "connection_statistics"); + settingsAcousticScanning = new KToggleAction (i18n ("&Acoustic Scanning"), 0, this, + SLOT (slotToggleTric ()), + actionCollection (), "acoustic_scanning"); + settingsAcousticScanning->setChecked( config->readBoolEntry("acousticScanning") ); +#ifdef WITHOUT_ARTS + settingsAcousticScanning->setEnabled( false); +#endif + settingsStayInSystrayOnClose = new KToggleAction (i18n ("Stay in System &Tray on Close"), 0, this, + SLOT (slotToggleStayInSystray()), + actionCollection (), "stay_in_systray_on_close"); + settingsStayInSystrayOnClose->setChecked( config->readBoolEntry("stayInSystrayOnClose") ); + createGUI(); +} + + +void +KWiFiManagerApp::initView () +{ + + led = new Led (); + + trayicon = new KSystemTray (this); + trayicon->show (); + + view = new QWidget (this, "mainwidget"); + view->setBackgroundMode (PaletteBackground); + setCentralWidget (view); + QGridLayout *zentrallayout = new QGridLayout (view); + zentrallayout->setMargin( KDialog::marginHint() ); + speedmeter = new Speed (view, device); + status = new Status (view, device); + location = new Locator (view, device); + strength = new Strength (view, device); + pictogram = new Picture (view, device); + scan = new QPushButton (i18n("Scan for &Networks..."),view); + slotChangeWindowCaption (); + QToolTip::add (strength, i18n ("The current signal strength")); + QToolTip::add (speedmeter, i18n ("The speed at which the wireless LAN card is operating")); + QToolTip::add (status, i18n ("Detailed connection status")); + QToolTip::add (scan, i18n ("Performs a scan to discover the networks you can log into")); + pictogram->setMinimumSize (pictogram->mySizeHint()); + strength->setMinimumSize (strength->mySizeHint()); + speedmeter->setMinimumHeight (60); + status->setMinimumHeight (60); + zentrallayout->addWidget (pictogram, 0, 0); + zentrallayout->addWidget (strength, 1, 0); + zentrallayout->addWidget (speedmeter, 0, 1); + zentrallayout->addMultiCellWidget (status, 1, 2, 1, 1); + zentrallayout->addWidget (scan, 2, 0); + zentrallayout->addMultiCellWidget (location, 3, 3, 0, 1, Qt::AlignLeft); + connect (device, SIGNAL (interfaceChanged ()), this, SLOT (slotChangeWindowCaption ())); + connect (device, SIGNAL (strengthChanged ()), this, SLOT (slotChangeTrayIcon ())); + connect (device, SIGNAL (strengthChanged ()), strength, SLOT (repaint ())); + connect (device, SIGNAL (statusChanged ()), status, SLOT (repaint ())); + connect (device, SIGNAL (speedChanged ()), speedmeter, SLOT (repaint ())); + connect (device, SIGNAL (modeChanged ()), pictogram, SLOT (repaint ())); + connect (device, SIGNAL (essidChanged (QString)), this, SLOT (slotLogESSID (QString))); + connect (device, SIGNAL (essidChanged (QString)), location, SLOT (repaint ())); + connect (device, SIGNAL (statusChanged ()), location, SLOT (repaint ())); + connect (device, SIGNAL (txPowerChanged ()), this, SLOT (slotTXPowerChanged ())); + connect (device, SIGNAL (txPowerChanged ()), this, SLOT (slotChangeTrayIcon ())); + connect (device, SIGNAL (txPowerChanged ()), pictogram, SLOT (repaint ())); + connect (device, SIGNAL (txPowerChanged ()), strength, SLOT (repaint ())); + connect (scan, SIGNAL (clicked()), this, SLOT (slotNetworkScan())); +} + +void +KWiFiManagerApp::slotToggleShowStrengthNumber () +{ + KConfig* config = kapp->config(); + config->setGroup("General"); + config->writeEntry( "showStrengthNumberInTray", settingsShowStrengthNumber->isChecked() ); + if (settingsShowStrengthNumber->isChecked()) { showStrength = true; } + else { showStrength = false; } + slotChangeTrayIcon (); +} + +void +KWiFiManagerApp::slotNetworkScan () +{ + scan->setText( i18n( "Scan in progress..." ) ); + scan->setEnabled ( false ); + scanwidget = new NetworkScanning(device); + scan->setText( i18n( "Scan for &Networks..." ) ); + scan->setEnabled ( true ); +} + + +void +KWiFiManagerApp::slotStartStatViewer () +{ + delete statistik; + statistik = new Statistics (device, showStatsNoise); + statistik->setFixedSize (590, 300); + connect(device,SIGNAL(statsUpdated()),statistik,SLOT(repaint())); + statistik->show (); +} + +void +KWiFiManagerApp::slotDisableRadio () +{ + fileDisableRadio->setChecked( device->get_txpower_disabled() ); + + if ( disablePower != 0 && disablePower->isRunning() ) { + return; + } + QString interface = device->get_interface_name(); + + if (interface.isEmpty()) { + return; + } + + QString onOrOff; + if ( fileDisableRadio->isChecked() ) { + onOrOff = "on"; + } else { + onOrOff = "off"; + } + + disablePower = new KProcess; + + // FIXME my Cisco Aironet 350 has two interfaces eth1 and wifi1, + // kwifimanager works on wifi 1 where txpower does not work -- jriddell + + //*disablePower << "kdesu" << "iwconfig" << "eth1" << "txpower" << onOrOff; + + *disablePower << "kdesu" << "iwconfig" << interface << "txpower" << onOrOff; + connect( disablePower, SIGNAL(processExited(KProcess*)), this, SLOT(slotDisablePowerProcessExited()) ); + disablePower->start(KProcess::NotifyOnExit); +} + +void +KWiFiManagerApp::slotDisablePowerProcessExited() +{ + if (! disablePower->normalExit() || disablePower->exitStatus() != 0) { + delete disablePower; + disablePower = 0; + return; + } + + if ( fileDisableRadio->isChecked() ) { + fileDisableRadio->setChecked(false); + } else { + fileDisableRadio->setChecked(true); + } + + delete disablePower; + disablePower = 0; + + fileDisableRadio->setChecked( device->get_txpower_disabled() ); +} + +void +KWiFiManagerApp::slotToggleTric () +{ + KConfig* config = kapp->config(); + config->setGroup("General"); + config->writeEntry( "acousticScanning", settingsAcousticScanning->isChecked() ); + if (settingsAcousticScanning->isChecked()) + { + tricorder_trigger->start (250); + } + else + { + tricorder_trigger->stop (); + } +} + +void KWiFiManagerApp::slotToggleStrengthCalc () +{ + KConfig* config = kapp->config(); + config->setGroup("General"); + config->writeEntry( "useAlternateStrengthCalculation", settingsUseAlternateCalc->isChecked() ); + useAlternateStrengthCalc = settingsUseAlternateCalc->isChecked(); +} + +void KWiFiManagerApp::slotToggleStayInSystray () +{ + KConfig* config = kapp->config(); + config->setGroup("General"); + config->writeEntry( "stayInSystrayOnClose", settingsStayInSystrayOnClose->isChecked() ); +} + +void +KWiFiManagerApp::tricorder_beep () +{ + int sig, noi, qual; + device->get_current_quality (sig, noi, qual); +#ifndef WITHOUT_ARTS + sinus_wave (150.0 + qual * 20); +#endif + if (qual == 0) + { + tricorder_trigger->changeInterval (2000); + } + else if (qual < 10) + { + tricorder_trigger->changeInterval (1000); + } + else + { + tricorder_trigger->changeInterval (500); + } +} + +void +KWiFiManagerApp::slotShowStatsNoise () +{ + KConfig* config = kapp->config(); + config->setGroup("General"); + config->writeEntry( "showStatsNoise", settingsShowStatsNoise->isChecked() ); + showStatsNoise = settingsShowStatsNoise->isChecked(); +} + +void +KWiFiManagerApp::slotFileQuit () +{ + m_shuttingDown = true; + kapp->quit(); +} + +void +KWiFiManagerApp::slotStartConfigEditor () +{ + KProcess startConf; + startConf << "kdesu" << locate("exe", "kcmshell") << "kcmwifi"; + startConf.start (KProcess::DontCare); +} + +void KWiFiManagerApp::saveProperties( KConfig* conf) +{ + m_startDocked = !isVisible(); + conf->writeEntry( "startDocked", m_startDocked ); + conf->writeEntry( "wifidevice", device->get_interface_name() ); + conf->sync(); +} + +void KWiFiManagerApp::readProperties( KConfig* conf) +{ + m_startDocked = conf->readBoolEntry( "startDocked", false ); + if (m_startDocked) + show(); + else + hide(); + + QString dev = conf->readEntry( "wifidevice" ); + if (!dev.isEmpty()) + device->setActiveDevice(dev); +} + +bool +KWiFiManagerApp::queryClose() +{ + if(!m_shuttingDown && + !kapp->sessionSaving() && + settingsStayInSystrayOnClose->isChecked() ) { + hide(); + return false; + } + return true; +} + +bool +KWiFiManagerApp::queryExit() +{ + // Save settings if auto-save is enabled, and settings have changed + if ( settingsDirty() && autoSaveSettings() ) + saveAutoSaveSettings(); + return true; +} + +// List of network interfaces used by all running kwifimanager applications +QStringList usedInterfacesList() +{ + // Register with DCOP + DCOPClient *client = kapp->dcopClient(); + client->registerAs( "kwifimanager" ); + client->setDefaultObject( "dcop_interface" ); + + // shamelessly stolen from kdelibs/kio/booksmarks/kbookmarkimporter_crash.cc + QStringList ignoreInterfaces; + QCStringList apps = client->registeredApplications(); + for ( QCStringList::Iterator it = apps.begin(); it != apps.end(); ++it ) + { + QCString &clientId = *it; + if ( qstrncmp(clientId, "kwifimanager", 12) != 0 ) + continue; + + DCOPRef ask( clientId, "dcop_interface" ); + DCOPReply reply = ask.call( "interface()" ); + QString interface; + if ( reply.isValid() ) { + QString i = reply; + interface = i; + } + if (!interface.isEmpty()) + ignoreInterfaces.append(interface); + } + return ignoreInterfaces; +} + +#include "kwifimanager.moc" diff --git a/wifi/kwifimanager.desktop b/wifi/kwifimanager.desktop new file mode 100644 index 00000000..533e4d2b --- /dev/null +++ b/wifi/kwifimanager.desktop @@ -0,0 +1,134 @@ +# KDE Config File +[Desktop Entry] +Type=Application +Exec=kwifimanager -caption "%c" %i %m +Icon=kwifimanager +DocPath=kwifimanager/index.html +Comment=A wireless LAN connection monitor +Comment[ar]=مراقب أداء وصلة الشبكة المحلية اللاسلكبة +Comment[bg]=Мониторинг на безжичната локална мрежа +Comment[bn]=একটি ওয়্যারলেস ল্যান সংযোগ মনিটর +Comment[bs]=Nadzor bežične LAN konekcije +Comment[ca]=Un monitor per a connexions LAN sense fils +Comment[cs]=Monitor bezdrátového připojení +Comment[cy]=Arsylwydd cysylltiad LAN di-wifr +Comment[da]=En trådløs LAN-forbindelsesovervåger +Comment[de]=Monitor zur Überwachung von drahtlosen LAN-Verbindungen +Comment[el]=Παρακολούθηση ασύρματης σύνδεσης δικτύου +Comment[es]=Monitor de conexiones de redes inalámbricas +Comment[et]=Traadita kohtvõrgu ühenduse monitor +Comment[eu]=Kablerik gabeko LAN konexio monitorea +Comment[fa]=یک نمایشگر اتصال شبکۀ داخلی بیسیم +Comment[fi]=Langattoman lähiverkon yhteyden valvonta +Comment[fr]=Un écran de contrôle des connexions locales sans fil +Comment[gl]=Unha ferramente para a monitorización de redes inalámbricas +Comment[he]=צג בקרה לחיבורי רשת LAN אלחוטית +Comment[hi]=एक बेतार लैन कनेक्शन मॉनीटर +Comment[hr]=Nadglednik bežične LAN veze +Comment[hu]=Kapcsolatkezelő vezeték nélküli hálózatokhoz +Comment[is]=Vaktskjár á þráðlaust staðarneti +Comment[it]=Controllo connessione rete LAN senza fili +Comment[ja]=ワイヤレス LAN 接続モニタ +Comment[ka]=უკანელო LAN კავშირის მონიტორი +Comment[kk]=Сымсыз жергілікті желіге қосылымды қадағалау +Comment[km]=កម្មវិធីត្រួតពិនិត្យការតភ្ជាប់បណ្ដាញមូលដ្ឋានឥតខ្សែ +Comment[lt]=Bevielio tinklo ryšio stebėjimas +Comment[mk]=Монитор на поврзувањата на безжичната локална мрежа +Comment[ms]=Pemerhati sambungan LAN tanpa wayar +Comment[nb]=Passer på det trådløse nettverket +Comment[nds]=En Kieker för Funknettwark-Verbinnen +Comment[ne]=एउटा तारविहिन LAN जडान मोनिटर +Comment[nl]=Een programma voor het observeren van een draadloos lokaal netwerk +Comment[nn]=Passar på det trådlause nettverket +Comment[pa]=ਇੱਕ ਬੇਤਾਰ LAN ਕੁਨੈਕਸ਼ਨ ਨਿਗਰਾਨੀ +Comment[pl]=Program monitorujący połączenia w sieci bezprzewodowej +Comment[pt]=Um monitor de ligações na rede local sem-fios ('wireless') +Comment[pt_BR]=Um monitor de conexões LAN sem fio +Comment[ru]=Монитор соединения локальной радиосети +Comment[se]=Jođaskeahttes LAN-oktavuohta goziheaddji +Comment[sk]=Sledovanie bezdrôtového pripojenia LAN +Comment[sl]=Nadzornik brezžične omrežne povezave +Comment[sr]=Надгледач бежичне LAN везе +Comment[sr@Latn]=Nadgledač bežične LAN veze +Comment[sv]=Övervakning av trådlöst lokalt nätverk +Comment[ta]=கம்பியில்லா LAN இணைப்பு கண்காணி +Comment[tg]=Дидабони пайвастшавии бесими шабакаи маҳаллӣ +Comment[tr]=Bir kablosuz yerel ağ bağlantı gözlemcisi +Comment[uk]=Монітор з'єднання локальної радіомережі +Comment[zh_CN]=无线局域网连接监视器 +Comment[zh_HK]=無線網絡連線監視器 +Comment[zh_TW]=無線網路監視器 +Terminal=false +Name=KWiFiManager +Name[ar]=إدارة KWiFi +Name[bn]=কে-ওয়াইফাই-ম্যানেজার +Name[cs]=Správce WIFI +Name[cy]=KRheolyddDiWi +Name[de]=KWiFi-Verwaltung +Name[et]=KWiFi haldur +Name[gl]=Configuración de KWiFI +Name[hi]=के-विफि-मैनेजर +Name[ja]=KWiFi マネージャ +Name[nb]=KWiFiHåndterer +Name[ne]=KWifi प्रबन्धक +Name[nn]=KWiFiHandterar +Name[pa]=KWiFi ਮੈਨੇਜਰ +Name[tr]=KWifi Yöneticisi +GenericName=Wireless LAN Manager +GenericName[ar]=إدارة الشبكة المحلية اللاسلكية +GenericName[bg]=Безжична мрежа +GenericName[bn]=ওয়্যারলেস ল্যান ম্যানেজার +GenericName[br]=Merour ar rouedad hep neud +GenericName[bs]=Upravitelj bežčnim LANom +GenericName[ca]=Gestor LAN sense fils +GenericName[cs]=Správce bezdrátové LAN +GenericName[cy]=Rheolydd LAN Di-Wifr +GenericName[da]=Håndtering af trådløst netværk +GenericName[de]=Verwaltung für drahtlose LAN-Verbindungen +GenericName[el]=Διαχειριστής ασύρματου δικτύου +GenericName[eo]=Administrilo por sendrata loka reto +GenericName[es]=Gestor de red inalámbrica +GenericName[et]=Traadita võrgu haldur +GenericName[eu]=Kablerik gabeko LAN kudeatzailea +GenericName[fa]=مدیر شبکۀ داخلی بیسیم +GenericName[fi]=Langattoman lähiverkon hallinta +GenericName[fr]=Gestionnaire de réseau sans fil +GenericName[ga]=Bainisteoir Ghréasáin gan sreang +GenericName[he]=מנהל LAN אלחוטי +GenericName[hi]= बेतार लैन मैनेजर +GenericName[hr]=Upravitelj bežičnog LAN-a +GenericName[hu]=WiFi-kezelő +GenericName[is]=Fylgist með staðarneti +GenericName[it]=Gestione LAN senza fili +GenericName[ja]=ワイヤレス LAN マネージャ +GenericName[ka]=უკაბელო LAN მმართველი +GenericName[kk]=Сымсыз желі менеджері +GenericName[km]=កម្មវិធីគ្រប់គ្រងបណ្ដាញមូលដ្ឋានឥតខ្សែ +GenericName[lt]=Bevielio ryšio kontrolės centras +GenericName[mk]=Менаџер на безжичната локална мрежа +GenericName[ms]=Pengurus LAN Tanpa Wayar +GenericName[nb]=Håndterer for trådløse nettverk +GenericName[nds]=Funknettwark-Pleger +GenericName[ne]=तारविहिन LAN प्रबन्धक +GenericName[nl]=Draadloos netwerkbeheer +GenericName[nn]=Handsamar for trådlaust nettverk +GenericName[pa]=ਬੇਤਾਰ LAN ਮੈਨੇਜਰ +GenericName[pl]=Nadzorca sieci bezprzewodowej +GenericName[pt]=Gestor de Rede Sem Fios +GenericName[pt_BR]=Gerenciador de Wireless na LAN +GenericName[ru]=Менеджер локальной радиосети +GenericName[sk]=Správca bezdrôtovej siete LAN +GenericName[sl]=Upravljalec brezžičnega omrežja +GenericName[sr]=Управник бежичног LAN-а +GenericName[sr@Latn]=Upravnik bežičnog LAN-a +GenericName[sv]=Trådlöst nätverkshantering +GenericName[ta]=கம்பியில்லா LAN மேளாளர் +GenericName[tg]=Мудири Беноқили Шабакаи Маҳаллӣ +GenericName[tr]=Kablosuz Yerel Ağ Yöneticisi +GenericName[uk]=Менеджер локальної радіомережі +GenericName[uz]=Simsiz tarmoq boshqaruvchisi +GenericName[uz@cyrillic]=Симсиз тармоқ бошқарувчиси +GenericName[zh_CN]=无线局域网管理器 +GenericName[zh_HK]=無線網絡管理員 +GenericName[zh_TW]=無線網路管理者 +Categories=Qt;KDE;Network;X-KDE-More;System;Monitor; diff --git a/wifi/kwifimanager.h b/wifi/kwifimanager.h new file mode 100644 index 00000000..cdf8c726 --- /dev/null +++ b/wifi/kwifimanager.h @@ -0,0 +1,143 @@ +/*************************************************************************** + kwifimanager.h - a graphical interface for wireless LAN cards + ------------------- + begin : Sam Apr 7 11:44:20 CEST 2001 + copyright : (C) 2001 by Stefan Winter + email : [email protected] + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef KWIFIMANAGER_H +#define KWIFIMANAGER_H + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +// include files for Qt +class QLabel; +class QTimer; +class QPixmap; +class QPushButton; +class QStringList; + +// include files for KDE +#include <kmainwindow.h> +class KSystemTray; +class KToggleAction; +class KProcess; + +// application specific includes +#include "interface_wireless.h" +#include "interface_dcop.h" +class Strength; +class Status; +class Picture; +class Locator; +class Speed; +class Statistics; +class NetworkScanning; +class Led; + +extern QStringList usedInterfacesList(); + +enum speedlevels +{ AUTO, M1, M2, M55, M11 }; +enum packetmode +{ UNI, MULTI, BOTH }; +enum cryptomodes +{ OPEN, RESTRICTED }; + +struct configuration_data +{ + QString net_name[5]; + QString disp_name[5]; + bool managed[5]; + bool crypto_enabled[5]; + int active_crypto_key[5]; + QString active_key_string[5]; + QString crypto1[5], crypto2[5], crypto3[5], crypto4[5]; + bool crypto_is_string1[5], crypto_is_string2[5], crypto_is_string3[5], + crypto_is_string4[5]; + cryptomodes crypto_mode[5]; + bool pm_enabled[5]; + int sleep_time[5]; + QString sleep_time_string[5]; + int wake_time[5]; + QString wake_time_string[5]; + speedlevels bitrate[5]; + packetmode packet[5]; +}; + +class KWiFiManagerApp:public KMainWindow, virtual public dcop_interface +{ +Q_OBJECT public: + KWiFiManagerApp (QWidget * parent = 0, const char * name = 0); + ~KWiFiManagerApp (); + QString interface () const { return device ? device->get_interface_name() : QString::null; }; + public: + bool startDocked() { return m_startDocked; } + public slots: + void slotToggleShowStrengthNumber (); + void slotDisableRadio (); + void slotFileQuit (); + void slotStartConfigEditor (); + void slotStartStatViewer (); + void slotToggleTric (); + void slotToggleStrengthCalc (); + void slotToggleStayInSystray (); + void slotChangeTrayIcon (); + void slotChangeWindowCaption (); + void slotLogESSID (QString essid); + void slotTXPowerChanged (); + void slotShowStatsNoise (); + void slotNetworkScan(); + void tricorder_beep (); + void slotDisablePowerProcessExited(); + virtual bool queryClose(); + virtual bool queryExit(); + virtual void readProperties( KConfig* ); + virtual void saveProperties( KConfig* ); +private: + void initActions (); + void initView (); + Speed *speedmeter; + QBoxLayout *bla; + QLabel *profil; + Status *status; + Strength *strength; + Picture *pictogram; + Locator *location; + NetworkScanning* scanwidget; + QWidget *view; + Statistics *statistik; + KToggleAction *fileDisableRadio; + KToggleAction *settingsUseAlternateCalc; + KToggleAction *settingsStayInSystrayOnClose; + KToggleAction *settingsAcousticScanning; + KToggleAction *settingsShowStatsNoise; + KToggleAction *settingsShowStrengthNumber; + KSystemTray *trayicon; + void init_whois_db (); + QTimer *tricorder_trigger, *counter; + QPixmap *pixmap; + Interface_wireless *device; + QPushButton * scan; + Led *led; + KProcess* disablePower; + bool showStrength; + bool showStatsNoise; + bool m_startDocked; + bool m_shuttingDown; + int m_iconSize; +}; + +#endif /* KWIFIMANAGER_H */ diff --git a/wifi/kwifimanagerui.rc b/wifi/kwifimanagerui.rc new file mode 100644 index 00000000..a9408485 --- /dev/null +++ b/wifi/kwifimanagerui.rc @@ -0,0 +1,19 @@ +<!DOCTYPE kpartgui> +<kpartgui name="kwifimanager"> +<MenuBar> + <Menu name="file"><text>&File</text> + <Action name="disable_radio"/> + <Action name="connection_statistics"/> + </Menu> + <Menu name="config"><text>&Settings</text> + <Action name="use_alt_calculation"/> + <Action name="acoustic_scanning"/> + <Action name="show_stats_noise"/> + <Separator/> + <Action name="stay_in_systray_on_close"/> + <Action name="show_strength_number_in_tray"/> + <Separator/> + <Action name="configuration_editor"/> + </Menu> +</MenuBar> +</kpartgui> diff --git a/wifi/kwireless/Makefile.am b/wifi/kwireless/Makefile.am new file mode 100644 index 00000000..d5b4fcf7 --- /dev/null +++ b/wifi/kwireless/Makefile.am @@ -0,0 +1,17 @@ +INCLUDES= $(all_includes) +METASOURCES = AUTO + +lib_LTLIBRARIES = libkwireless.la + +libkwireless_la_SOURCES = kwireless.cpp \ + kwirelesswidget.cpp \ + linuxwirelesswidget.cpp \ + propertytablebase.ui propertytable.cpp +libkwireless_la_LDFLAGS = -module -avoid-version $(all_libraries) +libkwireless_la_LIBADD = -liw $(LIB_KDEUI) + +kwireless_DATA = kwireless.desktop +kwirelessdir = $(kde_datadir)/kicker/applets + +messages: rc.cpp + $(XGETTEXT) *.cpp -o $(podir)/kwireless.pot diff --git a/wifi/kwireless/kwireless.cpp b/wifi/kwireless/kwireless.cpp new file mode 100644 index 00000000..ff584603 --- /dev/null +++ b/wifi/kwireless/kwireless.cpp @@ -0,0 +1,89 @@ +/* + $ Author: Mirko Boehm $ + $ License: This code is licensed under the LGPL $ + $ Copyright: (C) 1996-2003, Mirko Boehm $ + $ Contact: Mirko Boehm <[email protected]> + http://www.kde.org + http://www.hackerbuero.org $ +*/ + +#include <kglobal.h> +#include <klocale.h> +#include <kconfig.h> +#include <kapplication.h> +#include <kmessagebox.h> + +#include "kwireless.h" +#include "kwirelesswidget.h" + + +KWireLess::KWireLess(const QString& configFile, Type type, + int actions, QWidget *parent, const char *name) + : KPanelApplet(configFile, type, actions, parent, name) +{ + ksConfig = config(); + + widget = KWireLessWidget::makeWireLessWidget(this); + widget->show(); +} + + +KWireLess::~KWireLess() +{ +} + + +void KWireLess::about() +{ + KMessageBox::information + (0, + i18n("<qt><b>KWireLess</b><br>" + "Displays information about wireless network devices.<br />" + "KWireLess is licensed to you under the terms of the GPL.<br />" + "<i>(C) 2003 Mirko Boehm</i></qt>"), + i18n("About KWireLess")); +} + + +void KWireLess::help() +{ +// KMessageBox::information(0, i18n("This is a help box")); +} + + +void KWireLess::preferences() +{ +// KMessageBox::information(0, i18n("This is a preferences box")); +} + +int KWireLess::widthForHeight(int) const +{ + widget->setMode(KWireLessWidget::Vertical); + return widget->preferredWidth(); +} + +int KWireLess::heightForWidth(int) const +{ + widget->setMode(KWireLessWidget::Horizontal); + return widget->preferredHeight(); +} + +void KWireLess::resizeEvent(QResizeEvent *) +{ + widget->setGeometry(0, 0, width(), height()); +} + + +extern "C" +{ + KDE_EXPORT KPanelApplet* init( QWidget *parent, const QString configFile) + { + KGlobal::locale()->insertCatalogue("kwireless"); + return new KWireLess(configFile, KPanelApplet::Normal, + KPanelApplet::About, + // | KPanelApplet::Help | KPanelApplet::Preferences, + parent, "kwireless"); + } +} + +#include "kwireless.moc" diff --git a/wifi/kwireless/kwireless.desktop b/wifi/kwireless/kwireless.desktop new file mode 100644 index 00000000..8564c742 --- /dev/null +++ b/wifi/kwireless/kwireless.desktop @@ -0,0 +1,118 @@ +[Desktop Entry] +Comment=Displays information about wireless network devices +Comment[ar]=عرض معلومات أجهزة الشبكة الاسلكية +Comment[bg]=Данни за устройствата поддържащи безжичната мрежа +Comment[bn]=ওয়্যারলেস নেটওয়ার্ক ডিভাইস সম্বন্ধে তথ্য প্রদর্শন করে +Comment[bs]=Prikazuje informacije o bežičnim mrežnim uređajima +Comment[ca]=Mostra informació quant als dispositius de la xarxa sense fils +Comment[cs]=Zobrazuje informace o bezdrátových síťových zařízeních +Comment[cy]=Dangos gwybodaeth ynglyn â dyfeisiau rhwydwaith di-wifr +Comment[da]=Giver oplysninger om trådløse netværksenheder +Comment[de]=Zeigt Informationen zu Geräten für drahtlose Netzwerke an +Comment[el]=Εμφανίζει πληροφορίες για συσκευές ασύρματου δικτύου +Comment[es]=Muestra información acerca de los dispositivos de la red inalámbrica +Comment[et]=Näitab infot traadita võrgu seadmete kohta +Comment[eu]=Kablerik gabeko sare gailuen informazioa erakusten du +Comment[fa]=اطلاعاتی دربارۀ دستگاههای شبکۀ بیسیم را نمایش میدهد +Comment[fi]=Tietoja langattoman verkon laitteista +Comment[fr]=Affiche des informations sur les périphériques réseau sans fil +Comment[gl]=Información sobre os dispositivos de rede inalámbirca +Comment[he]=מציג מידע ונתונים על התקני רשת אלחוטית +Comment[hi]=वायरलेस नेटवर्क औज़ार के बारे में जानकारी दिखाए +Comment[hr]=Prikazuje informacije o bežičnim mrežnim uređajima +Comment[hu]=Megjeleníti a vezeték nélküli hálózatok csatolókártyáinak jellemzőit +Comment[is]=Sýnir upplýsingar um tæki fyrir þráðlausar nettengingar +Comment[it]=Visualizza informazioni sui dispositivi di rete senza fili +Comment[ja]=ワイヤレスネットワークデバイスの情報を表示 +Comment[ka]=უკაბელო ქსელების მოწყობილობების შესახებ ინფორმაცია +Comment[kk]=Сымсыз желі құрылғылар туралы мәлімет береді +Comment[km]=បង្ហាញព័ត៌មានអំពីឧបករណ៍បណ្ដាញឥតខ្សែ +Comment[lt]=Pateikia informaciją apie bevielio ryšio įrangą +Comment[mk]=Прикажува информации за уредите на безжичната мрежа +Comment[ms]=Memaparkan maklumat berkaitan peranti jaringan tanpa wayar +Comment[nb]=Viser informasjon om enheter for trådløst nettverk +Comment[nds]=Wiest Informatschonen över Funknettwark-Reedschappen +Comment[ne]=तारविहिन सञ्जाल यन्त्रबारे सूचना प्रदर्शन गर्दछ +Comment[nl]=Toont informatie over draadloze netwerkapparaten +Comment[nn]=Viser informasjon om einingar for trådlause nettverk +Comment[pl]=Wyświetla informacje o bezprzewodowych kartach sieciowych +Comment[pt]=Mostra informações sobre os dispositivos de rede sem-fios ('wireless') +Comment[pt_BR]=Mostra informação sobre dispositivos de rede sem fio +Comment[ru]=Отображает сведения о беспроводных сетевых устройствах +Comment[se]=Čájeha dieđuid jođaskeahttes fierpmádatovttadagaid birra +Comment[sk]=Zobrazí informácie o zariadeniach bezdrôtovej siete +Comment[sl]=Prikaže informacije o napravah brezžičnega omrežja +Comment[sr]=Приказује информације о бежичним мрежним уређајима +Comment[sr@Latn]=Prikazuje informacije o bežičnim mrežnim uređajima +Comment[sv]=Visar information om enheter i trådlösa nätverk +Comment[ta]=கம்பி இல்லா செய்தித்தொடர்பு சாதனம் பற்றிய தகவலைக்காட்டு +Comment[tg]=Ахборотро оиди дастгоҳҳои беноқили шабакавӣ намоиш медиҳад +Comment[tr]=Kablosuz ağ aygıtları hakkında gösterim bilgisi +Comment[uk]=Відображає інформацію про пристрої радіомережі +Comment[uz]=Simsiz tarmoq uskunalari haqida maʼlumotni koʻrsatish +Comment[uz@cyrillic]=Симсиз тармоқ ускуналари ҳақида маълумотни кўрсатиш +Comment[zh_CN]=显示关于无线网络设备的信息 +Comment[zh_HK]=顯示有關無線網絡裝置的資訊 +Comment[zh_TW]=顯示無線網路裝置的資訊 +Name=Wireless Network Information +Name[ar]=معلومات الشبكة الاسلكية +Name[bg]=Данни за безжична мрежа +Name[bn]=ওয়্যারলেস নেটওয়ার্ক তথ্য +Name[br]=Titouroù diwar-benn ar roueded hep neud +Name[bs]=Informacije o bežičnoj mreži +Name[ca]=Informació de la xarxa sense fils +Name[cs]=Informace o bezdrátové síti +Name[cy]=Gwybodaeth Rwydwaith Di-Wifr +Name[da]=Information om trådløst netværk +Name[de]=Informationen über drahtlose Netzwerke +Name[el]=Πληροφορίες ασύρματου δικτύου +Name[eo]=Informoj pri Sendrata Reto +Name[es]=Información de red inalámbrica +Name[et]=Traadita võrgu info +Name[eu]=Kablerik gabeko sarearen informazioa +Name[fa]=اطلاعات شبکۀ بیسیم +Name[fi]=Langattoman verkon tiedot +Name[fr]=Informations sur le réseau sans fil +Name[ga]=Eolas faoi Ghréasán gan sreang +Name[gl]=Información sobre a rede inalámbrica +Name[he]=נתוני רשת אלחוטית +Name[hi]=वायरलेस नेटवर्क जानकारी +Name[hr]=Informacije o bežičnoj mreži +Name[hu]=A vezeték nélküli hálózat jellemzői +Name[is]=Upplýsingar um þráðlausa netið +Name[it]=Informazione rete senza fili +Name[ja]=ワイヤレスネットワーク情報 +Name[ka]=ინფორმაცია უკაბელო ქსელის შესახებ +Name[kk]=Сымсыз желі мәліметі +Name[km]=ព័ត៌មានបណ្ដាញឥតខ្សែ +Name[lt]=Bevielio ryšio tinklo informacija +Name[mk]=Информации за безжичната мрежа +Name[ms]=Maklumat Jaringan Tanpa Wayar +Name[nb]=Informasjon om trådløst nettverk +Name[nds]=Funknettwark-Informatschonen +Name[ne]=तारविहिन सञ्जाल सूचना +Name[nl]=Draadloos netwerk-informatie +Name[nn]=Informasjon om trådlaust nettverk +Name[pa]=ਬੇਤਾਰ ਨੈੱਟਵਰਕ ਜਾਣਕਾਰੀ +Name[pl]=Informacja o sieci bezprzewodowej +Name[pt]=Informação da Rede Sem-Fios ('Wireless') +Name[pt_BR]=Informação sobre Rede Sem Fio +Name[ru]=Сведения о беспроводной сети +Name[se]=Jođaskeahttes fierpmádatdieđut +Name[sk]=Informácie o bezdrôtovej sieti +Name[sl]=Podatki o brezžičnem omrežju +Name[sr]=Информације о бежичној мрежи +Name[sr@Latn]=Informacije o bežičnoj mreži +Name[sv]=Information om trådlöst nätverk +Name[ta]=கம்பியில்லா பிணைய தகவல் +Name[tg]=Ахборот оиди Шабакаи Беноқил +Name[tr]=Kablosuz Ağ Bilgisi +Name[uk]=Інформація про радіомережу +Name[uz]=Simsiz tarmoq haqida maʼlumot +Name[uz@cyrillic]=Симсиз тармоқ ҳақида маълумот +Name[wa]=Informåcion sol rantoele sins fyis +Name[zh_CN]=无线网络信息 +Name[zh_HK]=無線網絡資訊 +Name[zh_TW]=無線網路資訊 +Icon=kwifimanager +X-KDE-Library=libkwireless diff --git a/wifi/kwireless/kwireless.h b/wifi/kwireless/kwireless.h new file mode 100644 index 00000000..5a4597af --- /dev/null +++ b/wifi/kwireless/kwireless.h @@ -0,0 +1,46 @@ +/* + $ Author: Mirko Boehm $ + $ License: This code is licensed under the LGPL $ + $ Copyright: (C) 1996-2003, Mirko Boehm $ + $ Contact: Mirko Boehm <[email protected]> + http://www.kde.org + http://www.hackerbuero.org $ +*/ + +#ifndef KWIRELESS_H +#define KWIRELESS_H + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +#include <kpanelapplet.h> +#include <qstring.h> +#include <kconfig.h> + +class KWireLessWidget; + +class KWireLess : public KPanelApplet +{ + Q_OBJECT + +public: + KWireLess(const QString& configFile, Type t = Normal, int actions = 0, + QWidget *parent = 0, const char *name = 0); + ~KWireLess(); + + virtual int widthForHeight(int height) const; + virtual int heightForWidth(int width) const; + virtual void about(); + virtual void help(); + virtual void preferences(); + +protected: + void resizeEvent(QResizeEvent *); + +private: + KConfig *ksConfig; + KWireLessWidget *widget; +}; + +#endif diff --git a/wifi/kwireless/kwirelesswidget.cpp b/wifi/kwireless/kwirelesswidget.cpp new file mode 100644 index 00000000..3ae2ff8c --- /dev/null +++ b/wifi/kwireless/kwirelesswidget.cpp @@ -0,0 +1,324 @@ +/* + $ Author: Mirko Boehm $ + $ License: This code is licensed under the LGPL $ + $ Copyright: (C) 1996-2003, Mirko Boehm $ + $ Contact: Mirko Boehm <[email protected]> + http://www.kde.org + http://www.hackerbuero.org $ +*/ + +#include <qtimer.h> +#include <qpainter.h> +#include <qpen.h> +#include <qcolor.h> +#include <qpointarray.h> +#include <kglobalsettings.h> +#include <kdebug.h> +#include <kpassivepopup.h> +#include <klocale.h> + +#include "kwirelesswidget.h" +#include "propertytable.h" +#include "linuxwirelesswidget.h" + +extern "C" { +#include <math.h> +} + +QPtrList<DeviceInfo> KWireLessWidget::deviceInfo; +QMutex KWireLessWidget::mutex; +QTimer *KWireLessWidget::timer; +int KWireLessWidget::m_instances; + +DeviceInfo::DeviceInfo(QString _device, QString _essid, QString _encr, + float _quality, float _signal, float _noise, + int _bitrate) + : m_device(_device), + m_essid(_essid), + m_quality(_quality), + m_noise(_noise), + m_signal(_signal), + m_bitrate(_bitrate), + m_encr(_encr) +{ +} + +float DeviceInfo::quality() +{ + return m_quality; +} + +QString DeviceInfo::qualityString() +{ + return i18n("%1%").arg(QString::number(m_quality*100, 'f', 0)); +} + +float DeviceInfo::signal() +{ + return m_signal; +} + +QString DeviceInfo::signalString() +{ + return i18n("%1%").arg(QString::number(m_signal*100, 'f', 0)); +} + +float DeviceInfo::noise() +{ + return m_noise ; +} + +QString DeviceInfo::noiseString() +{ + return i18n("%1%").arg(QString::number(m_noise*100, 'f', 0)); +} + +const QString& DeviceInfo::device() +{ + return m_device; +} + +const QString& DeviceInfo::essid() +{ + return m_essid; +} + + +QString DeviceInfo::bitrateString() +{ + QString bitrate; + QTextOStream b(&bitrate); + b.precision(2); + + switch((int)log10(m_bitrate)) + { + case 0: + case 1: + case 2: + b << m_bitrate << " bit/s"; + break; + case 3: + case 4: + case 5: + b << m_bitrate/1000 << " kbit/s"; + break; + case 6: + case 7: + case 8: + b << m_bitrate/1000000 << " Mbit/s"; + break; + case 9: + case 10: + case 11: + b << m_bitrate/1000000000 << " Gbit/s"; + break; + default: + b << m_bitrate << " bit/s (!)"; + }; + return bitrate; +} + +bool DeviceInfo::usesEncryption() +{ + return !m_encr.isEmpty(); +} + +QString DeviceInfo::encrString() +{ + if(m_encr.isEmpty()) + { + return i18n("unknown"); + } else { + // we rely on the information provided (that is, it has to + // translated already!): + return m_encr; + } +} + +KWireLessWidget::KWireLessWidget(QWidget *parent, const char* name) + : QWidget(parent, name), + mode(Horizontal), + frameWidth(1), + qualityBarWidth(6), + signalBarWidth(3), + noiseBarWidth(3) +{ + ++m_instances; + deviceInfo.setAutoDelete(true); + // set up the poll timer: + if(timer == 0) + { // this way, only the poll() method of the first instance will + // ever be called (intended behaviour): + timer = new QTimer(this); + connect(timer, SIGNAL(timeout()), SLOT(poll())); + // single shot, will be restartet at the end of poll () + timer->start(100, true); + } +} + +KWireLessWidget::~KWireLessWidget() +{ + --m_instances; +} + +int KWireLessWidget::preferredHeight() +{ + return preferredWidth(); +} + +int KWireLessWidget::preferredWidth() +{ + return 4*frameWidth + qualityBarWidth + signalBarWidth + noiseBarWidth; +} + +int KWireLessWidget::instances() +{ + return m_instances; +} + +void KWireLessWidget::setMode(KWireLessWidget::Mode _mode) +{ + mode = _mode; +} + +void KWireLessWidget::mousePressEvent(QMouseEvent *e) +{ + if( e->button() == QMouseEvent::LeftButton) + { + PropertiesDialog dialog(this); + connect(this, SIGNAL(updateDeviceInfo(QPtrList<DeviceInfo> *)), + &dialog, SLOT(update(QPtrList<DeviceInfo> *))); + dialog.exec(); + } +} + +void KWireLessWidget::paintEvent(QPaintEvent*) +{ + // WORK_TO_DO: paint other devices, too: + // for quick repaints, we need a buffered painter! + int w, h, space; + const int bevel = qualityBarWidth/2; + QPainter painter(this); + QPointArray points; + QColor color, brush; + + // do stuff that does not rely on device being valid (e.g., + // non-nil): + space = 3 * frameWidth + qualityBarWidth + signalBarWidth + noiseBarWidth+1; + + if(mode == Horizontal) + { + h = space; + w = width(); + } else { + // Vertical + h = height(); + w = space; + } + + painter.setPen(QPen(Qt::black, frameWidth)); + painter.setBrush(KGlobalSettings::baseColor()); + painter.drawRect(0, 0, w, h); + + int x = qualityBarWidth + frameWidth; + mode == Vertical + ? painter.drawLine(x, frameWidth, x, h-frameWidth) + : painter.drawLine(frameWidth, x, w-frameWidth, x); + x += signalBarWidth + frameWidth; + mode == Vertical + ? painter.drawLine(x, frameWidth, x, h-frameWidth) + : painter.drawLine(frameWidth, x, w-frameWidth, x); + + DeviceInfo *device = deviceInfo.getFirst(); + if(device != 0) + { + // draw the quality bar: + switch((int)(device->quality()*3)) + { + case 0: + color = Qt::darkRed; + brush = Qt::red; + break; + case 1: + color = Qt::darkYellow; + brush = Qt::yellow; + break; + default: + color = Qt::darkGreen; + brush = Qt::green; + }; + if(mode == Vertical) + { + int position = (int)(((float)(h-2*frameWidth))*(1-device->quality())+0.5); + + points.putPoints + (0, 4, + frameWidth, h - 2*frameWidth, + frameWidth, position + bevel/2, + qualityBarWidth, QMAX(position - bevel/2, frameWidth), + qualityBarWidth, h - 2*frameWidth); + } else { + int position = (int)(((float)(w-2*frameWidth))*device->quality()+0.5); + + points.putPoints + (0, 4, + frameWidth, frameWidth, + QMIN(position - bevel/2, w-frameWidth), frameWidth, + QMIN(position + bevel/2, w-frameWidth), frameWidth+qualityBarWidth-1, + frameWidth, frameWidth+qualityBarWidth-1); + } + painter.setPen(QPen(color)); + painter.setBrush(brush); + painter.drawPolygon(points); + + // draw the signal bar: + painter.setPen(QPen(Qt::darkRed)); + painter.setBrush(Qt::red); + + if(mode == Vertical) + { + int x = 2 * frameWidth + qualityBarWidth; + int h1 = (int)(((float)(h-2*frameWidth))*(1-device->signal())+0.5); + + painter.drawRect(x, h1, signalBarWidth, h - frameWidth - h1); + } else { + int x = frameWidth; + int y = 2 * frameWidth + qualityBarWidth; + int w1 = (int)(((float)(w-2*frameWidth))*device->signal()+0.5); + + painter.drawRect(x, y, w1, signalBarWidth); + } + // draw the noise bar: + painter.setPen(QPen(Qt::gray)); + painter.setBrush(Qt::lightGray); + + if(mode == Vertical) + { + int x = 3 * frameWidth + qualityBarWidth + signalBarWidth; + int h1 = (int)(((float)(h-2*frameWidth))*(1-device->noise())+0.5); + + painter.drawRect(x, h1, signalBarWidth, h - frameWidth - h1); + } else { + int x = frameWidth; + int y = 3 * frameWidth + qualityBarWidth + signalBarWidth; + int w1 = (int)(((float)(w-2*frameWidth))*device->noise()+0.5); + + painter.drawRect(x, y, w1, signalBarWidth); + } + } +} + +KWireLessWidget* KWireLessWidget::makeWireLessWidget(QWidget *parent, + const char *name) +{ +#if 1 + // defined linuxwirelesswidget + return new LinuxWireLessWidget(parent, name); +#else +#error KWireLess is not available for your OS +#endif + // just to shut the compiler up: + parent = parent; name = name; return 0; +} + +#include "kwirelesswidget.moc" diff --git a/wifi/kwireless/kwirelesswidget.h b/wifi/kwireless/kwirelesswidget.h new file mode 100644 index 00000000..5a374d07 --- /dev/null +++ b/wifi/kwireless/kwirelesswidget.h @@ -0,0 +1,103 @@ +/* + $ Author: Mirko Boehm $ + $ License: This code is licensed under the LGPL $ + $ Copyright: (C) 1996-2003, Mirko Boehm $ + $ Contact: Mirko Boehm <[email protected]> + http://www.kde.org + http://www.hackerbuero.org $ +*/ + +#ifndef KWIRELESS_WIDGET_H +#define KWIRELESS_WIDGET_H + +#include <qwidget.h> +#include <qptrlist.h> +#include <qmutex.h> +#include <qstringlist.h> + +class DeviceInfo +{ +public: + DeviceInfo(QString _device=QString::null, QString _essid=QString::null, + QString _encr=QString::null, + float _quality=0, float _signal=0, float _noise=0, + int _bitrate=0); + QString bitrateString(); + float quality(); + QString qualityString(); + float signal(); + QString signalString(); + float noise(); + QString noiseString(); + const QString& device(); + const QString& essid(); + bool usesEncryption(); + QString encrString(); +protected: + QString m_device; // the device name (e.g., eth1) + QString m_essid; // the network name + + // all this values are coefficients (values between 0 and 1): + float m_quality; // link quality level + float m_noise; // the noise level + float m_signal; // the signal level + // all these values are absolut, e.g., 11000000 = 11MBit/sec: + int m_bitrate; // bit rate + QString m_encr; +}; + +/** This wigdet displays the information about one wireless device. + It is supposed to "look good" at about any resolution (to enable + it to be used in the panel). */ + +class KWireLessWidget : public QWidget +{ + Q_OBJECT +public: + enum Mode { + Horizontal, + Vertical + }; + static KWireLessWidget* makeWireLessWidget(QWidget *parent = 0, + const char *name = 0); +protected: + KWireLessWidget(QWidget *parent=0, const char* name=0); +public: + ~KWireLessWidget(); + void setMode(Mode); + // These methods return values according to the mode: + int preferredHeight(); + int preferredWidth(); + int instances(); +protected: + void paintEvent(QPaintEvent*); + void mousePressEvent(QMouseEvent *e); +protected: + Mode mode; + int frameWidth; + int qualityBarWidth; + int signalBarWidth; + int noiseBarWidth; + // some static device information + // a list of DeviceInfo objects, this needs to be filled by the + // poll method: + static QPtrList<DeviceInfo> deviceInfo; + static QTimer *timer; // the poll timer + static QMutex mutex; + static int m_instances; +signals: + void updateDeviceInfo(QPtrList<DeviceInfo> *); +protected slots: + /** poll() is system dependent and needs to be implemented by + deriving classes. + poll() has to put a DeviceInfo object into deviceInfo for each + wireless network device on the system. It uses mutex to + serialize access to this objects. + poll() will be called by a timer. If you cannot implement a + KWireLessWidget for your OS this way, please contact me + ([email protected]). + */ + virtual void poll() = 0; +}; + +#endif // KWIRELESS_WIDGET_H diff --git a/wifi/kwireless/linuxwirelesswidget.cpp b/wifi/kwireless/linuxwirelesswidget.cpp new file mode 100644 index 00000000..de35b84b --- /dev/null +++ b/wifi/kwireless/linuxwirelesswidget.cpp @@ -0,0 +1,227 @@ +/* + $ Author: Mirko Boehm $ + $ License: This code is licensed under the LGPL $ + $ Copyright: (C) 1996-2003, Mirko Boehm $ + $ Contact: Mirko Boehm <[email protected]> + http://www.kde.org + http://www.hackerbuero.org $ +*/ + +#include <qtooltip.h> +#include <qtimer.h> +#include <kdebug.h> +#include <klocale.h> +#include <unistd.h> // for ::close +#include "linuxwirelesswidget.h" +#include "config.h" + +extern "C" { +#include <iwlib.h> +// #include <linux/wireless.h> +} + +int LinuxWireLessWidget::socketFD; +QStringList LinuxWireLessWidget::deviceNames; + +LinuxWireLessWidget::LinuxWireLessWidget(QWidget *parent, const char* name) + : KWireLessWidget(parent, name), + m_number (-1) +{ +} + +LinuxWireLessWidget::~LinuxWireLessWidget() +{ + if(instances() == 1) + { // I am the only one + if(socketFD != 0) + { + kdDebug() << "KWireLessWidget dtor: closing FD, over and out." + << endl; + ::close(socketFD); // prevent from using QWidget::close + socketFD = 0; + } + } +} + + +void LinuxWireLessWidget::poll() +{ + // BE AWARE: do not call this method, only the first instance is + // supposed to do so, and it has been taken care of! + // this will repoll the device names every ReEnumCountDownStart + // timer ticks: + const int ReEnumCountDownStart = 30; + static int ReEnumCountDown; + struct wireless_info info; + struct wireless_config config; + struct iwreq wrq; + bool updateNeeded = false; + bool updateToolTip = false; + + // get a socket file descriptor: + if(socketFD == 0) + { + socketFD = iw_sockets_open(); + } + if(socketFD == 0) + { + kdDebug() << "KWireLessWidget ctor: opening socket file descriptor failed." + << endl; + return; + } + // ----- query the available devices: + mutex.lock(); // querying the device names is protected: + if(ReEnumCountDown-- == 0) + { + ReEnumCountDown = ReEnumCountDownStart; + updateToolTip = true; + + // query device information: + deviceNames.clear(); + iw_enum_devices(socketFD, devEnumHandler, 0, 0); + + if (m_number != (int) deviceNames.count()) + { + m_number = deviceNames.count(); + kdDebug() << "KWireLessWidget::poll: found " + << deviceNames.count() << " wireless " + << ((deviceNames.count() == 1) ? "device" : "devices") + << endl; + } + } + + // ----- get the device information: + QStringList::Iterator it; + + deviceInfo.clear(); + for(it=deviceNames.begin(); it!=deviceNames.end(); ++it) + { + // I think it is OK to use this cast, since the QT docs say the + // returned pointer is valid until the value of the string is + // changed, which will not happen here (horrible cast, anyway + // ...): + char *device_c_str = (char*)(*it).latin1(); + + if(iw_get_basic_config(socketFD, device_c_str, &config) == -1) + { + kdDebug() << "KWireLessWidget::poll: device " + << *it << " does not seem to be a wireless device" + << endl; + } else { + // WORK_TO_DO: decide whether updates are needed or not + // create a DeviceInfo object and fill it: + QString dev, essid, encr; + float quality=0, signal=0, noise=0; + int bitrate; + + dev = *it; + // get the bitrate: + if(iw_get_ext(socketFD, device_c_str, SIOCGIWRATE, &wrq) >=0) + { + info.has_bitrate = 1; + memcpy(&(info.bitrate), &(wrq.u.bitrate), sizeof(iwparam)); + } + bitrate = info.bitrate.value; + // get the ranges (needed to translate the absolute values + // reported by the driver): + if(iw_get_range_info(socketFD, device_c_str, &(info.range)) >= 0) + { + info.has_range = 1; + } + + // get the device statistics: +#ifdef HAVE_IW_27 + if(iw_get_stats(socketFD, device_c_str, &(info.stats), &(info.range), info.has_range)>= 0) +#else + if(iw_get_stats(socketFD, device_c_str, &(info.stats)) >= 0) +#endif + { + info.has_stats = 1; + // get the link quality (logic has been taken from + // wireless-tools, iwlib.c): + + int rqn = info.range.max_qual.noise; + int rql = info.range.max_qual.level; + int rmq = info.range.max_qual.qual; + + // in case the quality levels are zero, do not allow division by zero, and + // instead set the max. possible quality range to 255 (max of "unsigned char") + if (!rqn) rqn = 255; + if (!rql) rql = 255; + if (!rmq) rmq = 255; + + bool isAbs; // true if values are relative tp a peak value, + // otherwise values are dBm + isAbs = (float)info.stats.qual.level > (int)info.range.max_qual.level; + if(isAbs) + { + noise = 1 + ((float)info.stats.qual.noise - 0x100) / rqn; + signal = 1 + ((float)info.stats.qual.level - 0x100) / rql; + } else { + noise = ((float)info.stats.qual.noise) / rqn; + signal = ((float)info.stats.qual.level) / rql; + } + + quality = ((float)info.stats.qual.qual) / rmq; + + updateNeeded = true; + } + if(config.has_essid) + essid = config.essid; + else + essid = i18n("<unknown>"); + + if (config.has_key && config.key_size>0) { + encr = i18n("enabled"); + } else { + // non-root users don't get information about encryption status + encr = (getuid() == 0) ? i18n("disabled") : i18n("no information"); + } + + DeviceInfo *device = new DeviceInfo(dev, essid, encr, quality, signal, + noise, bitrate); + deviceInfo.append(device); + } + } + mutex.unlock(); + if(updateNeeded) + { + emit(updateDeviceInfo(&deviceInfo)); + repaint(false); + } + if(updateToolTip) + { + DeviceInfo *info; + QString text; + + for(info=deviceInfo.first(); info; info=deviceInfo.next()) + { + if (!text.isEmpty()) + text.append('\n'); + text += i18n("%1: Link Quality %2, Bitrate: %3") + .arg(info->device()) + .arg(info->qualityString()) + .arg(info->bitrateString()); + } + QToolTip::add(this, text); + + updateToolTip = false; + } + + timer->start(330, true); // single shot +} + +// static: +int LinuxWireLessWidget::devEnumHandler(int skfd, char * ifname, char **, int) +{ + struct wireless_config config; + + if(iw_get_basic_config(skfd, ifname, &config) != -1) + { + deviceNames.append(ifname); + } + return 0; +} + + +#include "linuxwirelesswidget.moc" diff --git a/wifi/kwireless/linuxwirelesswidget.h b/wifi/kwireless/linuxwirelesswidget.h new file mode 100644 index 00000000..3bbd085c --- /dev/null +++ b/wifi/kwireless/linuxwirelesswidget.h @@ -0,0 +1,36 @@ +/* + $ Author: Mirko Boehm $ + $ License: This code is licensed under the LGPL $ + $ Copyright: (C) 1996-2003, Mirko Boehm $ + $ Contact: Mirko Boehm <[email protected]> + http://www.kde.org + http://www.hackerbuero.org $ +*/ + +#ifndef LINUXWIRELESSWIDGET_H +#define LINUXWIRELESSWIDGET_H + +#include "kwirelesswidget.h" + +class LinuxWireLessWidget : public KWireLessWidget +{ + Q_OBJECT +public: + LinuxWireLessWidget(QWidget *parent=0, const char* name=0); + ~LinuxWireLessWidget(); +protected: + /** poll() is supposed to read the information from + /proc/net/wireless (Linux) and put it into the data members. */ + void poll(); + static int socketFD; // the socket file descriptor to talk to the + // driver + static QStringList deviceNames; + static int devEnumHandler(int skfd, + char * ifname, + char * args[], + int count); + /** Store previously found number of wireless devices. */ + int m_number; +}; + +#endif diff --git a/wifi/kwireless/propertytable.cpp b/wifi/kwireless/propertytable.cpp new file mode 100644 index 00000000..7011c691 --- /dev/null +++ b/wifi/kwireless/propertytable.cpp @@ -0,0 +1,151 @@ +/* + $ Author: Mirko Boehm $ + $ License: This code is licensed under the LGPL $ + $ Copyright: (C) 1996-2003, Mirko Boehm $ + $ Contact: Mirko Boehm <[email protected]> + http://www.kde.org + http://www.hackerbuero.org $ +*/ + +#include <qtable.h> +#include <qcombobox.h> +#include <qtimer.h> +#include <qptrlist.h> +#include <qtextstream.h> +#include <kdialogbase.h> +#include <klocale.h> +#include "propertytable.h" +#include "kwirelesswidget.h" + +extern "C" { +#include <math.h> +} + +PropertyTable::PropertyTable(QWidget *parent, const char* name) + : PropertyTableBase(parent, name) +{ +} + +PropertyTable::~PropertyTable() +{ +} + +PropertiesDialog::PropertiesDialog(QWidget *parent, const char *name) + : KDialogBase(parent, name, true, + i18n("Wireless Network Device Properties"), + KDialogBase::Ok, KDialogBase::Ok, true), + wait(false) +{ + table = new PropertyTable(this); + setMainWidget(table); + table->table->setLeftMargin(0); + table->table->setSorting(false); + table->table->setReadOnly(true); + adjustSize(); + timer = new QTimer(this); + connect(timer, SIGNAL(timeout()), SLOT(timeout())); + timer->start(3000, false); + connect(table->cbDeviceSelector, SIGNAL(activated(int)), + SLOT(selected(int))); +} + +void PropertiesDialog::update(QPtrList<DeviceInfo> *_info) +{ + int selection = table->cbDeviceSelector->currentItem(); + + if(wait) return; + + info = _info; + DeviceInfo *device; + QPtrListIterator<DeviceInfo> it(*info); + + table->cbDeviceSelector->clear(); + + while((device = it.current()) != 0) + { + ++it; + table->cbDeviceSelector->insertItem(device->device()); + } + + if(selection > 0 && selection < table->cbDeviceSelector->count()) + { + selected(selection); + } else { + if(table->cbDeviceSelector->count() == 0) + { + selected(-1); + } else { + selected(0); + } + } + + table->cbDeviceSelector->setEnabled(info->count()>1); + + wait = true; +} + +void PropertiesDialog::timeout() +{ + wait = false; +} + +void PropertiesDialog::selected(int index) +{ + DeviceInfo temp; + DeviceInfo *device; + int count; + + if(index < 0) + { + device = &temp; + } else { + device = info->at(index); + } + + QString fields[] = + { + i18n("Device:"), + i18n("ESSID (network name):"), + i18n("Link quality:"), + i18n("Signal strength:"), + i18n("Noise level:"), + i18n("Bit rate:"), + i18n("Encryption:") + }; + const int NoOfFields = sizeof(fields)/sizeof(fields[0]); + + QString values[] = + { + device->device(), + device->essid(), + device->qualityString(), + device->signalString(), + device->noiseString(), + device->bitrateString(), + device->encrString() + }; + const int NoOfValues = sizeof(values)/sizeof(values[0]); + + if(table->table->numRows() == 0) + { + table->table->insertRows(0, NoOfFields); + // HACK (make more rows visible than the default): + resize(size().width(), (int)(1.8*size().height())); + } + + for(count = 0; count<NoOfFields; ++count) + { + table->table->setText(count, 0, fields[count]); + } + + for(count = 0; count<NoOfValues; ++count) + { + table->table->setText(count, 1, values[count]); + } + + table->table->adjustColumn(0); + table->table->adjustColumn(1); + +} + +#include "propertytable.moc" diff --git a/wifi/kwireless/propertytable.h b/wifi/kwireless/propertytable.h new file mode 100644 index 00000000..4eadc78a --- /dev/null +++ b/wifi/kwireless/propertytable.h @@ -0,0 +1,45 @@ +/* + $ Author: Mirko Boehm $ + $ License: This code is licensed under the LGPL $ + $ Copyright: (C) 1996-2003, Mirko Boehm $ + $ Contact: Mirko Boehm <[email protected]> + http://www.kde.org + http://www.hackerbuero.org $ +*/ + +#ifndef KWIRELESS_PROPERTYTABLE_H +#define KWIRELESS_PROPERTYTABLE_H + +#include <kdialogbase.h> +#include <qptrlist.h> +#include "propertytablebase.h" + +class DeviceInfo; +class QTimer; + +class PropertyTable : public PropertyTableBase +{ + Q_OBJECT +public: + PropertyTable(QWidget *parent = 0, const char* name = 0); + ~PropertyTable(); +}; + + +class PropertiesDialog : public KDialogBase +{ + Q_OBJECT +public: + PropertiesDialog(QWidget *parent = 0, const char *name = 0); +protected: + PropertyTable *table; + QPtrList<DeviceInfo> *info; + bool wait; + QTimer *timer; +public slots: + void update(QPtrList<DeviceInfo> *); + void timeout(); + void selected(int); +}; + +#endif // KWIRELESS_PROPERTYTABLE_H diff --git a/wifi/kwireless/propertytablebase.ui b/wifi/kwireless/propertytablebase.ui new file mode 100644 index 00000000..8f52c58b --- /dev/null +++ b/wifi/kwireless/propertytablebase.ui @@ -0,0 +1,68 @@ +<!DOCTYPE UI><UI version="3.1" stdsetdef="1"> +<class>PropertyTableBase</class> +<widget class="QWidget"> + <property name="name"> + <cstring>PropertyTableBase</cstring> + </property> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>552</width> + <height>439</height> + </rect> + </property> + <property name="caption"> + <string>Wireless Network Device Properties</string> + </property> + <grid> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <property name="margin"> + <number>0</number> + </property> + <widget class="QTable" row="1" column="0" rowspan="1" colspan="2"> + <column> + <property name="text"> + <string>Property</string> + </property> + </column> + <column> + <property name="text"> + <string>Value</string> + </property> + </column> + <property name="name"> + <cstring>table</cstring> + </property> + <property name="numRows"> + <number>0</number> + </property> + <property name="numCols"> + <number>2</number> + </property> + <property name="readOnly"> + <bool>true</bool> + </property> + <property name="sorting"> + <bool>true</bool> + </property> + </widget> + <widget class="QComboBox" row="0" column="1"> + <property name="name"> + <cstring>cbDeviceSelector</cstring> + </property> + </widget> + <widget class="QLabel" row="0" column="0"> + <property name="name"> + <cstring>tlDevice</cstring> + </property> + <property name="text"> + <string>Network device:</string> + </property> + </widget> + </grid> +</widget> +<layoutdefaults spacing="6" margin="11"/> +</UI> diff --git a/wifi/locations/DE_BW_Karlsruhe_University.loc b/wifi/locations/DE_BW_Karlsruhe_University.loc new file mode 100644 index 00000000..b485a8d0 --- /dev/null +++ b/wifi/locations/DE_BW_Karlsruhe_University.loc @@ -0,0 +1,29 @@ +00:02:2D:0F:87:7A DE, BW, Karlsruhe, Universit�t, Allg. Verf�gungsgeb�ude +00:02:2D:03:A2:8C DE, BW, Karlsruhe, Universit�t, Vorplatz Geb. 30.60 +00:02:2D:0A:45:20 DE, BW, Karlsruhe, Universit�t, ATIS +00:60:1D:21:EC:2C DE, BW, Karlsruhe, Universit�t, HSaFSG +00:02:2D:0F:88:30 DE, BW, Karlsruhe, Universit�t, Infogeb�ude +00:02:2D:03:A2:26 DE, BW, Karlsruhe, Universit�t West, Geb. 06.42 +00:02:2D:08:CD:04 DE, BW, Karlsruhe, Universit�t, Halle Geb. 50.36 +00:02:2D:03:9E:E4 DE, BW, Karlsruhe, Universit�t, FZU (Nordteil) +00:02:2D:03:9E:FF DE, BW, Karlsruhe, Universit�t, FZU (S�dteil) +00:02:2D:0F:88:CC DE, BW, Karlsruhe, Universit�t, FZU +00:60:1D:F2:81:85 DE, BW, Karlsruhe, Universit�t, Geb. 30.70 (Westteil) +00:60:1D:22:0B:9E DE, BW, Karlsruhe, Universit�t, Geb. 30.70 (Ostteil) +00:02:2D:0F:87:B7 DE, BW, Karlsruhe, Universit�t, Geb. 30.61 +00:02:2D:0F:88:C0 DE, BW, Karlsruhe, Universit�t, Mensavorplatz +00:02:2D:0A:E6:24 DE, BW, Karlsruhe, Universit�t, Mensahalle +00:60:1D:21:E0:25 DE, BW, Karlsruhe, Universit�t, Rechenzentrum Untergeschoss +00:02:2D:03:9F:00 DE, BW, Karlsruhe, Universit�t, Allg. Verf�gungsgeb�ude -109 +00:02:2D:0A:45:DA DE, BW, Karlsruhe, Universit�t, Infogeb�ude, EG West +00:60:1D:21:DF:7E DE, BW, Karlsruhe, Universit�t, Infogeb�ude, 3. OG Ost +00:02:2D:03:9E:F8 DE, BW, Karlsruhe, Universit�t, Infogeb�ude, 3. OG West +00:60:1D:21:E9:2D DE, BW, Karlsruhe, Universit�t, Infogeb�ude, Raum 020 +00:60:1D:21:E9:17 DE, BW, Karlsruhe, Universit�t, Infogeb�ude, 1. OG Nord +00:60:1D:21:EA:F6 DE, BW, Karlsruhe, Universit�t, Infogeb�ude, 1. OG Ost +00:60:1D:21:DE:6E DE, BW, Karlsruhe, Universit�t, Infogeb�ude, 2. OG Ost +00:02:2D:03:A3:16 DE, BW, Karlsruhe, Universit�t, Infogeb�ude, 2. OG West +00:60:1D:21:E0:7F DE, BW, Karlsruhe, Universit�t, Infogeb�ude, 2. OG Nord +00:02:2D:0A:45:58 DE, BW, Karlsruhe, Universit�t West, Geb. 06.34 +00:02:2D:03:9E:BB DE, BW, Karlsruhe, Universit�t West, Geb. 06.42 +00:02:2D:0F:86:08 DE, BW, Karlsruhe, Universit�t, Architekturgeb�ude, Neuer H�rsaal diff --git a/wifi/locations/DE_BW_Weissach.loc b/wifi/locations/DE_BW_Weissach.loc new file mode 100644 index 00000000..dec83a18 --- /dev/null +++ b/wifi/locations/DE_BW_Weissach.loc @@ -0,0 +1,2 @@ +00:30:F1:CC:1C:42 DE, BW, Weissach, Hotel am Neuenbuehl, Flur +00:30:F1:AC:E0:36 DE, BW, Weissach, Hotel am Neuenbuehl, Restaurant diff --git a/wifi/locations/Makefile.am b/wifi/locations/Makefile.am new file mode 100644 index 00000000..9bc167e7 --- /dev/null +++ b/wifi/locations/Makefile.am @@ -0,0 +1,6 @@ +emo_DATA = DE_BW_Karlsruhe_University.loc \ + NOWHERE.loc + +emodir = $(kde_datadir)/kwifimanager/locations + +EXTRA_DIST = $(emo_DATA) diff --git a/wifi/locations/NOWHERE.loc b/wifi/locations/NOWHERE.loc new file mode 100644 index 00000000..3dc5d489 --- /dev/null +++ b/wifi/locations/NOWHERE.loc @@ -0,0 +1 @@ +00:00:00:00:00:00 N/A diff --git a/wifi/locator.cpp b/wifi/locator.cpp new file mode 100644 index 00000000..dc4e4ce1 --- /dev/null +++ b/wifi/locator.cpp @@ -0,0 +1,56 @@ +/*************************************************************************** + locator.cpp - description + ------------------- + begin : Mon Aug 19 2002 + copyright : (C) 2002 by Stefan Winter + email : [email protected] + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include <qpainter.h> +#include "locator.h" +#include "interface_wireless.h" + +extern QStringList APs; + +Locator::Locator (QWidget * parent, Interface_wireless * device):QWidget (parent, + "KwiFiManager") +{ + this->device = device; +} + +void +Locator::generateLocWidget () +{ + QString mac, ip; + device->get_AP_info (mac, ip); + sentence = + new QLabel (i18n ("AccessPoint: ") + whois (mac.local8Bit (), APs), this); + setFixedSize (QSize + (sentence->sizeHint ().width () + 2, + sentence->sizeHint ().height ())); + sentence-> + setFixedSize (QSize + (sentence->sizeHint ().width () + 2, + sentence->sizeHint ().height ())); + sentence->show (); + widgetbild = QPixmap::grabWidget (sentence); + delete sentence; +} + +void +Locator::paintEvent (QPaintEvent *) +{ + QPainter *locatorpainter = new QPainter (this); + generateLocWidget (); + locatorpainter->drawPixmap (0, 0, widgetbild); + delete locatorpainter; +} diff --git a/wifi/locator.h b/wifi/locator.h new file mode 100644 index 00000000..af63c70c --- /dev/null +++ b/wifi/locator.h @@ -0,0 +1,41 @@ +/*************************************************************************** + locator.h - description + ------------------- + begin : Mon Aug 19 2002 + copyright : (C) 2002 by Stefan Winter + email : [email protected] + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef LOCATOR_H +#define LOCATOR_H + +#include <qwidget.h> +#include <qpixmap.h> +#include <qlabel.h> + +#include <klocale.h> + +class Interface_wireless; + +class Locator:public QWidget +{ +public: + Locator (QWidget * parent, Interface_wireless * device); +private: + void paintEvent (QPaintEvent *); + void generateLocWidget (); + QPixmap widgetbild; + QLabel *sentence; + Interface_wireless *device; +}; + +#endif diff --git a/wifi/main.cpp b/wifi/main.cpp new file mode 100644 index 00000000..4cf6f567 --- /dev/null +++ b/wifi/main.cpp @@ -0,0 +1,66 @@ +/*************************************************************************** + main.cpp - description + ------------------- + begin : Sam Apr 7 11:44:20 CEST 2001 + copyright : (C) 2001 by Stefan Winter + email : [email protected] + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include <kcmdlineargs.h> +#include <kaboutdata.h> +#include <klocale.h> +#include <kapplication.h> + +#include "kwifimanager.h" +#ifndef VERSION +#define VERSION "1_2_0" +#endif + +static const char description[] = +I18N_NOOP ("KWiFiManager - Wireless LAN Manager for KDE"); + + +static KCmdLineOptions options[] = { + KCmdLineLastOption +}; + +int +main (int argc, char *argv[]) +{ + KAboutData aboutData ("kwifimanager", I18N_NOOP ("KWiFiManager"), VERSION, + description, KAboutData::License_GPL, + "(c) 2001-05, Stefan Winter"); + aboutData.addAuthor ("Stefan Winter", I18N_NOOP("Original Author and Maintainer"), "[email protected]"); + aboutData.addCredit ("Helge Deller", I18N_NOOP("Lots of Fixes and Optimizations, added Session Management"), + "[email protected]"); + KCmdLineArgs::init (argc, argv, &aboutData); + KCmdLineArgs::addCmdLineOptions (options); // Add our own options. + KCmdLineArgs *args = KCmdLineArgs::parsedArgs (); + args->clear (); + + KApplication app; + + if (app.isRestored ()) + { + RESTORE (KWiFiManagerApp(0,"mainWindow")); + KWiFiManagerApp *kwifimanager = (KWiFiManagerApp *) app.mainWidget(); + if (kwifimanager && kwifimanager->startDocked()) + kwifimanager->hide(); + } + else + { + KWiFiManagerApp *kwifimanager = new KWiFiManagerApp (0,"mainWindow"); + kwifimanager->show(); + } + + return app.exec (); +} diff --git a/wifi/networkscanning.cpp b/wifi/networkscanning.cpp new file mode 100644 index 00000000..5a15ffbc --- /dev/null +++ b/wifi/networkscanning.cpp @@ -0,0 +1,155 @@ +/*************************************************************************** + networkscanning.cpp - description + ------------------- + begin : Sam Apr 24 11:44:20 CEST 2005 + copyright : (C) 2005 by Stefan Winter + email : [email protected] + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include <stdio.h> + +#include <qstring.h> +#include <qwidget.h> +#include <qlayout.h> +#include <qpushbutton.h> +#include <qtable.h> + +#include <kdebug.h> +#include <klocale.h> +#include <kprocess.h> +#include <kmessagebox.h> +#include <ktempfile.h> + +#include "networkscanning.h" +#include "interface_wireless.h" + +NetworkScanning::NetworkScanning (Interface_wireless * dev, QWidget * parent, const char * name ) : QWidget ( parent, name ) { + device = dev; + networkScan(); +} + +void +NetworkScanning::networkScan () +{ + networks = device->get_available_networks (); + + if ( networks->numRows() > 0 ) { + + networks->setColumnReadOnly( 0, true); + networks->setColumnReadOnly( 1, true); + networks->setColumnReadOnly( 2, true); + networks->setColumnReadOnly( 3, false); + for ( int i = 0; i < networks->numRows(); i++) { + if ( networks->text( i, 3 ) == i18n( "off" )) networks->setRowReadOnly( i, true ); + } + + networks->setSelectionMode(QTable::SingleRow); + connect(networks,SIGNAL(selectionChanged()),this,SLOT(checkWEP())); + + this->setCaption( i18n( "Scan Results" ) ); + + QGridLayout* networkSelectionLayout = new QGridLayout ( this, 2, 3, 0, 5); + switchNet = new QPushButton( i18n( "Switch to Network..." ), this ); + switchNet->setEnabled(false); + QPushButton* close = new QPushButton( i18n( "Close" ), this ); + + networks->reparent( this, QPoint( 0, 0 ) ); + networks->setLeftMargin( 0 ); + networks->verticalHeader()->hide(); + + connect ( close, SIGNAL( clicked() ), this, SLOT( hide() ) ); + connect ( switchNet, SIGNAL( clicked() ), this, SLOT( switchToNetwork() ) ); + connect ( networks, SIGNAL( currentChanged(int,int)), this, SLOT( checkSettings(int,int))); + connect ( networks, SIGNAL( valueChanged(int,int)), this, SLOT( checkSettings(int,int))); + + networkSelectionLayout->addMultiCellWidget( networks, 0, 0, 0, 2 ); + networkSelectionLayout->addWidget( switchNet, 1, 0 ); + networkSelectionLayout->addWidget( close, 1, 2 ); + + this->show(); + + } else + { + KMessageBox::sorry(0,i18n("The scan is complete, but no networks have been found."),i18n("No Network Available")); + } +} + +void NetworkScanning::checkSettings(int row, int) +{ + if ((networks->text(row,0)!=i18n("(hidden cell)")) && (checkWEP()!=INVALID)) switchNet->setEnabled(true); + else switchNet->setEnabled(false); +} + +WEP_KEY +NetworkScanning::checkWEP() +{ + kdDebug() << "In checkWEP()\n"; + if ( (networks->text( networks->currentRow() , 3 ) == i18n( "off" )) || + (networks->text( networks->currentRow() , 3 ) == "" ) ) return NONE; + if ( (networks->text( networks->currentRow() , 3 ).length()== 5 ) || + (networks->text( networks->currentRow() , 3 ).length()== 13 ) ) return VALID_STRING; + if ( (networks->text( networks->currentRow() , 3 ).length()== 10 ) || + (networks->text( networks->currentRow() , 3 ).length()== 26 ) ) return VALID_HEX; + return INVALID; +} + +void +NetworkScanning::switchToNetwork() +{ + + WEP_KEY encryption = checkWEP(); + + if (encryption == INVALID) { + KMessageBox::sorry(0,i18n( "Aborting network switching due to invalid WEP key specification." ), i18n( "Invalid WEP Key" )); + return; + } + + QString cmdline; + + KTempFile* tempfile = new KTempFile( QString::null, QString::null, 0700 ); + QString tempfilename = tempfile->name(); + + cmdline = (QString)"ifconfig %1 down\n"; + cmdline = cmdline.arg( device->get_interface_name() ); + write( tempfile->handle(), cmdline.ascii(), strlen( cmdline.ascii() ) ); + + cmdline = (QString)"iwconfig %1 essid %2 mode %3 enc %4\n"; + cmdline = cmdline.arg( device->get_interface_name() ); + cmdline = cmdline.arg( KProcess::quote( networks->text( networks->currentRow(), 0 ) ) ); + + QString modetemp; + if (networks->text( networks->currentRow(), 1 ) == i18n("Managed") ) modetemp = "Managed"; else modetemp = "Ad-Hoc"; + cmdline = cmdline.arg( modetemp ); + + if ( encryption != NONE ) { + cmdline = cmdline.arg( (encryption == VALID_STRING ? "s:" : "" ) + KProcess::quote( networks->text( networks->currentRow(), 3 ) ) ); + } else { + cmdline = cmdline.arg("off"); + } + write( tempfile->handle(), cmdline.ascii(), strlen( cmdline.ascii() ) ); + + cmdline = (QString)"ifconfig %1 up\n"; + cmdline = cmdline.arg( device->get_interface_name() ); + write( tempfile->handle(), cmdline.ascii(), strlen( cmdline.ascii() ) ); + + delete tempfile; // autoDeletion off, so the file remains on disk + + KProcess switchProc; + switchProc << "kdesu" << tempfilename; + switchProc.start( KProcess::Block ); + + remove(tempfilename.ascii()); + +} + + +#include "networkscanning.moc" diff --git a/wifi/networkscanning.h b/wifi/networkscanning.h new file mode 100644 index 00000000..5964db3a --- /dev/null +++ b/wifi/networkscanning.h @@ -0,0 +1,52 @@ + +/*************************************************************************** + networkscanning.h - header for the NetworkScanning class + ------------------- + begin : Sam Apr 24 11:44:20 CEST 2005 + copyright : (C) 2005 by Stefan Winter + email : [email protected] + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef NETWORKSCANNING_H +#define NETWORKSCANNING_H + +#include <qwidget.h> + +class QTable; +class QPushButton; +class Interface_wireless; + +enum WEP_KEY { NONE, VALID_HEX, VALID_STRING, INVALID }; + +class NetworkScanning : public QWidget + +{ + + Q_OBJECT + + public: + NetworkScanning (Interface_wireless * dev, QWidget * parent = 0, const char * name = 0 ); + + protected: + void networkScan (); + QTable* networks; + Interface_wireless * device; + QPushButton* switchNet; + + protected slots: + void checkSettings(int row, int); + WEP_KEY checkWEP(); + void switchToNetwork(); + +}; + +#endif /* NETWORKSCANNING_H */ diff --git a/wifi/picture.cpp b/wifi/picture.cpp new file mode 100644 index 00000000..11d77cae --- /dev/null +++ b/wifi/picture.cpp @@ -0,0 +1,92 @@ +/*************************************************************************** + picture.cpp - description + ------------------- + begin : Mon Aug 19 2002 + copyright : (C) 2002 by Stefan Winter + email : [email protected] + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include <qwidget.h> +#include <qpainter.h> +#include <qpixmap.h> +#include <kstandarddirs.h> +#include "picture.h" +#include "interface_wireless.h" + +#define X_OFFSET 20 +#define Y_OFFSET 10 + +Picture::Picture (QWidget * parent, Interface_wireless * device):QWidget (parent, + "picture") +{ + this->device = device; + KStandardDirs finder; + kdedir = finder.findResourceDir ("data", "kwifimanager/pics/no_card.png"); + kdedir += "kwifimanager/pics/"; + NO_CARD = new QPixmap (kdedir + "no_card.png"); + AD_HOC = new QPixmap (kdedir + "ad_hoc.png"); + ALL_ALONE = new QPixmap (kdedir + "all_alone.png"); + AP_CONNECT = new QPixmap (kdedir + "ap_connect.png"); +} + +QSize Picture::mySizeHint() { + /* make this quite general, just in case someone uses different icons */ + QSize* temp = new QSize(NO_CARD->size()); + if (AD_HOC->size().width() > temp->width ()) { temp->setWidth (AD_HOC->size().width ()); } + if (AD_HOC->size().height() > temp->height()) { temp->setHeight(AD_HOC->size().height()); } + if (ALL_ALONE->size().width() > temp->width ()) { temp->setWidth (ALL_ALONE->size().width ()); } + if (ALL_ALONE->size().height() > temp->height()) { temp->setHeight(ALL_ALONE->size().height()); } + if (AP_CONNECT->size().width() > temp->width ()) { temp->setWidth (AP_CONNECT->size().width ()); } + if (AP_CONNECT->size().height() > temp->height()) { temp->setHeight(AP_CONNECT->size().height()); } + temp->setWidth (temp->width() + X_OFFSET); + temp->setHeight(temp->height() + Y_OFFSET); + return *temp; +} + +Picture::~Picture () +{ + delete NO_CARD; + delete AD_HOC; + delete ALL_ALONE; + delete AP_CONNECT; + +} + +void +Picture::paintEvent (QPaintEvent *) +{ + QPainter *picturepainter = new QPainter (this); + double freq; + int mode; + device->get_mode (mode); + int sig, noise, qual; + device->get_current_quality (sig, noise, qual); + if (!device->get_device_freq (freq) || device->get_txpower_disabled()) + { + picturepainter->drawPixmap (X_OFFSET, Y_OFFSET, *NO_CARD); + } + else if (mode == 1) + { + picturepainter->drawPixmap (X_OFFSET, Y_OFFSET, *AD_HOC); + } + else if (qual == 0) + { + picturepainter->drawPixmap (X_OFFSET, Y_OFFSET, *ALL_ALONE); + } + else if (qual > 0) + { + picturepainter->drawPixmap (X_OFFSET, Y_OFFSET, *AP_CONNECT); + } + else + picturepainter->drawPixmap (X_OFFSET, Y_OFFSET, *NO_CARD); + delete picturepainter; +} diff --git a/wifi/picture.h b/wifi/picture.h new file mode 100644 index 00000000..8d9b6bfc --- /dev/null +++ b/wifi/picture.h @@ -0,0 +1,37 @@ +/*************************************************************************** + picture.h - description + ------------------- + begin : Mon Aug 19 2002 + copyright : (C) 2002 by Stefan Winter + email : [email protected] + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef PICTURE_H +#define PICTURE_H + +class Interface_wireless; +class QSize; + +class Picture:public QWidget +{ +public: + Picture (QWidget * parent, Interface_wireless * device); + QSize mySizeHint(); + ~Picture (); +private: + void paintEvent (QPaintEvent *); + QPixmap *NO_CARD, *ALL_ALONE, *AD_HOC, *AP_CONNECT; + QString kdedir; + Interface_wireless *device; +}; + +#endif diff --git a/wifi/pixmaps/Makefile.am b/wifi/pixmaps/Makefile.am new file mode 100644 index 00000000..66625201 --- /dev/null +++ b/wifi/pixmaps/Makefile.am @@ -0,0 +1,14 @@ +emo_DATA = ad_hoc.png \ + all_alone.png \ + ap_connect.png \ + excellent.png \ + good.png \ + marginal.png \ + no_card.png \ + offline.png \ + oor_down.png \ + oor_minimum.png + +emodir = $(kde_datadir)/kwifimanager/pics + +EXTRA_DIST = $(emo_DATA) diff --git a/wifi/pixmaps/README b/wifi/pixmaps/README new file mode 100644 index 00000000..0464e53e --- /dev/null +++ b/wifi/pixmaps/README @@ -0,0 +1,2 @@ +Connection type SVG files and their accompanying PNG files Copyright Jonathan Riddell jr_AT_jriddell.org 2004. +They may be copied under the LGPL with add-on as found in kdelibs/pics/LICENSE.crystalsvg diff --git a/wifi/pixmaps/ad_hoc.png b/wifi/pixmaps/ad_hoc.png Binary files differnew file mode 100644 index 00000000..fb85a078 --- /dev/null +++ b/wifi/pixmaps/ad_hoc.png diff --git a/wifi/pixmaps/ad_hoc.svg b/wifi/pixmaps/ad_hoc.svg new file mode 100644 index 00000000..25b7a606 --- /dev/null +++ b/wifi/pixmaps/ad_hoc.svg @@ -0,0 +1,1102 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" +"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> +<!-- This file was created using the SVG export filter from Karbon14, a free vector drawing app. --> +<!-- It is part of koffice, the free, integrated office suite for KDE (http://www.koffice.org/). --> +<svg + width="60px" + height="30.000000pt" + id="svg1" + sodipodi:version="0.32" + inkscape:version="0.40" + sodipodi:docname="ad_hoc.svgz" + sodipodi:docbase="/mnt/win_d/Graphics/kde/icons/kwifimanager/pics" + inkscape:export-filename="/mnt/win_d/Graphics/kde/icons/kwifimanager/pics/ad_hoc.png" + inkscape:export-xdpi="115.50000" + inkscape:export-ydpi="115.50000" + xmlns="http://www.w3.org/2000/svg" + xmlns:cc="http://web.resource.org/cc/" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:xlink="http://www.w3.org/1999/xlink"> + <metadata + id="metadata64"> + <rdf:RDF + id="RDF65"> + <cc:Work + rdf:about="" + id="Work66"> + <dc:format + id="format67">image/svg+xml</dc:format> + <dc:type + id="type69" + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + </cc:Work> + </rdf:RDF> + </metadata> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="3.4732670" + inkscape:cx="54.239187" + inkscape:cy="29.761621" + inkscape:window-width="802" + inkscape:window-height="538" + inkscape:window-x="214" + inkscape:window-y="153" + inkscape:current-layer="svg1" /> + <defs + id="defs2"> + <radialGradient + id="defitem14" + gradientUnits="userSpaceOnUse" + cx="58.403" + cy="16.0261" + fx="9.67146" + fy="50.7123" + r="18.0973"> + <stop + stop-color="#00f200" + offset="0" + stop-opacity="1" + id="stop46" /> + <stop + stop-color="#00a300" + offset="1" + stop-opacity="1" + id="stop47" /> + </radialGradient> + <radialGradient + inkscape:collect="always" + xlink:href="#defitem14" + id="radialGradient2316" + gradientUnits="userSpaceOnUse" + cx="58.403" + cy="16.0261" + fx="9.67146" + fy="50.7123" + r="18.0973" + gradientTransform="matrix(0.610854,0.000000,0.000000,-0.610854,19.64182,-45.08786)" /> + <radialGradient + id="defitem17" + gradientUnits="userSpaceOnUse" + cx="49.8929" + cy="23.6043" + fx="9.67146" + fy="50.7123" + r="7.7871"> + <stop + stop-color="#00f200" + offset="0" + stop-opacity="1" + id="stop55" /> + <stop + stop-color="#00a300" + offset="1" + stop-opacity="1" + id="stop56" /> + </radialGradient> + <radialGradient + inkscape:collect="always" + xlink:href="#defitem17" + id="radialGradient2317" + gradientUnits="userSpaceOnUse" + cx="49.8929" + cy="23.6043" + fx="9.67146" + fy="50.7123" + r="7.7871" + gradientTransform="matrix(0.610854,0.000000,0.000000,-0.610854,19.64182,-45.08786)" /> + <linearGradient + id="defitem22" + gradientUnits="userSpaceOnUse" + x1="56.5467" + y1="43.2785" + x2="56.5467" + y2="34.3363"> + <stop + stop-color="#ffffff" + offset="0" + stop-opacity="1" + id="stop70" /> + <stop + stop-color="#ffffff" + offset="1" + stop-opacity="0.117021" + id="stop71" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem22" + id="linearGradient2318" + gradientUnits="userSpaceOnUse" + x1="56.5467" + y1="43.2785" + x2="56.5467" + y2="34.3363" + gradientTransform="matrix(0.610854,0.000000,0.000000,-0.610854,19.64182,-45.08786)" /> + <linearGradient + id="defitem23" + gradientUnits="userSpaceOnUse" + x1="49.4575" + y1="36.4366" + x2="49.4575" + y2="31.9398"> + <stop + stop-color="#ffffff" + offset="0" + stop-opacity="1" + id="stop73" /> + <stop + stop-color="#ffffff" + offset="1" + stop-opacity="0.117021" + id="stop74" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem23" + id="linearGradient2319" + gradientUnits="userSpaceOnUse" + x1="49.4575" + y1="36.4366" + x2="49.4575" + y2="31.9398" + gradientTransform="matrix(0.610854,0.000000,0.000000,-0.610854,19.64182,-45.08786)" /> + <linearGradient + id="defitem0" + gradientUnits="userSpaceOnUse" + x1="13.0416" + y1="33.4683" + x2="35.7962" + y2="12.9124"> + <stop + stop-color="#606060" + offset="0" + stop-opacity="1" + id="stop4" /> + <stop + stop-color="#ffffff" + offset="1" + stop-opacity="1" + id="stop5" /> + </linearGradient> + <linearGradient + id="defitem1" + gradientUnits="userSpaceOnUse" + x1="22.5629" + y1="27.4437" + x2="40.2475" + y2="9.38352"> + <stop + stop-color="#606060" + offset="0" + stop-opacity="1" + id="stop7" /> + <stop + stop-color="#ffffff" + offset="1" + stop-opacity="1" + id="stop8" /> + </linearGradient> + <linearGradient + id="defitem2" + gradientUnits="userSpaceOnUse" + x1="43.9104" + y1="16.4535" + x2="19.2773" + y2="14.5777"> + <stop + stop-color="#606060" + offset="0" + stop-opacity="1" + id="stop10" /> + <stop + stop-color="#ffffff" + offset="1" + stop-opacity="1" + id="stop11" /> + </linearGradient> + <linearGradient + id="defitem3" + gradientUnits="userSpaceOnUse" + x1="20.9082" + y1="22.3925" + x2="26.2153" + y2="15.4384"> + <stop + stop-color="#809ab8" + offset="0" + stop-opacity="1" + id="stop13" /> + <stop + stop-color="#ffffff" + offset="1" + stop-opacity="1" + id="stop14" /> + </linearGradient> + <linearGradient + id="defitem4" + gradientUnits="userSpaceOnUse" + x1="43.8883" + y1="13.6313" + x2="34.6669" + y2="12.9291"> + <stop + stop-color="#606060" + offset="0" + stop-opacity="1" + id="stop16" /> + <stop + stop-color="#ffffff" + offset="1" + stop-opacity="1" + id="stop17" /> + </linearGradient> + <linearGradient + id="defitem5" + gradientUnits="userSpaceOnUse" + x1="35.2774" + y1="15.8545" + x2="37.2641" + y2="13.2513"> + <stop + stop-color="#809ab8" + offset="0" + stop-opacity="1" + id="stop19" /> + <stop + stop-color="#ffffff" + offset="1" + stop-opacity="1" + id="stop20" /> + </linearGradient> + <linearGradient + id="defitem6" + gradientUnits="userSpaceOnUse" + x1="10.4881" + y1="51.4421" + x2="20.8871" + y2="39.295"> + <stop + stop-color="#a3a3a3" + offset="0" + stop-opacity="1" + id="stop22" /> + <stop + stop-color="#646464" + offset="1" + stop-opacity="1" + id="stop23" /> + </linearGradient> + <linearGradient + id="defitem7" + gradientUnits="userSpaceOnUse" + x1="20.5406" + y1="46.7018" + x2="24.9239" + y2="21.656"> + <stop + stop-color="#a3a3a3" + offset="0" + stop-opacity="1" + id="stop25" /> + <stop + stop-color="#ffffff" + offset="1" + stop-opacity="1" + id="stop26" /> + </linearGradient> + <linearGradient + id="defitem8" + gradientUnits="userSpaceOnUse" + x1="20.9103" + y1="40.4761" + x2="23.0818" + y2="39.6786"> + <stop + stop-color="#2a2a2a" + offset="0" + stop-opacity="1" + id="stop28" /> + <stop + stop-color="#ffffff" + offset="1" + stop-opacity="1" + id="stop29" /> + </linearGradient> + <radialGradient + id="defitem9" + gradientUnits="userSpaceOnUse" + cx="24.5089" + cy="28.1715" + fx="44.128" + fy="61.0801" + r="18.9697"> + <stop + stop-color="#a3cdeb" + offset="0" + stop-opacity="1" + id="stop31" /> + <stop + stop-color="#4189dd" + offset="1" + stop-opacity="1" + id="stop32" /> + </radialGradient> + <linearGradient + id="defitem10" + gradientUnits="userSpaceOnUse" + x1="19.6704" + y1="52.2427" + x2="22.0662" + y2="37.9851"> + <stop + stop-color="#ffffff" + offset="0" + stop-opacity="1" + id="stop34" /> + <stop + stop-color="#ffffff" + offset="1" + stop-opacity="0.117647" + id="stop35" /> + </linearGradient> + <linearGradient + id="defitem11" + gradientUnits="userSpaceOnUse" + x1="16.3795" + y1="46.0794" + x2="21.7056" + y2="37.3341"> + <stop + stop-color="#ffffff" + offset="0" + stop-opacity="1" + id="stop37" /> + <stop + stop-color="#ffffff" + offset="1" + stop-opacity="0.117647" + id="stop38" /> + </linearGradient> + <radialGradient + inkscape:collect="always" + xlink:href="#defitem9" + id="radialGradient1741" + gradientUnits="userSpaceOnUse" + cx="31.862440" + cy="30.222889" + fx="31.862440" + fy="30.222889" + r="19.767193" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem8" + id="linearGradient1742" + gradientUnits="userSpaceOnUse" + x1="20.910299" + y1="40.476101" + x2="23.115303" + y2="38.855164" /> + <radialGradient + inkscape:collect="always" + xlink:href="#defitem14" + id="radialGradient1851" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.610854,0.000000,0.000000,-0.610854,19.64182,-45.08786)" + cx="58.403" + cy="16.0261" + fx="9.67146" + fy="50.7123" + r="18.0973" /> + <radialGradient + inkscape:collect="always" + xlink:href="#defitem17" + id="radialGradient1852" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.610854,0.000000,0.000000,-0.610854,19.64182,-45.08786)" + cx="49.8929" + cy="23.6043" + fx="9.67146" + fy="50.7123" + r="7.7871" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem22" + id="linearGradient1853" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.610854,0.000000,0.000000,-0.610854,19.64182,-45.08786)" + x1="56.5467" + y1="43.2785" + x2="56.5467" + y2="34.3363" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem23" + id="linearGradient1854" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.610854,0.000000,0.000000,-0.610854,19.64182,-45.08786)" + x1="49.4575" + y1="36.4366" + x2="49.4575" + y2="31.9398" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem0" + id="linearGradient1855" + gradientUnits="userSpaceOnUse" + x1="13.0416" + y1="33.4683" + x2="35.7962" + y2="12.9124" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem1" + id="linearGradient1856" + gradientUnits="userSpaceOnUse" + x1="22.5629" + y1="27.4437" + x2="40.2475" + y2="9.38352" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem2" + id="linearGradient1857" + gradientUnits="userSpaceOnUse" + x1="43.9104" + y1="16.4535" + x2="19.2773" + y2="14.5777" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem3" + id="linearGradient1858" + gradientUnits="userSpaceOnUse" + x1="20.9082" + y1="22.3925" + x2="26.2153" + y2="15.4384" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem4" + id="linearGradient1859" + gradientUnits="userSpaceOnUse" + x1="43.8883" + y1="13.6313" + x2="34.6669" + y2="12.9291" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem5" + id="linearGradient1860" + gradientUnits="userSpaceOnUse" + x1="35.2774" + y1="15.8545" + x2="37.2641" + y2="13.2513" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem6" + id="linearGradient1861" + gradientUnits="userSpaceOnUse" + x1="10.4881" + y1="51.4421" + x2="20.8871" + y2="39.295" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem7" + id="linearGradient1862" + gradientUnits="userSpaceOnUse" + x1="20.5406" + y1="46.7018" + x2="24.9239" + y2="21.656" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem10" + id="linearGradient1863" + gradientUnits="userSpaceOnUse" + x1="19.6704" + y1="52.2427" + x2="22.0662" + y2="37.9851" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem11" + id="linearGradient1864" + gradientUnits="userSpaceOnUse" + x1="16.3795" + y1="46.0794" + x2="21.7056" + y2="37.3341" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem0" + id="linearGradient1889" + gradientUnits="userSpaceOnUse" + x1="13.0416" + y1="33.4683" + x2="35.7962" + y2="12.9124" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem1" + id="linearGradient1890" + gradientUnits="userSpaceOnUse" + x1="22.5629" + y1="27.4437" + x2="40.2475" + y2="9.38352" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem2" + id="linearGradient1891" + gradientUnits="userSpaceOnUse" + x1="43.9104" + y1="16.4535" + x2="19.2773" + y2="14.5777" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem3" + id="linearGradient1892" + gradientUnits="userSpaceOnUse" + x1="20.9082" + y1="22.3925" + x2="26.2153" + y2="15.4384" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem4" + id="linearGradient1893" + gradientUnits="userSpaceOnUse" + x1="43.8883" + y1="13.6313" + x2="34.6669" + y2="12.9291" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem5" + id="linearGradient1894" + gradientUnits="userSpaceOnUse" + x1="35.2774" + y1="15.8545" + x2="37.2641" + y2="13.2513" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem6" + id="linearGradient1895" + gradientUnits="userSpaceOnUse" + x1="10.4881" + y1="51.4421" + x2="20.8871" + y2="39.295" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem7" + id="linearGradient1896" + gradientUnits="userSpaceOnUse" + x1="20.5406" + y1="46.7018" + x2="24.9239" + y2="21.656" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem8" + id="linearGradient1897" + gradientUnits="userSpaceOnUse" + x1="20.910299" + y1="40.476101" + x2="23.115303" + y2="38.855164" /> + <radialGradient + inkscape:collect="always" + xlink:href="#defitem9" + id="radialGradient1898" + gradientUnits="userSpaceOnUse" + cx="31.862440" + cy="30.222889" + fx="31.862440" + fy="30.222889" + r="19.767193" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem10" + id="linearGradient1899" + gradientUnits="userSpaceOnUse" + x1="19.6704" + y1="52.2427" + x2="22.0662" + y2="37.9851" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem11" + id="linearGradient1900" + gradientUnits="userSpaceOnUse" + x1="16.3795" + y1="46.0794" + x2="21.7056" + y2="37.3341" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem0" + id="linearGradient1961" + gradientUnits="userSpaceOnUse" + x1="13.0416" + y1="33.4683" + x2="35.7962" + y2="12.9124" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem1" + id="linearGradient1962" + gradientUnits="userSpaceOnUse" + x1="22.5629" + y1="27.4437" + x2="40.2475" + y2="9.38352" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem2" + id="linearGradient1963" + gradientUnits="userSpaceOnUse" + x1="43.9104" + y1="16.4535" + x2="19.2773" + y2="14.5777" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem3" + id="linearGradient1964" + gradientUnits="userSpaceOnUse" + x1="20.9082" + y1="22.3925" + x2="26.2153" + y2="15.4384" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem4" + id="linearGradient1965" + gradientUnits="userSpaceOnUse" + x1="43.8883" + y1="13.6313" + x2="34.6669" + y2="12.9291" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem5" + id="linearGradient1966" + gradientUnits="userSpaceOnUse" + x1="35.2774" + y1="15.8545" + x2="37.2641" + y2="13.2513" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem6" + id="linearGradient1967" + gradientUnits="userSpaceOnUse" + x1="10.4881" + y1="51.4421" + x2="20.8871" + y2="39.295" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem7" + id="linearGradient1968" + gradientUnits="userSpaceOnUse" + x1="20.5406" + y1="46.7018" + x2="24.9239" + y2="21.656" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem8" + id="linearGradient1969" + gradientUnits="userSpaceOnUse" + x1="20.910299" + y1="40.476101" + x2="23.115303" + y2="38.855164" /> + <radialGradient + inkscape:collect="always" + xlink:href="#defitem9" + id="radialGradient1970" + gradientUnits="userSpaceOnUse" + cx="31.862440" + cy="30.222889" + fx="31.862440" + fy="30.222889" + r="19.767193" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem10" + id="linearGradient1971" + gradientUnits="userSpaceOnUse" + x1="19.6704" + y1="52.2427" + x2="22.0662" + y2="37.9851" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem11" + id="linearGradient1972" + gradientUnits="userSpaceOnUse" + x1="16.3795" + y1="46.0794" + x2="21.7056" + y2="37.3341" /> + <radialGradient + inkscape:collect="always" + xlink:href="#defitem14" + id="radialGradient1973" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.610854,0.000000,0.000000,-0.610854,19.64182,-45.08786)" + cx="58.403" + cy="16.0261" + fx="9.67146" + fy="50.7123" + r="18.0973" /> + <radialGradient + inkscape:collect="always" + xlink:href="#defitem17" + id="radialGradient1974" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.610854,0.000000,0.000000,-0.610854,19.64182,-45.08786)" + cx="49.8929" + cy="23.6043" + fx="9.67146" + fy="50.7123" + r="7.7871" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem22" + id="linearGradient1975" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.610854,0.000000,0.000000,-0.610854,19.64182,-45.08786)" + x1="56.5467" + y1="43.2785" + x2="56.5467" + y2="34.3363" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem23" + id="linearGradient1976" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.610854,0.000000,0.000000,-0.610854,19.64182,-45.08786)" + x1="49.4575" + y1="36.4366" + x2="49.4575" + y2="31.9398" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem0" + id="linearGradient1977" + gradientUnits="userSpaceOnUse" + x1="13.0416" + y1="33.4683" + x2="35.7962" + y2="12.9124" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem1" + id="linearGradient1978" + gradientUnits="userSpaceOnUse" + x1="22.5629" + y1="27.4437" + x2="40.2475" + y2="9.38352" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem2" + id="linearGradient1979" + gradientUnits="userSpaceOnUse" + x1="43.9104" + y1="16.4535" + x2="19.2773" + y2="14.5777" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem3" + id="linearGradient1980" + gradientUnits="userSpaceOnUse" + x1="20.9082" + y1="22.3925" + x2="26.2153" + y2="15.4384" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem4" + id="linearGradient1981" + gradientUnits="userSpaceOnUse" + x1="43.8883" + y1="13.6313" + x2="34.6669" + y2="12.9291" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem5" + id="linearGradient1982" + gradientUnits="userSpaceOnUse" + x1="35.2774" + y1="15.8545" + x2="37.2641" + y2="13.2513" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem6" + id="linearGradient1983" + gradientUnits="userSpaceOnUse" + x1="10.4881" + y1="51.4421" + x2="20.8871" + y2="39.295" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem7" + id="linearGradient1984" + gradientUnits="userSpaceOnUse" + x1="20.5406" + y1="46.7018" + x2="24.9239" + y2="21.656" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem8" + id="linearGradient1985" + gradientUnits="userSpaceOnUse" + x1="20.910299" + y1="40.476101" + x2="23.115303" + y2="38.855164" /> + <radialGradient + inkscape:collect="always" + xlink:href="#defitem9" + id="radialGradient1986" + gradientUnits="userSpaceOnUse" + cx="31.862440" + cy="30.222889" + fx="31.862440" + fy="30.222889" + r="19.767193" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem10" + id="linearGradient1987" + gradientUnits="userSpaceOnUse" + x1="19.6704" + y1="52.2427" + x2="22.0662" + y2="37.9851" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem11" + id="linearGradient1988" + gradientUnits="userSpaceOnUse" + x1="16.3795" + y1="46.0794" + x2="21.7056" + y2="37.3341" /> + </defs> + <g + id="g1901" + transform="matrix(0.828345,0.000000,0.000000,0.828345,10.23566,-17.55248)"> + <g + transform="matrix(0.494888,0.000000,0.000000,-0.494888,30.11960,58.94005)" + id="g39"> + <path + id="path87" + d="" + style="fill:#000000" /> + <g + id="g41"> + <g + id="g42" /> + <g + id="g45"> + <g + id="g46"> + <path + id="path1660" + d="M 35.889700,35.427300 C 35.342900,35.391900 34.794500,35.288600 34.279700,35.102500 L 6.6818400,25.009500 C 5.8918000,24.723900 5.4991800,24.170400 5.2361300,23.602300 C 4.9730800,23.034200 4.8242500,22.394200 4.7761300,21.762200 C 4.7280100,21.130100 4.7778000,20.490500 4.9075600,19.922000 C 5.0373100,19.353600 5.2026600,18.850900 5.7618400,18.406600 L 21.358700,5.1619700 C 22.961500,3.8885800 25.503800,3.5343200 27.535800,4.2689500 L 55.133700,14.362000 C 55.868100,14.627500 56.252500,15.151100 56.480900,15.660900 C 56.709200,16.170800 56.785000,16.709600 56.809400,17.257500 C 56.833900,17.805400 56.804800,18.364700 56.678000,18.854100 C 56.556400,19.323500 56.382600,19.734400 55.922300,20.126000 L 55.955200,20.153000 L 40.489700,34.182500 L 40.456900,34.182500 L 40.424000,34.209500 C 39.619200,34.848900 38.596700,35.216500 37.532600,35.373100 C 36.998500,35.451800 36.436600,35.462600 35.889700,35.427300 z M 37.138300,33.641200 C 37.859500,33.535100 38.493700,33.305600 38.912600,32.991800 L 54.378000,18.962400 L 54.410900,18.962400 L 54.443700,18.935300 C 54.344600,19.014100 54.525200,18.795000 54.608000,18.475300 C 54.690800,18.155500 54.724900,17.748600 54.706600,17.338700 C 54.688300,16.928800 54.627000,16.518900 54.509400,16.256300 C 54.391800,15.993700 54.245100,15.919100 54.279400,15.931500 L 26.681500,5.8384900 C 25.603100,5.4486100 23.646500,5.7377600 22.804400,6.4067700 L 7.2075500,19.651400 C 7.2693100,19.602400 7.0670200,19.854800 6.9775500,20.246800 C 6.8880800,20.638700 6.8410800,21.156100 6.8789800,21.653900 C 6.9168800,22.151700 7.0523000,22.644600 7.2075500,22.979900 C 7.3628000,23.315200 7.5485300,23.444400 7.5361200,23.440000 L 35.134000,33.533000 C 35.659700,33.723100 36.394000,33.750800 37.138300,33.641200 z " + style="fill:#7e7e7e;stroke-width:2.2734101;stroke-linecap:round" /> + <path + id="path1661" + d="M 37.028700,34.507200 C 36.122400,34.640600 35.177700,34.598900 34.400100,34.317800 L 7.1089800,24.224700 C 5.5537300,23.662500 5.4898600,19.819400 6.4846900,19.029000 L 22.238100,5.9159700 C 23.460600,4.9447800 25.710000,4.6230700 27.265300,5.1853300 L 54.556400,15.278400 C 55.956500,15.784600 55.838500,19.036200 55.016400,19.689300 L 39.394400,33.587100 C 38.783100,34.072700 37.934900,34.373800 37.028700,34.507200 z " + style="fill:url(#linearGradient1961);stroke-width:1.4172200;stroke-linecap:round" /> + <path + id="path1662" + d="M 7.0978700,24.212800 L 34.232200,34.376500 C 35.787500,34.938800 38.253800,34.672700 39.476200,33.701500 L 54.395700,20.422300 C 55.618100,19.451100 55.350200,18.216600 53.794900,17.654300 L 26.660600,7.4906200 C 25.105300,6.9283600 22.869100,7.2575700 21.646700,8.2287700 L 6.4971100,21.444800 C 5.2746800,22.416000 5.5426200,23.650500 7.0978700,24.212800 z " + style="fill:url(#linearGradient1962);stroke-width:1.4172200;stroke-linecap:round" /> + <g + id="g50"> + <path + id="path1664" + d="M 13.464600,20.842300 L 38.049400,30.017400 C 39.328100,30.479700 41.166700,30.209000 42.171800,29.410500 L 48.750800,23.746900 C 49.755900,22.948400 49.535600,21.933400 48.256900,21.471100 L 23.672100,12.296000 C 22.393400,11.833700 20.554800,12.104400 19.549700,12.902900 L 12.970700,18.566500 C 11.965600,19.365000 12.185900,20.380000 13.464600,20.842300 z " + style="fill:url(#linearGradient1963);stroke-width:1.4172200;stroke-linecap:round" /> + <path + id="path1665" + d="M 14.070400,20.920400 L 37.950400,29.668500 C 39.150000,30.102200 40.874900,29.848300 41.817900,29.099100 L 47.804500,23.826400 C 48.747400,23.077300 48.540700,22.125000 47.341100,21.691300 L 23.461100,12.943100 C 22.261500,12.509400 20.536600,12.763400 19.593600,13.512500 L 13.607000,18.785300 C 12.664100,19.534400 12.870800,20.486700 14.070400,20.920400 z " + style="fill:url(#linearGradient1964);stroke-width:1.4172200;stroke-linecap:round" /> + </g> + <g + id="g53"> + <path + id="path3151" + d="M 32.490900,15.274200 L 39.306300,17.754800 C 39.785000,17.927800 40.473300,17.826500 40.849500,17.527600 L 43.312400,15.407400 C 43.688600,15.108500 43.606200,14.728500 43.127500,14.555400 L 36.312100,12.074900 C 35.833400,11.901800 35.145100,12.003200 34.768900,12.302100 L 32.306000,14.422300 C 31.929800,14.721200 32.012300,15.101200 32.490900,15.274200 z " + style="fill:url(#linearGradient1965);stroke-width:0.53053498;stroke-linecap:round" /> + <path + id="path3152" + d="M 32.717700,15.303400 L 39.230100,17.690000 C 39.679200,17.852300 40.324900,17.757200 40.677900,17.476800 L 42.919000,15.503000 C 43.272000,15.222500 43.194600,14.866000 42.745500,14.703700 L 36.233100,12.317200 C 35.784000,12.154800 35.138300,12.249900 34.785300,12.530300 L 32.544300,14.504100 C 32.191300,14.784600 32.268600,15.141100 32.717700,15.303400 z " + style="fill:url(#linearGradient1966);stroke-width:0.53053498;stroke-linecap:round" /> + </g> + </g> + <g + id="g56"> + <path + id="path1670" + d="M 30.744300,59.532300 C 30.432000,59.561000 30.065700,59.511600 29.733000,59.388200 L 2.6736100,49.864700 C 1.3429500,49.370900 0.47013600,47.759100 0.72888100,46.280700 L 4.6183300,24.096900 C 4.8770800,22.618500 8.1261900,20.721200 10.180300,21.130800 L 37.912100,31.409100 C 39.242700,31.902900 40.115500,33.535300 39.856800,35.013700 L 35.967300,57.197500 C 35.708600,58.675900 31.475300,59.465200 30.744300,59.532300 z " + style="fill:url(#linearGradient1967);stroke-width:1.3453600;stroke-linecap:round" /> + <path + id="path1671" + d="M 5.8649200,47.969300 C 4.8047100,47.575900 4.1239100,46.306800 4.3327900,45.113300 L 8.1133500,23.511600 C 8.3222400,22.318100 9.3371300,21.678200 10.397300,22.071700 L 37.542200,32.144700 C 38.602400,32.538100 39.283200,33.807200 39.074300,35.000800 L 35.293700,56.602400 C 35.084800,57.796000 34.069900,58.435800 33.009700,58.042400 L 5.8649200,47.969300 z M 7.4174400,45.999000 L 32.294200,55.230400 C 32.787200,55.413300 33.252900,55.119800 33.350000,54.564700 L 36.690800,35.475900 C 36.787900,34.920800 36.475600,34.338600 35.982600,34.155600 L 11.105800,24.924200 C 10.612800,24.741200 10.147100,25.034800 10.050000,25.589800 L 6.7091900,44.678700 C 6.6120500,45.233700 6.9244100,45.816000 7.4174400,45.999000 z " + style="fill:url(#linearGradient1968);stroke-width:1.3751301;stroke-linecap:round" /> + <path + d="M 10.223700,24.596900 L 6.5353900,45.671700 L 33.176200,55.557700 L 36.864500,34.482900 L 10.223700,24.596900 z " + id="path59" + style="fill:url(#linearGradient1969);fill-opacity:1.0000000;stroke-width:1.3013901;stroke-linecap:round" /> + <path + d="M 10.801900,25.674700 L 7.3972700,45.128300 L 32.598000,54.479900 L 36.002700,35.026300 L 10.801900,25.674700 z " + id="path60" + style="fill:url(#radialGradient1970);fill-opacity:1.0000000;stroke-width:1.3013901;stroke-linecap:round" /> + <path + id="path1674" + d="M 5.9500300,47.483000 C 5.1201500,47.175000 4.6013000,46.207800 4.7648000,45.273600 L 6.7685700,33.824300 C 7.2127900,33.798400 7.6853400,33.800900 8.1532700,33.798600 L 6.2771800,44.518400 C 6.1352700,45.329200 6.6120600,46.218000 7.3323200,46.485300 L 32.209100,55.716700 C 32.929300,55.984000 33.640100,55.535900 33.782000,54.725000 L 35.782200,43.296000 C 36.209100,43.599200 36.597100,43.914000 37.000300,44.222800 L 34.861700,56.442100 C 34.698200,57.376400 33.924700,57.864000 33.094900,57.556000 L 5.9500300,47.483000 z " + style="fill:url(#linearGradient1971);stroke-width:1.3751301;stroke-linecap:round" /> + <path + id="path1675" + d="M 9.0398900,44.874600 C 8.6107900,44.715400 8.3262800,44.201500 8.4081800,43.733500 L 10.491000,31.832300 C 12.953300,36.964200 21.062000,43.028400 31.308400,46.830700 C 31.906000,47.052400 32.479700,47.206700 33.069400,47.405300 L 32.168900,52.550800 C 32.087000,53.018700 31.668300,53.271700 31.239200,53.112500 L 9.0398900,44.874600 z " + style="opacity:0.78313255;fill:url(#linearGradient1972);stroke-width:1.3751301;stroke-linecap:round" /> + </g> + </g> + </g> + </g> + <g + id="g1840" + transform="translate(-29.26542,106.6279)"> + <path + id="path1715" + d="M 49.708973,-74.827841 C 52.537594,-72.279969 54.442970,-67.751708 54.442970,-62.553402 C 54.442970,-57.355095 52.537594,-52.826835 49.708973,-50.279024 C 54.490311,-52.302478 57.844632,-57.037574 57.844632,-62.553402 C 57.844632,-68.069230 54.490311,-72.804326 49.708973,-74.827841 z " + style="fill:#007e00;stroke-width:2.0899899;stroke-linecap:round" /> + <path + id="path1717" + d="M 47.280707,-69.082332 C 48.785362,-67.727152 49.798830,-65.318494 49.798830,-62.553402 C 49.798830,-59.788371 48.785362,-57.379713 47.280707,-56.024472 C 49.823997,-57.100797 51.608241,-59.619470 51.608241,-62.553402 C 51.608241,-65.487395 49.823997,-68.006068 47.280707,-69.082332 z " + style="fill:#007e00;stroke-width:2.0899899;stroke-linecap:round" /> + <path + id="path1721" + d="M 52.419821,-72.435065 C 54.063752,-69.775712 55.072882,-66.364092 55.072882,-62.560793 C 55.072882,-58.757494 54.063752,-55.325838 52.419821,-52.666486 C 55.329624,-54.989808 57.207328,-58.544306 57.207328,-62.560793 C 57.207328,-66.577219 55.329624,-70.111804 52.419821,-72.435065 z " + style="fill:url(#radialGradient1973);stroke-width:2.0899899;stroke-linecap:round" /> + <path + id="path1726" + d="M 48.789210,-67.747249 C 49.611237,-66.377348 50.115802,-64.619860 50.115802,-62.660668 C 50.115802,-60.701415 49.611237,-58.933725 48.789210,-57.563763 C 50.244143,-58.760548 51.183025,-60.591644 51.183025,-62.660668 C 51.183025,-64.729691 50.244143,-66.550464 48.789210,-67.747249 z " + style="fill:url(#radialGradient1974);stroke-width:2.0899899;stroke-linecap:round" /> + <path + id="path2442" + d="M 52.419821,-72.435065 C 54.063752,-69.775712 55.072882,-66.364092 55.072882,-62.560793 C 55.072882,-58.757494 54.063752,-55.325838 52.419821,-52.666486 C 55.329624,-54.989808 57.207328,-58.544306 57.207328,-62.560793 C 57.207328,-66.577219 55.329624,-70.111804 52.419821,-72.435065 z " + style="fill:url(#linearGradient1975);stroke-width:2.0899899;stroke-linecap:round" /> + <path + id="path2444" + d="M 48.789210,-67.747249 C 49.611237,-66.377348 50.115802,-64.619860 50.115802,-62.660668 C 50.115802,-60.701415 49.611237,-58.933725 48.789210,-57.563763 C 50.244143,-58.760548 51.183025,-60.591644 51.183025,-62.660668 C 51.183025,-64.729691 50.244143,-66.550464 48.789210,-67.747249 z " + style="fill:url(#linearGradient1976);stroke-width:2.0899899;stroke-linecap:round" /> + </g> + <g + transform="matrix(0.494888,0.000000,0.000000,-0.494888,-11.86991,58.94005)" + id="g1865"> + <path + id="path1866" + d="" + style="fill:#000000" /> + <g + id="g1867"> + <g + id="g1868" /> + <g + id="g1871"> + <g + id="g1872"> + <path + id="path1873" + d="M 35.889700,35.427300 C 35.342900,35.391900 34.794500,35.288600 34.279700,35.102500 L 6.6818400,25.009500 C 5.8918000,24.723900 5.4991800,24.170400 5.2361300,23.602300 C 4.9730800,23.034200 4.8242500,22.394200 4.7761300,21.762200 C 4.7280100,21.130100 4.7778000,20.490500 4.9075600,19.922000 C 5.0373100,19.353600 5.2026600,18.850900 5.7618400,18.406600 L 21.358700,5.1619700 C 22.961500,3.8885800 25.503800,3.5343200 27.535800,4.2689500 L 55.133700,14.362000 C 55.868100,14.627500 56.252500,15.151100 56.480900,15.660900 C 56.709200,16.170800 56.785000,16.709600 56.809400,17.257500 C 56.833900,17.805400 56.804800,18.364700 56.678000,18.854100 C 56.556400,19.323500 56.382600,19.734400 55.922300,20.126000 L 55.955200,20.153000 L 40.489700,34.182500 L 40.456900,34.182500 L 40.424000,34.209500 C 39.619200,34.848900 38.596700,35.216500 37.532600,35.373100 C 36.998500,35.451800 36.436600,35.462600 35.889700,35.427300 z M 37.138300,33.641200 C 37.859500,33.535100 38.493700,33.305600 38.912600,32.991800 L 54.378000,18.962400 L 54.410900,18.962400 L 54.443700,18.935300 C 54.344600,19.014100 54.525200,18.795000 54.608000,18.475300 C 54.690800,18.155500 54.724900,17.748600 54.706600,17.338700 C 54.688300,16.928800 54.627000,16.518900 54.509400,16.256300 C 54.391800,15.993700 54.245100,15.919100 54.279400,15.931500 L 26.681500,5.8384900 C 25.603100,5.4486100 23.646500,5.7377600 22.804400,6.4067700 L 7.2075500,19.651400 C 7.2693100,19.602400 7.0670200,19.854800 6.9775500,20.246800 C 6.8880800,20.638700 6.8410800,21.156100 6.8789800,21.653900 C 6.9168800,22.151700 7.0523000,22.644600 7.2075500,22.979900 C 7.3628000,23.315200 7.5485300,23.444400 7.5361200,23.440000 L 35.134000,33.533000 C 35.659700,33.723100 36.394000,33.750800 37.138300,33.641200 z " + style="fill:#7e7e7e;stroke-width:2.2734101;stroke-linecap:round" /> + <path + id="path1874" + d="M 37.028700,34.507200 C 36.122400,34.640600 35.177700,34.598900 34.400100,34.317800 L 7.1089800,24.224700 C 5.5537300,23.662500 5.4898600,19.819400 6.4846900,19.029000 L 22.238100,5.9159700 C 23.460600,4.9447800 25.710000,4.6230700 27.265300,5.1853300 L 54.556400,15.278400 C 55.956500,15.784600 55.838500,19.036200 55.016400,19.689300 L 39.394400,33.587100 C 38.783100,34.072700 37.934900,34.373800 37.028700,34.507200 z " + style="fill:url(#linearGradient1977);stroke-width:1.4172200;stroke-linecap:round" /> + <path + id="path1875" + d="M 7.0978700,24.212800 L 34.232200,34.376500 C 35.787500,34.938800 38.253800,34.672700 39.476200,33.701500 L 54.395700,20.422300 C 55.618100,19.451100 55.350200,18.216600 53.794900,17.654300 L 26.660600,7.4906200 C 25.105300,6.9283600 22.869100,7.2575700 21.646700,8.2287700 L 6.4971100,21.444800 C 5.2746800,22.416000 5.5426200,23.650500 7.0978700,24.212800 z " + style="fill:url(#linearGradient1978);stroke-width:1.4172200;stroke-linecap:round" /> + <g + id="g1876"> + <path + id="path1877" + d="M 13.464600,20.842300 L 38.049400,30.017400 C 39.328100,30.479700 41.166700,30.209000 42.171800,29.410500 L 48.750800,23.746900 C 49.755900,22.948400 49.535600,21.933400 48.256900,21.471100 L 23.672100,12.296000 C 22.393400,11.833700 20.554800,12.104400 19.549700,12.902900 L 12.970700,18.566500 C 11.965600,19.365000 12.185900,20.380000 13.464600,20.842300 z " + style="fill:url(#linearGradient1979);stroke-width:1.4172200;stroke-linecap:round" /> + <path + id="path1878" + d="M 14.070400,20.920400 L 37.950400,29.668500 C 39.150000,30.102200 40.874900,29.848300 41.817900,29.099100 L 47.804500,23.826400 C 48.747400,23.077300 48.540700,22.125000 47.341100,21.691300 L 23.461100,12.943100 C 22.261500,12.509400 20.536600,12.763400 19.593600,13.512500 L 13.607000,18.785300 C 12.664100,19.534400 12.870800,20.486700 14.070400,20.920400 z " + style="fill:url(#linearGradient1980);stroke-width:1.4172200;stroke-linecap:round" /> + </g> + <g + id="g1879"> + <path + id="path1880" + d="M 32.490900,15.274200 L 39.306300,17.754800 C 39.785000,17.927800 40.473300,17.826500 40.849500,17.527600 L 43.312400,15.407400 C 43.688600,15.108500 43.606200,14.728500 43.127500,14.555400 L 36.312100,12.074900 C 35.833400,11.901800 35.145100,12.003200 34.768900,12.302100 L 32.306000,14.422300 C 31.929800,14.721200 32.012300,15.101200 32.490900,15.274200 z " + style="fill:url(#linearGradient1981);stroke-width:0.53053498;stroke-linecap:round" /> + <path + id="path1881" + d="M 32.717700,15.303400 L 39.230100,17.690000 C 39.679200,17.852300 40.324900,17.757200 40.677900,17.476800 L 42.919000,15.503000 C 43.272000,15.222500 43.194600,14.866000 42.745500,14.703700 L 36.233100,12.317200 C 35.784000,12.154800 35.138300,12.249900 34.785300,12.530300 L 32.544300,14.504100 C 32.191300,14.784600 32.268600,15.141100 32.717700,15.303400 z " + style="fill:url(#linearGradient1982);stroke-width:0.53053498;stroke-linecap:round" /> + </g> + </g> + <g + id="g1882"> + <path + id="path1883" + d="M 30.744300,59.532300 C 30.432000,59.561000 30.065700,59.511600 29.733000,59.388200 L 2.6736100,49.864700 C 1.3429500,49.370900 0.47013600,47.759100 0.72888100,46.280700 L 4.6183300,24.096900 C 4.8770800,22.618500 8.1261900,20.721200 10.180300,21.130800 L 37.912100,31.409100 C 39.242700,31.902900 40.115500,33.535300 39.856800,35.013700 L 35.967300,57.197500 C 35.708600,58.675900 31.475300,59.465200 30.744300,59.532300 z " + style="fill:url(#linearGradient1983);stroke-width:1.3453600;stroke-linecap:round" /> + <path + id="path1884" + d="M 5.8649200,47.969300 C 4.8047100,47.575900 4.1239100,46.306800 4.3327900,45.113300 L 8.1133500,23.511600 C 8.3222400,22.318100 9.3371300,21.678200 10.397300,22.071700 L 37.542200,32.144700 C 38.602400,32.538100 39.283200,33.807200 39.074300,35.000800 L 35.293700,56.602400 C 35.084800,57.796000 34.069900,58.435800 33.009700,58.042400 L 5.8649200,47.969300 z M 7.4174400,45.999000 L 32.294200,55.230400 C 32.787200,55.413300 33.252900,55.119800 33.350000,54.564700 L 36.690800,35.475900 C 36.787900,34.920800 36.475600,34.338600 35.982600,34.155600 L 11.105800,24.924200 C 10.612800,24.741200 10.147100,25.034800 10.050000,25.589800 L 6.7091900,44.678700 C 6.6120500,45.233700 6.9244100,45.816000 7.4174400,45.999000 z " + style="fill:url(#linearGradient1984);stroke-width:1.3751301;stroke-linecap:round" /> + <path + d="M 10.223700,24.596900 L 6.5353900,45.671700 L 33.176200,55.557700 L 36.864500,34.482900 L 10.223700,24.596900 z " + id="path1885" + style="fill:url(#linearGradient1985);fill-opacity:1.0000000;stroke-width:1.3013901;stroke-linecap:round" /> + <path + d="M 10.801900,25.674700 L 7.3972700,45.128300 L 32.598000,54.479900 L 36.002700,35.026300 L 10.801900,25.674700 z " + id="path1886" + style="fill:url(#radialGradient1986);fill-opacity:1.0000000;stroke-width:1.3013901;stroke-linecap:round" /> + <path + id="path1887" + d="M 5.9500300,47.483000 C 5.1201500,47.175000 4.6013000,46.207800 4.7648000,45.273600 L 6.7685700,33.824300 C 7.2127900,33.798400 7.6853400,33.800900 8.1532700,33.798600 L 6.2771800,44.518400 C 6.1352700,45.329200 6.6120600,46.218000 7.3323200,46.485300 L 32.209100,55.716700 C 32.929300,55.984000 33.640100,55.535900 33.782000,54.725000 L 35.782200,43.296000 C 36.209100,43.599200 36.597100,43.914000 37.000300,44.222800 L 34.861700,56.442100 C 34.698200,57.376400 33.924700,57.864000 33.094900,57.556000 L 5.9500300,47.483000 z " + style="fill:url(#linearGradient1987);stroke-width:1.3751301;stroke-linecap:round" /> + <path + id="path1888" + d="M 9.0398900,44.874600 C 8.6107900,44.715400 8.3262800,44.201500 8.4081800,43.733500 L 10.491000,31.832300 C 12.953300,36.964200 21.062000,43.028400 31.308400,46.830700 C 31.906000,47.052400 32.479700,47.206700 33.069400,47.405300 L 32.168900,52.550800 C 32.087000,53.018700 31.668300,53.271700 31.239200,53.112500 L 9.0398900,44.874600 z " + style="opacity:0.78313255;fill:url(#linearGradient1988);stroke-width:1.3751301;stroke-linecap:round" /> + </g> + </g> + </g> + </g> + </g> +</svg> diff --git a/wifi/pixmaps/all_alone.png b/wifi/pixmaps/all_alone.png Binary files differnew file mode 100644 index 00000000..380f8ba0 --- /dev/null +++ b/wifi/pixmaps/all_alone.png diff --git a/wifi/pixmaps/all_alone.svg b/wifi/pixmaps/all_alone.svg new file mode 100644 index 00000000..88547f08 --- /dev/null +++ b/wifi/pixmaps/all_alone.svg @@ -0,0 +1,402 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" +"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> +<!-- This file was created using the SVG export filter from Karbon14, a free vector drawing app. --> +<!-- It is part of koffice, the free, integrated office suite for KDE (http://www.koffice.org/). --> +<svg + width="60px" + height="60px" + id="svg1" + sodipodi:version="0.32" + inkscape:version="0.40" + sodipodi:docname="all_alone.svgz" + sodipodi:docbase="/mnt/win_d/Graphics/kde/icons/kwifimanager/pics" + xmlns="http://www.w3.org/2000/svg" + xmlns:cc="http://web.resource.org/cc/" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:xlink="http://www.w3.org/1999/xlink" + inkscape:export-filename="/mnt/win_d/Graphics/kde/icons/kwifimanager/pics/all_alone.svgz.png" + inkscape:export-xdpi="72.000000" + inkscape:export-ydpi="72.000000"> + <metadata + id="metadata64"> + <rdf:RDF + id="RDF65"> + <cc:Work + rdf:about="" + id="Work66"> + <dc:format + id="format67">image/svg+xml</dc:format> + <dc:type + id="type69" + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + </cc:Work> + </rdf:RDF> + </metadata> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="4.9119412" + inkscape:cx="50.130660" + inkscape:cy="36.091618" + inkscape:window-width="640" + inkscape:window-height="538" + inkscape:window-x="115" + inkscape:window-y="139" + inkscape:current-layer="svg1" /> + <defs + id="defs2"> + <linearGradient + id="defitem0" + gradientUnits="userSpaceOnUse" + x1="13.0416" + y1="33.4683" + x2="35.7962" + y2="12.9124"> + <stop + stop-color="#606060" + offset="0" + stop-opacity="1" + id="stop4" /> + <stop + stop-color="#ffffff" + offset="1" + stop-opacity="1" + id="stop5" /> + </linearGradient> + <linearGradient + id="defitem1" + gradientUnits="userSpaceOnUse" + x1="22.5629" + y1="27.4437" + x2="40.2475" + y2="9.38352"> + <stop + stop-color="#606060" + offset="0" + stop-opacity="1" + id="stop7" /> + <stop + stop-color="#ffffff" + offset="1" + stop-opacity="1" + id="stop8" /> + </linearGradient> + <linearGradient + id="defitem2" + gradientUnits="userSpaceOnUse" + x1="43.9104" + y1="16.4535" + x2="19.2773" + y2="14.5777"> + <stop + stop-color="#606060" + offset="0" + stop-opacity="1" + id="stop10" /> + <stop + stop-color="#ffffff" + offset="1" + stop-opacity="1" + id="stop11" /> + </linearGradient> + <linearGradient + id="defitem3" + gradientUnits="userSpaceOnUse" + x1="20.9082" + y1="22.3925" + x2="26.2153" + y2="15.4384"> + <stop + stop-color="#809ab8" + offset="0" + stop-opacity="1" + id="stop13" /> + <stop + stop-color="#ffffff" + offset="1" + stop-opacity="1" + id="stop14" /> + </linearGradient> + <linearGradient + id="defitem4" + gradientUnits="userSpaceOnUse" + x1="43.8883" + y1="13.6313" + x2="34.6669" + y2="12.9291"> + <stop + stop-color="#606060" + offset="0" + stop-opacity="1" + id="stop16" /> + <stop + stop-color="#ffffff" + offset="1" + stop-opacity="1" + id="stop17" /> + </linearGradient> + <linearGradient + id="defitem5" + gradientUnits="userSpaceOnUse" + x1="35.2774" + y1="15.8545" + x2="37.2641" + y2="13.2513"> + <stop + stop-color="#809ab8" + offset="0" + stop-opacity="1" + id="stop19" /> + <stop + stop-color="#ffffff" + offset="1" + stop-opacity="1" + id="stop20" /> + </linearGradient> + <linearGradient + id="defitem6" + gradientUnits="userSpaceOnUse" + x1="10.4881" + y1="51.4421" + x2="20.8871" + y2="39.295"> + <stop + stop-color="#a3a3a3" + offset="0" + stop-opacity="1" + id="stop22" /> + <stop + stop-color="#646464" + offset="1" + stop-opacity="1" + id="stop23" /> + </linearGradient> + <linearGradient + id="defitem7" + gradientUnits="userSpaceOnUse" + x1="20.5406" + y1="46.7018" + x2="24.9239" + y2="21.656"> + <stop + stop-color="#a3a3a3" + offset="0" + stop-opacity="1" + id="stop25" /> + <stop + stop-color="#ffffff" + offset="1" + stop-opacity="1" + id="stop26" /> + </linearGradient> + <linearGradient + id="defitem8" + gradientUnits="userSpaceOnUse" + x1="20.9103" + y1="40.4761" + x2="23.0818" + y2="39.6786"> + <stop + stop-color="#2a2a2a" + offset="0" + stop-opacity="1" + id="stop28" /> + <stop + stop-color="#ffffff" + offset="1" + stop-opacity="1" + id="stop29" /> + </linearGradient> + <radialGradient + id="defitem9" + gradientUnits="userSpaceOnUse" + cx="24.5089" + cy="28.1715" + fx="44.128" + fy="61.0801" + r="18.9697"> + <stop + stop-color="#a3cdeb" + offset="0" + stop-opacity="1" + id="stop31" /> + <stop + stop-color="#4189dd" + offset="1" + stop-opacity="1" + id="stop32" /> + </radialGradient> + <linearGradient + id="defitem10" + gradientUnits="userSpaceOnUse" + x1="19.6704" + y1="52.2427" + x2="22.0662" + y2="37.9851"> + <stop + stop-color="#ffffff" + offset="0" + stop-opacity="1" + id="stop34" /> + <stop + stop-color="#ffffff" + offset="1" + stop-opacity="0.117647" + id="stop35" /> + </linearGradient> + <linearGradient + id="defitem11" + gradientUnits="userSpaceOnUse" + x1="16.3795" + y1="46.0794" + x2="21.7056" + y2="37.3341"> + <stop + stop-color="#ffffff" + offset="0" + stop-opacity="1" + id="stop37" /> + <stop + stop-color="#ffffff" + offset="1" + stop-opacity="0.117647" + id="stop38" /> + </linearGradient> + <radialGradient + inkscape:collect="always" + xlink:href="#defitem9" + id="radialGradient1741" + gradientUnits="userSpaceOnUse" + cx="31.862440" + cy="30.222889" + fx="31.862440" + fy="30.222889" + r="19.767193" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem8" + id="linearGradient1742" + gradientUnits="userSpaceOnUse" + x1="20.910299" + y1="40.476101" + x2="23.115303" + y2="38.855164" /> + </defs> + <g + transform="scale(1, -1) translate(0, -60)" + id="g39"> + <path + id="path87" + fill="#000000" + d="" /> + <g + id="g41"> + <g + id="g42" /> + <g + id="g45"> + <g + id="g46"> + <path + id="path1660" + fill="#7e7e7e" + stroke-width="2.27341" + stroke-linecap="round" + d="M35.8897 35.4273C35.3429 35.3919 34.7945 35.2886 34.2797 35.1025L6.68184 25.0095C5.8918 24.7239 5.49918 24.1704 5.23613 23.6023C4.97308 23.0342 4.82425 22.3942 4.77613 21.7622C4.72801 21.1301 4.7778 20.4905 4.90756 19.922C5.03731 19.3536 5.20266 18.8509 5.76184 18.4066L21.3587 5.16197C22.9615 3.88858 25.5038 3.53432 27.5358 4.26895L55.1337 14.362C55.8681 14.6275 56.2525 15.1511 56.4809 15.6609C56.7092 16.1708 56.785 16.7096 56.8094 17.2575C56.8339 17.8054 56.8048 18.3647 56.678 18.8541C56.5564 19.3235 56.3826 19.7344 55.9223 20.126L55.9552 20.153L40.4897 34.1825L40.4569 34.1825L40.424 34.2095C39.6192 34.8489 38.5967 35.2165 37.5326 35.3731C36.9985 35.4518 36.4366 35.4626 35.8897 35.4273ZM37.1383 33.6412C37.8595 33.5351 38.4937 33.3056 38.9126 32.9918L54.378 18.9624L54.4109 18.9624L54.4437 18.9353C54.3446 19.0141 54.5252 18.795 54.608 18.4753C54.6908 18.1555 54.7249 17.7486 54.7066 17.3387C54.6883 16.9288 54.627 16.5189 54.5094 16.2563C54.3918 15.9937 54.2451 15.9191 54.2794 15.9315L26.6815 5.83849C25.6031 5.44861 23.6465 5.73776 22.8044 6.40677L7.20755 19.6514C7.26931 19.6024 7.06702 19.8548 6.97755 20.2468C6.88808 20.6387 6.84108 21.1561 6.87898 21.6539C6.91688 22.1517 7.0523 22.6446 7.20755 22.9799C7.3628 23.3152 7.54853 23.4444 7.53612 23.44L35.134 33.533C35.6597 33.7231 36.394 33.7508 37.1383 33.6412Z" /> + <path + id="path1661" + fill="url(#defitem0)" + stroke-width="1.41722" + stroke-linecap="round" + d="M37.0287 34.5072C36.1224 34.6406 35.1777 34.5989 34.4001 34.3178L7.10898 24.2247C5.55373 23.6625 5.48986 19.8194 6.48469 19.029L22.2381 5.91597C23.4606 4.94478 25.71 4.62307 27.2653 5.18533L54.5564 15.2784C55.9565 15.7846 55.8385 19.0362 55.0164 19.6893L39.3944 33.5871C38.7831 34.0727 37.9349 34.3738 37.0287 34.5072Z" /> + <path + id="path1662" + fill="url(#defitem1)" + stroke-width="1.41722" + stroke-linecap="round" + d="M7.09787 24.2128L34.2322 34.3765C35.7875 34.9388 38.2538 34.6727 39.4762 33.7015L54.3957 20.4223C55.6181 19.4511 55.3502 18.2166 53.7949 17.6543L26.6606 7.49062C25.1053 6.92836 22.8691 7.25757 21.6467 8.22877L6.49711 21.4448C5.27468 22.416 5.54262 23.6505 7.09787 24.2128Z" /> + <g + id="g50"> + <path + id="path1664" + fill="url(#defitem2)" + stroke-width="1.41722" + stroke-linecap="round" + d="M13.4646 20.8423L38.0494 30.0174C39.3281 30.4797 41.1667 30.209 42.1718 29.4105L48.7508 23.7469C49.7559 22.9484 49.5356 21.9334 48.2569 21.4711L23.6721 12.296C22.3934 11.8337 20.5548 12.1044 19.5497 12.9029L12.9707 18.5665C11.9656 19.365 12.1859 20.38 13.4646 20.8423Z" /> + <path + id="path1665" + fill="url(#defitem3)" + stroke-width="1.41722" + stroke-linecap="round" + d="M14.0704 20.9204L37.9504 29.6685C39.15 30.1022 40.8749 29.8483 41.8179 29.0991L47.8045 23.8264C48.7474 23.0773 48.5407 22.125 47.3411 21.6913L23.4611 12.9431C22.2615 12.5094 20.5366 12.7634 19.5936 13.5125L13.607 18.7853C12.6641 19.5344 12.8708 20.4867 14.0704 20.9204Z" /> + </g> + <g + id="g53"> + <path + id="path3151" + fill="url(#defitem4)" + stroke-width="0.530535" + stroke-linecap="round" + d="M32.4909 15.2742L39.3063 17.7548C39.785 17.9278 40.4733 17.8265 40.8495 17.5276L43.3124 15.4074C43.6886 15.1085 43.6062 14.7285 43.1275 14.5554L36.3121 12.0749C35.8334 11.9018 35.1451 12.0032 34.7689 12.3021L32.306 14.4223C31.9298 14.7212 32.0123 15.1012 32.4909 15.2742Z" /> + <path + id="path3152" + fill="url(#defitem5)" + stroke-width="0.530535" + stroke-linecap="round" + d="M32.7177 15.3034L39.2301 17.69C39.6792 17.8523 40.3249 17.7572 40.6779 17.4768L42.919 15.503C43.272 15.2225 43.1946 14.866 42.7455 14.7037L36.2331 12.3172C35.784 12.1548 35.1383 12.2499 34.7853 12.5303L32.5443 14.5041C32.1913 14.7846 32.2686 15.1411 32.7177 15.3034Z" /> + </g> + </g> + <g + id="g56"> + <path + id="path1670" + fill="url(#defitem6)" + stroke-width="1.34536" + stroke-linecap="round" + d="M30.7443 59.5323C30.432 59.561 30.0657 59.5116 29.733 59.3882L2.67361 49.8647C1.34295 49.3709 0.470136 47.7591 0.728881 46.2807L4.61833 24.0969C4.87708 22.6185 8.12619 20.7212 10.1803 21.1308L37.9121 31.4091C39.2427 31.9029 40.1155 33.5353 39.8568 35.0137L35.9673 57.1975C35.7086 58.6759 31.4753 59.4652 30.7443 59.5323Z" /> + <path + id="path1671" + fill="url(#defitem7)" + stroke-width="1.37513" + stroke-linecap="round" + d="M5.86492 47.9693C4.80471 47.5759 4.12391 46.3068 4.33279 45.1133L8.11335 23.5116C8.32224 22.3181 9.33713 21.6782 10.3973 22.0717L37.5422 32.1447C38.6024 32.5381 39.2832 33.8072 39.0743 35.0008L35.2937 56.6024C35.0848 57.796 34.0699 58.4358 33.0097 58.0424L5.86492 47.9693ZM7.41744 45.999L32.2942 55.2304C32.7872 55.4133 33.2529 55.1198 33.35 54.5647L36.6908 35.4759C36.7879 34.9208 36.4756 34.3386 35.9826 34.1556L11.1058 24.9242C10.6128 24.7412 10.1471 25.0348 10.05 25.5898L6.70919 44.6787C6.61205 45.2337 6.92441 45.816 7.41744 45.999Z" /> + <path + fill="url(#defitem8)" + stroke-width="1.30139" + stroke-linecap="round" + d="M10.2237 24.5969L6.53539 45.6717L33.1762 55.5577L36.8645 34.4829L10.2237 24.5969Z" + id="path59" + style="fill:url(#linearGradient1742);fill-opacity:1.0;" /> + <path + fill="url(#defitem9)" + stroke-width="1.30139" + stroke-linecap="round" + d="M10.8019 25.6747L7.39727 45.1283L32.598 54.4799L36.0027 35.0263L10.8019 25.6747Z" + id="path60" + style="fill:url(#radialGradient1741);fill-opacity:1.0;" /> + <path + id="path1674" + fill="url(#defitem10)" + stroke-width="1.37513" + stroke-linecap="round" + d="M5.95003 47.483C5.12015 47.175 4.6013 46.2078 4.7648 45.2736L6.76857 33.8243C7.21279 33.7984 7.68534 33.8009 8.15327 33.7986L6.27718 44.5184C6.13527 45.3292 6.61206 46.218 7.33232 46.4853L32.2091 55.7167C32.9293 55.984 33.6401 55.5359 33.782 54.725L35.7822 43.296C36.2091 43.5992 36.5971 43.914 37.0003 44.2228L34.8617 56.4421C34.6982 57.3764 33.9247 57.864 33.0949 57.556L5.95003 47.483Z" /> + <path + id="path1675" + fill="url(#defitem11)" + stroke-width="1.37513" + stroke-linecap="round" + d="M9.03989 44.8746C8.61079 44.7154 8.32628 44.2015 8.40818 43.7335L10.491 31.8323C12.9533 36.9642 21.062 43.0284 31.3084 46.8307C31.906 47.0524 32.4797 47.2067 33.0694 47.4053L32.1689 52.5508C32.087 53.0187 31.6683 53.2717 31.2392 53.1125L9.03989 44.8746Z" + style="opacity:0.78313253;" /> + </g> + </g> + </g> + </g> +</svg> diff --git a/wifi/pixmaps/ap_connect.png b/wifi/pixmaps/ap_connect.png Binary files differnew file mode 100644 index 00000000..bfcd1075 --- /dev/null +++ b/wifi/pixmaps/ap_connect.png diff --git a/wifi/pixmaps/ap_connect.svg b/wifi/pixmaps/ap_connect.svg new file mode 100644 index 00000000..569ac48c --- /dev/null +++ b/wifi/pixmaps/ap_connect.svg @@ -0,0 +1,1105 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" +"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> +<!-- This file was created using the SVG export filter from Karbon14, a free vector drawing app. --> +<!-- It is part of koffice, the free, integrated office suite for KDE (http://www.koffice.org/). --> +<svg + width="60px" + height="35.000000pt" + id="svg1" + sodipodi:version="0.32" + inkscape:version="0.40" + sodipodi:docname="ap_connect.svgz" + sodipodi:docbase="/mnt/win_d/Graphics/kde/icons/kwifimanager/pics" + inkscape:export-filename="/mnt/win_d/Graphics/kde/icons/kwifimanager/pics/ap_connect.png" + inkscape:export-xdpi="99.000000" + inkscape:export-ydpi="99.000000" + xmlns="http://www.w3.org/2000/svg" + xmlns:cc="http://web.resource.org/cc/" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:xlink="http://www.w3.org/1999/xlink"> + <metadata + id="metadata134"> + <rdf:RDF + id="RDF135"> + <cc:Work + rdf:about="" + id="Work136"> + <dc:format + id="format137">image/svg+xml</dc:format> + <dc:type + id="type139" + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + </cc:Work> + </rdf:RDF> + </metadata> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="3.4732669" + inkscape:cx="93.441743" + inkscape:cy="18.645880" + inkscape:window-width="777" + inkscape:window-height="538" + inkscape:window-x="239" + inkscape:window-y="153" + inkscape:current-layer="svg1" /> + <defs + id="defs2"> + <linearGradient + id="defitem0" + gradientUnits="userSpaceOnUse" + x1="13.0416" + y1="33.4683" + x2="35.7962" + y2="12.9124"> + <stop + stop-color="#606060" + offset="0" + stop-opacity="1" + id="stop4" /> + <stop + stop-color="#ffffff" + offset="1" + stop-opacity="1" + id="stop5" /> + </linearGradient> + <linearGradient + id="defitem1" + gradientUnits="userSpaceOnUse" + x1="22.5629" + y1="27.4437" + x2="40.2475" + y2="9.38352"> + <stop + stop-color="#606060" + offset="0" + stop-opacity="1" + id="stop7" /> + <stop + stop-color="#ffffff" + offset="1" + stop-opacity="1" + id="stop8" /> + </linearGradient> + <linearGradient + id="defitem2" + gradientUnits="userSpaceOnUse" + x1="43.9104" + y1="16.4535" + x2="19.2773" + y2="14.5777"> + <stop + stop-color="#606060" + offset="0" + stop-opacity="1" + id="stop10" /> + <stop + stop-color="#ffffff" + offset="1" + stop-opacity="1" + id="stop11" /> + </linearGradient> + <linearGradient + id="defitem3" + gradientUnits="userSpaceOnUse" + x1="20.9082" + y1="22.3925" + x2="26.2153" + y2="15.4384"> + <stop + stop-color="#809ab8" + offset="0" + stop-opacity="1" + id="stop13" /> + <stop + stop-color="#ffffff" + offset="1" + stop-opacity="1" + id="stop14" /> + </linearGradient> + <linearGradient + id="defitem4" + gradientUnits="userSpaceOnUse" + x1="43.8883" + y1="13.6313" + x2="34.6669" + y2="12.9291"> + <stop + stop-color="#606060" + offset="0" + stop-opacity="1" + id="stop16" /> + <stop + stop-color="#ffffff" + offset="1" + stop-opacity="1" + id="stop17" /> + </linearGradient> + <linearGradient + id="defitem5" + gradientUnits="userSpaceOnUse" + x1="35.2774" + y1="15.8545" + x2="37.2641" + y2="13.2513"> + <stop + stop-color="#809ab8" + offset="0" + stop-opacity="1" + id="stop19" /> + <stop + stop-color="#ffffff" + offset="1" + stop-opacity="1" + id="stop20" /> + </linearGradient> + <linearGradient + id="defitem6" + gradientUnits="userSpaceOnUse" + x1="10.4881" + y1="51.4421" + x2="20.8871" + y2="39.295"> + <stop + stop-color="#a3a3a3" + offset="0" + stop-opacity="1" + id="stop22" /> + <stop + stop-color="#646464" + offset="1" + stop-opacity="1" + id="stop23" /> + </linearGradient> + <linearGradient + id="defitem7" + gradientUnits="userSpaceOnUse" + x1="20.5406" + y1="46.7018" + x2="24.9239" + y2="21.656"> + <stop + stop-color="#a3a3a3" + offset="0" + stop-opacity="1" + id="stop25" /> + <stop + stop-color="#ffffff" + offset="1" + stop-opacity="1" + id="stop26" /> + </linearGradient> + <linearGradient + id="defitem8" + gradientUnits="userSpaceOnUse" + x1="20.9103" + y1="40.4761" + x2="23.1153" + y2="38.8552"> + <stop + stop-color="#2a2a2a" + offset="0" + stop-opacity="1" + id="stop28" /> + <stop + stop-color="#ffffff" + offset="1" + stop-opacity="1" + id="stop29" /> + </linearGradient> + <radialGradient + id="defitem9" + gradientUnits="userSpaceOnUse" + cx="31.8624" + cy="30.2229" + fx="31.8624" + fy="30.2229" + r="19.7672"> + <stop + stop-color="#a3cdeb" + offset="0" + stop-opacity="1" + id="stop31" /> + <stop + stop-color="#4189dd" + offset="1" + stop-opacity="1" + id="stop32" /> + </radialGradient> + <linearGradient + id="defitem10" + gradientUnits="userSpaceOnUse" + x1="19.6704" + y1="52.2427" + x2="22.0662" + y2="37.9851"> + <stop + stop-color="#ffffff" + offset="0" + stop-opacity="1" + id="stop34" /> + <stop + stop-color="#ffffff" + offset="1" + stop-opacity="0.117647" + id="stop35" /> + </linearGradient> + <linearGradient + id="defitem11" + gradientUnits="userSpaceOnUse" + x1="16.3795" + y1="46.0794" + x2="21.7056" + y2="37.3341"> + <stop + stop-color="#ffffff" + offset="0" + stop-opacity="1" + id="stop37" /> + <stop + stop-color="#ffffff" + offset="1" + stop-opacity="0.117647" + id="stop38" /> + </linearGradient> + <linearGradient + id="defitem12" + gradientUnits="userSpaceOnUse" + x1="40.4771" + y1="26.4264" + x2="40.4771" + y2="12.8913"> + <stop + stop-color="#ffffff" + offset="0" + stop-opacity="1" + id="stop40" /> + <stop + stop-color="#ffffff" + offset="1" + stop-opacity="0.117021" + id="stop41" /> + </linearGradient> + <radialGradient + id="defitem13" + gradientUnits="userSpaceOnUse" + cx="40.5327" + cy="-6.37103" + fx="40.5327" + fy="-6.37103" + r="9.8821"> + <stop + stop-color="#cdcdcd" + offset="0" + stop-opacity="1" + id="stop43" /> + <stop + stop-color="#000000" + offset="1" + stop-opacity="1" + id="stop44" /> + </radialGradient> + <radialGradient + id="defitem14" + gradientUnits="userSpaceOnUse" + cx="58.403" + cy="16.0261" + fx="9.67146" + fy="50.7123" + r="18.0973"> + <stop + stop-color="#00f200" + offset="0" + stop-opacity="1" + id="stop46" /> + <stop + stop-color="#00a300" + offset="1" + stop-opacity="1" + id="stop47" /> + </radialGradient> + <radialGradient + id="defitem15" + gradientUnits="userSpaceOnUse" + cx="24.0401" + cy="16.8777" + fx="9.67146" + fy="50.7123" + r="18.0973"> + <stop + stop-color="#00f200" + offset="0" + stop-opacity="1" + id="stop49" /> + <stop + stop-color="#00a300" + offset="1" + stop-opacity="1" + id="stop50" /> + </radialGradient> + <radialGradient + id="defitem16" + gradientUnits="userSpaceOnUse" + cx="31.6735" + cy="24.0431" + fx="9.67146" + fy="50.7123" + r="7.458"> + <stop + stop-color="#00f200" + offset="0" + stop-opacity="1" + id="stop52" /> + <stop + stop-color="#00a300" + offset="1" + stop-opacity="1" + id="stop53" /> + </radialGradient> + <radialGradient + id="defitem17" + gradientUnits="userSpaceOnUse" + cx="49.8929" + cy="23.6043" + fx="9.67146" + fy="50.7123" + r="7.7871"> + <stop + stop-color="#00f200" + offset="0" + stop-opacity="1" + id="stop55" /> + <stop + stop-color="#00a300" + offset="1" + stop-opacity="1" + id="stop56" /> + </radialGradient> + <linearGradient + id="defitem18" + gradientUnits="userSpaceOnUse" + x1="40.9397" + y1="6.4937" + x2="40.8771" + y2="-1.15177"> + <stop + stop-color="#ffffff" + offset="0" + stop-opacity="1" + id="stop58" /> + <stop + stop-color="#ffffff" + offset="1" + stop-opacity="0.117021" + id="stop59" /> + </linearGradient> + <linearGradient + id="defitem19" + gradientUnits="userSpaceOnUse" + x1="40.657" + y1="30.2051" + x2="40.7319" + y2="28.1208"> + <stop + stop-color="#ffffff" + offset="0" + stop-opacity="1" + id="stop61" /> + <stop + stop-color="#ffffff" + offset="1" + stop-opacity="0.117021" + id="stop62" /> + </linearGradient> + <linearGradient + id="defitem20" + gradientUnits="userSpaceOnUse" + x1="40.8941" + y1="25.4297" + x2="40.8794" + y2="26.8204"> + <stop + stop-color="#ffffff" + offset="0" + stop-opacity="1" + id="stop64" /> + <stop + stop-color="#ffffff" + offset="1" + stop-opacity="0.117021" + id="stop65" /> + </linearGradient> + <radialGradient + id="defitem21" + gradientUnits="userSpaceOnUse" + cx="48.8515" + cy="-3.19751" + fx="48.8515" + fy="-3.19751" + r="1.2989"> + <stop + stop-color="#ffffff" + offset="0" + stop-opacity="1" + id="stop67" /> + <stop + stop-color="#ffffff" + offset="1" + stop-opacity="0.117021" + id="stop68" /> + </radialGradient> + <linearGradient + id="defitem22" + gradientUnits="userSpaceOnUse" + x1="56.5467" + y1="43.2785" + x2="56.5467" + y2="34.3363"> + <stop + stop-color="#ffffff" + offset="0" + stop-opacity="1" + id="stop70" /> + <stop + stop-color="#ffffff" + offset="1" + stop-opacity="0.117021" + id="stop71" /> + </linearGradient> + <linearGradient + id="defitem23" + gradientUnits="userSpaceOnUse" + x1="49.4575" + y1="36.4366" + x2="49.4575" + y2="31.9398"> + <stop + stop-color="#ffffff" + offset="0" + stop-opacity="1" + id="stop73" /> + <stop + stop-color="#ffffff" + offset="1" + stop-opacity="0.117021" + id="stop74" /> + </linearGradient> + <linearGradient + id="defitem24" + gradientUnits="userSpaceOnUse" + x1="31.1293" + y1="36.6559" + x2="31.1293" + y2="30.6237"> + <stop + stop-color="#ffffff" + offset="0" + stop-opacity="1" + id="stop76" /> + <stop + stop-color="#ffffff" + offset="1" + stop-opacity="0.117021" + id="stop77" /> + </linearGradient> + <linearGradient + id="defitem25" + gradientUnits="userSpaceOnUse" + x1="23.6276" + y1="43.4914" + x2="23.6276" + y2="30.9297"> + <stop + stop-color="#ffffff" + offset="0" + stop-opacity="1" + id="stop79" /> + <stop + stop-color="#ffffff" + offset="1" + stop-opacity="0.117021" + id="stop80" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem12" + id="linearGradient1241" + gradientUnits="userSpaceOnUse" + x1="40.4771" + y1="26.4264" + x2="40.4771" + y2="12.8913" /> + <radialGradient + inkscape:collect="always" + xlink:href="#defitem13" + id="radialGradient1242" + gradientUnits="userSpaceOnUse" + cx="40.5327" + cy="-6.37103" + fx="40.5327" + fy="-6.37103" + r="9.8821" /> + <radialGradient + inkscape:collect="always" + xlink:href="#defitem14" + id="radialGradient1243" + gradientUnits="userSpaceOnUse" + cx="58.403" + cy="16.0261" + fx="9.67146" + fy="50.7123" + r="18.0973" /> + <radialGradient + inkscape:collect="always" + xlink:href="#defitem17" + id="radialGradient1246" + gradientUnits="userSpaceOnUse" + cx="49.8929" + cy="23.6043" + fx="9.67146" + fy="50.7123" + r="7.7871" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem18" + id="linearGradient1247" + gradientUnits="userSpaceOnUse" + x1="40.9397" + y1="6.4937" + x2="40.8771" + y2="-1.15177" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem19" + id="linearGradient1248" + gradientUnits="userSpaceOnUse" + x1="40.657" + y1="30.2051" + x2="40.7319" + y2="28.1208" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem20" + id="linearGradient1249" + gradientUnits="userSpaceOnUse" + x1="40.8941" + y1="25.4297" + x2="40.8794" + y2="26.8204" /> + <radialGradient + inkscape:collect="always" + xlink:href="#defitem21" + id="radialGradient1250" + gradientUnits="userSpaceOnUse" + cx="48.8515" + cy="-3.19751" + fx="48.8515" + fy="-3.19751" + r="1.2989" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem22" + id="linearGradient1251" + gradientUnits="userSpaceOnUse" + x1="56.5467" + y1="43.2785" + x2="56.5467" + y2="34.3363" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem23" + id="linearGradient1252" + gradientUnits="userSpaceOnUse" + x1="49.4575" + y1="36.4366" + x2="49.4575" + y2="31.9398" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem0" + id="linearGradient1255" + gradientUnits="userSpaceOnUse" + x1="13.0416" + y1="33.4683" + x2="35.7962" + y2="12.9124" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem1" + id="linearGradient1256" + gradientUnits="userSpaceOnUse" + x1="22.5629" + y1="27.4437" + x2="40.2475" + y2="9.38352" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem2" + id="linearGradient1257" + gradientUnits="userSpaceOnUse" + x1="43.9104" + y1="16.4535" + x2="19.2773" + y2="14.5777" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem3" + id="linearGradient1258" + gradientUnits="userSpaceOnUse" + x1="20.9082" + y1="22.3925" + x2="26.2153" + y2="15.4384" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem4" + id="linearGradient1259" + gradientUnits="userSpaceOnUse" + x1="43.8883" + y1="13.6313" + x2="34.6669" + y2="12.9291" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem5" + id="linearGradient1260" + gradientUnits="userSpaceOnUse" + x1="35.2774" + y1="15.8545" + x2="37.2641" + y2="13.2513" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem6" + id="linearGradient1261" + gradientUnits="userSpaceOnUse" + x1="10.4881" + y1="51.4421" + x2="20.8871" + y2="39.295" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem7" + id="linearGradient1262" + gradientUnits="userSpaceOnUse" + x1="20.5406" + y1="46.7018" + x2="24.9239" + y2="21.656" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem8" + id="linearGradient1263" + gradientUnits="userSpaceOnUse" + x1="20.9103" + y1="40.4761" + x2="23.1153" + y2="38.8552" /> + <radialGradient + inkscape:collect="always" + xlink:href="#defitem9" + id="radialGradient1264" + gradientUnits="userSpaceOnUse" + cx="31.8624" + cy="30.2229" + fx="31.8624" + fy="30.2229" + r="19.7672" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem10" + id="linearGradient1265" + gradientUnits="userSpaceOnUse" + x1="19.6704" + y1="52.2427" + x2="22.0662" + y2="37.9851" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem11" + id="linearGradient1266" + gradientUnits="userSpaceOnUse" + x1="16.3795" + y1="46.0794" + x2="21.7056" + y2="37.3341" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem0" + id="linearGradient1438" + gradientUnits="userSpaceOnUse" + x1="13.0416" + y1="33.4683" + x2="35.7962" + y2="12.9124" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem1" + id="linearGradient1439" + gradientUnits="userSpaceOnUse" + x1="22.5629" + y1="27.4437" + x2="40.2475" + y2="9.38352" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem2" + id="linearGradient1440" + gradientUnits="userSpaceOnUse" + x1="43.9104" + y1="16.4535" + x2="19.2773" + y2="14.5777" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem3" + id="linearGradient1441" + gradientUnits="userSpaceOnUse" + x1="20.9082" + y1="22.3925" + x2="26.2153" + y2="15.4384" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem4" + id="linearGradient1442" + gradientUnits="userSpaceOnUse" + x1="43.8883" + y1="13.6313" + x2="34.6669" + y2="12.9291" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem5" + id="linearGradient1443" + gradientUnits="userSpaceOnUse" + x1="35.2774" + y1="15.8545" + x2="37.2641" + y2="13.2513" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem6" + id="linearGradient1444" + gradientUnits="userSpaceOnUse" + x1="10.4881" + y1="51.4421" + x2="20.8871" + y2="39.295" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem7" + id="linearGradient1445" + gradientUnits="userSpaceOnUse" + x1="20.5406" + y1="46.7018" + x2="24.9239" + y2="21.656" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem8" + id="linearGradient1446" + gradientUnits="userSpaceOnUse" + x1="20.9103" + y1="40.4761" + x2="23.1153" + y2="38.8552" /> + <radialGradient + inkscape:collect="always" + xlink:href="#defitem9" + id="radialGradient1447" + gradientUnits="userSpaceOnUse" + cx="31.8624" + cy="30.2229" + fx="31.8624" + fy="30.2229" + r="19.7672" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem10" + id="linearGradient1448" + gradientUnits="userSpaceOnUse" + x1="19.6704" + y1="52.2427" + x2="22.0662" + y2="37.9851" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem11" + id="linearGradient1449" + gradientUnits="userSpaceOnUse" + x1="16.3795" + y1="46.0794" + x2="21.7056" + y2="37.3341" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem12" + id="linearGradient1450" + gradientUnits="userSpaceOnUse" + x1="40.4771" + y1="26.4264" + x2="40.4771" + y2="12.8913" /> + <radialGradient + inkscape:collect="always" + xlink:href="#defitem13" + id="radialGradient1451" + gradientUnits="userSpaceOnUse" + cx="40.5327" + cy="-6.37103" + fx="40.5327" + fy="-6.37103" + r="9.8821" /> + <radialGradient + inkscape:collect="always" + xlink:href="#defitem14" + id="radialGradient1452" + gradientUnits="userSpaceOnUse" + cx="58.403" + cy="16.0261" + fx="9.67146" + fy="50.7123" + r="18.0973" /> + <radialGradient + inkscape:collect="always" + xlink:href="#defitem17" + id="radialGradient1453" + gradientUnits="userSpaceOnUse" + cx="49.8929" + cy="23.6043" + fx="9.67146" + fy="50.7123" + r="7.7871" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem18" + id="linearGradient1454" + gradientUnits="userSpaceOnUse" + x1="40.9397" + y1="6.4937" + x2="40.8771" + y2="-1.15177" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem19" + id="linearGradient1455" + gradientUnits="userSpaceOnUse" + x1="40.657" + y1="30.2051" + x2="40.7319" + y2="28.1208" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem20" + id="linearGradient1456" + gradientUnits="userSpaceOnUse" + x1="40.8941" + y1="25.4297" + x2="40.8794" + y2="26.8204" /> + <radialGradient + inkscape:collect="always" + xlink:href="#defitem21" + id="radialGradient1457" + gradientUnits="userSpaceOnUse" + cx="48.8515" + cy="-3.19751" + fx="48.8515" + fy="-3.19751" + r="1.2989" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem22" + id="linearGradient1458" + gradientUnits="userSpaceOnUse" + x1="56.5467" + y1="43.2785" + x2="56.5467" + y2="34.3363" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem23" + id="linearGradient1459" + gradientUnits="userSpaceOnUse" + x1="49.4575" + y1="36.4366" + x2="49.4575" + y2="31.9398" /> + </defs> + <g + id="g1390" + transform="translate(0.000000,-13.99650)"> + <g + id="g82" + transform="matrix(0.623443,0.000000,0.000000,-0.623443,22.45389,52.73176)"> + <path + id="path87" + d="" + style="fill:#000000" /> + <g + id="g84"> + <g + id="g85" /> + <g + id="g88"> + <g + id="g89"> + <path + id="path1660" + d="M 35.889700,35.427300 C 35.342900,35.391900 34.794500,35.288600 34.279700,35.102500 L 6.6818400,25.009500 C 5.8918000,24.723900 5.4991800,24.170400 5.2361300,23.602300 C 4.9730800,23.034200 4.8242500,22.394200 4.7761300,21.762200 C 4.7280100,21.130100 4.7778000,20.490500 4.9075600,19.922000 C 5.0373100,19.353600 5.2026600,18.850900 5.7618400,18.406600 L 21.358700,5.1619700 C 22.961500,3.8885800 25.503800,3.5343200 27.535800,4.2689500 L 55.133700,14.362000 C 55.868100,14.627500 56.252500,15.151100 56.480900,15.660900 C 56.709200,16.170800 56.785000,16.709600 56.809400,17.257500 C 56.833900,17.805400 56.804800,18.364700 56.678000,18.854100 C 56.556400,19.323500 56.382600,19.734400 55.922300,20.126000 L 55.955200,20.153000 L 40.489700,34.182500 L 40.456900,34.182500 L 40.424000,34.209500 C 39.619200,34.848900 38.596700,35.216500 37.532600,35.373100 C 36.998500,35.451800 36.436600,35.462600 35.889700,35.427300 z M 37.138300,33.641200 C 37.859500,33.535100 38.493700,33.305600 38.912600,32.991800 L 54.378000,18.962400 L 54.410900,18.962400 L 54.443700,18.935300 C 54.344600,19.014100 54.525200,18.795000 54.608000,18.475300 C 54.690800,18.155500 54.724900,17.748600 54.706600,17.338700 C 54.688300,16.928800 54.627000,16.518900 54.509400,16.256300 C 54.391800,15.993700 54.245100,15.919100 54.279400,15.931500 L 26.681500,5.8384900 C 25.603100,5.4486100 23.646500,5.7377600 22.804400,6.4067700 L 7.2075500,19.651400 C 7.2693100,19.602400 7.0670200,19.854800 6.9775500,20.246800 C 6.8880800,20.638700 6.8410800,21.156100 6.8789800,21.653900 C 6.9168800,22.151700 7.0523000,22.644600 7.2075500,22.979900 C 7.3628000,23.315200 7.5485300,23.444400 7.5361200,23.440000 L 35.134000,33.533000 C 35.659700,33.723100 36.394000,33.750800 37.138300,33.641200 z " + style="fill:#7e7e7e;stroke-width:2.2734101;stroke-linecap:round" /> + <path + id="path1661" + d="M 37.028700,34.507200 C 36.122400,34.640600 35.177700,34.598900 34.400100,34.317800 L 7.1089800,24.224700 C 5.5537300,23.662500 5.4898600,19.819400 6.4846900,19.029000 L 22.238100,5.9159700 C 23.460600,4.9447800 25.710000,4.6230700 27.265300,5.1853300 L 54.556400,15.278400 C 55.956500,15.784600 55.838500,19.036200 55.016400,19.689300 L 39.394400,33.587100 C 38.783100,34.072700 37.934900,34.373800 37.028700,34.507200 z " + style="fill:url(#linearGradient1438);stroke-width:1.4172200;stroke-linecap:round" /> + <path + id="path1662" + d="M 7.0978700,24.212800 L 34.232200,34.376500 C 35.787500,34.938800 38.253800,34.672700 39.476200,33.701500 L 54.395700,20.422300 C 55.618100,19.451100 55.350200,18.216600 53.794900,17.654300 L 26.660600,7.4906200 C 25.105300,6.9283600 22.869100,7.2575700 21.646700,8.2287700 L 6.4971100,21.444800 C 5.2746800,22.416000 5.5426200,23.650500 7.0978700,24.212800 z " + style="fill:url(#linearGradient1439);stroke-width:1.4172200;stroke-linecap:round" /> + <g + id="g93"> + <path + id="path1664" + d="M 13.464600,20.842300 L 38.049400,30.017400 C 39.328100,30.479700 41.166700,30.209000 42.171800,29.410500 L 48.750800,23.746900 C 49.755900,22.948400 49.535600,21.933400 48.256900,21.471100 L 23.672100,12.296000 C 22.393400,11.833700 20.554800,12.104400 19.549700,12.902900 L 12.970700,18.566500 C 11.965600,19.365000 12.185900,20.380000 13.464600,20.842300 z " + style="fill:url(#linearGradient1440);stroke-width:1.4172200;stroke-linecap:round" /> + <path + id="path1665" + d="M 14.070400,20.920400 L 37.950400,29.668500 C 39.150000,30.102200 40.874900,29.848300 41.817900,29.099100 L 47.804500,23.826400 C 48.747400,23.077300 48.540700,22.125000 47.341100,21.691300 L 23.461100,12.943100 C 22.261500,12.509400 20.536600,12.763400 19.593600,13.512500 L 13.607000,18.785300 C 12.664100,19.534400 12.870800,20.486700 14.070400,20.920400 z " + style="fill:url(#linearGradient1441);stroke-width:1.4172200;stroke-linecap:round" /> + </g> + <g + id="g96"> + <path + id="path3151" + d="M 32.490900,15.274200 L 39.306300,17.754800 C 39.785000,17.927800 40.473300,17.826500 40.849500,17.527600 L 43.312400,15.407400 C 43.688600,15.108500 43.606200,14.728500 43.127500,14.555400 L 36.312100,12.074900 C 35.833400,11.901800 35.145100,12.003200 34.768900,12.302100 L 32.306000,14.422300 C 31.929800,14.721200 32.012300,15.101200 32.490900,15.274200 z " + style="fill:url(#linearGradient1442);stroke-width:0.53053498;stroke-linecap:round" /> + <path + id="path3152" + d="M 32.717700,15.303400 L 39.230100,17.690000 C 39.679200,17.852300 40.324900,17.757200 40.677900,17.476800 L 42.919000,15.503000 C 43.272000,15.222500 43.194600,14.866000 42.745500,14.703700 L 36.233100,12.317200 C 35.784000,12.154800 35.138300,12.249900 34.785300,12.530300 L 32.544300,14.504100 C 32.191300,14.784600 32.268600,15.141100 32.717700,15.303400 z " + style="fill:url(#linearGradient1443);stroke-width:0.53053498;stroke-linecap:round" /> + </g> + </g> + <g + id="g99"> + <path + id="path1670" + d="M 30.744300,59.532300 C 30.432000,59.561000 30.065700,59.511600 29.733000,59.388200 L 2.6736100,49.864700 C 1.3429500,49.370900 0.47013600,47.759100 0.72888100,46.280700 L 4.6183300,24.096900 C 4.8770800,22.618500 8.1261900,20.721200 10.180300,21.130800 L 37.912100,31.409100 C 39.242700,31.902900 40.115500,33.535300 39.856800,35.013700 L 35.967300,57.197500 C 35.708600,58.675900 31.475300,59.465200 30.744300,59.532300 z " + style="fill:url(#linearGradient1444);stroke-width:1.3453600;stroke-linecap:round" /> + <path + id="path1671" + d="M 5.8649200,47.969300 C 4.8047100,47.575900 4.1239100,46.306800 4.3327900,45.113300 L 8.1133500,23.511600 C 8.3222400,22.318100 9.3371300,21.678200 10.397300,22.071700 L 37.542200,32.144700 C 38.602400,32.538100 39.283200,33.807200 39.074300,35.000800 L 35.293700,56.602400 C 35.084800,57.796000 34.069900,58.435800 33.009700,58.042400 L 5.8649200,47.969300 z M 7.4174400,45.999000 L 32.294200,55.230400 C 32.787200,55.413300 33.252900,55.119800 33.350000,54.564700 L 36.690800,35.475900 C 36.787900,34.920800 36.475600,34.338600 35.982600,34.155600 L 11.105800,24.924200 C 10.612800,24.741200 10.147100,25.034800 10.050000,25.589800 L 6.7091900,44.678700 C 6.6120500,45.233700 6.9244100,45.816000 7.4174400,45.999000 z " + style="fill:url(#linearGradient1445);stroke-width:1.3751301;stroke-linecap:round" /> + <path + id="path59" + d="M 10.223700,24.596900 L 6.5353900,45.671700 L 33.176200,55.557700 L 36.864500,34.482900 L 10.223700,24.596900 z " + style="fill:url(#linearGradient1446);stroke-width:1.3013901;stroke-linecap:round" /> + <path + id="path60" + d="M 10.801900,25.674700 L 7.3972700,45.128300 L 32.598000,54.479900 L 36.002700,35.026300 L 10.801900,25.674700 z " + style="fill:url(#radialGradient1447);stroke-width:1.3013901;stroke-linecap:round" /> + <path + id="path1674" + d="M 5.9500300,47.483000 C 5.1201500,47.175000 4.6013000,46.207800 4.7648000,45.273600 L 6.7685700,33.824300 C 7.2127900,33.798400 7.6853400,33.800900 8.1532700,33.798600 L 6.2771800,44.518400 C 6.1352700,45.329200 6.6120600,46.218000 7.3323200,46.485300 L 32.209100,55.716700 C 32.929300,55.984000 33.640100,55.535900 33.782000,54.725000 L 35.782200,43.296000 C 36.209100,43.599200 36.597100,43.914000 37.000300,44.222800 L 34.861700,56.442100 C 34.698200,57.376400 33.924700,57.864000 33.094900,57.556000 L 5.9500300,47.483000 z " + style="fill:url(#linearGradient1448);stroke-width:1.3751301;stroke-linecap:round" /> + <path + id="path1675" + d="M 9.0398900,44.874600 C 8.6107900,44.715400 8.3262800,44.201500 8.4081800,43.733500 L 10.491000,31.832300 C 12.953300,36.964200 21.062000,43.028400 31.308400,46.830700 C 31.906000,47.052400 32.479700,47.206700 33.069400,47.405300 L 32.168900,52.550800 C 32.087000,53.018700 31.668300,53.271700 31.239200,53.112500 L 9.0398900,44.874600 z " + style="fill:url(#linearGradient1449);fill-opacity:0.78313297;stroke-width:1.3751301;stroke-linecap:round" /> + </g> + </g> + </g> + </g> + <g + id="g1367"> + <path + id="rect1702" + d="M 38.408800,27.199800 L 43.049500,27.199800 L 43.049500,6.7812000 L 38.408800,6.7812000 L 38.408800,27.199800 z " + style="fill:#000000;stroke-width:2.0899899;stroke-linecap:round" + transform="matrix(0.623443,0.000000,0.000000,-0.623443,-17.70872,50.45930)" /> + <path + id="path1727" + d="M 39.715100,27.199800 L 41.021300,27.199800 L 41.021300,7.6062000 L 39.715100,7.6062000 L 39.715100,27.199800 z " + style="fill:url(#linearGradient1450);stroke-width:2.0899899;stroke-linecap:round" + transform="matrix(0.623443,0.000000,0.000000,-0.623443,-17.70872,50.45930)" /> + <path + id="path1693" + d="M 40.895600,8.0447000 C 35.100000,8.0447000 30.403800,2.9155000 30.403800,-3.4043300 C 30.403800,-5.9790800 35.100000,-8.0687400 40.895600,-8.0687400 C 46.691200,-8.0687400 51.402500,-5.9790800 51.402500,-3.4043300 C 51.402500,2.9155000 46.691200,8.0447000 40.895600,8.0447000 z " + style="fill:#000000;stroke-width:2.0899899;stroke-linecap:round" + transform="matrix(0.623443,0.000000,0.000000,-0.623443,-17.70872,50.45930)" /> + <path + id="path1071" + d="M 49.928800,-3.1594100 C 49.928800,-5.3738900 45.887900,-7.1690900 40.903200,-7.1690900 C 35.918500,-7.1690900 31.877600,-5.3738900 31.877600,-3.1594100 C 31.877600,-0.94492000 35.918500,0.85030000 40.903200,0.85030000 C 45.887900,0.85030000 49.928800,-0.94492000 49.928800,-3.1594100 z " + style="fill:#8c8c8c;stroke-width:0.88503402;stroke-linecap:round" + transform="matrix(0.623443,0.000000,0.000000,-0.623443,-17.70872,50.45930)" /> + <path + id="path1731" + d="M 40.896500,7.0951000 C 35.783900,7.0951000 31.641300,2.5705000 31.641300,-3.0045000 C 31.641300,-5.2757900 35.783900,-7.1191500 40.896500,-7.1191500 C 46.009000,-7.1191500 50.165100,-5.2757900 50.165100,-3.0045000 C 50.165100,2.5705000 46.009000,7.0951000 40.896500,7.0951000 z " + style="fill:url(#radialGradient1451);fill-opacity:0.84739000;stroke-width:2.0899899;stroke-linecap:round" + transform="matrix(0.623443,0.000000,0.000000,-0.623443,-17.70872,50.45930)" /> + <path + id="path1715" + d="M 49.221500,48.685900 C 53.852100,44.514900 56.971300,37.101900 56.971300,28.592000 C 56.971300,20.082100 53.852100,12.669100 49.221500,8.4982000 C 57.048800,11.810700 62.540000,19.562300 62.540000,28.592000 C 62.540000,37.621700 57.048800,45.373300 49.221500,48.685900 z " + style="fill:#007e00;stroke-width:2.0899899;stroke-linecap:round" + transform="matrix(0.623443,0.000000,0.000000,-0.623443,-17.70872,50.45930)" /> + <path + id="path1717" + d="M 45.246300,39.280200 C 47.709500,37.061700 49.368600,33.118600 49.368600,28.592000 C 49.368600,24.065500 47.709500,20.122400 45.246300,17.903800 C 49.409800,19.665800 52.330700,23.789000 52.330700,28.592000 C 52.330700,33.395100 49.409800,37.518300 45.246300,39.280200 z " + style="fill:#007e00;stroke-width:2.0899899;stroke-linecap:round" + transform="matrix(0.623443,0.000000,0.000000,-0.623443,-17.70872,50.45930)" /> + <path + id="path1721" + d="M 53.659300,44.768800 C 56.350500,40.415300 58.002500,34.830300 58.002500,28.604100 C 58.002500,22.377900 56.350500,16.760100 53.659300,12.406600 C 58.422800,16.210000 61.496700,22.028900 61.496700,28.604100 C 61.496700,35.179200 58.422800,40.965500 53.659300,44.768800 z " + style="fill:url(#radialGradient1452);stroke-width:2.0899899;stroke-linecap:round" + transform="matrix(0.623443,0.000000,0.000000,-0.623443,-17.70872,50.45930)" /> + <path + id="path1726" + d="M 47.715800,37.094600 C 49.061500,34.852000 49.887500,31.974900 49.887500,28.767600 C 49.887500,25.560200 49.061500,22.666400 47.715800,20.423700 C 50.097600,22.382900 51.634600,25.380500 51.634600,28.767600 C 51.634600,32.154700 50.097600,35.135400 47.715800,37.094600 z " + style="fill:url(#radialGradient1453);stroke-width:2.0899899;stroke-linecap:round" + transform="matrix(0.623443,0.000000,0.000000,-0.623443,-17.70872,50.45930)" /> + <path + id="path1701" + d="M 43.977600,27.663900 C 43.977600,25.870800 42.540300,24.415500 40.769400,24.415500 C 38.998500,24.415500 37.561300,25.870800 37.561300,27.663900 C 37.561300,29.457000 38.998500,30.912300 40.769400,30.912300 C 42.540300,30.912300 43.977600,29.457000 43.977600,27.663900 z " + style="fill:#000000;stroke-width:1.6529100;stroke-linecap:round" + transform="matrix(0.623443,0.000000,0.000000,-0.623443,-17.70872,50.45930)" /> + <path + id="path1730" + d="M 47.389300,1.9190000 C 47.389300,-0.71143000 44.501700,-2.8438000 40.939700,-2.8438000 C 37.377700,-2.8438000 34.490100,-0.71143000 34.490100,1.9190000 C 34.490100,4.5494000 37.377700,6.6817000 40.939700,6.6817000 C 44.501700,6.6817000 47.389300,4.5494000 47.389300,1.9190000 z " + style="fill:url(#linearGradient1454);stroke-width:3.3847101;stroke-linecap:round" + transform="matrix(0.623443,0.000000,0.000000,-0.623443,-17.70872,50.45930)" /> + <path + id="path1733" + d="M 43.130000,28.871900 C 43.130000,28.084100 42.072500,27.444800 40.769400,27.444800 C 39.466400,27.444800 38.408800,28.084100 38.408800,28.871900 C 38.408800,29.659700 39.466400,30.299000 40.769400,30.299000 C 42.072500,30.299000 43.130000,29.659700 43.130000,28.871900 z " + style="fill:url(#linearGradient1455);stroke-width:2.0899899;stroke-linecap:round" + transform="matrix(0.623443,0.000000,0.000000,-0.623443,-17.70872,50.45930)" /> + <path + id="path1735" + d="M 38.604800,27.069200 C 38.567500,26.968500 38.408800,26.915500 38.408800,26.808000 C 38.408800,26.020200 39.457100,25.371100 40.760100,25.371100 C 42.063100,25.371100 43.144000,26.020200 43.144000,26.808000 C 43.144000,26.913800 42.984300,26.969900 42.948000,27.069200 C 42.718700,26.426300 41.891800,25.893600 40.760100,25.893600 C 39.630900,25.893600 38.836700,26.428400 38.604800,27.069200 z " + style="fill:url(#linearGradient1456);stroke-width:2.0899899;stroke-linecap:round" + transform="matrix(0.623443,0.000000,0.000000,-0.623443,-17.70872,50.45930)" /> + <path + id="path2396" + d="M 50.150300,-3.1975200 C 50.150300,-3.8826400 49.568400,-4.4386800 48.851500,-4.4386800 C 48.134500,-4.4386800 47.552600,-3.8826400 47.552600,-3.1975200 C 47.552600,-2.5124000 48.134500,-1.9563600 48.851500,-1.9563600 C 49.568400,-1.9563600 50.150300,-2.5124000 50.150300,-3.1975200 z " + style="fill:url(#radialGradient1457);stroke-width:2.0899899;stroke-linecap:round" + transform="matrix(0.623443,0.000000,0.000000,-0.623443,-17.70872,50.45930)" /> + <path + id="path2442" + d="M 53.659300,44.768800 C 56.350500,40.415300 58.002500,34.830300 58.002500,28.604100 C 58.002500,22.377900 56.350500,16.760100 53.659300,12.406600 C 58.422800,16.210000 61.496700,22.028900 61.496700,28.604100 C 61.496700,35.179200 58.422800,40.965500 53.659300,44.768800 z " + style="fill:url(#linearGradient1458);stroke-width:2.0899899;stroke-linecap:round" + transform="matrix(0.623443,0.000000,0.000000,-0.623443,-17.70872,50.45930)" /> + <path + id="path2444" + d="M 47.715800,37.094600 C 49.061500,34.852000 49.887500,31.974900 49.887500,28.767600 C 49.887500,25.560200 49.061500,22.666400 47.715800,20.423700 C 50.097600,22.382900 51.634600,25.380500 51.634600,28.767600 C 51.634600,32.154700 50.097600,35.135400 47.715800,37.094600 z " + style="fill:url(#linearGradient1459);stroke-width:2.0899899;stroke-linecap:round" + transform="matrix(0.623443,0.000000,0.000000,-0.623443,-17.70872,50.45930)" /> + </g> + </g> +</svg> diff --git a/wifi/pixmaps/excellent.png b/wifi/pixmaps/excellent.png Binary files differnew file mode 100644 index 00000000..cc830954 --- /dev/null +++ b/wifi/pixmaps/excellent.png diff --git a/wifi/pixmaps/good.png b/wifi/pixmaps/good.png Binary files differnew file mode 100644 index 00000000..9aac8acf --- /dev/null +++ b/wifi/pixmaps/good.png diff --git a/wifi/pixmaps/marginal.png b/wifi/pixmaps/marginal.png Binary files differnew file mode 100644 index 00000000..ac852fcd --- /dev/null +++ b/wifi/pixmaps/marginal.png diff --git a/wifi/pixmaps/no_card.png b/wifi/pixmaps/no_card.png Binary files differnew file mode 100644 index 00000000..bcc2331f --- /dev/null +++ b/wifi/pixmaps/no_card.png diff --git a/wifi/pixmaps/no_card.svg b/wifi/pixmaps/no_card.svg new file mode 100644 index 00000000..7f4a0429 --- /dev/null +++ b/wifi/pixmaps/no_card.svg @@ -0,0 +1,885 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" +"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> +<!-- Created with Inkscape (http://www.inkscape.org/) --> +<svg + width="48pt" + height="35.000000pt" + id="svg1101" + sodipodi:version="0.32" + inkscape:version="0.40" + sodipodi:docbase="/mnt/win_d/Graphics/kde/icons/kwifimanager/pics" + sodipodi:docname="no_card.svgz" + inkscape:export-filename="/mnt/win_d/Graphics/kde/icons/kwifimanager/pics/no_card.png" + inkscape:export-xdpi="99.000000" + inkscape:export-ydpi="99.000000" + xmlns="http://www.w3.org/2000/svg" + xmlns:cc="http://web.resource.org/cc/" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:xlink="http://www.w3.org/1999/xlink"> + <defs + id="defs3"> + <linearGradient + y2="25.928497" + x2="24.164434" + y1="5.2444587" + x1="10.139539" + gradientTransform="scale(0.975894,1.024702)" + gradientUnits="userSpaceOnUse" + id="linearGradient2319" + xlink:href="#XMLID_7_" + inkscape:collect="always" /> + <linearGradient + id="linearGradient1862"> + <stop + id="stop1864" + offset="0.0000000" + style="stop-color:#ff6161;stop-opacity:1.0000000;" /> + <stop + id="stop1863" + offset="1.0000000" + style="stop-color:#cf2533;stop-opacity:1.0000000;" /> + </linearGradient> + <radialGradient + r="14.654100" + fy="34.776825" + fx="25.254200" + cy="35.025124" + cx="25.747030" + gradientUnits="userSpaceOnUse" + id="radialGradient2317" + xlink:href="#linearGradient1862" + inkscape:collect="always" /> + <radialGradient + r="13.409894" + fy="29.598881" + fx="25.835396" + cy="29.439672" + cx="25.043650" + gradientTransform="scale(1.000075,0.999925)" + gradientUnits="userSpaceOnUse" + id="radialGradient2315" + xlink:href="#XMLID_7_" + inkscape:collect="always" /> + <linearGradient + gradientTransform="matrix(0.999900,-1.010000e-2,1.010000e-2,0.999900,-1.144400,0.354300)" + gradientUnits="userSpaceOnUse" + id="XMLID_7_" + y2="164.30850" + x2="33.114700" + y1="-141.01460" + x1="33.114700"> + <stop + id="stop96" + offset="0.0000000" + style="stop-color:#ffffff;stop-opacity:1.0000000;" /> + <stop + id="stop3170" + offset="0.50000000" + style="stop-color:#ffffff;stop-opacity:0.67032969;" /> + <stop + id="stop98" + offset="1.0000000" + style="stop-color:#ffffff;stop-opacity:0.0000000;" /> + </linearGradient> + <linearGradient + y2="15.847512" + x2="25.759991" + y1="3.3488133" + x1="25.496077" + gradientTransform="scale(1.000075,0.999925)" + gradientUnits="userSpaceOnUse" + id="linearGradient2313" + xlink:href="#XMLID_7_" + inkscape:collect="always" /> + <linearGradient + id="linearGradient1865"> + <stop + id="stop2120" + offset="0.0000000" + style="stop-color:#cf2533;stop-opacity:1.0000000;" /> + <stop + id="stop1866" + offset="1.0000000" + style="stop-color:#9f1a34;stop-opacity:1.0000000;" /> + </linearGradient> + <linearGradient + y2="11.857447" + x2="21.960972" + y1="34.629219" + x1="21.960972" + gradientUnits="userSpaceOnUse" + id="linearGradient2311" + xlink:href="#linearGradient1865" + inkscape:collect="always" /> + <linearGradient + id="linearGradient2928"> + <stop + style="stop-color:#418ade;stop-opacity:1.0000000;" + offset="0.0000000" + id="stop2929" /> + <stop + style="stop-color:#b1c4ea;stop-opacity:1.0000000;" + offset="1.0000000" + id="stop2930" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + id="linearGradient2913"> + <stop + style="stop-color:#000000;stop-opacity:1;" + offset="0" + id="stop2914" /> + <stop + style="stop-color:#000000;stop-opacity:0;" + offset="1" + id="stop2915" /> + </linearGradient> + <linearGradient + id="defitem11" + gradientUnits="userSpaceOnUse" + x1="16.3795" + y1="46.0794" + x2="21.7056" + y2="37.3341"> + <stop + stop-color="#ffffff" + offset="0" + stop-opacity="1" + id="stop37" /> + <stop + stop-color="#ffffff" + offset="1" + stop-opacity="0.117647" + id="stop38" /> + </linearGradient> + <linearGradient + id="defitem10" + gradientUnits="userSpaceOnUse" + x1="19.6704" + y1="52.2427" + x2="22.0662" + y2="37.9851"> + <stop + stop-color="#ffffff" + offset="0" + stop-opacity="1" + id="stop34" /> + <stop + stop-color="#ffffff" + offset="1" + stop-opacity="0.117647" + id="stop35" /> + </linearGradient> + <radialGradient + id="defitem9" + gradientUnits="userSpaceOnUse" + cx="24.5089" + cy="28.1715" + fx="44.128" + fy="61.0801" + r="18.9697"> + <stop + stop-color="#a3cdeb" + offset="0" + stop-opacity="1" + id="stop31" /> + <stop + stop-color="#4189dd" + offset="1" + stop-opacity="1" + id="stop32" /> + </radialGradient> + <linearGradient + id="defitem8" + gradientUnits="userSpaceOnUse" + x1="20.9103" + y1="40.4761" + x2="23.0818" + y2="39.6786"> + <stop + stop-color="#2a2a2a" + offset="0" + stop-opacity="1" + id="stop28" /> + <stop + stop-color="#ffffff" + offset="1" + stop-opacity="1" + id="stop29" /> + </linearGradient> + <linearGradient + id="defitem7" + gradientUnits="userSpaceOnUse" + x1="20.5406" + y1="46.7018" + x2="24.9239" + y2="21.656"> + <stop + stop-color="#a3a3a3" + offset="0" + stop-opacity="1" + id="stop25" /> + <stop + stop-color="#ffffff" + offset="1" + stop-opacity="1" + id="stop26" /> + </linearGradient> + <linearGradient + id="defitem6" + gradientUnits="userSpaceOnUse" + x1="10.4881" + y1="51.4421" + x2="20.8871" + y2="39.295"> + <stop + stop-color="#a3a3a3" + offset="0" + stop-opacity="1" + id="stop22" /> + <stop + stop-color="#646464" + offset="1" + stop-opacity="1" + id="stop23" /> + </linearGradient> + <linearGradient + id="defitem5" + gradientUnits="userSpaceOnUse" + x1="35.2774" + y1="15.8545" + x2="37.2641" + y2="13.2513"> + <stop + stop-color="#809ab8" + offset="0" + stop-opacity="1" + id="stop19" /> + <stop + stop-color="#ffffff" + offset="1" + stop-opacity="1" + id="stop20" /> + </linearGradient> + <linearGradient + id="defitem4" + gradientUnits="userSpaceOnUse" + x1="43.8883" + y1="13.6313" + x2="34.6669" + y2="12.9291"> + <stop + stop-color="#606060" + offset="0" + stop-opacity="1" + id="stop16" /> + <stop + stop-color="#ffffff" + offset="1" + stop-opacity="1" + id="stop17" /> + </linearGradient> + <linearGradient + id="defitem3" + gradientUnits="userSpaceOnUse" + x1="148.753" + y1="385.25" + x2="352.345" + y2="221.794"> + <stop + stop-color="#00005d" + offset="0" + stop-opacity="1" + id="stop13" /> + <stop + stop-color="#ffffff" + offset="1" + stop-opacity="1" + id="stop14" /> + </linearGradient> + <linearGradient + id="defitem2" + gradientUnits="userSpaceOnUse" + x1="42.0318" + y1="458.943" + x2="303.137" + y2="252.238"> + <stop + stop-color="#00005d" + offset="0" + stop-opacity="1" + id="stop10" /> + <stop + stop-color="#ffffff" + offset="1" + stop-opacity="1" + id="stop11" /> + </linearGradient> + <linearGradient + id="defitem1" + gradientUnits="userSpaceOnUse" + x1="25.1257" + y1="265.422" + x2="803.563" + y2="-11.1106"> + <stop + stop-color="#00005d" + offset="0" + stop-opacity="1" + id="stop7" /> + <stop + stop-color="#ffffff" + offset="1" + stop-opacity="1" + id="stop8" /> + </linearGradient> + <linearGradient + id="defitem0" + gradientUnits="userSpaceOnUse" + x1="90.7316" + y1="380.011" + x2="874.145" + y2="20.7036"> + <stop + stop-color="#464d46" + offset="0" + stop-opacity="1" + id="stop4" /> + <stop + stop-color="#ffffff" + offset="1" + stop-opacity="1" + id="stop5" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem0" + id="linearGradient1152" + gradientUnits="userSpaceOnUse" + x1="669.96069" + y1="357.63095" + x2="504.21884" + y2="-29.963737" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem6" + id="linearGradient1153" + gradientUnits="userSpaceOnUse" + x1="436.45444" + y1="143.63887" + x2="264.29764" + y2="233.98660" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem0" + id="linearGradient1154" + gradientUnits="userSpaceOnUse" + x1="243.31390" + y1="458.89246" + x2="144.42444" + y2="234.72000" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem6" + id="linearGradient1155" + gradientUnits="userSpaceOnUse" + x1="293.13882" + y1="354.33441" + x2="277.06821" + y2="371.91318" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem8" + id="linearGradient2291" + gradientTransform="scale(1.238101,0.807689)" + x1="443.82205" + y1="199.66719" + x2="430.70648" + y2="332.03079" + gradientUnits="userSpaceOnUse" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient2913" + id="linearGradient2916" + gradientTransform="scale(0.843884,1.184997)" + x1="23.988409" + y1="20.002319" + x2="21.380413" + y2="25.374052" + gradientUnits="userSpaceOnUse" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient2913" + id="linearGradient2920" + gradientTransform="scale(0.843884,1.184997)" + x1="24.697392" + y1="19.856495" + x2="15.669713" + y2="29.511093" + gradientUnits="userSpaceOnUse" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem11" + id="linearGradient2925" + gradientUnits="userSpaceOnUse" + x1="20.268293" + y1="14.901933" + x2="17.700712" + y2="25.424341" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem11" + id="linearGradient2927" + gradientUnits="userSpaceOnUse" + x1="607.75952" + y1="377.21552" + x2="496.41223" + y2="159.41556" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient2928" + id="linearGradient2931" + gradientTransform="scale(1.237999,0.807755)" + x1="30.894909" + y1="34.588230" + x2="23.711727" + y2="45.811607" + gradientUnits="userSpaceOnUse" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem0" + id="linearGradient3185" + gradientUnits="userSpaceOnUse" + x1="669.96069" + y1="357.63095" + x2="504.21884" + y2="-29.963737" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem8" + id="linearGradient3186" + gradientUnits="userSpaceOnUse" + gradientTransform="scale(1.238101,0.807689)" + x1="443.82205" + y1="199.66719" + x2="430.70648" + y2="332.03079" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient2928" + id="linearGradient3187" + gradientUnits="userSpaceOnUse" + gradientTransform="scale(1.237999,0.807755)" + x1="30.894909" + y1="34.588230" + x2="23.711727" + y2="45.811607" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem6" + id="linearGradient3188" + gradientUnits="userSpaceOnUse" + x1="436.45444" + y1="143.63887" + x2="264.29764" + y2="233.98660" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem0" + id="linearGradient3189" + gradientUnits="userSpaceOnUse" + x1="243.31390" + y1="458.89246" + x2="144.42444" + y2="234.72000" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem6" + id="linearGradient3190" + gradientUnits="userSpaceOnUse" + x1="293.13882" + y1="354.33441" + x2="277.06821" + y2="371.91318" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem11" + id="linearGradient3191" + gradientUnits="userSpaceOnUse" + x1="20.268293" + y1="14.901933" + x2="17.700712" + y2="25.424341" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem11" + id="linearGradient3192" + gradientUnits="userSpaceOnUse" + x1="607.75952" + y1="377.21552" + x2="496.41223" + y2="159.41556" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient2913" + id="linearGradient3193" + gradientUnits="userSpaceOnUse" + gradientTransform="scale(0.843884,1.184997)" + x1="24.697392" + y1="19.856495" + x2="15.669713" + y2="29.511093" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient2913" + id="linearGradient3194" + gradientUnits="userSpaceOnUse" + gradientTransform="scale(0.843884,1.184997)" + x1="23.988409" + y1="20.002319" + x2="21.380413" + y2="25.374052" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem0" + id="linearGradient3236" + gradientUnits="userSpaceOnUse" + x1="669.96069" + y1="357.63095" + x2="504.21884" + y2="-29.963737" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem8" + id="linearGradient3237" + gradientUnits="userSpaceOnUse" + gradientTransform="scale(1.238101,0.807689)" + x1="443.82205" + y1="199.66719" + x2="430.70648" + y2="332.03079" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient2928" + id="linearGradient3238" + gradientUnits="userSpaceOnUse" + gradientTransform="scale(1.237999,0.807755)" + x1="30.894909" + y1="34.588230" + x2="23.711727" + y2="45.811607" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem6" + id="linearGradient3239" + gradientUnits="userSpaceOnUse" + x1="436.45444" + y1="143.63887" + x2="264.29764" + y2="233.98660" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem0" + id="linearGradient3240" + gradientUnits="userSpaceOnUse" + x1="243.31390" + y1="458.89246" + x2="144.42444" + y2="234.72000" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem6" + id="linearGradient3241" + gradientUnits="userSpaceOnUse" + x1="293.13882" + y1="354.33441" + x2="277.06821" + y2="371.91318" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem11" + id="linearGradient3242" + gradientUnits="userSpaceOnUse" + x1="20.268293" + y1="14.901933" + x2="17.700712" + y2="25.424341" /> + <linearGradient + inkscape:collect="always" + xlink:href="#defitem11" + id="linearGradient3243" + gradientUnits="userSpaceOnUse" + x1="607.75952" + y1="377.21552" + x2="496.41223" + y2="159.41556" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient2913" + id="linearGradient3244" + gradientUnits="userSpaceOnUse" + gradientTransform="scale(0.843884,1.184997)" + x1="24.697392" + y1="19.856495" + x2="15.669713" + y2="29.511093" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient2913" + id="linearGradient3245" + gradientUnits="userSpaceOnUse" + gradientTransform="scale(0.843884,1.184997)" + x1="23.988409" + y1="20.002319" + x2="21.380413" + y2="25.374052" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient1865" + id="linearGradient3246" + gradientUnits="userSpaceOnUse" + x1="21.960972" + y1="34.629219" + x2="21.960972" + y2="11.857447" /> + <linearGradient + inkscape:collect="always" + xlink:href="#XMLID_7_" + id="linearGradient3247" + gradientUnits="userSpaceOnUse" + gradientTransform="scale(1.000075,0.999925)" + x1="25.496077" + y1="3.3488133" + x2="25.759991" + y2="15.847512" /> + <radialGradient + inkscape:collect="always" + xlink:href="#XMLID_7_" + id="radialGradient3248" + gradientUnits="userSpaceOnUse" + gradientTransform="scale(1.000075,0.999925)" + cx="25.043650" + cy="29.439672" + fx="25.835396" + fy="29.598881" + r="13.409894" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient1862" + id="radialGradient3249" + gradientUnits="userSpaceOnUse" + cx="25.747030" + cy="35.025124" + fx="25.254200" + fy="34.776825" + r="14.654100" /> + <linearGradient + inkscape:collect="always" + xlink:href="#XMLID_7_" + id="linearGradient3250" + gradientUnits="userSpaceOnUse" + gradientTransform="scale(0.975894,1.024702)" + x1="10.139539" + y1="5.2444587" + x2="24.164434" + y2="25.928497" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient1865" + id="linearGradient3277" + gradientUnits="userSpaceOnUse" + x1="21.960972" + y1="34.629219" + x2="21.960972" + y2="11.857447" /> + <linearGradient + inkscape:collect="always" + xlink:href="#XMLID_7_" + id="linearGradient3278" + gradientUnits="userSpaceOnUse" + gradientTransform="scale(1.000075,0.999925)" + x1="25.496077" + y1="3.3488133" + x2="25.759991" + y2="15.847512" /> + <radialGradient + inkscape:collect="always" + xlink:href="#XMLID_7_" + id="radialGradient3279" + gradientUnits="userSpaceOnUse" + gradientTransform="scale(1.000075,0.999925)" + cx="25.043650" + cy="29.439672" + fx="25.835396" + fy="29.598881" + r="13.409894" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient1862" + id="radialGradient3280" + gradientUnits="userSpaceOnUse" + cx="25.747030" + cy="35.025124" + fx="25.254200" + fy="34.776825" + r="14.654100" /> + <linearGradient + inkscape:collect="always" + xlink:href="#XMLID_7_" + id="linearGradient3281" + gradientUnits="userSpaceOnUse" + gradientTransform="scale(0.975894,1.024702)" + x1="10.139539" + y1="5.2444587" + x2="24.164434" + y2="25.928497" /> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="8.0000000" + inkscape:cx="14.572426" + inkscape:cy="13.438808" + inkscape:current-layer="layer1" + showgrid="true" + inkscape:grid-bbox="true" + gridspacingy="1.0000000pt" + gridspacingx="1.0000000pt" + gridoriginy="0.0000000pt" + gridoriginx="0.0000000pt" + inkscape:window-width="1024" + inkscape:window-height="698" + inkscape:window-x="0" + inkscape:window-y="49" /> + <metadata + id="metadata4"> + <rdf:RDF + id="RDF5"> + <cc:Work + rdf:about="" + id="Work6"> + <dc:format + id="format7">image/svg+xml</dc:format> + <dc:type + id="type9" + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + id="layer1" + inkscape:label="Layer 1" + inkscape:groupmode="layer"> + <g + id="g2279"> + <g + id="g2932" + transform="translate(-3.092735e-7,-12.50000)"> + <path + style="fill:#666666;fill-opacity:1.0000000;fill-rule:evenodd;stroke-width:1.2500000" + d="M 11.625000,13.531250 C 11.461860,13.557604 11.315795,13.647491 11.218750,13.781250 L 2.3437500,26.406250 C 2.2321131,26.547183 2.1865683,26.729362 2.2187500,26.906250 C 2.2184896,26.916665 2.2184896,26.927085 2.2187500,26.937500 C 2.2145733,26.979062 2.2145733,27.020938 2.2187500,27.062500 L 2.2500000,29.781250 C 2.2540731,30.026003 2.4006403,30.245854 2.6250000,30.343750 C 2.6250000,30.343750 13.652146,35.339681 24.687500,40.312500 C 30.205177,42.798910 35.739669,45.263177 39.875000,47.125000 C 41.942665,48.055912 43.639161,48.833638 44.843750,49.375000 C 45.446044,49.645681 45.927843,49.855739 46.250000,50.000000 C 46.411079,50.072130 46.541352,50.150317 46.625000,50.187500 C 47.177819,50.330388 47.517940,50.014116 47.781250,49.687500 L 56.437500,37.406250 C 56.525343,37.289593 56.569568,37.145861 56.562500,37.000000 L 56.500000,35.906250 C 56.487690,35.792614 56.444455,35.684528 56.375000,35.593750 C 56.349101,35.548326 56.317605,35.506331 56.281250,35.468750 C 56.271205,35.457968 56.260782,35.447545 56.250000,35.437500 C 56.195589,35.384818 56.132057,35.342463 56.062500,35.312500 L 23.968750,21.156250 L 23.843750,19.968750 C 23.938430,19.675909 23.805853,19.357723 23.531250,19.218750 L 12.000000,13.593750 C 11.884521,13.534486 11.753457,13.512643 11.625000,13.531250 z " + id="path2180" + sodipodi:nodetypes="cccccccccccccccccccccccccc" /> + <path + id="path617" + d="M 181.94300,222.09000 L 299.82100,387.80300 L 725.20800,199.88100 L 609.89200,35.022200 L 181.94300,222.09000 z " + style="fill:url(#linearGradient3236);fill-opacity:1.0000000;fill-rule:evenodd;stroke-width:1.2500000" + transform="matrix(7.570141e-2,0.000000,0.000000,-7.570141e-2,0.912349,51.00637)" /> + <path + id="path616" + d="M 608.18400,32.459200 L 726.06200,199.02600 L 726.91600,184.50500 L 612.45500,22.209200 L 608.18400,32.459200 z " + style="fill:#7e7e7e;fill-rule:evenodd;stroke:none;stroke-width:1.2500000" + transform="matrix(7.570141e-2,0.000000,0.000000,-7.570141e-2,0.912349,51.00637)" /> + <path + id="path2287" + d="M 233.75000,224.08500 L 325.55800,353.34200 L 655.94800,208.38100 L 565.95200,77.916500 L 233.75000,224.08500 z " + style="fill:url(#linearGradient3237);fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.2500000" + transform="matrix(7.570141e-2,0.000000,0.000000,-7.570141e-2,0.912349,51.00637)" /> + <path + id="path615" + d="M 19.135063,33.909343 L 25.837798,24.472524 L 50.193347,35.212113 L 43.622903,44.737089 L 19.135063,33.909343 z " + style="fill:url(#linearGradient3238);fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.2500000" + sodipodi:nodetypes="ccccc" /> + <path + id="path673" + d="M 25.625700,316.47800 L 178.09900,245.15300 C 178.09900,245.15300 180.66100,219.52700 181.08900,219.52700 C 181.51600,219.52700 608.61100,33.313200 608.61100,33.313200 C 608.61100,33.313200 608.18400,18.365200 608.61100,17.938200 C 609.03800,17.511200 26.052800,280.17500 26.052800,280.17500 L 25.625700,316.47800 z " + style="fill:url(#linearGradient3239);fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.2500000" + transform="matrix(7.570141e-2,0.000000,0.000000,-7.570141e-2,0.912349,51.00637)" /> + <path + id="path666" + d="M 25.625700,319.89500 L 142.65000,486.88900 L 295.12300,412.57400 L 178.95300,245.15300 L 25.625700,319.89500 z " + style="fill:url(#linearGradient3240);fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.2500000" + transform="matrix(7.570141e-2,0.000000,0.000000,-7.570141e-2,0.912349,51.00637)" /> + <path + id="path671" + d="M 181.51600,220.80800 C 181.94300,221.23600 180.23400,245.58000 180.23400,245.58000 L 294.69600,410.01200 L 297.25800,386.09400 L 181.51600,220.80800 z " + style="fill:url(#linearGradient3241);fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.2500000" + transform="matrix(7.570141e-2,0.000000,0.000000,-7.570141e-2,0.912349,51.00637)" /> + <path + style="fill:#ffffff;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:6.2500000;stroke-opacity:1.0000000" + d="M 2.9135073,26.708568 L 2.7730583,26.897882 L 2.7707160,27.149345 L 14.250000,32.656250 L 14.375000,34.562500 L 14.500000,34.562500 L 46.812500,48.687500 L 46.812500,49.559927 L 46.991632,49.656602 L 47.281250,49.338956 L 47.281250,48.593750 L 47.281250,48.562500 L 55.910156,36.207031 L 55.884830,35.904371 L 55.652344,35.781250 L 46.937500,48.218750 L 14.812500,34.187500 L 14.718750,32.500000 L 14.593750,32.312500 L 2.9135073,26.708568 z " + id="path871" + sodipodi:nodetypes="cccccccccccccccccccc" /> + <path + style="fill:url(#linearGradient3242);fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.2500000" + d="M 11.718750,14.156250 L 2.8750000,26.750000 C 6.6958210,24.170916 12.161633,22.500000 18.343750,22.500000 C 19.335573,22.500000 20.294955,22.606645 21.250000,22.687500 L 23.250000,19.781250 L 11.718750,14.156250 z " + id="path2921" /> + <path + id="path2926" + d="M 234.05976,290.20300 L 299.82100,387.80300 L 725.20800,199.88100 L 696.58127,160.92805 C 552.72759,216.40388 359.33718,302.84016 234.05976,290.20300 z " + style="fill:url(#linearGradient3243);fill-opacity:1.0000000;fill-rule:evenodd;stroke-width:1.2500000" + transform="matrix(7.570141e-2,0.000000,0.000000,-7.570141e-2,0.912349,51.00637)" + sodipodi:nodetypes="ccccc" /> + <path + style="opacity:0.75100404;fill:url(#linearGradient3244);fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:6.2500000;stroke-opacity:1.0000000" + d="M 14.796461,34.626477 L 14.408491,34.354425 L 23.354534,21.505948 L 23.770124,21.708946 L 14.796461,34.626477 z " + id="path877" + sodipodi:nodetypes="ccccc" /> + <path + style="fill:url(#linearGradient3245);fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:6.2500000;stroke-opacity:1.0000000" + d="M 14.621401,32.648778 L 14.233431,32.376726 L 23.087682,19.698021 L 23.351355,20.050571 L 14.621401,32.648778 z " + id="path876" + sodipodi:nodetypes="ccccc" /> + </g> + <path + style="fill:#000000;fill-opacity:0.30196080;fill-rule:nonzero;stroke:none;stroke-width:1.1000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-opacity:0.15686275;" + d="M 24.312500 17.343750 C 23.987616 17.343750 23.649855 17.446542 23.406250 17.687500 L 17.718750 23.406250 C 17.713151 23.411276 17.693007 23.401124 17.687500 23.406250 C 17.659964 23.431878 17.650137 23.472004 17.625000 23.500000 C 17.624566 23.510824 17.624565 23.520426 17.625000 23.531250 C 17.350876 23.875722 17.338357 24.292493 17.468750 24.687500 L 43.562500 36.312500 C 43.502312 36.165290 43.491932 35.993216 43.375000 35.875000 L 38.218750 30.718750 C 38.200985 30.669342 38.187500 30.581876 38.187500 30.531250 C 38.187500 30.486074 38.203602 30.422181 38.218750 30.375000 L 43.375000 25.187500 C 43.856918 24.700290 43.856918 23.893458 43.375000 23.406250 L 37.656250 17.687500 C 37.169039 17.205582 36.362210 17.205582 35.875000 17.687500 L 30.718750 22.843750 C 30.709161 22.851759 30.715932 22.846566 30.687500 22.875000 C 30.640318 22.890148 30.576424 22.906250 30.531250 22.906250 C 30.486075 22.906250 30.422181 22.890148 30.375000 22.875000 C 30.346568 22.846566 30.384589 22.851760 30.375000 22.843750 L 25.187500 17.687500 C 24.943895 17.446541 24.637384 17.343750 24.312500 17.343750 z " + id="path2271" /> + <g + id="g2292" + transform="matrix(0.735081,0.000000,0.000000,0.735081,10.40225,14.07764)"> + <path + sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccc" + id="path2076" + d="M 7.9113325,10.909610 C 7.9107405,10.924335 7.9107406,10.939079 7.9113325,10.953804 C 7.3714319,11.632256 7.4081462,12.617271 8.0218179,13.229804 L 15.048692,20.256678 L 15.070789,20.278775 C 15.091397,20.342959 15.114983,20.438291 15.114983,20.499746 C 15.114983,20.568617 15.072860,20.675598 15.048692,20.742814 L 8.0218179,27.769687 C 7.3662191,28.432485 7.3662203,29.537570 8.0218179,30.200367 L 15.799993,37.978542 C 16.462790,38.634139 17.567875,38.634140 18.230672,37.978542 L 25.257546,30.951668 L 25.279643,30.929571 C 25.343827,30.908963 25.439159,30.885377 25.500614,30.885377 C 25.569484,30.885377 25.676466,30.927500 25.743682,30.951668 L 32.770555,37.978542 C 33.433352,38.634140 34.538438,38.634140 35.201235,37.978542 L 42.979409,30.200367 C 43.635008,29.537570 43.635008,28.432484 42.979409,27.769687 L 35.952536,20.742814 C 35.928368,20.675598 35.886245,20.568617 35.886245,20.499746 C 35.886245,20.438291 35.909831,20.342959 35.930439,20.278775 C 35.969120,20.240094 35.941639,20.269723 35.952536,20.256678 L 42.979409,13.229804 C 43.635008,12.567008 43.635008,11.461921 42.979409,10.799125 L 35.201235,3.0209501 C 34.538438,2.3653518 33.433352,2.3653518 32.770555,3.0209501 L 25.743682,10.047824 C 25.730637,10.058720 25.760265,10.031240 25.721585,10.069921 C 25.657400,10.090529 25.562068,10.114115 25.500614,10.114115 C 25.439159,10.114115 25.343827,10.090529 25.279643,10.069921 C 25.240962,10.031240 25.270590,10.058720 25.257546,10.047824 L 18.230672,3.0209501 C 17.567875,2.3653513 16.462790,2.3653525 15.799993,3.0209501 L 8.0439150,10.777028 C 8.0362978,10.783866 8.0293096,10.792152 8.0218179,10.799125 C 7.9843580,10.833990 7.9455278,10.871524 7.9113325,10.909610 z " + style="fill:url(#linearGradient3277);fill-opacity:1.0000000;fill-rule:nonzero;stroke:none;stroke-width:1.1000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000" /> + <path + id="path1311" + d="M 8.3311771,11.285261 C 7.9627502,11.748234 8.0007976,12.414065 8.4195655,12.832057 L 15.468536,19.881027 C 15.499831,19.912323 15.645313,20.189863 15.645313,20.499746 C 15.645313,20.809628 15.499831,21.087169 15.468536,21.118464 L 8.4195655,28.167435 C 7.9715048,28.620416 7.9715054,29.349639 8.4195655,29.802619 L 16.197740,37.580794 C 16.650721,38.028854 17.379944,38.028855 17.832924,37.580794 L 24.881895,30.531823 C 24.913190,30.500528 25.190731,30.355047 25.500614,30.355047 C 25.810496,30.355047 26.088037,30.500528 26.119332,30.531823 L 33.168303,37.580794 C 33.621283,38.028854 34.350507,38.028854 34.803487,37.580794 L 42.581662,29.802619 C 43.029722,29.349639 43.029722,28.620415 42.581662,28.167435 L 35.532691,21.118464 C 35.501396,21.087169 35.355914,20.809628 35.355914,20.499746 C 35.355914,20.189863 35.501396,19.912323 35.532691,19.881027 L 42.581662,12.832057 C 43.029722,12.379076 43.029722,11.649853 42.581662,11.196872 L 34.803487,3.4186976 C 34.350507,2.9706373 33.621283,2.9706373 33.168303,3.4186976 L 26.119332,10.467668 C 26.088037,10.498963 25.810496,10.644445 25.500614,10.644445 C 25.190731,10.644445 24.913190,10.498963 24.881895,10.467668 L 17.832924,3.4186976 C 17.379944,2.9706369 16.650721,2.9706376 16.197740,3.4186976 L 8.4195655,11.196872 C 8.3885387,11.224729 8.3590340,11.254234 8.3311771,11.285261 z " + style="fill:url(#linearGradient3278);fill-opacity:1.0000000;fill-rule:nonzero;stroke:none;stroke-width:2.3250000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000" /> + <path + id="path2241" + d="M 8.3311771,11.285261 C 7.9627502,11.748234 8.0007976,12.414065 8.4195655,12.832057 L 15.468536,19.881027 C 15.499831,19.912323 15.645313,20.189863 15.645313,20.499746 C 15.645313,20.809628 15.499831,21.087169 15.468536,21.118464 L 8.4195655,28.167435 C 7.9715048,28.620416 7.9715054,29.349639 8.4195655,29.802619 L 16.197740,37.580794 C 16.650721,38.028854 17.379944,38.028855 17.832924,37.580794 L 24.881895,30.531823 C 24.913190,30.500528 25.190731,30.355047 25.500614,30.355047 C 25.810496,30.355047 26.088037,30.500528 26.119332,30.531823 L 33.168303,37.580794 C 33.621283,38.028854 34.350507,38.028854 34.803487,37.580794 L 42.581662,29.802619 C 43.029722,29.349639 43.029722,28.620415 42.581662,28.167435 L 35.532691,21.118464 C 35.501396,21.087169 35.355914,20.809628 35.355914,20.499746 C 35.355914,20.189863 35.501396,19.912323 35.532691,19.881027 L 42.581662,12.832057 C 43.029722,12.379076 43.029722,11.649853 42.581662,11.196872 L 34.803487,3.4186976 C 34.350507,2.9706373 33.621283,2.9706373 33.168303,3.4186976 L 26.119332,10.467668 C 26.088037,10.498963 25.810496,10.644445 25.500614,10.644445 C 25.190731,10.644445 24.913190,10.498963 24.881895,10.467668 L 17.832924,3.4186976 C 17.379944,2.9706369 16.650721,2.9706376 16.197740,3.4186976 L 8.4195655,11.196872 C 8.3885387,11.224729 8.3590340,11.254234 8.3311771,11.285261 z " + style="fill:url(#radialGradient3279);fill-opacity:1.0000000;fill-rule:nonzero;stroke:none;stroke-width:2.3250000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000" /> + <path + sodipodi:nodetypes="ccccccccccccccccc" + id="rect1301" + d="M 9.2371577,12.014464 L 16.286128,19.063435 C 16.963211,19.740518 16.963211,21.258973 16.286128,21.936056 L 9.2371577,28.985027 L 17.015332,36.763202 L 24.064303,29.714231 C 24.741386,29.037148 26.259841,29.037148 26.936924,29.714231 L 33.985895,36.763202 L 41.764070,28.985027 L 34.715099,21.936056 C 34.038016,21.258973 34.038016,19.740518 34.715099,19.063435 L 41.764070,12.014464 L 33.985895,4.2362898 L 26.936924,11.285261 C 26.259841,11.962344 24.741386,11.962344 24.064303,11.285261 L 17.015332,4.2362898 L 9.2371577,12.014464 z " + style="fill:url(#radialGradient3280);fill-opacity:1.0000000;fill-rule:nonzero;stroke:none;stroke-width:2.3250000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000" /> + <path + sodipodi:nodetypes="ccccccccccccccccccc" + id="path2252" + d="M 17.000000,3.0937500 C 16.704449,3.0937501 16.413991,3.1822200 16.187500,3.4062500 L 8.4062500,11.187500 C 8.3752235,11.215357 8.3716069,11.250223 8.3437500,11.281250 C 7.9753234,11.744223 7.9874821,12.425758 8.4062500,12.843750 L 15.468750,19.875000 C 15.500045,19.906296 15.656250,20.190117 15.656250,20.500000 C 15.656250,20.809882 15.500045,21.093705 15.468750,21.125000 L 8.4062500,28.156250 C 7.9581896,28.609231 7.9581899,29.359520 8.4062500,29.812500 L 11.843750,33.250000 C 23.166667,26.397321 31.632440,16.401786 36.812500,5.4062500 L 34.812500,3.4062500 C 34.359521,2.9581897 33.609230,2.9581897 33.156250,3.4062500 L 26.125000,10.468750 C 26.093706,10.500045 25.809882,10.656250 25.500000,10.656250 C 25.190117,10.656250 24.906295,10.500045 24.875000,10.468750 L 17.843750,3.4062500 C 17.617260,3.1822197 17.295551,3.0937499 17.000000,3.0937500 z " + style="fill:url(#linearGradient3281);fill-opacity:1.0000000;fill-rule:nonzero;stroke:none;stroke-width:2.3250000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000" /> + </g> + </g> + </g> +</svg> diff --git a/wifi/pixmaps/offline.png b/wifi/pixmaps/offline.png Binary files differnew file mode 100644 index 00000000..16887f42 --- /dev/null +++ b/wifi/pixmaps/offline.png diff --git a/wifi/pixmaps/oor_down.png b/wifi/pixmaps/oor_down.png Binary files differnew file mode 100644 index 00000000..ab35304c --- /dev/null +++ b/wifi/pixmaps/oor_down.png diff --git a/wifi/pixmaps/oor_minimum.png b/wifi/pixmaps/oor_minimum.png Binary files differnew file mode 100644 index 00000000..8ad659f5 --- /dev/null +++ b/wifi/pixmaps/oor_minimum.png diff --git a/wifi/speed.cpp b/wifi/speed.cpp new file mode 100644 index 00000000..fdb7256c --- /dev/null +++ b/wifi/speed.cpp @@ -0,0 +1,64 @@ +/*************************************************************************** + speed.cpp - description + ------------------- + begin : Mon Aug 19 2002 + copyright : (C) 2002 by Stefan Winter + email : [email protected] + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include <qpainter.h> +#include <klocale.h> +#include <kdebug.h> +#include "speed.h" +#include "interface_wireless.h" + +Speed::Speed (QWidget * parent, Interface_wireless * device):QWidget (parent, + "KWiFiManager") +{ + this->device = device; +} + +void +Speed::paintEvent (QPaintEvent *) +{ + QPainter speedpainter (this); + QColor farbe; + farbe.setRgb (0, 255, 0); + if (device->get_bitrate () < 6000000) + farbe.setRgb (0, 200, 0); + if (device->get_bitrate () < 2500000) + farbe.setRgb (255, 255, 0); + if (device->get_bitrate () < 1500000) + farbe.setRgb (255, 128, 0); + speedpainter.drawText (20, 20, i18n ("Connection speed [MBit/s]:")); + speedpainter.drawRect (19, 29, 222, 12); + if (device->get_bitrate () <= 11000000.) + { + speedpainter.fillRect (20, 30, (int) device->get_bitrate () / 50000, + 10, farbe); + speedpainter.drawText (16, 52, "0"); + speedpainter.drawText (35, 52, "1"); + speedpainter.drawText (55, 52, "2"); + speedpainter.drawText (120, 52, "5.5"); + speedpainter.drawText (230, 52, "11"); + } + else + { + speedpainter.fillRect (20, 30, (int) device->get_bitrate () / 500000, + 10, farbe); + speedpainter.drawText (16, 52, "0"); + speedpainter.drawText (33, 52, "11"); + speedpainter.drawText (56, 52, "22"); + speedpainter.drawText (120, 52, "54"); + speedpainter.drawText (220, 52, "108"); + }; +} diff --git a/wifi/speed.h b/wifi/speed.h new file mode 100644 index 00000000..41f15b70 --- /dev/null +++ b/wifi/speed.h @@ -0,0 +1,34 @@ +/*************************************************************************** + speed.h - description + ------------------- + begin : Mon Aug 19 2002 + copyright : (C) 2002 by Stefan Winter + email : [email protected] + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef SPEED_H +#define SPEED_H + +#include <qwidget.h> + +class Interface_wireless; + +class Speed:public QWidget +{ +public: + Speed (QWidget * parent, Interface_wireless * device); +private: + void paintEvent (QPaintEvent *); + Interface_wireless *device; +}; + +#endif diff --git a/wifi/statistics.cpp b/wifi/statistics.cpp new file mode 100644 index 00000000..2ad8d393 --- /dev/null +++ b/wifi/statistics.cpp @@ -0,0 +1,111 @@ +/*************************************************************************** + statistics.cpp - description + ------------------- + begin : Mon Aug 19 2002 + copyright : (C) 2002 by Stefan Winter + email : [email protected] + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include <qwidget.h> +#include <qpainter.h> +#include <klocale.h> +#include "statistics.h" +#include "interface_wireless.h" + +Statistics::Statistics (Interface_wireless * device, bool showStatsNoise):QWidget (0, + "KWiFiManager") +{ + this->setCaption (i18n ("Statistics - KWiFiManager")); + this->device = device; + this->showStatsNoise = showStatsNoise; +} + +void +Statistics::paintEvent (QPaintEvent *) +{ + statpainter = new QPainter (this); + QColor farbe (255, 255, 255); + statpainter->drawText (40, 30, i18n ("Noise/Signal Level Statistics")); + statpainter->drawText (150, 260, + i18n ("BLUE = signal level, RED = noise level")); + statpainter->drawLine (41, 244, 41, 260); + statpainter->drawLine (520, 244, 520, 260); + statpainter->drawText (21, 274, i18n ("-240 s")); + statpainter->drawText (510, 274, i18n ("now")); + statpainter->fillRect (41, 41, 480, 201, farbe); + QPointArray datensatz (240); + QPointArray datensatz2 (240); + // we may need to scale the output to fit into the window, so here we + // determine the range of values + int bottom = + (device->sigLevelMin > + device->noiseLevelMin) ? device->noiseLevelMin : device->sigLevelMin; + int top = + (device->sigLevelMax > + device->noiseLevelMax) ? device->sigLevelMax : device->noiseLevelMax; + int datarange = top - bottom; + statpainter->drawText (10, 50, QString ("%1").arg (top)); + statpainter->drawText (10, 240, QString ("%1").arg (bottom)); + + // if values are all below 0, this indicates proper dBm values + + if (top < 0) { + statpainter->drawText (2,65, "dBm"); + statpainter->drawText (2,255, "dBm"); + } + + double scaleRatio; + if (datarange != 0) + { + scaleRatio = 200. / datarange; + } + else + { + scaleRatio = 1.; + } + int i = 0; + bool atLeastOneValid = false; + for (int j = device->current; j < device->current + MAX_HISTORY; j++) + { + if (device->valid[j % MAX_HISTORY]) + { + atLeastOneValid = true; + datensatz.setPoint (i, 40 + (i * 2), + 241 - + (int) (((device->sigLevel[j % MAX_HISTORY] + device->sigLevel[(j-1) % MAX_HISTORY]) / 2 - + bottom) * scaleRatio)); + datensatz2.setPoint (i, 40 + (i * 2), + 241 - + (int) (((device->noiseLevel[j % MAX_HISTORY] + device->noiseLevel[(j-1) % MAX_HISTORY]) / 2 - + bottom) * scaleRatio)); + } + else + { + datensatz.setPoint (i, 40 + (i * 2), 241); + datensatz2.setPoint (i, 40 + (i * 2), 241); + } + i++; + }; + // the above point array is only useful if at least one entry has its + // valid flag set. This fact is determined in the iteration before. + // Only paint the point array if there is one valid entry + if (atLeastOneValid) + { + if (showStatsNoise) { + statpainter->setPen (red); + statpainter->drawPolyline (datensatz2, 1); + } + statpainter->setPen (blue); + statpainter->drawPolyline (datensatz, 1); + } + delete statpainter; +} diff --git a/wifi/statistics.h b/wifi/statistics.h new file mode 100644 index 00000000..f8c99dd9 --- /dev/null +++ b/wifi/statistics.h @@ -0,0 +1,33 @@ +/*************************************************************************** + statistics.h - description + ------------------- + begin : Mon Aug 19 2002 + copyright : (C) 2002 by Stefan Winter + email : [email protected] + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ +#ifndef STATISTICS_H +#define STATISTICS_H + +class Interface_wireless; + +class Statistics:public QWidget +{ +public: + Statistics (Interface_wireless * device, bool showStatsNoise); +private: + QPainter * statpainter; + void paintEvent (QPaintEvent *); + Interface_wireless *device; + bool showStatsNoise; +}; + +#endif diff --git a/wifi/status.cpp b/wifi/status.cpp new file mode 100644 index 00000000..b40fa67d --- /dev/null +++ b/wifi/status.cpp @@ -0,0 +1,382 @@ +/*************************************************************************** + status.cpp - description + ------------------- + begin : Mon Aug 19 2002 + copyright : (C) 2002 by Stefan Winter + email : [email protected] + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include <klocale.h> +#include "status.h" +#include "interface_wireless.h" + +#include <unistd.h> +#include <sys/types.h> + +Status::Status (QWidget * parent, Interface_wireless * device) + : QWidget (parent, "KWiFiManager status") +{ + this->device = device; +} + +bool Status::generateStatsWidget () +{ + double + freq = 0.; + int + sig = 0, + noi = 0, + qual = 0; + device->get_current_quality (sig, noi, qual); + content = + new QGroupBox (2, Qt::Horizontal, i18n ("Status of Active Connection"), + this); + bool has_freq = device->get_device_freq (freq); + if ((!has_freq) || (qual == 0)) + { + stat = new QLabel (i18n ("Searching for network: "), content); + } + else + stat = new QLabel (i18n ("Connected to network: "), content); + net_id = new QLabel (device->get_essid (), content); + ap_str = new QLabel (i18n ("Access point: "), content); + QString + mac, + ip; + device->get_AP_info (mac, ip); + if ((mac != "44:44:44:44:44:44") && (mac != "00:00:00:00:00:00")) { + ap_ad = new QLabel (mac, content); + } else { + ap_ad = new QLabel (i18n("- no access point -"),content); + } + local_ip_string = new QLabel (i18n ("Local IP: "), content); + local_ip_content = new QLabel (device->get_IP_info (), content); + fr_str = new QLabel (i18n ("Frequency [channel]: "), content); + QString + temp3 = "%1"; + QString + temp2 = "%1"; + if (freq >= 1000000000) + { + if (freq / 1000000. > 5690.) + { + temp3 = temp3.arg(140); + } + else if (freq / 1000000. > 5670.) + { + temp3 = temp3.arg(136); + } + else if (freq / 1000000. > 5650.) + { + temp3 = temp3.arg(132); + } + else if (freq / 1000000. > 5630.) + { + temp3 = temp3.arg(128); + } + else if (freq / 1000000. > 5610.) + { + temp3 = temp3.arg(124); + } + else if (freq / 1000000. > 5590.) + { + temp3 = temp3.arg(120); + } + else if (freq / 1000000. > 5570.) + { + temp3 = temp3.arg(116); + } + else if (freq / 1000000. > 5550.) + { + temp3 = temp3.arg(112); + } + else if (freq / 1000000. > 5530.) + { + temp3 = temp3.arg(108); + } + else if (freq / 1000000. > 5510.) + { + temp3 = temp3.arg(104); + } + else if (freq / 1000000. > 5490.) + { + temp3 = temp3.arg(100); + } + else if (freq / 1000000. > 5310.) + { + temp3 = temp3.arg(64); + } + else if (freq / 1000000. > 5290.) + { + temp3 = temp3.arg(60); + } + else if (freq / 1000000. > 5270.) + { + temp3 = temp3.arg(56); + } + else if (freq / 1000000. > 5250.) + { + temp3 = temp3.arg(52); + } + else if (freq / 1000000. > 5230.) + { + temp3 = temp3.arg(48); + } + else if (freq / 1000000. > 5210.) + { + temp3 = temp3.arg(44); + } + else if (freq / 1000000. > 5190.) + { + temp3 = temp3.arg(40); + } + else if (freq / 1000000. > 5170.) + { + temp3 = temp3.arg(36); + } + else if (freq / 1000000. > 2474.) + { + temp3 = temp3.arg (14); + } + else if (freq / 1000000. > 2469.) + { + temp3 = temp3.arg (13); + } + else if (freq / 1000000. > 2464.) + { + temp3 = temp3.arg (12); + } + else if (freq / 1000000. > 2459.) + { + temp3 = temp3.arg (11); + } + else if (freq / 1000000. > 2454.) + { + temp3 = temp3.arg (10); + } + else if (freq / 1000000. > 2449.) + { + temp3 = temp3.arg (9); + } + else if (freq / 1000000. > 2444.) + { + temp3 = temp3.arg (8); + } + else if (freq / 1000000. > 2439.) + { + temp3 = temp3.arg (7); + } + else if (freq / 1000000. > 2434.) + { + temp3 = temp3.arg (6); + } + else if (freq / 1000000. > 2429.) + { + temp3 = temp3.arg (5); + } + else if (freq / 1000000. > 2424.) + { + temp3 = temp3.arg (4); + } + else if (freq / 1000000. > 2419.) + { + temp3 = temp3.arg (3); + } + else if (freq / 1000000. > 2414.) + { + temp3 = temp3.arg (2); + } + else if (freq / 1000000. >= 2400.) + { + temp3 = temp3.arg (1); + } + else + temp3 = temp3.arg ("?"); + temp2 = temp2.arg (freq / 1000000000.); + } + + if (freq < 1000000000) + {if (freq >= 140.) + { + temp2 = temp2.arg (5.700); + } + else if (freq >= 136.) + { + temp2 = temp2.arg (5.680); + } + else if (freq >= 132.) + { + temp2 = temp2.arg (5.660); + } + else if (freq >= 128.) + { + temp2 = temp2.arg (5.640); + } + else if (freq >= 124.) + { + temp2 = temp2.arg (5.620); + } + else if (freq >= 120.) + { + temp2 = temp2.arg (5.600); + } + else if (freq >= 116.) + { + temp2 = temp2.arg (5.580); + } + else if (freq >= 112.) + { + temp2 = temp2.arg (5.560); + } + else if (freq >= 108.) + { + temp2 = temp2.arg (5.540); + } + else if (freq >= 104.) + { + temp2 = temp2.arg (5.520); + } + else if (freq >= 100.) + { + temp2 = temp2.arg (5.500); + } + else if (freq >= 64.) + { + temp2 = temp2.arg (5.320); + } + else if (freq >= 60.) + { + temp2 = temp2.arg (5.300); + } + else if (freq >= 56.) + { + temp2 = temp2.arg (5.280); + } + else if (freq >= 52.) + { + temp2 = temp2.arg (5.260); + } + else if (freq >= 48.) + { + temp2 = temp2.arg (5.240); + } + else if (freq >= 44.) + { + temp2 = temp2.arg (5.220); + } + else if (freq >= 40.) + { + temp2 = temp2.arg (5.200); + } + else if (freq >= 36.) + { + temp2 = temp2.arg (5.180); + } + else if (freq >= 14.) + { + temp2 = temp2.arg (2.484); + } + else if (freq >= 13.) + { + temp2 = temp2.arg (2.472); + } + else if (freq >= 12.) + { + temp2 = temp2.arg (2.467); + } + else if (freq >= 11.) + { + temp2 = temp2.arg (2.462); + } + else if (freq >= 10.) + { + temp2 = temp2.arg (2.457); + } + else if (freq >= 9.) + { + temp2 = temp2.arg (2.452); + } + else if (freq >= 8.) + { + temp2 = temp2.arg (2.447); + } + else if (freq >= 7.) + { + temp2 = temp2.arg (2.442); + } + else if (freq >= 6.) + { + temp2 = temp2.arg (2.437); + } + else if (freq >= 5.) + { + temp2 = temp2.arg (2.432); + } + else if (freq >= 4.) + { + temp2 = temp2.arg (2.427); + } + else if (freq >= 3.) + { + temp2 = temp2.arg (2.422); + } + else if (freq >= 2.) + { + temp2 = temp2.arg (2.417); + } + else if (freq >= 1.) + { + temp2 = temp2.arg (2.412); + } + else + temp2 = temp2.arg ("?"); + temp3 = temp3.arg (freq); + } + + fr = new QLabel ( has_freq ? temp2 + " [" + temp3 + "]" : "" , content); + if (geteuid () == 0) + { + enc_str = new QLabel (i18n ("Encryption: "), content); + QString + key; + int + size = 0, + flags = 0; + if (device->get_key (key, size, flags)) + // if ((device->key_flags & IW_ENCODE_DISABLED) || (key_size == 0)) + // will the following line suffice? + if (size == 0) + { + enc = new QLabel (i18n ("off"), content); + } + else + enc = new QLabel (i18n ("active"), content); + } + // content->setFixedSize (content->sizeHint ()); + content->setMinimumSize(content->sizeHint()); + if ( content->minimumWidth() < 280 ) content->setMinimumWidth( 280 ); + setFixedSize (content->minimumSize()); + content->show (); + widgetbild = QPixmap::grabWidget (content); + delete + content; + return true; +} + +void +Status::paintEvent (QPaintEvent *) +{ + QPainter *paintArea = new QPainter (this); + generateStatsWidget (); + paintArea->drawPixmap (0, 0, widgetbild); + delete paintArea; +} diff --git a/wifi/status.h b/wifi/status.h new file mode 100644 index 00000000..0c7f0d3e --- /dev/null +++ b/wifi/status.h @@ -0,0 +1,43 @@ +/*************************************************************************** + status.h - description + ------------------- + begin : Mon Aug 19 2002 + copyright : (C) 2002 by Stefan Winter + email : [email protected] + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef STATUS_H +#define STATUS_H + +#include <qwidget.h> +#include <qpainter.h> +#include <qgroupbox.h> +#include <qlabel.h> +#include <qpixmap.h> + +class Interface_wireless; + +class Status:public QWidget +{ +public: + Status (QWidget * parent, Interface_wireless * device); +private: + void paintEvent (QPaintEvent *); + bool generateStatsWidget (); + QGroupBox *content; + QLabel *stat, *net_id, *ap_str, *ap_ad, *fr_str, *fr, *enc_str, *enc, + *local_ip_content, *local_ip_string; + QPixmap widgetbild, widgetbildalt; + Interface_wireless *device; +}; + +#endif diff --git a/wifi/strength.cpp b/wifi/strength.cpp new file mode 100644 index 00000000..0bb43f6c --- /dev/null +++ b/wifi/strength.cpp @@ -0,0 +1,166 @@ +/*************************************************************************** + strength.cpp - description + ------------------- + begin : Mon Aug 19 2002 + copyright : (C) 2002 by Stefan Winter + email : [email protected] + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include <qwidget.h> +#include <qpainter.h> +#include <qpixmap.h> +#include <qlabel.h> +#include <kstandarddirs.h> +#include <klocale.h> +#include <kdebug.h> +#include "strength.h" +#include "interface_wireless.h" + +extern bool useAlternateStrengthCalc; + +Strength::Strength (QWidget * parent, Interface_wireless * device):QWidget (parent, + "strength") +{ + this->device = device; + KStandardDirs finder; + kdedir = finder.findResourceDir ("data", "kwifimanager/pics/no_card.png"); + kdedir += "kwifimanager/pics/"; + NOT_CON_OFFLINE_ADHOC = new QPixmap (kdedir + "offline.png"); + EXCELLENT = new QPixmap (kdedir + "excellent.png"); + GOOD = new QPixmap (kdedir + "good.png"); + MARGINAL = new QPixmap (kdedir + "marginal.png"); + OOR_MINIMUM = new QPixmap (kdedir + "oor_minimum.png"); + OOR_DOWN = new QPixmap (kdedir + "oor_down.png"); +} + +QSize Strength::mySizeHint () +{ + /* make this quite general, just in case someone uses different icons */ + QSize* temp = new QSize(NOT_CON_OFFLINE_ADHOC->size()); + if (EXCELLENT->size().width() > temp->width ()) { temp->setWidth (EXCELLENT->size().width ()); } + if (EXCELLENT->size().height() > temp->height()) { temp->setHeight(EXCELLENT->size().height()); } + if (GOOD->size().width() > temp->width ()) { temp->setWidth (GOOD->size().width ()); } + if (GOOD->size().height() > temp->height()) { temp->setHeight(GOOD->size().height()); } + if (MARGINAL->size().width() > temp->width ()) { temp->setWidth (MARGINAL->size().width ()); } + if (MARGINAL->size().height() > temp->height()) { temp->setHeight(MARGINAL->size().height()); } + if (OOR_MINIMUM->size().width() > temp->width ()) { temp->setWidth (OOR_MINIMUM->size().width ()); } + if (OOR_MINIMUM->size().height() > temp->height()) { temp->setHeight(OOR_MINIMUM->size().height()); } + if (OOR_DOWN->size().width() > temp->width ()) { temp->setWidth (OOR_DOWN->size().width ()); } + if (OOR_DOWN->size().height() > temp->height()) { temp->setHeight(OOR_DOWN->size().height()); } + // add a little more x-space: we need 50 pixels left and 50 pixels right of the icon + temp->setWidth (temp->width() + 100); + // add a little more y-space: we need 10 pixels above and 20 pixels below the icon + temp->setHeight(temp->height() + 30); + // up to now: this is the height required to get a decent logo display + // now determine height of QLabels to calculate the extra needed height + QLabel heightTest( "ABC", 0 ); + temp->setHeight( temp->height() + 2 * heightTest.sizeHint().height() + 10 ); + return *temp; +} + +Strength::~Strength () +{ + delete NOT_CON_OFFLINE_ADHOC; + delete GOOD; + delete MARGINAL; + delete OOR_MINIMUM; + delete OOR_DOWN; +} + +void +Strength::paintEvent (QPaintEvent * event) +{ + updateInfo (event); +} + +void +Strength::updateInfo (QPaintEvent *) +{ + QPainter *strengthpainter = new QPainter (this); + QString sstrength1, sstrength2( i18n("N/A") ); + int mode; + double freq; + + int sig, noi, strength; + bool validdata = device->get_current_quality (sig, noi, strength); + if (useAlternateStrengthCalc) + strength = sig - noi; + + if ( device->get_txpower_disabled() ) + { + sstrength1 = i18n("DISABLED"); + strengthpainter->drawPixmap (50, 10, *NOT_CON_OFFLINE_ADHOC); + } + else if (!device->get_device_freq (freq)) + { + sstrength1 = i18n("NOT CONNECTED"); + strengthpainter->drawPixmap (50, 10, *NOT_CON_OFFLINE_ADHOC); + } + else if (device->get_mode(mode) && mode == 1) + { + sstrength1 = i18n("AD-HOC MODE"); + strengthpainter->drawPixmap (50, 10, *NOT_CON_OFFLINE_ADHOC); + } + else if (validdata && (strength > 45)) + { + sstrength1 = i18n("ULTIMATE"); + sstrength2 = QString::number(strength); + strengthpainter->drawPixmap (50, 10, *EXCELLENT); + } + else if (validdata && (strength > 35)) + { + sstrength1 = i18n("TOP"); + sstrength2 = QString::number(strength); + strengthpainter->drawPixmap (50, 10, *EXCELLENT); + } + else if (validdata && (strength > 25)) + { + sstrength1 = i18n("EXCELLENT"); + sstrength2 = QString::number(strength); + strengthpainter->drawPixmap (50, 10, *EXCELLENT); + } + else if (validdata && (strength > 15)) + { + sstrength1 = i18n("GOOD"); + sstrength2 = QString::number(strength); + strengthpainter->drawPixmap (50, 10, *GOOD); + } + else if (validdata && (strength > 5)) + { + sstrength1 = i18n("WEAK"); + sstrength2 = QString::number(strength); + strengthpainter->drawPixmap (50, 10, *MARGINAL); + } + else if (validdata && (strength > 0)) + { + sstrength1 = i18n("MINIMUM"); + sstrength2 = QString::number(strength); + strengthpainter->drawPixmap (50, 10, *OOR_MINIMUM); + } + else if (((strength == 0) && (mode == 2)) || (!validdata)) + { + sstrength1 = i18n("OUT OF RANGE"); + sstrength2 = QString::fromLatin1("0"); + strengthpainter->drawPixmap (50, 10, *OOR_DOWN); + } + else + { + sstrength1 = i18n("N/A"); + strengthpainter->drawPixmap (50, 10, *NOT_CON_OFFLINE_ADHOC); + }; + sstrength2.prepend( i18n("Signal strength: ") ); + strengthpainter->drawText (5, 55, sstrength1); + strengthpainter->drawText (5, 80, sstrength2); + delete strengthpainter; +} + +#include "strength.moc" diff --git a/wifi/strength.h b/wifi/strength.h new file mode 100644 index 00000000..b03eb215 --- /dev/null +++ b/wifi/strength.h @@ -0,0 +1,41 @@ +/*************************************************************************** + strength.h - description + ------------------- + begin : Mon Aug 19 2002 + copyright : (C) 2002 by Stefan Winter + email : [email protected] + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef STRENGTH_H +#define STRENGTH_H +#include <qwidget.h> + +class Interface_wireless; +class QSize; + +class Strength:public QWidget +{ +Q_OBJECT + public: + Strength (QWidget * parent, Interface_wireless * device); + QSize mySizeHint(); + ~Strength (); + QPixmap *NOT_CON_OFFLINE_ADHOC, *OOR_DOWN, *OOR_MINIMUM, *MARGINAL, *GOOD, *EXCELLENT; + public slots: + void updateInfo (QPaintEvent *); + private: + QString kdedir; + void paintEvent (QPaintEvent *); + Interface_wireless *device; +}; + +#endif |