uvccameracontrol.h 970 Bytes
Newer Older
Thiago Santini's avatar
Thiago Santini committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
#ifndef UVCCAMERACONTROL_H
#define UVCCAMERACONTROL_H


#include <QtCore/qobject.h>
#include <QtMultimedia/QCameraControl>

QT_BEGIN_NAMESPACE

class UVCCameraService;
class UVCCameraSession;

class UVCCameraControl : public QCameraControl
{
    Q_OBJECT
public:
    UVCCameraControl(QObject *parent = 0);
    ~UVCCameraControl();

    QCamera::State state() const { return m_state; }

    QCamera::CaptureModes captureMode() const { return m_captureMode; }
    void setCaptureMode(QCamera::CaptureModes mode);

    void setState(QCamera::State state);

    QCamera::Status status() const;
    bool isCaptureModeSupported(QCamera::CaptureModes mode) const;
    bool canChangeProperty(PropertyChangeType /* changeType */, QCamera::Status /* status */) const {return false; }

private:
    UVCCameraSession *m_session;
    UVCCameraService *m_service;
    QCamera::State m_state;
    QCamera::CaptureModes m_captureMode;
};

QT_END_NAMESPACE

#endif // UVCCAMERACONTROL_H