author | zecke <zecke> | 2004-04-05 20:01:22 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-04-05 20:01:22 (UTC) |
commit | ecdd2845abeb5f3d00f58540e9b222799d6610e8 (patch) (unidiff) | |
tree | 7199007b1dc296bb4572f2c96178d47d2f36bc02 /noncore/graphics/opie-eye/gui/imagescrollview.cpp | |
parent | cb3097d5249b6bd576d0212394ab57e885f9e9da (diff) | |
download | opie-ecdd2845abeb5f3d00f58540e9b222799d6610e8.zip opie-ecdd2845abeb5f3d00f58540e9b222799d6610e8.tar.gz opie-ecdd2845abeb5f3d00f58540e9b222799d6610e8.tar.bz2 |
Make use of OWidgetStack
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.cpp | 20 |
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; | |||
7 | #include <qimage.h> | 7 | #include <qimage.h> |
8 | #include <qlayout.h> | 8 | #include <qlayout.h> |
9 | 9 | ||
10 | ImageScrollView::ImageScrollView( QWidget* parent, const char* name, WFlags f ) | ||
11 | :QScrollView(parent,name,f|Qt::WRepaintNoErase ),_image_data(),_original_data(),scale_to_fit(true), | ||
12 | rotate_to_fit(true),first_resize_done(false) | ||
13 | { | ||
14 | init(); | ||
15 | } | ||
16 | |||
10 | ImageScrollView::ImageScrollView (const QImage&img, QWidget * parent, const char * name, WFlags f,bool always_scale,bool rfit) | 17 | ImageScrollView::ImageScrollView (const QImage&img, QWidget * parent, const char * name, WFlags f,bool always_scale,bool rfit) |
11 | :QScrollView(parent,name,f|Qt::WRepaintNoErase),_image_data(),_original_data(img),scale_to_fit(always_scale), | 18 | :QScrollView(parent,name,f|Qt::WRepaintNoErase),_image_data(),_original_data(img),scale_to_fit(always_scale), |
12 | rotate_to_fit(rfit),first_resize_done(false) | 19 | rotate_to_fit(rfit),first_resize_done(false) |
@@ -29,6 +36,10 @@ void ImageScrollView::setImage(const QImage&img) | |||
29 | init(); | 36 | init(); |
30 | } | 37 | } |
31 | 38 | ||
39 | void ImageScrollView::setImage( const QString& path ) { | ||
40 | |||
41 | } | ||
42 | |||
32 | /* should be called every time the QImage changed it content */ | 43 | /* should be called every time the QImage changed it content */ |
33 | void ImageScrollView::init() | 44 | void ImageScrollView::init() |
34 | { | 45 | { |
@@ -259,6 +270,15 @@ void ImageScrollView::contentsMousePressEvent ( QMouseEvent * e) | |||
259 | _mouseStartPosY = e->y(); | 270 | _mouseStartPosY = e->y(); |
260 | } | 271 | } |
261 | 272 | ||
273 | void ImageScrollView::setDestructiveClose() { | ||
274 | WFlags fl = getWFlags(); | ||
275 | /* clear it just in case */ | ||
276 | fl &= ~WDestructiveClose; | ||
277 | fl |= WDestructiveClose; | ||
278 | setWFlags( fl ); | ||
279 | } | ||
280 | |||
281 | |||
262 | /* for testing */ | 282 | /* for testing */ |
263 | ImageDlg::ImageDlg(const QString&fname,QWidget * parent, const char * name) | 283 | ImageDlg::ImageDlg(const QString&fname,QWidget * parent, const char * name) |
264 | :QDialog(parent,name,true,WStyle_ContextHelp) | 284 | :QDialog(parent,name,true,WStyle_ContextHelp) |