author | zecke <zecke> | 2004-03-13 19:51:45 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-03-13 19:51:45 (UTC) |
commit | 6d08277737e22b7a1527124623f3571969073ddf (patch) (side-by-side diff) | |
tree | 4129e674e21df767b31299e873dd44e33a308e1b /libopie2/opieui/otaskbarapplet.h | |
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.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opieui/otaskbarapplet.h | 49 |
1 files changed, 24 insertions, 25 deletions
diff --git a/libopie2/opieui/otaskbarapplet.h b/libopie2/opieui/otaskbarapplet.h index 074367f..0c85ee7 100644 --- a/libopie2/opieui/otaskbarapplet.h +++ b/libopie2/opieui/otaskbarapplet.h @@ -28,21 +28,30 @@ Boston, MA 02111-1307, USA. */ #ifndef OTASKBARAPPLET_H #define OTASKBARAPPLET_H #include <qpe/taskbarappletinterface.h> +#include <qpe/qcom.h> +#include <qwidget.h> + +class QMouseEvent; + +namespace Opie { +namespace Ui { +namespace Private { /*====================================================================================== * OTaskbarAppletWrapper *======================================================================================*/ +class OTaskbarAppletWrapperPrivate; template<class T> class OTaskbarAppletWrapper : public TaskbarAppletInterface { public: OTaskbarAppletWrapper():_applet( 0 ) { } virtual ~OTaskbarAppletWrapper() @@ -75,56 +84,46 @@ template<class T> class OTaskbarAppletWrapper : public TaskbarAppletInterface virtual int position() const { return T::position(); } private: T* _applet; + OTaskbarAppletWrapperPrivate *d; }; -#include <qframe.h> -#include <qwidget.h> -#include <qpe/qpeapplication.h> - -class QMouseEvent; - +} /*====================================================================================== * OTaskbarApplet *======================================================================================*/ // Must be inline until after we shipped Opie 1.0 // Having OTaskBarApplet reside in libopieui2 is not possible // until we link the launcher binary against libopieui2 - // otherwise the necessary symbols are not present, when // the dynamic loader [dlopen] tries to resolve an applet which // inherits OTaskbarApplet class OTaskbarApplet : public QWidget { public: - OTaskbarApplet( QWidget* parent, const char* name = 0 ):QWidget( parent, name ) - { - setFixedHeight( 18 ); - setFixedWidth( 14 ); - } - - virtual ~OTaskbarApplet() - { - } + OTaskbarApplet( QWidget* parent, const char* name = 0 ); + virtual ~OTaskbarApplet(); protected: - virtual void popup( QWidget* widget ) - { - QPoint curPos = mapToGlobal( QPoint( 0, 0 ) ); - int w = widget->sizeHint().width(); - int x = curPos.x() - (w/2 ); - if ( (x+w) > QPEApplication::desktop()->width() ) - x = QPEApplication::desktop()->width()-w; - widget->move( x, curPos.y()-widget->sizeHint().height() ); - widget->show(); - } + virtual void popup( QWidget* widget ); +private: + class Private; + Private *d; }; +} +} + +#define EXPORT_OPIE_APPLET_v1( AppLet ) \ + Q_EXPORT_INTERFACE() { \ + Q_CREATE_INSTANCE( Opie::Ui::Private::OTaskbarAppletWrapper<AppLet> ) \ + } #endif |