summaryrefslogtreecommitdiff
path: root/noncore/graphics/opie-eye/gui/imagescrollview.h
authoralwin <alwin>2004-04-14 19:00:02 (UTC)
committer alwin <alwin>2004-04-14 19:00:02 (UTC)
commit26e89198404dba70a3bea2b337f6677e6b177bb2 (patch) (unidiff)
treec55849b61ff27c121fc3cc8e6954d1179323af38 /noncore/graphics/opie-eye/gui/imagescrollview.h
parentb3156cadba8f4a397ac7d65947cdb7a33b5c3b72 (diff)
downloadopie-26e89198404dba70a3bea2b337f6677e6b177bb2.zip
opie-26e89198404dba70a3bea2b337f6677e6b177bb2.tar.gz
opie-26e89198404dba70a3bea2b337f6677e6b177bb2.tar.bz2
mostly all basics done
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.h65
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
@@ -2,6 +2,4 @@
2#define _IMAGE_SCROLL_VIEW_H 2#define _IMAGE_SCROLL_VIEW_H
3 3
4#include <lib/oimagezoomer.h>
5
6#include <qscrollview.h> 4#include <qscrollview.h>
7#include <qimage.h> 5#include <qimage.h>
@@ -9,20 +7,30 @@
9#include <qstring.h> 7#include <qstring.h>
10#include <qdialog.h> 8#include <qdialog.h>
11 9#include <qbitarray.h>
12 10
13 11
14class QPainter; 12class QPainter;
15 13
16class ImageScrollView:public QScrollView 14namespace Opie { namespace MM {
15
16 class OImageZoomer;
17
18class OImageScrollView:public QScrollView
17{ 19{
18 Q_OBJECT 20 Q_OBJECT
19public: 21public:
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();
28 36
@@ -31,13 +39,14 @@ public:
31 virtual void setShowZoomer(bool); 39 virtual void setShowZoomer(bool);
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 45public slots:
38 }; 46 virtual void setImage(const QImage&);
47 virtual void setImage( const QString& path );
48
39 49
40signals: 50signals:
41 void sig_return();
42 void imageSizeChanged( const QSize& ); 51 void imageSizeChanged( const QSize& );
43 void viewportSizeChanged( const QSize& ); 52 void viewportSizeChanged( const QSize& );
@@ -54,11 +63,7 @@ protected:
54 int _mouseStartPosX,_mouseStartPosY; 63 int _mouseStartPosX,_mouseStartPosY;
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;
64 virtual void rescaleImage(int w, int h); 69 virtual void rescaleImage(int w, int h);
@@ -70,4 +75,12 @@ protected:
70 void check_zoomer(); 75 void check_zoomer();
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
72protected slots: 85protected slots:
73 virtual void viewportMouseMoveEvent(QMouseEvent* e); 86 virtual void viewportMouseMoveEvent(QMouseEvent* e);
@@ -76,3 +89,7 @@ protected slots:
76 virtual void keyPressEvent(QKeyEvent * e); 89 virtual void keyPressEvent(QKeyEvent * e);
77}; 90};
91
92}
93}
94
78#endif 95#endif