FotoBox
camera.h
Go to the documentation of this file.
1 /* camera.h
2  *
3  * Copyright (c) 2017 Thomas Kais
4  *
5  * This file is subject to the terms and conditions defined in
6  * file 'COPYING', which is part of this source code package.
7  */
8 #ifndef CAMERA_H
9 #define CAMERA_H
10 
11 #include <QObject>
12 #include <QProcess>
13 
14 namespace FotoBox {
15 
20 class Camera : public QObject
21 {
22  Q_OBJECT
23 
24 public:
29  explicit Camera(QObject *parent = nullptr);
30 
34  ~Camera() override = default;
35 
39  Camera(const Camera &other) = delete;
40 
44  Camera &operator=(const Camera &other) = delete;
45 
49  Camera(Camera &&other) = delete;
50 
54  Camera &operator=(Camera &&other) = delete;
55 
60  auto shootPhoto() -> bool;
61 
66  auto currentPhoto() const -> QString;
67 
68 private:
70  static constexpr int TO_SECONDS = 1000;
71 
73  const int m_timeoutValue;
74 
76  QString m_currentPhoto;
77 
79  const QString m_photoSuffix;
80 
82  const QString m_cameraMode;
83 
85  const QStringList m_argList;
86 
88  QProcess m_process;
89 };
90 
91 } // end namespace FotoBox
92 
93 #endif // CAMERA_H
The Camera class Use gphoto2 to send commands to camera.
Definition: camera.h:21
~Camera() override=default
Camera destructor.
auto currentPhoto() const -> QString
return member
Definition: camera.cpp:48
QString m_currentPhoto
Definition: camera.h:76
auto shootPhoto() -> bool
shoot a photo with gphoto2
Definition: camera.cpp:32
static constexpr int TO_SECONDS
Definition: camera.h:70
const QString m_cameraMode
Definition: camera.h:82
const int m_timeoutValue
Definition: camera.h:73
const QString m_photoSuffix
Definition: camera.h:79
const QStringList m_argList
Definition: camera.h:85
Camera & operator=(const Camera &other)=delete
Camera default copy assignment.
Camera & operator=(Camera &&other)=delete
Camera default move assignment.
QProcess m_process
Definition: camera.h:88
Camera(QObject *parent=nullptr)
Camera constructor.
Definition: camera.cpp:16
Camera(const Camera &other)=delete
Camera default copy constructor.
Camera(Camera &&other)=delete
Camera default move constructor.