summaryrefslogtreecommitdiffstats
path: root/wifi/locator.cpp
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commitbcb704366cb5e333a626c18c308c7e0448a8e69f (patch)
treef0d6ab7d78ecdd9207cf46536376b44b91a1ca71 /wifi/locator.cpp
downloadtdenetwork-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/locator.cpp')
-rw-r--r--wifi/locator.cpp56
1 files changed, 56 insertions, 0 deletions
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 : mail@stefan-winter.de
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * 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;
+}