summaryrefslogtreecommitdiff
path: root/noncore/applets/wirelessapplet/wireless.cpp
Side-by-side diff
Diffstat (limited to 'noncore/applets/wirelessapplet/wireless.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/applets/wirelessapplet/wireless.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/noncore/applets/wirelessapplet/wireless.cpp b/noncore/applets/wirelessapplet/wireless.cpp
index 6ef2e44..f244426 100644
--- a/noncore/applets/wirelessapplet/wireless.cpp
+++ b/noncore/applets/wirelessapplet/wireless.cpp
@@ -5,70 +5,73 @@
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
**********************************************************************/
#include "wireless.h"
#include "mgraph.h"
#include "advancedconfig.h"
#include "connect0.xpm"
#include "connect1.xpm"
#include "connect2.xpm"
#include "connect3.xpm"
#include "connect4.xpm"
#include "connect5.xpm"
#include "nowireless.xpm"
/* OPIE */
#include <opie2/onetwork.h>
#include <opie2/otaskbarapplet.h>
#include <qpe/config.h>
+#include <qpe/qpeapplication.h>
/* QT */
#include <qradiobutton.h>
#include <qpushbutton.h>
#include <qpainter.h>
#include <qlabel.h>
#include <qslider.h>
#include <qbuttongroup.h>
#include <qlayout.h>
#include <qfile.h>
#include <qtextstream.h>
/* STD */
#include <sys/types.h>
#include <signal.h>
#define STYLE_BARS 0
#define STYLE_ANTENNA 1
//#define MDEBUG
#undef MDEBUG
+using namespace Opie::Ui;
+using namespace Opie::Net;
WirelessControl::WirelessControl( WirelessApplet *applet, QWidget *parent, const char *name )
: QFrame( parent, name, WStyle_StaysOnTop | WType_Popup ), applet( applet )
{
readConfig();
writeConfigEntry( "UpdateFrequency", updateFrequency );
writeConfigEntry( "DisplayStyle", displayStyle );
setFrameStyle( QFrame::PopupPanel | QFrame::Raised );
QGridLayout *grid = new QGridLayout( this, 3, 2, 6, 2, "top layout" );
/* status label */
statusLabel = new QLabel( this, "statuslabel" );
QString text( "Wireless Status:<br>"
"*** Unknown ***<br>"
"Card not inserted ?<br>"
"Or Sharp ROM ?<br>"
"CELL: 00:00:00:00:00:00" );
/* QString text( "Station: Unknown<br>"
"ESSID: Unknown<br>"
"MODE: Unknown<br>"
"FREQ: Unknown<br>"
"CELL: AA:BB:CC:DD:EE:FF" ); */
@@ -529,30 +532,26 @@ void WirelessApplet::paintEvent( QPaintEvent* )
p.setPen ( color );
p.drawLine( leftoffset, height() - bottomoffset - i, pixelWidth + leftoffset, height() - bottomoffset - i );
}
// draw quality indicator
pixelHeight = qualityH;
Hue = 250;
leftoffset += pixelWidth + barSpace;
for ( int i = 0; i < pixelHeight; ++i )
{
intensity = 50 + ( ( double ) i / ( double ) pixelHeight ) * 205;
color.setHsv( Hue, 255, intensity );
p.setPen ( color );
p.drawLine( leftoffset, height() - bottomoffset - i, pixelWidth + leftoffset, height() - bottomoffset - i );
}
}
}
int WirelessApplet::position()
{
return 6;
}
-
-Q_EXPORT_INTERFACE()
-{
- Q_CREATE_INSTANCE( OTaskbarAppletWrapper<WirelessApplet> );
-}
+EXPORT_OPIE_APPLET_v1( WirelessApplet )