author | zecke <zecke> | 2004-03-13 21:53:54 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-03-13 21:53:54 (UTC) |
commit | 2eb5c075b612498c4b65f3d49389b8612612a930 (patch) (unidiff) | |
tree | a0230cd9007f71bbb387b71b8e58684937e0cf70 | |
parent | 184a0cd9935d0a249038cdbe05488c181b273d64 (diff) | |
download | opie-2eb5c075b612498c4b65f3d49389b8612612a930.zip opie-2eb5c075b612498c4b65f3d49389b8612612a930.tar.gz opie-2eb5c075b612498c4b65f3d49389b8612612a930.tar.bz2 |
Introduce the namespace
and the new APPLET_EXPORT define
-rw-r--r-- | noncore/applets/autorotateapplet/autorotate.cpp | 8 | ||||
-rw-r--r-- | noncore/applets/memoryapplet/memorymeter.cpp | 26 | ||||
-rw-r--r-- | noncore/applets/memoryapplet/memorystatus.cpp | 1 | ||||
-rw-r--r-- | noncore/applets/memoryapplet/memorystatus.h | 4 | ||||
-rw-r--r-- | noncore/applets/networkapplet/networkapplet.cpp | 7 | ||||
-rw-r--r-- | noncore/applets/networkapplet/networkapplet.h | 18 | ||||
-rw-r--r-- | noncore/applets/notesapplet/notes.cpp | 8 | ||||
-rw-r--r-- | noncore/applets/wirelessapplet/wireless.cpp | 9 | ||||
-rw-r--r-- | noncore/applets/wirelessapplet/wireless.h | 9 | ||||
-rw-r--r-- | noncore/applets/zkbapplet/zkbwidget.cpp | 11 |
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 | |||
@@ -23,6 +23,5 @@ | |||
23 | #include <qpainter.h> | 23 | #include <qpainter.h> |
24 | 24 | ||
25 | using namespace Opie; | 25 | using namespace Opie::Ui; |
26 | |||
27 | AutoRotate::AutoRotate(QWidget * parent):QWidget(parent) | 26 | AutoRotate::AutoRotate(QWidget * parent):QWidget(parent) |
28 | { | 27 | { |
@@ -95,7 +94,4 @@ bool AutoRotate::isRotateEnabled() | |||
95 | } | 94 | } |
96 | 95 | ||
97 | Q_EXPORT_INTERFACE() | 96 | EXPORT_OPIE_APPLET_v1( AutoRotate ) |
98 | { | ||
99 | Q_CREATE_INSTANCE( OTaskbarAppletWrapper<AutoRotate> ); | ||
100 | } | ||
101 | 97 | ||
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 | |||
@@ -32,14 +32,15 @@ | |||
32 | #include <qtopia/applnk.h> | 32 | #include <qtopia/applnk.h> |
33 | 33 | ||
34 | using namespace Opie::Ui; | ||
34 | MemoryMeter::MemoryMeter( QWidget *parent ) | 35 | MemoryMeter::MemoryMeter( QWidget *parent ) |
35 | : QWidget( parent ), memoryView(0) | 36 | : QWidget( parent ), memoryView(0) |
36 | { | 37 | { |
37 | bvsz = QSize(); | 38 | bvsz = QSize(); |
38 | if ( qApp->desktop()->height() >= 300 ) | 39 | if ( qApp->desktop()->height() >= 300 ) |
39 | { | 40 | { |
40 | memoryView = new MemoryStatus( 0, WStyle_StaysOnTop | WType_Popup ); | 41 | memoryView = new MemoryStatus( 0, WStyle_StaysOnTop | WType_Popup ); |
41 | memoryView->setFrameStyle( QFrame::Panel | QFrame::Raised ); | 42 | memoryView->setFrameStyle( QFrame::Panel | QFrame::Raised ); |
42 | } | 43 | } |
43 | else | 44 | else |
44 | { | 45 | { |
45 | memoryView = new MemoryStatus( 0 ); | 46 | memoryView = new MemoryStatus( 0 ); |
@@ -80,9 +81,9 @@ bool MemoryMeter::updateMemoryViewGeometry() | |||
80 | { | 81 | { |
81 | QSize sz = memoryView->sizeHint(); | 82 | QSize sz = memoryView->sizeHint(); |
82 | if ( sz != bvsz ) | 83 | if ( sz != bvsz ) |
83 | { | 84 | { |
84 | bvsz = sz; | 85 | bvsz = sz; |
85 | QRect r(memoryView->pos(), memoryView->sizeHint()); | 86 | QRect r(memoryView->pos(), memoryView->sizeHint()); |
86 | if ( qApp->desktop()->height() >= 300 ) | 87 | if ( qApp->desktop()->height() >= 300 ) |
87 | { | 88 | { |
88 | QPoint curPos = mapToGlobal( rect().topLeft() ); | 89 | QPoint curPos = mapToGlobal( rect().topLeft() ); |
@@ -101,9 +102,9 @@ bool MemoryMeter::updateMemoryViewGeometry() | |||
101 | void MemoryMeter::mousePressEvent( QMouseEvent *) | 102 | void MemoryMeter::mousePressEvent( QMouseEvent *) |
102 | { | 103 | { |
103 | if ( memoryView->isVisible() ) | 104 | if ( memoryView->isVisible() ) |
104 | { | 105 | { |
105 | memoryView->hide(); | 106 | memoryView->hide(); |
106 | } | 107 | } |
107 | else | 108 | else |
108 | { | 109 | { |
109 | bvsz = QSize(); | 110 | bvsz = QSize(); |
@@ -207,5 +208,5 @@ void MemoryMeter::paintEvent( QPaintEvent* ) | |||
207 | // Drained section. | 208 | // Drained section. |
208 | // | 209 | // |
209 | if (used_height != 0) | 210 | if (used_height != 0) |
210 | { | 211 | { |
211 | p.setPen(NoPen); | 212 | p.setPen(NoPen); |
@@ -224,5 +225,5 @@ void MemoryMeter::paintEvent( QPaintEvent* ) | |||
224 | // Unused section. | 225 | // Unused section. |
225 | // | 226 | // |
226 | if ( batt_height - used_height > 0 ) | 227 | if ( batt_height - used_height > 0 ) |
227 | { | 228 | { |
228 | int unused_offset = used_height + batt_yoffset; | 229 | int unused_offset = used_height + batt_yoffset; |
@@ -241,7 +242,4 @@ void MemoryMeter::paintEvent( QPaintEvent* ) | |||
241 | } | 242 | } |
242 | 243 | ||
243 | Q_EXPORT_INTERFACE() | 244 | EXPORT_OPIE_APPLET_v1( MemoryMeter ) |
244 | { | ||
245 | Q_CREATE_INSTANCE( OTaskbarAppletWrapper<MemoryMeter> ); | ||
246 | } | ||
247 | 245 | ||
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 | |||
@@ -29,4 +29,5 @@ | |||
29 | #include <qlayout.h> | 29 | #include <qlayout.h> |
30 | 30 | ||
31 | using namespace Opie::Ui; | ||
31 | MemoryStatus::MemoryStatus(QWidget *parent, WFlags f ) | 32 | MemoryStatus::MemoryStatus(QWidget *parent, WFlags f ) |
32 | : QFrame(parent, 0, f), mi(0), sf(0) | 33 | : 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 | |||
@@ -27,5 +27,5 @@ | |||
27 | class MemoryInfo; | 27 | class MemoryInfo; |
28 | class Swapfile; | 28 | class Swapfile; |
29 | using Opie::OTabWidget; | 29 | |
30 | 30 | ||
31 | class MemoryStatus : public QFrame | 31 | class MemoryStatus : public QFrame |
@@ -43,5 +43,5 @@ public: | |||
43 | 43 | ||
44 | private: | 44 | private: |
45 | OTabWidget *tab; | 45 | Opie::Ui::OTabWidget *tab; |
46 | }; | 46 | }; |
47 | 47 | ||
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 | |||
@@ -46,4 +46,6 @@ | |||
46 | #include <assert.h> | 46 | #include <assert.h> |
47 | 47 | ||
48 | using namespace Opie::Ui; | ||
49 | using namespace Opie::Net; | ||
48 | IfaceUpDownButton::IfaceUpDownButton( QWidget* parent, const char* name ) | 50 | IfaceUpDownButton::IfaceUpDownButton( QWidget* parent, const char* name ) |
49 | :QToolButton( parent, name ) | 51 | :QToolButton( parent, name ) |
@@ -247,8 +249,5 @@ void NetworkApplet::mousePressEvent( QMouseEvent* ) | |||
247 | } | 249 | } |
248 | 250 | ||
251 | EXPORT_OPIE_APPLET_v1( NetworkApplet ) | ||
249 | 252 | ||
250 | Q_EXPORT_INTERFACE() | ||
251 | { | ||
252 | Q_CREATE_INSTANCE( OTaskbarAppletWrapper<NetworkApplet> ); | ||
253 | } | ||
254 | 253 | ||
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 | |||
@@ -39,5 +39,11 @@ | |||
39 | #include <qpixmap.h> | 39 | #include <qpixmap.h> |
40 | 40 | ||
41 | class ONetworkInterface; | 41 | |
42 | namespace Opie { | ||
43 | namespace Net { | ||
44 | class ONetwork; | ||
45 | class ONetworkInterface; | ||
46 | } | ||
47 | } | ||
42 | class QShowEvent; | 48 | class QShowEvent; |
43 | class QHideEvent; | 49 | class QHideEvent; |
@@ -56,5 +62,5 @@ class IfaceUpDownButton : public QToolButton | |||
56 | 62 | ||
57 | private: | 63 | private: |
58 | ONetworkInterface* _iface; | 64 | Opie::Net::ONetworkInterface* _iface; |
59 | }; | 65 | }; |
60 | 66 | ||
@@ -72,5 +78,5 @@ class IfaceIPAddress : public QLineEdit | |||
72 | 78 | ||
73 | private: | 79 | private: |
74 | ONetworkInterface* _iface; | 80 | Opie::Net::ONetworkInterface* _iface; |
75 | }; | 81 | }; |
76 | 82 | ||
@@ -78,5 +84,5 @@ class NetworkAppletControl : public QFrame | |||
78 | { | 84 | { |
79 | public: | 85 | public: |
80 | NetworkAppletControl( OTaskbarApplet* parent, const char* name = 0 ); | 86 | NetworkAppletControl( Opie::Ui::OTaskbarApplet* parent, const char* name = 0 ); |
81 | ~NetworkAppletControl(); | 87 | ~NetworkAppletControl(); |
82 | 88 | ||
@@ -86,5 +92,5 @@ class NetworkAppletControl : public QFrame | |||
86 | virtual void showEvent( QShowEvent* ); | 92 | virtual void showEvent( QShowEvent* ); |
87 | virtual void hideEvent( QHideEvent* ); | 93 | virtual void hideEvent( QHideEvent* ); |
88 | QString guessDevice( ONetworkInterface* iface ); | 94 | QString guessDevice( Opie::Net::ONetworkInterface* iface ); |
89 | void build(); | 95 | void build(); |
90 | 96 | ||
@@ -95,5 +101,5 @@ class NetworkAppletControl : public QFrame | |||
95 | 101 | ||
96 | 102 | ||
97 | class NetworkApplet : public OTaskbarApplet | 103 | class NetworkApplet : public Opie::Ui::OTaskbarApplet |
98 | { | 104 | { |
99 | public: | 105 | public: |
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 | |||
@@ -47,4 +47,5 @@ | |||
47 | 47 | ||
48 | /* XPM */ | 48 | /* XPM */ |
49 | using namespace Opie::Ui; | ||
49 | static char * notes_xpm[] = { | 50 | static char * notes_xpm[] = { |
50 | "16 16 11 1", | 51 | "16 16 11 1", |
@@ -509,6 +510,5 @@ void NotesApplet::paintEvent( QPaintEvent* ) { | |||
509 | } | 510 | } |
510 | 511 | ||
511 | Q_EXPORT_INTERFACE() | 512 | |
512 | { | 513 | EXPORT_OPIE_APPLET_v1( NotesApplet ) |
513 | Q_CREATE_INSTANCE( OTaskbarAppletWrapper<NotesApplet> ); | 514 | |
514 | } | ||
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 | |||
@@ -27,4 +27,5 @@ | |||
27 | #include <opie2/otaskbarapplet.h> | 27 | #include <opie2/otaskbarapplet.h> |
28 | #include <qpe/config.h> | 28 | #include <qpe/config.h> |
29 | #include <qpe/qpeapplication.h> | ||
29 | 30 | ||
30 | /* QT */ | 31 | /* QT */ |
@@ -49,4 +50,6 @@ | |||
49 | #undef MDEBUG | 50 | #undef MDEBUG |
50 | 51 | ||
52 | using namespace Opie::Ui; | ||
53 | using namespace Opie::Net; | ||
51 | WirelessControl::WirelessControl( WirelessApplet *applet, QWidget *parent, const char *name ) | 54 | WirelessControl::WirelessControl( WirelessApplet *applet, QWidget *parent, const char *name ) |
52 | : QFrame( parent, name, WStyle_StaysOnTop | WType_Popup ), applet( applet ) | 55 | : QFrame( parent, name, WStyle_StaysOnTop | WType_Popup ), applet( applet ) |
@@ -551,8 +554,4 @@ int WirelessApplet::position() | |||
551 | } | 554 | } |
552 | 555 | ||
553 | 556 | EXPORT_OPIE_APPLET_v1( WirelessApplet ) | |
554 | Q_EXPORT_INTERFACE() | ||
555 | { | ||
556 | Q_CREATE_INSTANCE( OTaskbarAppletWrapper<WirelessApplet> ); | ||
557 | } | ||
558 | 557 | ||
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 | |||
@@ -20,5 +20,8 @@ | |||
20 | #include <qpixmap.h> | 20 | #include <qpixmap.h> |
21 | 21 | ||
22 | class OWirelessNetworkInterface; | 22 | namespace Opie {namespace Net { |
23 | class OWirelessNetworkInterface; | ||
24 | } | ||
25 | } | ||
23 | class Y; | 26 | class Y; |
24 | class QLabel; | 27 | class QLabel; |
@@ -87,9 +90,9 @@ class WirelessApplet : public QWidget | |||
87 | int timer; | 90 | int timer; |
88 | 91 | ||
89 | OWirelessNetworkInterface* interface; | 92 | Opie::Net::OWirelessNetworkInterface* interface; |
90 | 93 | ||
91 | private: | 94 | private: |
92 | const char** oldpixmap; | 95 | const char** oldpixmap; |
93 | OWirelessNetworkInterface* oldiface; | 96 | Opie::Net::OWirelessNetworkInterface* oldiface; |
94 | int oldqualityH; | 97 | int oldqualityH; |
95 | int oldsignalH; | 98 | int oldsignalH; |
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 | |||
@@ -9,9 +9,10 @@ | |||
9 | #include "zkbcfg.h" | 9 | #include "zkbcfg.h" |
10 | 10 | ||
11 | using namespace Opie::Ui; | ||
11 | ZkbWidget::ZkbWidget(QWidget* parent):QLabel(parent),keymap(0), | 12 | ZkbWidget::ZkbWidget(QWidget* parent):QLabel(parent),keymap(0), |
12 | disabled(Resource::loadPixmap("zkb-disabled")) { | 13 | disabled(Resource::loadPixmap("zkb-disabled")) { |
13 | 14 | ||
14 | labels = new QPopupMenu(); | 15 | labels = new QPopupMenu(); |
15 | connect(labels, SIGNAL(activated(int)), this, | 16 | connect(labels, SIGNAL(activated(int)), this, |
16 | SLOT(labelChanged(int))); | 17 | SLOT(labelChanged(int))); |
17 | 18 | ||
@@ -69,5 +70,5 @@ bool ZkbWidget::loadKeymap() { | |||
69 | int n = 1; | 70 | int n = 1; |
70 | w = 0; | 71 | w = 0; |
71 | for(QStringList::Iterator it = l.begin(); it != l.end(); | 72 | for(QStringList::Iterator it = l.begin(); it != l.end(); |
72 | ++it, n++) { | 73 | ++it, n++) { |
73 | 74 | ||
@@ -156,7 +157,5 @@ void ZkbWidget::reload() { | |||
156 | } | 157 | } |
157 | 158 | ||
158 | Q_EXPORT_INTERFACE() | 159 | EXPORT_OPIE_APPLET_v1( ZkbWidget ) |
159 | { | 160 | |
160 | Q_CREATE_INSTANCE( OTaskbarAppletWrapper<ZkbWidget> ); | ||
161 | } | ||
162 | 161 | ||