-rw-r--r-- | core/applets/screenshotapplet/screenshot.cpp | 20 |
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 @@ -16,9 +16,12 @@ #include "inputDialog.h" /* OPIE */ +#include <opie2/odebug.h> #include <opie2/otaskbarapplet.h> #include <qpe/qpeapplication.h> #include <qpe/applnk.h> +using namespace Opie::Core; +using namespace Opie::Ui; /* QT */ #include <qlineedit.h> @@ -39,7 +42,6 @@ #include <unistd.h> /* XPM */ -using namespace Opie::Ui; static char * snapshot_xpm[] = { "32 32 177 2", " c None", @@ -362,13 +364,13 @@ void ScreenshotControl::savePixmap() if (fileName.right(3) != "png") fileName = fileName + ".png"; lnk.setFile(fileName); //sets File property - qDebug("saving file " + fileName); + odebug << "saving file " + fileName << oendl; snapshot.save( fileName, "PNG"); QFileInfo fi( fileName); lnk.setName( fi.fileName()); //sets file name if (!lnk.writeLink()) - qDebug("Writing doclink did not work"); + odebug << "Writing doclink did not work" << oendl; } else { @@ -380,7 +382,7 @@ void ScreenshotControl::savePixmap() QString dirName = QDir::homeDirPath() + "/Documents/image/png/"; if ( !QDir( dirName).exists() ) { - qDebug("making dir " + dirName); + odebug << "making dir " + dirName << oendl; QString msg = "mkdir -p " + dirName; system(msg.latin1()); } @@ -388,13 +390,13 @@ void ScreenshotControl::savePixmap() if (fileName.right(3) != "png") fileName = fileName + ".png"; lnk.setFile(fileName); //sets File property - qDebug("saving file " + fileName); + odebug << "saving file " + fileName << oendl; snapshot.save( fileName, "PNG"); QFileInfo fi( fileName); lnk.setName( fi.fileName()); //sets file name if (!lnk.writeLink()) - qDebug("Writing doclink did not work"); + odebug << "Writing doclink did not work" << oendl; } @@ -406,7 +408,7 @@ void ScreenshotControl::performGrab() snapshot = QPixmap::grabWindow( QPEApplication::desktop()->winId(), 0, 0, QApplication::desktop()->width(), QApplication::desktop()->height() ); if (buttonPushed == 1) { - qDebug("grabbing screen"); + odebug << "grabbing screen" << oendl; grabTimer->stop(); show(); qApp->processEvents(); @@ -420,7 +422,7 @@ void ScreenshotControl::performGrab() bool ok = false; QString displayEnv = getenv("QWS_DISPLAY"); - qDebug(displayEnv); + odebug << displayEnv << oendl; if(( displayEnv.left(2) != ":0" ) && (!displayEnv.isEmpty())) { @@ -457,7 +459,7 @@ void ScreenshotControl::performGrab() header = header.arg( SCAP_model).arg( ::getenv( "USER" ) ).arg( img.numBytes() ).arg( SCAP_hostname ); - qDebug(header); + odebug << header << oendl; if ( !pix.isNull() ) { const char *ascii = header.latin1( ); |