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 | 28 |
1 files changed, 9 insertions, 19 deletions
diff --git a/noncore/graphics/opie-eye/gui/imagescrollview.h b/noncore/graphics/opie-eye/gui/imagescrollview.h index 44f2a64..17e2f5f 100644 --- a/noncore/graphics/opie-eye/gui/imagescrollview.h +++ b/noncore/graphics/opie-eye/gui/imagescrollview.h | |||
@@ -12,22 +12,22 @@ class ImageScrollView:public QScrollView | |||
12 | { | 12 | { |
13 | Q_OBJECT | 13 | Q_OBJECT |
14 | public: | 14 | public: |
15 | ImageScrollView( QWidget* parent, const char* name = 0, WFlags fl = 0 ); | 15 | ImageScrollView( QWidget* parent, const char* name = 0, WFlags fl = 0 ); |
16 | ImageScrollView (const QImage&, QWidget * parent=0, const char * name=0, WFlags f=0,bool always_scale=false,bool rfit=false ); | 16 | ImageScrollView (const QImage&, QWidget * parent=0, const char * name=0, WFlags f=0,bool always_scale=false,bool rfit=false ); |
17 | ImageScrollView (const QString&, QWidget * parent=0, const char * name=0, WFlags f=0,bool always_scale=false,bool rfit=false ); | 17 | ImageScrollView (const QString&, QWidget * parent=0, const char * name=0, WFlags f=0,bool always_scale=false,bool rfit=false ); |
18 | virtual ~ImageScrollView(); | 18 | virtual ~ImageScrollView(); |
19 | 19 | ||
20 | void setImage(const QImage&); | 20 | virtual void setImage(const QImage&); |
21 | void setImage( const QString& path ); | 21 | virtual void setImage( const QString& path ); |
22 | void setDestructiveClose(); | 22 | virtual void setDestructiveClose(); |
23 | 23 | ||
24 | void setAutoRotate(bool); | 24 | virtual void setAutoRotate(bool); |
25 | void setAutoScale(bool); | 25 | virtual void setAutoScale(bool); |
26 | 26 | ||
27 | enum Rotation { | 27 | enum Rotation { |
28 | Rotate0, | 28 | Rotate0, |
29 | Rotate90, | 29 | Rotate90, |
30 | Rotate180, | 30 | Rotate180, |
31 | Rotate270 | 31 | Rotate270 |
32 | }; | 32 | }; |
33 | 33 | ||
@@ -43,30 +43,20 @@ protected: | |||
43 | 43 | ||
44 | int _mouseStartPosX,_mouseStartPosY; | 44 | int _mouseStartPosX,_mouseStartPosY; |
45 | 45 | ||
46 | bool scale_to_fit; | 46 | bool scale_to_fit; |
47 | bool rotate_to_fit; | 47 | bool rotate_to_fit; |
48 | bool first_resize_done; | 48 | bool first_resize_done; |
49 | Rotation last_rot; | 49 | Rotation last_rot; |
50 | QString m_lastName; | 50 | QString m_lastName; |
51 | void rescaleImage(int w, int h); | 51 | virtual void rescaleImage(int w, int h); |
52 | 52 | ||
53 | void rotate_into_data(Rotation r); | 53 | virtual void rotate_into_data(Rotation r); |
54 | void generateImage(); | 54 | virtual void generateImage(); |
55 | 55 | ||
56 | protected slots: | 56 | protected slots: |
57 | virtual void viewportMouseMoveEvent(QMouseEvent* e); | 57 | virtual void viewportMouseMoveEvent(QMouseEvent* e); |
58 | virtual void contentsMousePressEvent ( QMouseEvent * e); | 58 | virtual void contentsMousePressEvent ( QMouseEvent * e); |
59 | virtual void contentsMouseReleaseEvent ( QMouseEvent * e); | ||
60 | virtual void resizeEvent(QResizeEvent * e); | 59 | virtual void resizeEvent(QResizeEvent * e); |
60 | virtual void keyPressEvent(QKeyEvent * e); | ||
61 | }; | 61 | }; |
62 | |||
63 | /* for testing */ | ||
64 | class ImageDlg:public QDialog | ||
65 | { | ||
66 | Q_OBJECT | ||
67 | public: | ||
68 | ImageDlg(const QString&,QWidget * parent=0, const char * name=0); | ||
69 | virtual ~ImageDlg(); | ||
70 | }; | ||
71 | |||
72 | #endif | 62 | #endif |