author | alwin <alwin> | 2004-04-04 23:02:29 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-04-04 23:02:29 (UTC) |
commit | 318c10ce368a6bf99f3412a2ff1ef0a9177c965a (patch) (unidiff) | |
tree | a38485b18eb9a2cd4a8bb5bccde0f91df3c0521e /noncore/graphics/opie-eye/gui/imagescrollview.h | |
parent | 9242abc186f0acc3df7020aaa219c435c2e00672 (diff) | |
download | opie-318c10ce368a6bf99f3412a2ff1ef0a9177c965a.zip opie-318c10ce368a6bf99f3412a2ff1ef0a9177c965a.tar.gz opie-318c10ce368a6bf99f3412a2ff1ef0a9177c965a.tar.bz2 |
ok, the first - realy first - working shot of a special
ImageScrollView. But the most important things are working now and
can be used.
Todo:
- check on a pda(!) doublebuffering (bitBlt) - may be it will paint faster
- implemented mouseEvents seems not working good, its just a first try.
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 | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/noncore/graphics/opie-eye/gui/imagescrollview.h b/noncore/graphics/opie-eye/gui/imagescrollview.h new file mode 100644 index 0000000..5836c8d --- a/dev/null +++ b/noncore/graphics/opie-eye/gui/imagescrollview.h | |||
@@ -0,0 +1,43 @@ | |||
1 | #ifndef __IMAGE_SCROLL_VIEW_H | ||
2 | #define __IMAGE_SCROLL_VIEW_H | ||
3 | |||
4 | #include <qscrollview.h> | ||
5 | #include <qimage.h> | ||
6 | #include <qstring.h> | ||
7 | #include <qdialog.h> | ||
8 | |||
9 | class QPainter; | ||
10 | |||
11 | class ImageScrollView:public QScrollView | ||
12 | { | ||
13 | Q_OBJECT | ||
14 | public: | ||
15 | ImageScrollView (const QImage&, QWidget * parent=0, const char * name=0, WFlags f=0 ); | ||
16 | ImageScrollView (const QString&, QWidget * parent=0, const char * name=0, WFlags f=0 ); | ||
17 | virtual ~ImageScrollView(); | ||
18 | |||
19 | void setImage(const QImage&); | ||
20 | protected: | ||
21 | virtual void drawContents ( QPainter * p, int clipx, int clipy, int clipw, int cliph ); | ||
22 | void init(); | ||
23 | |||
24 | QImage _image_data; | ||
25 | |||
26 | int _mouseStartPosX,_mouseStartPosY; | ||
27 | |||
28 | protected slots: | ||
29 | virtual void viewportMouseMoveEvent(QMouseEvent* e); | ||
30 | virtual void contentsMousePressEvent ( QMouseEvent * e); | ||
31 | virtual void contentsMouseReleaseEvent ( QMouseEvent * e); | ||
32 | }; | ||
33 | |||
34 | /* for testing */ | ||
35 | class ImageDlg:public QDialog | ||
36 | { | ||
37 | Q_OBJECT | ||
38 | public: | ||
39 | ImageDlg(const QString&,QWidget * parent=0, const char * name=0); | ||
40 | virtual ~ImageDlg(); | ||
41 | }; | ||
42 | |||
43 | #endif | ||