summaryrefslogtreecommitdiff
path: root/noncore/multimedia/camera/zcameraio.h
Unidiff
Diffstat (limited to 'noncore/multimedia/camera/zcameraio.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/camera/zcameraio.h22
1 files changed, 19 insertions, 3 deletions
diff --git a/noncore/multimedia/camera/zcameraio.h b/noncore/multimedia/camera/zcameraio.h
index 9d4b1d7..edce143 100644
--- a/noncore/multimedia/camera/zcameraio.h
+++ b/noncore/multimedia/camera/zcameraio.h
@@ -17,8 +17,13 @@
17#define ZCAMERAIO_H 17#define ZCAMERAIO_H
18 18
19#include <qobject.h>
20
19class QImage; 21class QImage;
22class QTime;
20 23
21class ZCameraIO 24class ZCameraIO : public QObject
22{ 25{
26 Q_OBJECT
27
23 public: 28 public:
24 virtual ~ZCameraIO(); 29 virtual ~ZCameraIO();
@@ -32,5 +37,8 @@ class ZCameraIO
32 }; 37 };
33 38
39 // low level interface
40
34 bool setCaptureFrame( int w, int h, int zoom = 256, bool rot = true ); 41 bool setCaptureFrame( int w, int h, int zoom = 256, bool rot = true );
42 bool setZoom( int zoom = 0 );
35 void setReadMode( int = IMAGE | XFLIP | YFLIP ); 43 void setReadMode( int = IMAGE | XFLIP | YFLIP );
36 44
@@ -39,9 +47,12 @@ class ZCameraIO
39 bool isCapturing() const; 47 bool isCapturing() const;
40 bool isFinderReversed() const; 48 bool isFinderReversed() const;
41 bool isOpen() const;
42 49
43 bool snapshot( QImage* );
44 bool snapshot( unsigned char* ); 50 bool snapshot( unsigned char* );
51 bool snapshot( QImage* );
52
53 // high level interface
54 bool isOpen() const;
45 static ZCameraIO* instance(); 55 static ZCameraIO* instance();
56 void captureFrame( int w, int h, int zoom, QImage* image );
46 57
47 protected: 58 protected:
@@ -52,4 +63,7 @@ class ZCameraIO
52 bool write( char*, int = 0 ); 63 bool write( char*, int = 0 );
53 64
65 signals:
66 void shutterClicked();
67
54 private: 68 private:
55 int _driver; 69 int _driver;
@@ -61,4 +75,6 @@ class ZCameraIO
61 bool _rot; 75 bool _rot;
62 int _readlen; 76 int _readlen;
77
78 QTime* _timer;
63}; 79};
64 80