summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/graphics/opie-eye/gui/imagescrollview.cpp13
-rw-r--r--noncore/graphics/opie-eye/gui/imagescrollview.h2
2 files changed, 10 insertions, 5 deletions
diff --git a/noncore/graphics/opie-eye/gui/imagescrollview.cpp b/noncore/graphics/opie-eye/gui/imagescrollview.cpp
index ee20f40..99fdc51 100644
--- a/noncore/graphics/opie-eye/gui/imagescrollview.cpp
+++ b/noncore/graphics/opie-eye/gui/imagescrollview.cpp
@@ -11,5 +11,6 @@ ImageScrollView::ImageScrollView( QWidget* parent, const char* name, WFlags f )
11 :QScrollView(parent,name,f|Qt::WRepaintNoErase ),_image_data(),_original_data(),scale_to_fit(true), 11 :QScrollView(parent,name,f|Qt::WRepaintNoErase ),_image_data(),_original_data(),scale_to_fit(true),
12 rotate_to_fit(true),first_resize_done(false) 12 rotate_to_fit(true),first_resize_done(false),m_lastName("")
13{ 13{
14 init(); 14 init();
15 qDebug("constructor done");
15} 16}
@@ -18,3 +19,3 @@ ImageScrollView::ImageScrollView (const QImage&img, QWidget * parent, const char
18 :QScrollView(parent,name,f|Qt::WRepaintNoErase),_image_data(),_original_data(img),scale_to_fit(always_scale), 19 :QScrollView(parent,name,f|Qt::WRepaintNoErase),_image_data(),_original_data(img),scale_to_fit(always_scale),
19 rotate_to_fit(rfit),first_resize_done(false) 20 rotate_to_fit(rfit),first_resize_done(false),m_lastName("")
20{ 21{
@@ -24,6 +25,7 @@ ImageScrollView::ImageScrollView (const QImage&img, QWidget * parent, const char
24ImageScrollView::ImageScrollView (const QString&img, QWidget * parent, const char * name, WFlags f,bool always_scale,bool rfit) 25ImageScrollView::ImageScrollView (const QString&img, QWidget * parent, const char * name, WFlags f,bool always_scale,bool rfit)
25 :QScrollView(parent,name,f|Qt::WRepaintNoErase),_image_data(),_original_data(img),scale_to_fit(always_scale), 26 :QScrollView(parent,name,f|Qt::WRepaintNoErase),_image_data(),_original_data(),scale_to_fit(always_scale),
26 rotate_to_fit(rfit),first_resize_done(false) 27 rotate_to_fit(rfit),first_resize_done(false),m_lastName("")
27{ 28{
28 init(); 29 init();
30 setImage(img);
29} 31}
@@ -34,2 +36,3 @@ void ImageScrollView::setImage(const QImage&img)
34 _original_data=img; 36 _original_data=img;
37 m_lastName = "";
35 if (first_resize_done) { 38 if (first_resize_done) {
@@ -41,2 +44,4 @@ void ImageScrollView::setImage( const QString& path ) {
41 odebug << "load new image " << oendl; 44 odebug << "load new image " << oendl;
45 if (m_lastName == path) return;
46 m_lastName = path;
42 _original_data.load(path); 47 _original_data.load(path);
diff --git a/noncore/graphics/opie-eye/gui/imagescrollview.h b/noncore/graphics/opie-eye/gui/imagescrollview.h
index dcf54ce..44f2a64 100644
--- a/noncore/graphics/opie-eye/gui/imagescrollview.h
+++ b/noncore/graphics/opie-eye/gui/imagescrollview.h
@@ -49,3 +49,3 @@ protected:
49 Rotation last_rot; 49 Rotation last_rot;
50 50 QString m_lastName;
51 void rescaleImage(int w, int h); 51 void rescaleImage(int w, int h);