summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/applets/pyquicklaunch/.cvsignore6
-rw-r--r--noncore/applets/pyquicklaunch/config.in4
-rw-r--r--noncore/applets/pyquicklaunch/pyquicklaunch.cpp109
-rw-r--r--noncore/applets/pyquicklaunch/pyquicklaunch.h57
-rw-r--r--noncore/applets/pyquicklaunch/pyquicklaunch.pro13
-rw-r--r--packages1
6 files changed, 190 insertions, 0 deletions
diff --git a/noncore/applets/pyquicklaunch/.cvsignore b/noncore/applets/pyquicklaunch/.cvsignore
new file mode 100644
index 0000000..0f79c04
--- a/dev/null
+++ b/noncore/applets/pyquicklaunch/.cvsignore
@@ -0,0 +1,6 @@
1Makefile*
2advancedconfigbase.cpp
3advancedconfigbase.h
4moc_*
5.moc
6.obj
diff --git a/noncore/applets/pyquicklaunch/config.in b/noncore/applets/pyquicklaunch/config.in
new file mode 100644
index 0000000..f4828d3
--- a/dev/null
+++ b/noncore/applets/pyquicklaunch/config.in
@@ -0,0 +1,4 @@
1 config WIRELESSAPPLET
2 boolean "opie-wirelessapplet (view wireless signal strength, and renew IP on AP change)"
3 default "y"
4 depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && LIBOPIE2NET
diff --git a/noncore/applets/pyquicklaunch/pyquicklaunch.cpp b/noncore/applets/pyquicklaunch/pyquicklaunch.cpp
new file mode 100644
index 0000000..2ee8e17
--- a/dev/null
+++ b/noncore/applets/pyquicklaunch/pyquicklaunch.cpp
@@ -0,0 +1,109 @@
1/**********************************************************************
2** Copyright (C) 2004 Michael 'Mickey' Lauer <mickey@vanille.de>
3** All rights reserved.
4**
5** This file may be distributed and/or modified under the terms of the
6** GNU General Public License version 2 as published by the Free Software
7** Foundation and appearing in the file LICENSE.GPL included in the
8** packaging of this file.
9**
10** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
11** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
12**
13**********************************************************************/
14
15#include "pyquicklaunch.h"
16
17/* OPIE */
18#include <opie2/odebug.h>
19#include <opie2/otaskbarapplet.h>
20#include <qpe/qpeapplication.h>
21#include <qpe/config.h>
22using namespace Opie::Core;
23
24/* QT */
25#include <qpainter.h>
26#include <qframe.h>
27
28PyQuicklaunchControl::PyQuicklaunchControl( PyQuicklaunchApplet *applet, QWidget *parent, const char *name )
29 : QFrame( parent, name, WStyle_StaysOnTop | WType_Popup ), applet( applet )
30{
31
32 setFrameStyle( QFrame::PopupPanel | QFrame::Raised );
33 setFixedSize( sizeHint() );
34 setFocusPolicy( QWidget::NoFocus );
35}
36
37
38void PyQuicklaunchControl::show( bool )
39{
40 QPoint curPos = applet->mapToGlobal( QPoint ( 0, 0 ) );
41
42 int w = sizeHint().width();
43 int x = curPos.x() - ( w / 2 );
44
45 if ( ( x + w ) > QPEApplication::desktop() ->width() )
46 x = QPEApplication::desktop ( ) -> width ( ) - w;
47
48 move( x, curPos.y () - sizeHint().height () );
49 QFrame::show();
50}
51
52void PyQuicklaunchControl::readConfig()
53{
54 Config cfg( "qpe" );
55 cfg.setGroup( "PyQuicklaunch" );
56
57 // ...
58}
59
60void PyQuicklaunchControl::writeConfigEntry( const char *entry, int val )
61{
62 Config cfg( "qpe" );
63 cfg.setGroup( "PyQuicklaunch" );
64 cfg.writeEntry( entry, val );
65}
66
67//===========================================================================
68
69PyQuicklaunchApplet::PyQuicklaunchApplet( QWidget *parent, const char *name )
70 : QWidget( parent, name )
71{
72 setFixedHeight( 18 );
73 setFixedWidth( 14 );
74 status = new PyQuicklaunchControl( this, this, "Python Quicklaunch Status" );
75}
76
77
78PyQuicklaunchApplet::~PyQuicklaunchApplet()
79{}
80
81
82void PyQuicklaunchApplet::timerEvent( QTimerEvent* )
83{
84 // FIXME
85}
86
87void PyQuicklaunchApplet::mousePressEvent( QMouseEvent * )
88{
89 status->isVisible() ? status->hide() : status->show( true );
90}
91
92void PyQuicklaunchApplet::paintEvent( QPaintEvent* )
93{
94 QPainter p( this );
95 int h = height();
96 int w = width();
97
98 // FIXME
99
100}
101
102
103int PyQuicklaunchApplet::position()
104{
105 return 6;
106}
107
108EXPORT_OPIE_APPLET_v1( PyQuicklaunchApplet )
109
diff --git a/noncore/applets/pyquicklaunch/pyquicklaunch.h b/noncore/applets/pyquicklaunch/pyquicklaunch.h
new file mode 100644
index 0000000..e99f780
--- a/dev/null
+++ b/noncore/applets/pyquicklaunch/pyquicklaunch.h
@@ -0,0 +1,57 @@
1/**********************************************************************
2** Copyright (C) 2004 Michael 'Mickey' Lauer <mickey@Vanille.de>
3** All rights reserved.
4**
5** This file may be distributed and/or modified under the terms of the
6** GNU General Public License version 2 as published by the Free Software
7** Foundation and appearing in the file LICENSE.GPL included in the
8** packaging of this file.
9**
10** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
11** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
12**
13**********************************************************************/
14
15#ifndef PYQUICKLAUNCHAPPLET_H
16#define PYQUICKLAUNCHAPPLET_H
17
18#include <qwidget.h>
19#include <qframe.h>
20#include <qpixmap.h>
21
22class PyQuicklaunchApplet;
23
24class PyQuicklaunchControl : public QFrame
25{
26 Q_OBJECT
27 public:
28 PyQuicklaunchControl( PyQuicklaunchApplet* icon, QWidget *parent=0, const char *name=0 );
29 void show( bool );
30
31 void readConfig();
32 void writeConfigEntry( const char* entry, int val );
33
34 public slots:
35
36 private:
37 PyQuicklaunchApplet* applet;
38};
39
40class PyQuicklaunchApplet : public QWidget
41{
42 Q_OBJECT
43 public:
44 PyQuicklaunchApplet( QWidget *parent = 0, const char *name=0 );
45 ~PyQuicklaunchApplet();
46 static int position();
47 PyQuicklaunchControl* status;
48
49 virtual void timerEvent( QTimerEvent* );
50
51 protected:
52 virtual void mousePressEvent( QMouseEvent * );
53 virtual void paintEvent( QPaintEvent* );
54};
55
56#endif // PYQUICKLAUNCHAPPLET_H
57
diff --git a/noncore/applets/pyquicklaunch/pyquicklaunch.pro b/noncore/applets/pyquicklaunch/pyquicklaunch.pro
new file mode 100644
index 0000000..901781e
--- a/dev/null
+++ b/noncore/applets/pyquicklaunch/pyquicklaunch.pro
@@ -0,0 +1,13 @@
1TEMPLATE = lib
2CONFIG += qt plugin warn_on
3HEADERS = pyquicklaunch.h
4SOURCES = pyquicklaunch.cpp
5INTERFACES =
6TARGET = pyquicklaunch
7DESTDIR = $(OPIEDIR)/plugins/applets
8INCLUDEPATH += $(OPIEDIR)/include
9DEPENDPATH += $(OPIEDIR)/include
10LIBS += -lqpe -lopiecore2
11VERSION = 0.0.1
12
13include ( $(OPIEDIR)/include.pro )
diff --git a/packages b/packages
index 7cc36f0..7f54e4f 100644
--- a/packages
+++ b/packages
@@ -140,16 +140,17 @@ CONFIG_OPIETOOTH-MANAGER noncore/net/opietooth/manager manager.pro
140 CONFIG_OPIE-WRITE noncore/apps/opie-writeopie-write.pro 140 CONFIG_OPIE-WRITE noncore/apps/opie-writeopie-write.pro
141 CONFIG_OSEARCH core/pim/osearchosearch.pro 141 CONFIG_OSEARCH core/pim/osearchosearch.pro
142 CONFIG_OXYGEN noncore/apps/oxygenoxygen.pro 142 CONFIG_OXYGEN noncore/apps/oxygenoxygen.pro
143 CONFIG_PACKAGEMANAGER noncore/settings/packagemanagerpackagemanager.pro 143 CONFIG_PACKAGEMANAGER noncore/settings/packagemanagerpackagemanager.pro
144 CONFIG_PARASHOOT noncore/games/parashootparashoot.pro 144 CONFIG_PARASHOOT noncore/games/parashootparashoot.pro
145 CONFIG_PICKBOARD inputmethods/pickboardpickboard.pro 145 CONFIG_PICKBOARD inputmethods/pickboardpickboard.pro
146 CONFIG_POWERCHORD noncore/multimedia/powerchordpowerchord.pro 146 CONFIG_POWERCHORD noncore/multimedia/powerchordpowerchord.pro
147CONFIG_PPP noncore/settings/networksettings/ppp ppp.pro 147CONFIG_PPP noncore/settings/networksettings/ppp ppp.pro
148 CONFIG_PYQUICKLAUNCH noncore/applets/pyquicklaunchpyquicklaunch.pro
148 CONFIG_QASHMONEY noncore/apps/qashmoneyqashmoney.pro 149 CONFIG_QASHMONEY noncore/apps/qashmoneyqashmoney.pro
149 CONFIG_QASTEROIDS noncore/games/qasteroidsqasteroids.pro 150 CONFIG_QASTEROIDS noncore/games/qasteroidsqasteroids.pro
150 CONFIG_QCOP core/apps/qcopqcop.pro 151 CONFIG_QCOP core/apps/qcopqcop.pro
151 CONFIG_QPDF noncore/unsupported/qpdfqpdf.pro 152 CONFIG_QPDF noncore/unsupported/qpdfqpdf.pro
152CONFIG_QUICKLAUNCHER core/tools/quicklauncher quicklauncher.pro 153CONFIG_QUICKLAUNCHER core/tools/quicklauncher quicklauncher.pro
153 CONFIG_QWS core/qwsqws.pro 154 CONFIG_QWS core/qwsqws.pro
154 CONFIG_REMOTE noncore/tools/remoteremote.pro 155 CONFIG_REMOTE noncore/tools/remoteremote.pro
155 CONFIG_RESTARTAPPLET2 core/applets/restartapplet2restartapplet2.pro 156 CONFIG_RESTARTAPPLET2 core/applets/restartapplet2restartapplet2.pro