summaryrefslogtreecommitdiff
path: root/noncore/graphics/opie-eye/gui/imagescrollview.cpp
Side-by-side diff
Diffstat (limited to 'noncore/graphics/opie-eye/gui/imagescrollview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/graphics/opie-eye/gui/imagescrollview.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/noncore/graphics/opie-eye/gui/imagescrollview.cpp b/noncore/graphics/opie-eye/gui/imagescrollview.cpp
index 0d35354..7d83e29 100644
--- a/noncore/graphics/opie-eye/gui/imagescrollview.cpp
+++ b/noncore/graphics/opie-eye/gui/imagescrollview.cpp
@@ -8,4 +8,11 @@ using namespace Opie::Core;
#include <qlayout.h>
+ImageScrollView::ImageScrollView( QWidget* parent, const char* name, WFlags f )
+ :QScrollView(parent,name,f|Qt::WRepaintNoErase ),_image_data(),_original_data(),scale_to_fit(true),
+ rotate_to_fit(true),first_resize_done(false)
+{
+ init();
+}
+
ImageScrollView::ImageScrollView (const QImage&img, QWidget * parent, const char * name, WFlags f,bool always_scale,bool rfit)
:QScrollView(parent,name,f|Qt::WRepaintNoErase),_image_data(),_original_data(img),scale_to_fit(always_scale),
@@ -30,4 +37,8 @@ void ImageScrollView::setImage(const QImage&img)
}
+void ImageScrollView::setImage( const QString& path ) {
+
+}
+
/* should be called every time the QImage changed it content */
void ImageScrollView::init()
@@ -260,4 +271,13 @@ void ImageScrollView::contentsMousePressEvent ( QMouseEvent * e)
}
+void ImageScrollView::setDestructiveClose() {
+ WFlags fl = getWFlags();
+ /* clear it just in case */
+ fl &= ~WDestructiveClose;
+ fl |= WDestructiveClose;
+ setWFlags( fl );
+}
+
+
/* for testing */
ImageDlg::ImageDlg(const QString&fname,QWidget * parent, const char * name)