summaryrefslogtreecommitdiff
path: root/noncore
Side-by-side diff
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/applets/autorotateapplet/autorotate.cpp8
-rw-r--r--noncore/applets/memoryapplet/memorymeter.cpp26
-rw-r--r--noncore/applets/memoryapplet/memorystatus.cpp1
-rw-r--r--noncore/applets/memoryapplet/memorystatus.h4
-rw-r--r--noncore/applets/networkapplet/networkapplet.cpp7
-rw-r--r--noncore/applets/networkapplet/networkapplet.h18
-rw-r--r--noncore/applets/notesapplet/notes.cpp8
-rw-r--r--noncore/applets/wirelessapplet/wireless.cpp9
-rw-r--r--noncore/applets/wirelessapplet/wireless.h9
-rw-r--r--noncore/applets/zkbapplet/zkbwidget.cpp11
10 files changed, 51 insertions, 50 deletions
diff --git a/noncore/applets/autorotateapplet/autorotate.cpp b/noncore/applets/autorotateapplet/autorotate.cpp
index 94be0ae..ae7fbd0 100644
--- a/noncore/applets/autorotateapplet/autorotate.cpp
+++ b/noncore/applets/autorotateapplet/autorotate.cpp
@@ -22,8 +22,7 @@
/* QT */
#include <qpainter.h>
-using namespace Opie;
-
+using namespace Opie::Ui;
AutoRotate::AutoRotate(QWidget * parent):QWidget(parent)
{
setFixedWidth( AppLnk::smallIconSize() );
@@ -94,8 +93,5 @@ bool AutoRotate::isRotateEnabled()
return res;
}
-Q_EXPORT_INTERFACE()
-{
- Q_CREATE_INSTANCE( OTaskbarAppletWrapper<AutoRotate> );
-}
+EXPORT_OPIE_APPLET_v1( AutoRotate )
diff --git a/noncore/applets/memoryapplet/memorymeter.cpp b/noncore/applets/memoryapplet/memorymeter.cpp
index 9299f49..9cdeaf4 100644
--- a/noncore/applets/memoryapplet/memorymeter.cpp
+++ b/noncore/applets/memoryapplet/memorymeter.cpp
@@ -31,16 +31,17 @@
#include <qtopia/applnk.h>
+using namespace Opie::Ui;
MemoryMeter::MemoryMeter( QWidget *parent )
: QWidget( parent ), memoryView(0)
{
bvsz = QSize();
- if ( qApp->desktop()->height() >= 300 )
+ if ( qApp->desktop()->height() >= 300 )
{
memoryView = new MemoryStatus( 0, WStyle_StaysOnTop | WType_Popup );
memoryView->setFrameStyle( QFrame::Panel | QFrame::Raised );
- }
- else
+ }
+ else
{
memoryView = new MemoryStatus( 0 );
memoryView->showMaximized();
@@ -79,11 +80,11 @@ bool MemoryMeter::updateMemoryViewGeometry()
if (memoryView != 0)
{
QSize sz = memoryView->sizeHint();
- if ( sz != bvsz )
+ if ( sz != bvsz )
{
bvsz = sz;
QRect r(memoryView->pos(), memoryView->sizeHint());
- if ( qApp->desktop()->height() >= 300 )
+ if ( qApp->desktop()->height() >= 300 )
{
QPoint curPos = mapToGlobal( rect().topLeft() );
int lp = qApp->desktop()->width() - memoryView->sizeHint().width();
@@ -100,11 +101,11 @@ bool MemoryMeter::updateMemoryViewGeometry()
void MemoryMeter::mousePressEvent( QMouseEvent *)
{
- if ( memoryView->isVisible() )
+ if ( memoryView->isVisible() )
{
memoryView->hide();
- }
- else
+ }
+ else
{
bvsz = QSize();
updateMemoryViewGeometry();
@@ -206,7 +207,7 @@ void MemoryMeter::paintEvent( QPaintEvent* )
//
// Drained section.
//
- if (used_height != 0)
+ if (used_height != 0)
{
p.setPen(NoPen);
p.setBrush(gray);
@@ -223,7 +224,7 @@ void MemoryMeter::paintEvent( QPaintEvent* )
//
// Unused section.
//
- if ( batt_height - used_height > 0 )
+ if ( batt_height - used_height > 0 )
{
int unused_offset = used_height + batt_yoffset;
int unused_height = batt_height - used_height;
@@ -240,8 +241,5 @@ void MemoryMeter::paintEvent( QPaintEvent* )
}
}
-Q_EXPORT_INTERFACE()
-{
- Q_CREATE_INSTANCE( OTaskbarAppletWrapper<MemoryMeter> );
-}
+EXPORT_OPIE_APPLET_v1( MemoryMeter )
diff --git a/noncore/applets/memoryapplet/memorystatus.cpp b/noncore/applets/memoryapplet/memorystatus.cpp
index c01ba28..95ae06b 100644
--- a/noncore/applets/memoryapplet/memorystatus.cpp
+++ b/noncore/applets/memoryapplet/memorystatus.cpp
@@ -28,6 +28,7 @@
#include <qlayout.h>
+using namespace Opie::Ui;
MemoryStatus::MemoryStatus(QWidget *parent, WFlags f )
: QFrame(parent, 0, f), mi(0), sf(0)
{
diff --git a/noncore/applets/memoryapplet/memorystatus.h b/noncore/applets/memoryapplet/memorystatus.h
index c3926db..d16787b 100644
--- a/noncore/applets/memoryapplet/memorystatus.h
+++ b/noncore/applets/memoryapplet/memorystatus.h
@@ -26,7 +26,7 @@
class MemoryInfo;
class Swapfile;
-using Opie::OTabWidget;
+
class MemoryStatus : public QFrame
{
@@ -42,7 +42,7 @@ public:
int percent();
private:
- OTabWidget *tab;
+ Opie::Ui::OTabWidget *tab;
};
#endif
diff --git a/noncore/applets/networkapplet/networkapplet.cpp b/noncore/applets/networkapplet/networkapplet.cpp
index 955ed2e..5eb5ad2 100644
--- a/noncore/applets/networkapplet/networkapplet.cpp
+++ b/noncore/applets/networkapplet/networkapplet.cpp
@@ -45,6 +45,8 @@
#include <assert.h>
+using namespace Opie::Ui;
+using namespace Opie::Net;
IfaceUpDownButton::IfaceUpDownButton( QWidget* parent, const char* name )
:QToolButton( parent, name )
{
@@ -246,9 +248,6 @@ void NetworkApplet::mousePressEvent( QMouseEvent* )
}
}
+EXPORT_OPIE_APPLET_v1( NetworkApplet )
-Q_EXPORT_INTERFACE()
-{
- Q_CREATE_INSTANCE( OTaskbarAppletWrapper<NetworkApplet> );
-}
diff --git a/noncore/applets/networkapplet/networkapplet.h b/noncore/applets/networkapplet/networkapplet.h
index 8022537..1e2cac8 100644
--- a/noncore/applets/networkapplet/networkapplet.h
+++ b/noncore/applets/networkapplet/networkapplet.h
@@ -38,7 +38,13 @@
#include <qlineedit.h>
#include <qpixmap.h>
-class ONetworkInterface;
+
+namespace Opie {
+namespace Net {
+ class ONetwork;
+ class ONetworkInterface;
+}
+}
class QShowEvent;
class QHideEvent;
class QVBoxLayout;
@@ -55,7 +61,7 @@ class IfaceUpDownButton : public QToolButton
virtual void clicked();
private:
- ONetworkInterface* _iface;
+ Opie::Net::ONetworkInterface* _iface;
};
@@ -71,13 +77,13 @@ class IfaceIPAddress : public QLineEdit
virtual void returnPressed();
private:
- ONetworkInterface* _iface;
+ Opie::Net::ONetworkInterface* _iface;
};
class NetworkAppletControl : public QFrame
{
public:
- NetworkAppletControl( OTaskbarApplet* parent, const char* name = 0 );
+ NetworkAppletControl( Opie::Ui::OTaskbarApplet* parent, const char* name = 0 );
~NetworkAppletControl();
virtual QSize sizeHint() const;
@@ -85,7 +91,7 @@ class NetworkAppletControl : public QFrame
protected:
virtual void showEvent( QShowEvent* );
virtual void hideEvent( QHideEvent* );
- QString guessDevice( ONetworkInterface* iface );
+ QString guessDevice( Opie::Net::ONetworkInterface* iface );
void build();
private:
@@ -94,7 +100,7 @@ class NetworkAppletControl : public QFrame
};
-class NetworkApplet : public OTaskbarApplet
+class NetworkApplet : public Opie::Ui::OTaskbarApplet
{
public:
NetworkApplet( QWidget* parent = 0, const char* name = 0 );
diff --git a/noncore/applets/notesapplet/notes.cpp b/noncore/applets/notesapplet/notes.cpp
index 9b5e475..13f7cf3 100644
--- a/noncore/applets/notesapplet/notes.cpp
+++ b/noncore/applets/notesapplet/notes.cpp
@@ -46,6 +46,7 @@
#include <qtimer.h>
/* XPM */
+using namespace Opie::Ui;
static char * notes_xpm[] = {
"16 16 11 1",
" c None",
@@ -508,7 +509,6 @@ void NotesApplet::paintEvent( QPaintEvent* ) {
p.drawPixmap( 0, 1, ( const char** ) notes_xpm );
}
-Q_EXPORT_INTERFACE()
-{
- Q_CREATE_INSTANCE( OTaskbarAppletWrapper<NotesApplet> );
-}
+
+EXPORT_OPIE_APPLET_v1( NotesApplet )
+
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
@@ -26,6 +26,7 @@
#include <opie2/onetwork.h>
#include <opie2/otaskbarapplet.h>
#include <qpe/config.h>
+#include <qpe/qpeapplication.h>
/* QT */
#include <qradiobutton.h>
@@ -48,6 +49,8 @@
//#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 )
{
@@ -550,9 +553,5 @@ int WirelessApplet::position()
return 6;
}
-
-Q_EXPORT_INTERFACE()
-{
- Q_CREATE_INSTANCE( OTaskbarAppletWrapper<WirelessApplet> );
-}
+EXPORT_OPIE_APPLET_v1( WirelessApplet )
diff --git a/noncore/applets/wirelessapplet/wireless.h b/noncore/applets/wirelessapplet/wireless.h
index 27f8c90..b475a46 100644
--- a/noncore/applets/wirelessapplet/wireless.h
+++ b/noncore/applets/wirelessapplet/wireless.h
@@ -19,7 +19,10 @@
#include <qframe.h>
#include <qpixmap.h>
-class OWirelessNetworkInterface;
+namespace Opie {namespace Net {
+ class OWirelessNetworkInterface;
+}
+}
class Y;
class QLabel;
class WirelessApplet;
@@ -86,11 +89,11 @@ class WirelessApplet : public QWidget
int visualStyle;
int timer;
- OWirelessNetworkInterface* interface;
+ Opie::Net::OWirelessNetworkInterface* interface;
private:
const char** oldpixmap;
- OWirelessNetworkInterface* oldiface;
+ Opie::Net::OWirelessNetworkInterface* oldiface;
int oldqualityH;
int oldsignalH;
int oldnoiseH;
diff --git a/noncore/applets/zkbapplet/zkbwidget.cpp b/noncore/applets/zkbapplet/zkbwidget.cpp
index 0083e9b..3acff1e 100644
--- a/noncore/applets/zkbapplet/zkbwidget.cpp
+++ b/noncore/applets/zkbapplet/zkbwidget.cpp
@@ -8,11 +8,12 @@
#include "zkbwidget.h"
#include "zkbcfg.h"
+using namespace Opie::Ui;
ZkbWidget::ZkbWidget(QWidget* parent):QLabel(parent),keymap(0),
disabled(Resource::loadPixmap("zkb-disabled")) {
labels = new QPopupMenu();
- connect(labels, SIGNAL(activated(int)), this,
+ connect(labels, SIGNAL(activated(int)), this,
SLOT(labelChanged(int)));
loadKeymap();
@@ -68,7 +69,7 @@ bool ZkbWidget::loadKeymap() {
labels->insertItem(disabled, 0, 0);
int n = 1;
w = 0;
- for(QStringList::Iterator it = l.begin(); it != l.end();
+ for(QStringList::Iterator it = l.begin(); it != l.end();
++it, n++) {
// printf("label: %s\n", (const char*) (*it).utf8());
@@ -155,8 +156,6 @@ void ZkbWidget::reload() {
QCopEnvelope("QPE/System", "notBusy()");
}
-Q_EXPORT_INTERFACE()
-{
- Q_CREATE_INSTANCE( OTaskbarAppletWrapper<ZkbWidget> );
-}
+EXPORT_OPIE_APPLET_v1( ZkbWidget )
+