Diffstat (limited to 'noncore/graphics/opie-eye/gui/imagescrollview.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/graphics/opie-eye/gui/imagescrollview.h | 65 |
1 files changed, 41 insertions, 24 deletions
diff --git a/noncore/graphics/opie-eye/gui/imagescrollview.h b/noncore/graphics/opie-eye/gui/imagescrollview.h index f6e187d..3d2ea38 100644 --- a/noncore/graphics/opie-eye/gui/imagescrollview.h +++ b/noncore/graphics/opie-eye/gui/imagescrollview.h | |||
@@ -3,4 +3,2 @@ | |||
3 | 3 | ||
4 | #include <lib/oimagezoomer.h> | ||
5 | |||
6 | #include <qscrollview.h> | 4 | #include <qscrollview.h> |
@@ -10,3 +8,3 @@ | |||
10 | #include <qdialog.h> | 8 | #include <qdialog.h> |
11 | 9 | #include <qbitarray.h> | |
12 | 10 | ||
@@ -15,3 +13,7 @@ class QPainter; | |||
15 | 13 | ||
16 | class ImageScrollView:public QScrollView | 14 | namespace Opie { namespace MM { |
15 | |||
16 | class OImageZoomer; | ||
17 | |||
18 | class OImageScrollView:public QScrollView | ||
17 | { | 19 | { |
@@ -19,9 +21,15 @@ class ImageScrollView:public QScrollView | |||
19 | public: | 21 | public: |
20 | ImageScrollView( QWidget* parent, const char* name = 0, WFlags fl = 0 ); | 22 | enum Rotation { |
21 | ImageScrollView (const QImage&, QWidget * parent=0, const char * name=0, WFlags f=0,bool always_scale=false,bool rfit=false ); | 23 | Rotate0, |
22 | ImageScrollView (const QString&, QWidget * parent=0, const char * name=0, WFlags f=0,bool always_scale=false,bool rfit=false ); | 24 | Rotate90, |
23 | virtual ~ImageScrollView(); | 25 | Rotate180, |
26 | Rotate270 | ||
27 | }; | ||
28 | |||
29 | OImageScrollView( QWidget* parent, const char* name = 0, WFlags fl = 0 ); | ||
30 | OImageScrollView (const QImage&, QWidget * parent=0, const char * name=0, WFlags f=0,bool always_scale=false,bool rfit=false ); | ||
31 | OImageScrollView (const QString&, QWidget * parent=0, const char * name=0, WFlags f=0,bool always_scale=false,bool rfit=false ); | ||
32 | virtual ~OImageScrollView(); | ||
33 | |||
24 | 34 | ||
25 | virtual void setImage(const QImage&); | ||
26 | virtual void setImage( const QString& path ); | ||
27 | virtual void setDestructiveClose(); | 35 | virtual void setDestructiveClose(); |
@@ -32,11 +40,12 @@ public: | |||
32 | 40 | ||
33 | enum Rotation { | 41 | virtual bool AutoRotate()const; |
34 | Rotate0, | 42 | virtual bool AutoScale()const; |
35 | Rotate90, | 43 | virtual bool ShowZoomer()const; |
36 | Rotate180, | 44 | |
37 | Rotate270 | 45 | public slots: |
38 | }; | 46 | virtual void setImage(const QImage&); |
47 | virtual void setImage( const QString& path ); | ||
48 | |||
39 | 49 | ||
40 | signals: | 50 | signals: |
41 | void sig_return(); | ||
42 | void imageSizeChanged( const QSize& ); | 51 | void imageSizeChanged( const QSize& ); |
@@ -55,9 +64,5 @@ protected: | |||
55 | 64 | ||
56 | bool scale_to_fit; | 65 | QBitArray m_states; |
57 | bool rotate_to_fit; | 66 | |
58 | bool show_zoomer; | 67 | Rotation m_last_rot; |
59 | bool first_resize_done; | ||
60 | bool image_is_jpeg; | ||
61 | bool image_scaled_loaded; | ||
62 | Rotation last_rot; | ||
63 | QString m_lastName; | 68 | QString m_lastName; |
@@ -71,2 +76,10 @@ protected: | |||
71 | 76 | ||
77 | /* internal bitset manipulation */ | ||
78 | virtual bool ImageIsJpeg()const; | ||
79 | virtual void setImageIsJpeg(bool how); | ||
80 | virtual bool ImageScaledLoaded()const; | ||
81 | virtual void setImageScaledLoaded(bool how); | ||
82 | virtual bool FirstResizeDone()const; | ||
83 | virtual void setFirstResizeDone(bool how); | ||
84 | |||
72 | protected slots: | 85 | protected slots: |
@@ -77,2 +90,6 @@ protected slots: | |||
77 | }; | 90 | }; |
91 | |||
92 | } | ||
93 | } | ||
94 | |||
78 | #endif | 95 | #endif |