summaryrefslogtreecommitdiff
path: root/noncore/graphics/opie-eye/gui/imagescrollview.h
Side-by-side diff
Diffstat (limited to 'noncore/graphics/opie-eye/gui/imagescrollview.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/graphics/opie-eye/gui/imagescrollview.h23
1 files changed, 21 insertions, 2 deletions
diff --git a/noncore/graphics/opie-eye/gui/imagescrollview.h b/noncore/graphics/opie-eye/gui/imagescrollview.h
index edea235..e25f955 100644
--- a/noncore/graphics/opie-eye/gui/imagescrollview.h
+++ b/noncore/graphics/opie-eye/gui/imagescrollview.h
@@ -14,4 +14,4 @@ class ImageScrollView:public QScrollView
public:
- ImageScrollView (const QImage&, QWidget * parent=0, const char * name=0, WFlags f=0 );
- ImageScrollView (const QString&, QWidget * parent=0, const char * name=0, WFlags f=0 );
+ ImageScrollView (const QImage&, QWidget * parent=0, const char * name=0, WFlags f=0,bool always_scale=false,bool rfit=false );
+ ImageScrollView (const QString&, QWidget * parent=0, const char * name=0, WFlags f=0,bool always_scale=false,bool rfit=false );
virtual ~ImageScrollView();
@@ -19,2 +19,10 @@ public:
void setImage(const QImage&);
+
+ enum Rotation {
+ Rotate0,
+ Rotate90,
+ Rotate180,
+ Rotate270
+ };
+
protected:
@@ -24,2 +32,3 @@ protected:
QImage _image_data;
+ QImage _original_data;
@@ -27,2 +36,11 @@ protected:
+ bool scale_to_fit;
+ bool rotate_to_fit;
+ bool first_resize_done;
+ Rotation last_rot;
+
+ void rescaleImage(int w, int h);
+
+ void rotate_into_data(Rotation r);
+
protected slots:
@@ -31,2 +49,3 @@ protected slots:
virtual void contentsMouseReleaseEvent ( QMouseEvent * e);
+ virtual void resizeEvent(QResizeEvent * e);
};