-rw-r--r-- | core/applets/screenshotapplet/screenshot.cpp | 27 | ||||
-rw-r--r-- | core/applets/screenshotapplet/screenshot.h | 11 |
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 @@ | |||
22 | #include <qpe/applnk.h> | 22 | #include <qpe/applnk.h> |
23 | using namespace Opie::Core; | 23 | #include <qpe/qcopenvelope_qws.h> |
24 | using namespace Opie::Ui; | 24 | |
25 | 25 | ||
@@ -256,2 +256,6 @@ static char * snapshot_xpm[] = { | |||
256 | 256 | ||
257 | |||
258 | using namespace Opie::Core; | ||
259 | using namespace Opie::Ui; | ||
260 | |||
257 | static const char *SCAP_hostname = "www.handhelds.org"; | 261 | static const char *SCAP_hostname = "www.handhelds.org"; |
@@ -294,2 +298,6 @@ ScreenshotControl::ScreenshotControl( QWidget *parent, const char *name ) | |||
294 | 298 | ||
299 | QPushButton* drawPadButton = new QPushButton( tr("Opie drawpad"), this, "DrawPadButton" ); | ||
300 | drawPadButton->setFocusPolicy( QWidget::TabFocus ); | ||
301 | hbox->addWidget( drawPadButton ); | ||
302 | |||
295 | scapButton = new QPushButton( tr( "Scap" ), this, "ScapButton" ); | 303 | scapButton = new QPushButton( tr( "Scap" ), this, "ScapButton" ); |
@@ -307,2 +315,3 @@ ScreenshotControl::ScreenshotControl( QWidget *parent, const char *name ) | |||
307 | connect ( scapButton, SIGNAL( clicked()), SLOT( slotScap())); | 315 | connect ( scapButton, SIGNAL( clicked()), SLOT( slotScap())); |
316 | connect ( drawPadButton, SIGNAL(clicked()), SLOT(slotDrawpad()) ); | ||
308 | } | 317 | } |
@@ -352,2 +361,11 @@ void ScreenshotControl::slotScap() | |||
352 | 361 | ||
362 | void ScreenshotControl::slotDrawpad() | ||
363 | { | ||
364 | buttonPushed = 3; | ||
365 | hide(); | ||
366 | if ( delaySpin->value() ) | ||
367 | grabTimer->start( delaySpin->value()*1000, true ); | ||
368 | else | ||
369 | show(); | ||
370 | } | ||
353 | 371 | ||
@@ -415,2 +433,7 @@ void ScreenshotControl::performGrab() | |||
415 | savePixmap(); | 433 | savePixmap(); |
434 | }else if ( buttonPushed == 3 ) { | ||
435 | grabTimer->stop(); | ||
436 | show(); | ||
437 | QCopEnvelope env("QPE/Application/drawpad", "importPixmap(QPixmap)" ); | ||
438 | env << snapshot; | ||
416 | } else { | 439 | } 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 @@ | |||
14 | 14 | ||
15 | #ifndef __SCREENSHOT_APPLET_H__ | 15 | #ifndef SCREENSHOT_APPLET_H__ |
16 | #define __SCREENSHOT_APPLET_H__ | 16 | #define SCREENSHOT_APPLET_H__ |
17 | 17 | ||
@@ -49,3 +49,4 @@ private slots: | |||
49 | void slotGrab(); | 49 | void slotGrab(); |
50 | void slotScap(); | 50 | void slotScap(); |
51 | void slotDrawpad(); | ||
51 | void savePixmap(); | 52 | void savePixmap(); |
@@ -59,3 +60,3 @@ public: | |||
59 | static int position(); | 60 | static int position(); |
60 | 61 | ||
61 | protected: | 62 | protected: |
@@ -63,3 +64,3 @@ protected: | |||
63 | void paintEvent( QPaintEvent* ); | 64 | void paintEvent( QPaintEvent* ); |
64 | 65 | ||
65 | private: | 66 | private: |