Diffstat (limited to 'noncore/multimedia/camera/zcameraio.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/camera/zcameraio.h | 22 |
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 @@ #define ZCAMERAIO_H +#include <qobject.h> + class QImage; +class QTime; -class ZCameraIO +class ZCameraIO : public QObject { + Q_OBJECT + public: virtual ~ZCameraIO(); @@ -32,5 +37,8 @@ class ZCameraIO }; + // low level interface + bool setCaptureFrame( int w, int h, int zoom = 256, bool rot = true ); + bool setZoom( int zoom = 0 ); void setReadMode( int = IMAGE | XFLIP | YFLIP ); @@ -39,9 +47,12 @@ class ZCameraIO bool isCapturing() const; bool isFinderReversed() const; - bool isOpen() const; - bool snapshot( QImage* ); bool snapshot( unsigned char* ); + bool snapshot( QImage* ); + + // high level interface + bool isOpen() const; static ZCameraIO* instance(); + void captureFrame( int w, int h, int zoom, QImage* image ); protected: @@ -52,4 +63,7 @@ class ZCameraIO bool write( char*, int = 0 ); + signals: + void shutterClicked(); + private: int _driver; @@ -61,4 +75,6 @@ class ZCameraIO bool _rot; int _readlen; + + QTime* _timer; }; |