summaryrefslogtreecommitdiff
path: root/noncore/graphics/opie-eye/gui/imagescrollview.h
Unidiff
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.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/noncore/graphics/opie-eye/gui/imagescrollview.h b/noncore/graphics/opie-eye/gui/imagescrollview.h
index eb91dbd..1b25103 100644
--- a/noncore/graphics/opie-eye/gui/imagescrollview.h
+++ b/noncore/graphics/opie-eye/gui/imagescrollview.h
@@ -1,21 +1,25 @@
1#ifndef _IMAGE_SCROLL_VIEW_H 1#ifndef _IMAGE_SCROLL_VIEW_H
2#define _IMAGE_SCROLL_VIEW_H 2#define _IMAGE_SCROLL_VIEW_H
3 3
4#include <lib/oimagezoomer.h>
5
4#include <qscrollview.h> 6#include <qscrollview.h>
5#include <qimage.h> 7#include <qimage.h>
6#include <qpixmap.h> 8#include <qpixmap.h>
7#include <qstring.h> 9#include <qstring.h>
8#include <qdialog.h> 10#include <qdialog.h>
9 11
12
13
10class QPainter; 14class QPainter;
11 15
12class ImageScrollView:public QScrollView 16class ImageScrollView:public QScrollView
13{ 17{
14 Q_OBJECT 18 Q_OBJECT
15public: 19public:
16 ImageScrollView( QWidget* parent, const char* name = 0, WFlags fl = 0 ); 20 ImageScrollView( QWidget* parent, const char* name = 0, WFlags fl = 0 );
17 ImageScrollView (const QImage&, QWidget * parent=0, const char * name=0, WFlags f=0,bool always_scale=false,bool rfit=false ); 21 ImageScrollView (const QImage&, QWidget * parent=0, const char * name=0, WFlags f=0,bool always_scale=false,bool rfit=false );
18 ImageScrollView (const QString&, QWidget * parent=0, const char * name=0, WFlags f=0,bool always_scale=false,bool rfit=false ); 22 ImageScrollView (const QString&, QWidget * parent=0, const char * name=0, WFlags f=0,bool always_scale=false,bool rfit=false );
19 virtual ~ImageScrollView(); 23 virtual ~ImageScrollView();
20 24
21 virtual void setImage(const QImage&); 25 virtual void setImage(const QImage&);
@@ -25,29 +29,32 @@ public:
25 virtual void setAutoRotate(bool); 29 virtual void setAutoRotate(bool);
26 virtual void setAutoScale(bool); 30 virtual void setAutoScale(bool);
27 31
28 enum Rotation { 32 enum Rotation {
29 Rotate0, 33 Rotate0,
30 Rotate90, 34 Rotate90,
31 Rotate180, 35 Rotate180,
32 Rotate270 36 Rotate270
33 }; 37 };
34 38
35signals: 39signals:
36 void sig_return(); 40 void sig_return();
41 void imageSizeChanged( const QSize& );
42 void viewportSizeChanged( const QSize& );
37 43
38protected: 44protected:
39 virtual void drawContents ( QPainter * p, int clipx, int clipy, int clipw, int cliph ); 45 virtual void drawContents ( QPainter * p, int clipx, int clipy, int clipw, int cliph );
40 void init(); 46 void init();
41 47
48 Opie::MM::OImageZoomer *_zoomer;
42 QImage _image_data; 49 QImage _image_data;
43 QImage _original_data; 50 QImage _original_data;
44 QPixmap _pdata; 51 QPixmap _pdata;
45 52
46 int _mouseStartPosX,_mouseStartPosY; 53 int _mouseStartPosX,_mouseStartPosY;
47 54
48 bool scale_to_fit; 55 bool scale_to_fit;
49 bool rotate_to_fit; 56 bool rotate_to_fit;
50 bool first_resize_done; 57 bool first_resize_done;
51 Rotation last_rot; 58 Rotation last_rot;
52 QString m_lastName; 59 QString m_lastName;
53 virtual void rescaleImage(int w, int h); 60 virtual void rescaleImage(int w, int h);