author | zecke <zecke> | 2004-04-08 00:43:00 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-04-08 00:43:00 (UTC) |
commit | 5badc8e0aba089d73fdbfb1b1383b937aa30a301 (patch) (side-by-side diff) | |
tree | 07c82bb19e05c608a570f7de286e5c31fb9501c2 /core/applets/screenshotapplet/screenshot.cpp | |
parent | 5afca2540a2d6bf733c89ea97748496a679bc576 (diff) | |
download | opie-5badc8e0aba089d73fdbfb1b1383b937aa30a301.zip opie-5badc8e0aba089d73fdbfb1b1383b937aa30a301.tar.gz opie-5badc8e0aba089d73fdbfb1b1383b937aa30a301.tar.bz2 |
Allow to take a ScreenShot, Open it directly with drawpad
Comment it and send via email
Diffstat (limited to 'core/applets/screenshotapplet/screenshot.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/applets/screenshotapplet/screenshot.cpp | 27 |
1 files changed, 25 insertions, 2 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 { |