summaryrefslogtreecommitdiff
path: root/core/applets/screenshotapplet/screenshot.cpp
authormickeyl <mickeyl>2004-04-05 12:48:49 (UTC)
committer mickeyl <mickeyl>2004-04-05 12:48:49 (UTC)
commitf1708be741dfb73ceaffb633b44093f2cb2b3d57 (patch) (unidiff)
tree0bdcab2ac6c5f0e5cac67eb58807a50bb79d82e0 /core/applets/screenshotapplet/screenshot.cpp
parent0b481957a2eebf28b05d9803780d05ad4232aa00 (diff)
downloadopie-f1708be741dfb73ceaffb633b44093f2cb2b3d57.zip
opie-f1708be741dfb73ceaffb633b44093f2cb2b3d57.tar.gz
opie-f1708be741dfb73ceaffb633b44093f2cb2b3d57.tar.bz2
convert core/applets/* to Opie debug framework
Diffstat (limited to 'core/applets/screenshotapplet/screenshot.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/applets/screenshotapplet/screenshot.cpp20
1 files changed, 11 insertions, 9 deletions
diff --git a/core/applets/screenshotapplet/screenshot.cpp b/core/applets/screenshotapplet/screenshot.cpp
index 9aa012a..938ea0c 100644
--- a/core/applets/screenshotapplet/screenshot.cpp
+++ b/core/applets/screenshotapplet/screenshot.cpp
@@ -17,7 +17,10 @@
17 17
18/* OPIE */ 18/* OPIE */
19#include <opie2/odebug.h>
19#include <opie2/otaskbarapplet.h> 20#include <opie2/otaskbarapplet.h>
20#include <qpe/qpeapplication.h> 21#include <qpe/qpeapplication.h>
21#include <qpe/applnk.h> 22#include <qpe/applnk.h>
23using namespace Opie::Core;
24using namespace Opie::Ui;
22 25
23/* QT */ 26/* QT */
@@ -40,5 +43,4 @@
40 43
41/* XPM */ 44/* XPM */
42using namespace Opie::Ui;
43static char * snapshot_xpm[] = { 45static char * snapshot_xpm[] = {
44"32 32 177 2", 46"32 32 177 2",
@@ -363,5 +365,5 @@ void ScreenshotControl::savePixmap()
363 fileName = fileName + ".png"; 365 fileName = fileName + ".png";
364 lnk.setFile(fileName); //sets File property 366 lnk.setFile(fileName); //sets File property
365 qDebug("saving file " + fileName); 367 odebug << "saving file " + fileName << oendl;
366 snapshot.save( fileName, "PNG"); 368 snapshot.save( fileName, "PNG");
367 QFileInfo fi( fileName); 369 QFileInfo fi( fileName);
@@ -369,5 +371,5 @@ void ScreenshotControl::savePixmap()
369 371
370 if (!lnk.writeLink()) 372 if (!lnk.writeLink())
371 qDebug("Writing doclink did not work"); 373 odebug << "Writing doclink did not work" << oendl;
372 } 374 }
373 else { 375 else {
@@ -381,5 +383,5 @@ void ScreenshotControl::savePixmap()
381 383
382 if ( !QDir( dirName).exists() ) { 384 if ( !QDir( dirName).exists() ) {
383 qDebug("making dir " + dirName); 385 odebug << "making dir " + dirName << oendl;
384 QString msg = "mkdir -p " + dirName; 386 QString msg = "mkdir -p " + dirName;
385 system(msg.latin1()); 387 system(msg.latin1());
@@ -389,5 +391,5 @@ void ScreenshotControl::savePixmap()
389 fileName = fileName + ".png"; 391 fileName = fileName + ".png";
390 lnk.setFile(fileName); //sets File property 392 lnk.setFile(fileName); //sets File property
391 qDebug("saving file " + fileName); 393 odebug << "saving file " + fileName << oendl;
392 snapshot.save( fileName, "PNG"); 394 snapshot.save( fileName, "PNG");
393 QFileInfo fi( fileName); 395 QFileInfo fi( fileName);
@@ -395,5 +397,5 @@ void ScreenshotControl::savePixmap()
395 397
396 if (!lnk.writeLink()) 398 if (!lnk.writeLink())
397 qDebug("Writing doclink did not work"); 399 odebug << "Writing doclink did not work" << oendl;
398 400
399 } 401 }
@@ -407,5 +409,5 @@ void ScreenshotControl::performGrab()
407 409
408 if (buttonPushed == 1) { 410 if (buttonPushed == 1) {
409 qDebug("grabbing screen"); 411 odebug << "grabbing screen" << oendl;
410 grabTimer->stop(); 412 grabTimer->stop();
411 show(); 413 show();
@@ -421,5 +423,5 @@ void ScreenshotControl::performGrab()
421 423
422 QString displayEnv = getenv("QWS_DISPLAY"); 424 QString displayEnv = getenv("QWS_DISPLAY");
423 qDebug(displayEnv); 425 odebug << displayEnv << oendl;
424 426
425 if(( displayEnv.left(2) != ":0" ) && (!displayEnv.isEmpty())) { 427 if(( displayEnv.left(2) != ":0" ) && (!displayEnv.isEmpty())) {
@@ -458,5 +460,5 @@ void ScreenshotControl::performGrab()
458 460
459 header = header.arg( SCAP_model).arg( ::getenv( "USER" ) ).arg( img.numBytes() ).arg( SCAP_hostname ); 461 header = header.arg( SCAP_model).arg( ::getenv( "USER" ) ).arg( img.numBytes() ).arg( SCAP_hostname );
460 qDebug(header); 462 odebug << header << oendl;
461 463
462 if ( !pix.isNull() ) { 464 if ( !pix.isNull() ) {