Diffstat (limited to 'noncore/applets/networkapplet/networkapplet.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/applets/networkapplet/networkapplet.cpp | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/noncore/applets/networkapplet/networkapplet.cpp b/noncore/applets/networkapplet/networkapplet.cpp index 4e658da..9a08568 100644 --- a/noncore/applets/networkapplet/networkapplet.cpp +++ b/noncore/applets/networkapplet/networkapplet.cpp | |||
@@ -26,26 +26,31 @@ | |||
26 | Inc., 59 Temple Place - Suite 330, | 26 | Inc., 59 Temple Place - Suite 330, |
27 | Boston, MA 02111-1307, USA. | 27 | Boston, MA 02111-1307, USA. |
28 | 28 | ||
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include "networkapplet.h" | 31 | #include "networkapplet.h" |
32 | |||
33 | /* OPIE */ | ||
34 | #include <opie2/odebug.h> | ||
35 | #include <opie2/onetwork.h> | ||
32 | #include <opie2/otaskbarapplet.h> | 36 | #include <opie2/otaskbarapplet.h> |
37 | #include <qpe/applnk.h> | ||
33 | #include <qpe/qlibrary.h> | 38 | #include <qpe/qlibrary.h> |
34 | #include <qpe/resource.h> | 39 | #include <qpe/resource.h> |
35 | #include <qpainter.h> | 40 | #include <qpainter.h> |
36 | #include <opie2/odebug.h> | ||
37 | #include <opie2/onetwork.h> | ||
38 | 41 | ||
39 | #include <qpushbutton.h> | 42 | /* QT */ |
43 | #include <qhostaddress.h> | ||
44 | #include <qimage.h> | ||
40 | #include <qlabel.h> | 45 | #include <qlabel.h> |
41 | #include <qlayout.h> | 46 | #include <qlayout.h> |
42 | #include <qlineedit.h> | 47 | #include <qlineedit.h> |
43 | #include <qtoolbutton.h> | ||
44 | #include <qhostaddress.h> | ||
45 | #include <qobjectlist.h> | 48 | #include <qobjectlist.h> |
49 | #include <qpushbutton.h> | ||
50 | #include <qtoolbutton.h> | ||
46 | 51 | ||
47 | #include <assert.h> | 52 | #include <assert.h> |
48 | 53 | ||
49 | IfaceUpDownButton::IfaceUpDownButton( QWidget* parent, const char* name ) | 54 | IfaceUpDownButton::IfaceUpDownButton( QWidget* parent, const char* name ) |
50 | :QToolButton( parent, name ) | 55 | :QToolButton( parent, name ) |
51 | { | 56 | { |
@@ -207,13 +212,16 @@ QSize NetworkAppletControl::sizeHint() const | |||
207 | } | 212 | } |
208 | 213 | ||
209 | 214 | ||
210 | NetworkApplet::NetworkApplet( QWidget *parent, const char *name ) | 215 | NetworkApplet::NetworkApplet( QWidget *parent, const char *name ) |
211 | :OTaskbarApplet( parent, name ) | 216 | :OTaskbarApplet( parent, name ) |
212 | { | 217 | { |
213 | _control = new NetworkAppletControl( this, "control" ); | 218 | setFixedHeight( AppLnk::smallIconSize() ); |
219 | setFixedWidth( AppLnk::smallIconSize() ); | ||
220 | _pixmap.convertFromImage( Resource::loadImage( "networkapplet/network" ).smoothScale( height(), width() ) ); | ||
221 | _control = new NetworkAppletControl( this, "control" ); | ||
214 | } | 222 | } |
215 | 223 | ||
216 | 224 | ||
217 | NetworkApplet::~NetworkApplet() | 225 | NetworkApplet::~NetworkApplet() |
218 | { | 226 | { |
219 | } | 227 | } |
@@ -225,13 +233,13 @@ int NetworkApplet::position() | |||
225 | } | 233 | } |
226 | 234 | ||
227 | 235 | ||
228 | void NetworkApplet::paintEvent( QPaintEvent* ) | 236 | void NetworkApplet::paintEvent( QPaintEvent* ) |
229 | { | 237 | { |
230 | QPainter p(this); | 238 | QPainter p(this); |
231 | p.drawPixmap(0, 2, Resource::loadPixmap( "networkapplet/network" ) ); | 239 | p.drawPixmap(0, 2, _pixmap ); |
232 | } | 240 | } |
233 | 241 | ||
234 | 242 | ||
235 | void NetworkApplet::mousePressEvent( QMouseEvent* ) | 243 | void NetworkApplet::mousePressEvent( QMouseEvent* ) |
236 | { | 244 | { |
237 | if ( !_control->isVisible() ) | 245 | if ( !_control->isVisible() ) |