summaryrefslogtreecommitdiff
path: root/core/applets/screenshotapplet/screenshot.cpp
authormickeyl <mickeyl>2004-03-01 19:19:37 (UTC)
committer mickeyl <mickeyl>2004-03-01 19:19:37 (UTC)
commitddc3d749af5f7afebf69488b79641771fe246b5b (patch) (side-by-side diff)
tree8ea8614906c568e4677493ef09040724d60dd2d4 /core/applets/screenshotapplet/screenshot.cpp
parentfb0981f47e529f9d1dd77fa005ffa3c3ecedff67 (diff)
downloadopie-ddc3d749af5f7afebf69488b79641771fe246b5b.zip
opie-ddc3d749af5f7afebf69488b79641771fe246b5b.tar.gz
opie-ddc3d749af5f7afebf69488b79641771fe246b5b.tar.bz2
remove duplicated boiler plate code in favour of the OTaskbarApplet template
Diffstat (limited to 'core/applets/screenshotapplet/screenshot.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/screenshotapplet/screenshot.cpp25
1 files changed, 19 insertions, 6 deletions
diff --git a/core/applets/screenshotapplet/screenshot.cpp b/core/applets/screenshotapplet/screenshot.cpp
index 56a031c..5d6bce4 100644
--- a/core/applets/screenshotapplet/screenshot.cpp
+++ b/core/applets/screenshotapplet/screenshot.cpp
@@ -15,15 +15,12 @@
#include "screenshot.h"
#include "inputDialog.h"
-#include <stdlib.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <netdb.h>
-#include <unistd.h>
-
+/* OPIE */
+#include <opie2/otaskbarapplet.h>
#include <qpe/qpeapplication.h>
#include <qpe/applnk.h>
+/* QT */
#include <qlineedit.h>
#include <qdir.h>
#include <qlabel.h>
@@ -34,6 +31,12 @@
#include <qcheckbox.h>
#include <qmessagebox.h>
+/* STD */
+#include <stdlib.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <netdb.h>
+#include <unistd.h>
/* XPM */
static char * snapshot_xpm[] = {
@@ -497,6 +500,11 @@ ScreenshotApplet::~ScreenshotApplet()
{
}
+int ScreenshotApplet::position()
+{
+ return 6;
+}
+
void ScreenshotApplet::mousePressEvent( QMouseEvent *)
{
ScreenshotControl *sc = new ScreenshotControl ( );
@@ -528,3 +536,8 @@ void ScreenshotApplet::paintEvent( QPaintEvent* )
p.drawPixmap( 0,0, m_icon );
}
+Q_EXPORT_INTERFACE()
+{
+ Q_CREATE_INSTANCE( OTaskbarAppletWrapper<ScreenshotApplet> );
+}
+