-
Notifications
You must be signed in to change notification settings - Fork 3
/
mainwindow.h
64 lines (51 loc) · 1.53 KB
/
mainwindow.h
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
54
55
56
57
58
59
60
61
62
63
64
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include "pmgphotocommandthread.h"
#include <QMainWindow>
#include <QComboBox>
#include <QPixmap>
#include <QGraphicsPixmapItem>
#include <QStandardItemModel>
#include <QMap>
#include <gphoto2/gphoto2-camera.h>
#define PM_PROP_CONFIG_KEY "configKey"
#define PM_PROP_OFFSET "offset"
#define PM_CONFIG_KEY_AUTOFOCUS_DRIVE "autofocusdrive"
#define PM_CONFIG_KEY_VIEWFINDER "viewfinder"
#define PM_CONFIG_KEY_F_NUMBER "f-number"
#define PM_CONFIG_KEY_SHUTTERSPEED "shutterspeed"
#define PM_CONFIG_KEY_MANUALFOCUSDRIVE "manualfocusdrive"
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
protected:
void addMessage(QString message);
private:
void configureWidgets();
Ui::MainWindow *ui;
PMGPhotoCommandThread *commandThread;
QComboBox cameraSelector;
QStandardItemModel *logModel;
QStandardItemModel *infosModel;
QMap<QString, QWidget*> cameraWidgets;
public slots:
void camerasDetected(QList<PMCamera*>* cameras);
void cameraSelected(int index);
void cameraOpened(int cameraNumber);
void startLiveView();
void stopLiveView();
void manualFocusDrive();
void liveViewStopped(int cameraNumber);
void displayError(QString message);
void displayStatus(QString message);
void cameraSetWidgetValue();
void startListingWidgets(int cameraNumber);
void newWidget(int cameraNumber, CameraWidget* widget);
};
#endif // MAINWINDOW_H