summaryrefslogtreecommitdiff
path: root/core
Side-by-side diff
Diffstat (limited to 'core') (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/screenshotapplet/screenshot.cpp27
-rw-r--r--core/applets/screenshotapplet/screenshot.h11
2 files changed, 31 insertions, 7 deletions
diff --git a/core/applets/screenshotapplet/screenshot.cpp b/core/applets/screenshotapplet/screenshot.cpp
index 938ea0c..042f390 100644
--- a/core/applets/screenshotapplet/screenshot.cpp
+++ b/core/applets/screenshotapplet/screenshot.cpp
@@ -22,4 +22,4 @@
#include <qpe/applnk.h>
-using namespace Opie::Core;
-using namespace Opie::Ui;
+#include <qpe/qcopenvelope_qws.h>
+
@@ -256,2 +256,6 @@ static char * snapshot_xpm[] = {
+
+using namespace Opie::Core;
+using namespace Opie::Ui;
+
static const char *SCAP_hostname = "www.handhelds.org";
@@ -294,2 +298,6 @@ ScreenshotControl::ScreenshotControl( QWidget *parent, const char *name )
+ QPushButton* drawPadButton = new QPushButton( tr("Opie drawpad"), this, "DrawPadButton" );
+ drawPadButton->setFocusPolicy( QWidget::TabFocus );
+ hbox->addWidget( drawPadButton );
+
scapButton = new QPushButton( tr( "Scap" ), this, "ScapButton" );
@@ -307,2 +315,3 @@ ScreenshotControl::ScreenshotControl( QWidget *parent, const char *name )
connect ( scapButton, SIGNAL( clicked()), SLOT( slotScap()));
+ connect ( drawPadButton, SIGNAL(clicked()), SLOT(slotDrawpad()) );
}
@@ -352,2 +361,11 @@ void ScreenshotControl::slotScap()
+void ScreenshotControl::slotDrawpad()
+{
+ buttonPushed = 3;
+ hide();
+ if ( delaySpin->value() )
+ grabTimer->start( delaySpin->value()*1000, true );
+ else
+ show();
+}
@@ -415,2 +433,7 @@ void ScreenshotControl::performGrab()
savePixmap();
+ }else if ( buttonPushed == 3 ) {
+ grabTimer->stop();
+ show();
+ QCopEnvelope env("QPE/Application/drawpad", "importPixmap(QPixmap)" );
+ env << snapshot;
} else {
diff --git a/core/applets/screenshotapplet/screenshot.h b/core/applets/screenshotapplet/screenshot.h
index b753583..e7b6040 100644
--- a/core/applets/screenshotapplet/screenshot.h
+++ b/core/applets/screenshotapplet/screenshot.h
@@ -14,4 +14,4 @@
-#ifndef __SCREENSHOT_APPLET_H__
-#define __SCREENSHOT_APPLET_H__
+#ifndef SCREENSHOT_APPLET_H__
+#define SCREENSHOT_APPLET_H__
@@ -49,3 +49,4 @@ private slots:
void slotGrab();
- void slotScap();
+ void slotScap();
+ void slotDrawpad();
void savePixmap();
@@ -59,3 +60,3 @@ public:
static int position();
-
+
protected:
@@ -63,3 +64,3 @@ protected:
void paintEvent( QPaintEvent* );
-
+
private: