author | mickeyl <mickeyl> | 2004-04-04 13:54:40 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-04-04 13:54:40 (UTC) |
commit | 16cf79e90b5217f8d4bfce2a0fa817ae4b73db36 (patch) (unidiff) | |
tree | 0701eae15aa606a0211a2fccfde0eafdac69357c /noncore/applets/networkapplet | |
parent | 8d2d2664e5f544b8292806e617deb7a0e4170dc0 (diff) | |
download | opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.zip opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.tar.gz opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.tar.bz2 |
convert to Opie Debugging Framework
-rw-r--r-- | noncore/applets/networkapplet/networkapplet.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/noncore/applets/networkapplet/networkapplet.cpp b/noncore/applets/networkapplet/networkapplet.cpp index 5eb5ad2..534a8d0 100644 --- a/noncore/applets/networkapplet/networkapplet.cpp +++ b/noncore/applets/networkapplet/networkapplet.cpp | |||
@@ -35,19 +35,21 @@ | |||
35 | #include <opie2/onetwork.h> | 35 | #include <opie2/onetwork.h> |
36 | #include <opie2/otaskbarapplet.h> | 36 | #include <opie2/otaskbarapplet.h> |
37 | #include <qpe/applnk.h> | 37 | #include <qpe/applnk.h> |
38 | #include <qpe/resource.h> | 38 | #include <qpe/resource.h> |
39 | #include <qpainter.h> | 39 | using namespace Opie::Core; |
40 | using namespace Opie::Ui; | ||
41 | using namespace Opie::Net; | ||
40 | 42 | ||
41 | /* QT */ | 43 | /* QT */ |
44 | #include <qpainter.h> | ||
42 | #include <qlabel.h> | 45 | #include <qlabel.h> |
43 | #include <qlayout.h> | 46 | #include <qlayout.h> |
44 | #include <qobjectlist.h> | 47 | #include <qobjectlist.h> |
45 | 48 | ||
49 | /* STD */ | ||
46 | #include <assert.h> | 50 | #include <assert.h> |
47 | 51 | ||
48 | using namespace Opie::Ui; | ||
49 | using namespace Opie::Net; | ||
50 | IfaceUpDownButton::IfaceUpDownButton( QWidget* parent, const char* name ) | 52 | IfaceUpDownButton::IfaceUpDownButton( QWidget* parent, const char* name ) |
51 | :QToolButton( parent, name ) | 53 | :QToolButton( parent, name ) |
52 | { | 54 | { |
53 | _iface = ONetwork::instance()->interface( name ); | 55 | _iface = ONetwork::instance()->interface( name ); |
@@ -166,17 +168,17 @@ QString NetworkAppletControl::guessDevice( ONetworkInterface* iface ) | |||
166 | 168 | ||
167 | 169 | ||
168 | void NetworkAppletControl::showEvent( QShowEvent* e ) | 170 | void NetworkAppletControl::showEvent( QShowEvent* e ) |
169 | { | 171 | { |
170 | qDebug( "showEvent" ); | 172 | odebug << "showEvent" << oendl; |
171 | build(); | 173 | build(); |
172 | QWidget::showEvent( e ); | 174 | QWidget::showEvent( e ); |
173 | } | 175 | } |
174 | 176 | ||
175 | 177 | ||
176 | void NetworkAppletControl::hideEvent( QHideEvent* e ) | 178 | void NetworkAppletControl::hideEvent( QHideEvent* e ) |
177 | { | 179 | { |
178 | qDebug( "hideEvent" ); | 180 | odebug << "hideEvent" << oendl; |
179 | QWidget::hideEvent( e ); | 181 | QWidget::hideEvent( e ); |
180 | 182 | ||
181 | delete l; | 183 | delete l; |
182 | 184 | ||
@@ -191,9 +193,9 @@ void NetworkAppletControl::hideEvent( QHideEvent* e ) | |||
191 | } | 193 | } |
192 | 194 | ||
193 | list = const_cast<QObjectList*>( children() ); | 195 | list = const_cast<QObjectList*>( children() ); |
194 | if ( list ) | 196 | if ( list ) |
195 | qWarning( "D'oh! We still have %d children...", list->count() ); | 197 | owarn << "D'oh! We still have " << list->count() << " children..." << oendl; |
196 | 198 | ||
197 | // renew layout | 199 | // renew layout |
198 | l = new QVBoxLayout( this, 4, 2 ); | 200 | l = new QVBoxLayout( this, 4, 2 ); |
199 | resize( 0, 0 ); | 201 | resize( 0, 0 ); |
@@ -202,9 +204,9 @@ void NetworkAppletControl::hideEvent( QHideEvent* e ) | |||
202 | 204 | ||
203 | QSize NetworkAppletControl::sizeHint() const | 205 | QSize NetworkAppletControl::sizeHint() const |
204 | { | 206 | { |
205 | ONetwork::instance()->synchronize(); // rebuild interface database | 207 | ONetwork::instance()->synchronize(); // rebuild interface database |
206 | qDebug( "sizeHint (#ifaces=%d)", ONetwork::instance()->count() ); | 208 | odebug << "sizeHint (#ifaces=" << ONetwork::instance()->count() << ")" << oendl; |
207 | return QSize( 14+35+105+14 + 8, ONetwork::instance()->count() * 26 ); | 209 | return QSize( 14+35+105+14 + 8, ONetwork::instance()->count() * 26 ); |
208 | } | 210 | } |
209 | 211 | ||
210 | 212 | ||