-
Notifications
You must be signed in to change notification settings - Fork 1
/
mainwindow.h
194 lines (154 loc) · 5.71 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QUrl>
#include <QMap>
#include "motorbasic.h"
class NetworkConnection;
class Timelapse;
class Remote;
class QNetworkAccessManager;
class QNetworkReply;
class QGraphicsView;
class QGraphicsScene;
class QLabel;
class QButtonGroup;
class QWidget;
class LiveViewConsumer;
//class Motorbasic;
typedef QMap<int,QString> QIntMap;
//class QUrl;
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
//bool eventFilter(QObject *object, QEvent *event);
void setStackekWidgetPage_1();
void setStackekWidgetPage_2();
void setStackekWidgetPage_3();
public slots:
void onConnectionStatusChanged(int status,QString message = QString());
void onCameraStatusChanged(QString state);
void setControlStates(bool on);
private slots:
void closeEvent(QCloseEvent *event);
bool eventFilter(QObject *object, QEvent *event);
void on_buttonGroup_buttonClicked(int index);
void on_orientationChanged(Qt::ScreenOrientation orientation);
void on_primaryOrientationChanged(Qt::ScreenOrientation orientation);
void on_GeometryChanged(QRect geo);
void setupLandscapeScreen(QRect geo);
void setupPortraitScreen(QRect geo);
void setLayoutDimensions(Qt::ScreenOrientation orientation);
void resizeWindow(QSize orientedSize, QSize innerorientedSize, QSize viewSize);
void on_configurationComboBox_activated(QString text);
void on_startRecModePushButton_clicked(bool checked);
void on_takePicturePushButton_clicked();
void on_startLiveViewPushButton_clicked(bool checked);
void on_startTimerPushButton_clicked(bool checked);
void on_durationTimeEdit_timeChanged(const QTime &time);
void on_intervalTimeEdit_timeChanged(const QTime &time);
void on_chooseFolderPushButton_clicked();
void on_urlLineEdit_textEdited(QString url);
void on_isoSpeedRateComboBox_activated(QString text);
void on_shutterSpeedComboBox_activated(QString text);
void on_fNumberComboBox_activated(QString text);
void on_whiteBalanceComboBox_activated(QString text);
void on_focusModeComboBox_activated(QString text);
void on_exposureModeComboBox_activated(QString text);
void on_postViewImageSizeComboBox_activated(QString text);
void on_selfTimerComboBox_activated(QString text);
void on_liveViewImageTouched(QPointF pos);
void on_disableTimer_timeout();
void on_Quit_Accepted();
void on_leftPushButton_pressed();
void on_rightPushButton_pressed();
void on_upPushButton_pressed();
void on_downPushButton_pressed();
void on_leftPushButton_released();
void on_rightPushButton_released();
void on_upPushButton_released();
void on_downPushButton_released();
void on_stopMovePushButton_pressed();
void on_manualFocusInPushButton_pressed();
void on_manualFocusOutPushButton_pressed();
void on_manualFocusInPushButton_released();
void on_manualFocusOutPushButton_released();
void addIsoSpeedRateComboBoxItems(QStringList items);
void addfNumberComboBoxItems(QStringList items);
void addwhiteBalanceComboBoxItems(QStringList items);
void addshutterSpeedComboBox_2Items(QStringList items);
void addexposureModeComboBoxItems(QStringList items);
void addfocuModeComboBoxItems(QStringList items);
void addSelfTimerComboBoxItems(QStringList items);
void addPostViewImageSizeComboBoxItems(QStringList items);
void addConfigurationComboBoxItems(QStringList items);
void isoSpeedRateComboBox_setCurrentText(QString text);
void shutterSpeedComboBox_setCurrentText(QString text);
void fNumberComboBox_setCurrentText(QString text);
void whiteBalanceComboBox_setCurrentText(QString text);
void exposureModeComboBox_setCurrentText(QString text);
void focusModeComoBox_setCurrentText(QString text);
void startLiveViewPushButton_setChecked(bool status);
void selfTimerComboBox_setCurrentText(QString text);
void postViewImageSizeComboBox_setCurrentText(QString text);
void drawPreview(QNetworkReply *reply,QString previePicName);
void drawPreview(QString path);
void drawLiveView(QByteArray data);
QByteArray readPreviewFile(QString path);
void on_zoomInPushButton_pressed();
void on_zoomInPushButton_released();
void on_zoomOutPushButton_pressed();
void on_zoomOutPushButton_released();
void on_zoomPositionChanged(const int &text);
void on_quitPushButton_clicked(bool checked);
void on_remote_publishConnetionError(QString message);
void on_nextPushButton_clicked();
void on_previousPushButton_clicked();
private:
Ui::MainWindow *ui;
QTimer *disableTimer;
QTimer *timeoutTimer;
QDialog *infoDialog;
QLabel *shutDownLabel;
NetworkConnection *networkConnection;
LiveViewConsumer *liveViewConsumer;
Remote *remote;
Timelapse *timelapse;
MotorBasic *motorbasic;
double pressedEnd;
double pressedBegin;
//double elapsed_secs;
//QLabel *label;
QButtonGroup *buttonGroup;
QImage previewimg;
QImage liveviewimg;
QSize dialogsize;
QSize liveViewSize;
QGraphicsScene *previewScene;
QGraphicsScene *liveviewScene;
QString previewPath;
QString friendlyName;
QString pictureLocation;
QString homepath;
void savePreviewFile(QByteArray bytes,QString previePicName);
void readSettings();
void writeSettings();
float fontsize;
float statusBarSize;
QFont myf;
int pushbuttonsize;
QSize liveviewimgsize;
QSize currentsize;
bool processingstate;
bool quitaccepted;
bool manualdisconnect;
int currentpreviewfile;
QIntMap files;
};
#endif // MAINWINDOW_H