author | mickeyl <mickeyl> | 2004-04-04 13:54:40 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-04-04 13:54:40 (UTC) |
commit | 16cf79e90b5217f8d4bfce2a0fa817ae4b73db36 (patch) (unidiff) | |
tree | 0701eae15aa606a0211a2fccfde0eafdac69357c /noncore/graphics/opie-eye/slave/thumbnailtool.cpp | |
parent | 8d2d2664e5f544b8292806e617deb7a0e4170dc0 (diff) | |
download | opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.zip opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.tar.gz opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.tar.bz2 |
convert to Opie Debugging Framework
Diffstat (limited to 'noncore/graphics/opie-eye/slave/thumbnailtool.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/graphics/opie-eye/slave/thumbnailtool.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/noncore/graphics/opie-eye/slave/thumbnailtool.cpp b/noncore/graphics/opie-eye/slave/thumbnailtool.cpp index a202457..d2e169c 100644 --- a/noncore/graphics/opie-eye/slave/thumbnailtool.cpp +++ b/noncore/graphics/opie-eye/slave/thumbnailtool.cpp | |||
@@ -1,5 +1,10 @@ | |||
1 | #include "thumbnailtool.h" | 1 | #include "thumbnailtool.h" |
2 | 2 | ||
3 | /* OPIE */ | ||
4 | #include <opie2/odebug.h> | ||
5 | using namespace Opie::Core; | ||
6 | |||
7 | /* QT */ | ||
3 | #include <qfileinfo.h> | 8 | #include <qfileinfo.h> |
4 | #include <qdir.h> | 9 | #include <qdir.h> |
5 | #include <qimage.h> | 10 | #include <qimage.h> |
@@ -26,13 +31,13 @@ static bool makeThumbDir( const QFileInfo& inf, bool make = false) { | |||
26 | */ | 31 | */ |
27 | QPixmap ThumbNailTool::getThumb( const QString& path, int width, int height ) { | 32 | QPixmap ThumbNailTool::getThumb( const QString& path, int width, int height ) { |
28 | QFileInfo inf( path ); | 33 | QFileInfo inf( path ); |
29 | qWarning( "Get Thumb" ); | 34 | owarn << "Get Thumb" << oendl; |
30 | if ( !makeThumbDir( inf ) ) { | 35 | if ( !makeThumbDir( inf ) ) { |
31 | QPixmap pix; | 36 | QPixmap pix; |
32 | return pix; | 37 | return pix; |
33 | } | 38 | } |
34 | QString str = QString( "/.opie-eye/%1x%2-%3" ).arg( width ).arg( height ).arg( inf.fileName() ); | 39 | QString str = QString( "/.opie-eye/%1x%2-%3" ).arg( width ).arg( height ).arg( inf.fileName() ); |
35 | qWarning( inf.dirPath()+str ); | 40 | owarn << inf.dirPath()+str << oendl; |
36 | return QPixmap( inf.dirPath()+str,"PNG" ); | 41 | return QPixmap( inf.dirPath()+str,"PNG" ); |
37 | 42 | ||
38 | } | 43 | } |
@@ -41,7 +46,7 @@ void ThumbNailTool::putThumb( const QString& path, const QPixmap& pix, int width | |||
41 | QFileInfo inf( path ); | 46 | QFileInfo inf( path ); |
42 | makeThumbDir( inf, true ); | 47 | makeThumbDir( inf, true ); |
43 | QString str = QString( "/.opie-eye/%1x%2-%3" ).arg( width ).arg( height ).arg( inf.fileName() ); | 48 | QString str = QString( "/.opie-eye/%1x%2-%3" ).arg( width ).arg( height ).arg( inf.fileName() ); |
44 | qWarning( inf.dirPath()+str ); | 49 | owarn << inf.dirPath()+str << oendl; |
45 | pix.save( inf.dirPath()+str, "PNG" ); | 50 | pix.save( inf.dirPath()+str, "PNG" ); |
46 | } | 51 | } |
47 | 52 | ||