forked from dept2/qtmultimedia-gphoto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgphotocameracontrol.cpp
53 lines (43 loc) · 1.41 KB
/
gphotocameracontrol.cpp
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
41
42
43
44
45
46
47
48
49
50
51
52
53
#include "gphotocameracontrol.h"
#include "gphotocamerasession.h"
GPhotoCameraControl::GPhotoCameraControl(GPhotoCameraSession *session, QObject *parent)
: QCameraControl(parent)
, m_session(session)
{
using Session = GPhotoCameraSession;
using Control = GPhotoCameraControl;
connect(m_session, &Session::captureModeChanged, this, &Control::captureModeChanged);
connect(m_session, &Session::error, this, &Control::error);
connect(m_session, &Session::stateChanged, this, &Control::stateChanged);
connect(m_session, &Session::statusChanged, this, &Control::statusChanged);
}
QCamera::State GPhotoCameraControl::state() const
{
return m_session->state();
}
void GPhotoCameraControl::setState(QCamera::State state)
{
return m_session->setState(state);
}
QCamera::Status GPhotoCameraControl::status() const
{
return m_session->status();
}
bool GPhotoCameraControl::isCaptureModeSupported(QCamera::CaptureModes mode) const
{
return m_session->isCaptureModeSupported(mode);
}
QCamera::CaptureModes GPhotoCameraControl::captureMode() const
{
return m_session->captureMode();
}
void GPhotoCameraControl::setCaptureMode(QCamera::CaptureModes captureMode)
{
m_session->setCaptureMode(captureMode);
}
bool GPhotoCameraControl::canChangeProperty(QCameraControl::PropertyChangeType changeType, QCamera::Status status) const
{
Q_UNUSED(changeType)
Q_UNUSED(status)
return false;
}