author | zecke <zecke> | 2004-03-13 19:51:45 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-03-13 19:51:45 (UTC) |
commit | 6d08277737e22b7a1527124623f3571969073ddf (patch) (unidiff) | |
tree | 4129e674e21df767b31299e873dd44e33a308e1b /libopie2/opieui/otaskbarapplet.cpp | |
parent | 8e28911f7199f4450ac5eef09482069f9b9caea2 (diff) | |
download | opie-6d08277737e22b7a1527124623f3571969073ddf.zip opie-6d08277737e22b7a1527124623f3571969073ddf.tar.gz opie-6d08277737e22b7a1527124623f3571969073ddf.tar.bz2 |
Move XML class to internal PIM
Add namespaces!!!
Opie::Core and Opie::Core::Private
Opie::Net and Opie::Net::Private
Opie::Ui and Opie::Ui::Private
Opie::MM and Opie::MM::Private
Opie::DB and Opie::DB::Private
PIM classes are not yet converted because we will do other work
on it as well
Diffstat (limited to 'libopie2/opieui/otaskbarapplet.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opieui/otaskbarapplet.cpp | 52 |
1 files changed, 51 insertions, 1 deletions
diff --git a/libopie2/opieui/otaskbarapplet.cpp b/libopie2/opieui/otaskbarapplet.cpp index a67356d..b5268f0 100644 --- a/libopie2/opieui/otaskbarapplet.cpp +++ b/libopie2/opieui/otaskbarapplet.cpp | |||
@@ -7,26 +7,76 @@ | |||
7 | .>+-= | 7 | .>+-= |
8 | _;:, .> :=|. This program is free software; you can | 8 | _;:, .> :=|. This program is free software; you can |
9 | .> <`_, > . <= redistribute it and/or modify it under | 9 | .> <`_, > . <= redistribute it and/or modify it under |
10 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | 10 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
11 | .="- .-=="i, .._ License as published by the Free Software | 11 | .="- .-=="i, .._ License as published by the Free Software |
12 | - . .-<_> .<> Foundation; either version 2 of the License, | 12 | - . .-<_> .<> Foundation; either version 2 of the License, |
13 | ._= =} : or (at your option) any later version. | 13 | ._= =} : or (at your option) any later version. |
14 | .%`+i> _;_. | 14 | .%`+i> _;_. |
15 | .i_,=:_. -<s. This program is distributed in the hope that | 15 | .i_,=:_. -<s. This program is distributed in the hope that |
16 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 16 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
17 | : .. .:, . . . without even the implied warranty of | 17 | : .. .:, . . . without even the implied warranty of |
18 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 18 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
19 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 19 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
20 | ..}^=.= = ; Library General Public License for more | 20 | ..}^=.= = ; Library General Public License for more |
21 | ++= -. .` .: details. | 21 | ++= -. .` .: details. |
22 | : = ...= . :.=- | 22 | : = ...= . :.=- |
23 | -. .:....=;==+<; You should have received a copy of the GNU | 23 | -. .:....=;==+<; You should have received a copy of the GNU |
24 | -_. . . )=. = Library General Public License along with | 24 | -_. . . )=. = Library General Public License along with |
25 | -- :-=` this library; see the file COPYING.LIB. | 25 | -- :-=` this library; see the file COPYING.LIB. |
26 | If not, write to the Free Software Foundation, | 26 | If not, write to the Free Software Foundation, |
27 | Inc., 59 Temple Place - Suite 330, | 27 | Inc., 59 Temple Place - Suite 330, |
28 | Boston, MA 02111-1307, USA. | 28 | Boston, MA 02111-1307, USA. |
29 | 29 | ||
30 | */ | 30 | */ |
31 | #include <opie2/otaskbarapplet.h> | ||
32 | |||
33 | #include <qpe/qpeapplication.h> | ||
34 | #include <qframe.h> | ||
35 | |||
36 | using namespace Opie::Ui; | ||
37 | |||
38 | |||
39 | /** | ||
40 | * \todo no example yet!!! | ||
41 | * If you want to implement an Applet for the Opie Taskbar | ||
42 | * use this interface. | ||
43 | * The only specail thing about applets is that you need to build | ||
44 | * it as plugin/library and do EXPORT_OPIE_APPLET_v1( YourApplet ) | ||
45 | * at the bottom of your application. This takes care of | ||
46 | * the activation and implementing the TaskbarAppletInterface. | ||
47 | * You also need to add a static int position() functions to your | ||
48 | * application. | ||
49 | * \code | ||
50 | * class MyApplet : public OTaskBarApplet { | ||
51 | * public: | ||
52 | * static int position() { return 3: } | ||
53 | * void doStuff() { | ||
54 | * popup( myWidget ); | ||
55 | * } | ||
56 | * }; | ||
57 | * EXPORT_OPIE_APPLET_v1( MyApplet ) | ||
58 | * \endcode | ||
59 | * | ||
60 | * @author Michael Lauer | ||
61 | * @version 0.5 | ||
62 | * @see TaskbarAppletInterface | ||
63 | */ | ||
64 | OTaskbarApplet::OTaskbarApplet( QWidget* parent, const char* name ) | ||
65 | :QWidget( parent, name ){ | ||
66 | setFixedHeight( 18 ); | ||
67 | setFixedWidth( 14 ); | ||
68 | } | ||
69 | |||
70 | OTaskbarApplet::~OTaskbarApplet(){ | ||
71 | } | ||
72 | |||
73 | void OTaskbarApplet::popup( QWidget* widget ){ | ||
74 | QPoint curPos = mapToGlobal( QPoint( 0, 0 ) ); | ||
75 | int w = widget->sizeHint().width(); | ||
76 | int x = curPos.x() - (w/2 ); | ||
77 | if ( (x+w) > QPEApplication::desktop()->width() ) | ||
78 | x = QPEApplication::desktop()->width()-w; | ||
79 | widget->move( x, curPos.y()-widget->sizeHint().height() ); | ||
80 | widget->show(); | ||
81 | } | ||
31 | 82 | ||
32 | // Empty on purpose until we shipped Opie 1.0 (see otaskbarapplet.h for explanation) | ||