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.h28
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
@@ -14,18 +14,18 @@ class ImageScrollView:public QScrollView
14public: 14public:
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
@@ -45,28 +45,18 @@ protected:
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
56protected slots: 56protected 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 */
64class ImageDlg:public QDialog
65{
66 Q_OBJECT
67public:
68 ImageDlg(const QString&,QWidget * parent=0, const char * name=0);
69 virtual ~ImageDlg();
70};
71
72#endif 62#endif