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) (show 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
@@ -7,6 +7,13 @@ using namespace Opie::Core;
#include <qimage.h>
#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),
rotate_to_fit(rfit),first_resize_done(false)
@@ -29,6 +36,10 @@ void ImageScrollView::setImage(const QImage&img)
init();
}
+void ImageScrollView::setImage( const QString& path ) {
+
+}
+
/* should be called every time the QImage changed it content */
void ImageScrollView::init()
{
@@ -259,6 +270,15 @@ void ImageScrollView::contentsMousePressEvent ( QMouseEvent * e)
_mouseStartPosY = e->y();
}
+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)
:QDialog(parent,name,true,WStyle_ContextHelp)