-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathpref_window.h
116 lines (92 loc) · 3.11 KB
/
pref_window.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
#ifndef PREF_WINDOW_H
#define PREF_WINDOW_H
/* Qt includes */
#include <QWidget>
#include <QLabel>
#include <QPushButton>
#include <QCheckBox>
#include <QRadioButton>
#include <QLineEdit>
#include <QFileDialog>
#include <QTabWidget>
#include <QComboBox>
#include <QSpinBox>
//#include <QIntValidator>
/* Live View includes */
#include "frame_worker.h"
#include "profile_widget.h"
#include "fft_widget.h"
#include "preferences.h"
/*! \file
* \brief Adjusts hardware settings in the backend.
* \paragraph
*
* The preferenceWindow offers control over the hardware conditions of the current camera. Many of the command options
* in this window directly affect the raw data as it is received at the back end. Parallel Pixel Remapping may be turned on
* or off for cameras with 6604B geometry (1280x480 resolution). On other cameras, this option is disabled. Options for 14-
* and 16-bit bright-dark swapping are also included. All data arriving on the data bus will be inverted by the specified
* factor. As a sanity check, the expected data range is displayed above this option. The assumed camera type and geometry
* are listed at the top of the window. Additionally, the first or last row data in the raw image may be excluded from the
* image. This option only applies to linear profiles. Log files are not currently an implemented feature.
* \author Jackie Ryan
*/
class preferenceWindow : public QWidget
{
Q_OBJECT
int index;
int base_scale;
unsigned int frHeight;
unsigned int frWidth;
QTabWidget *mainWinTab;
frameWorker *fw;
QWidget *logFileTab = NULL;
QWidget *renderingTab;
QLabel *camera_label;
QLineEdit *filePath;
QLineEdit *leftBound;
QLineEdit *rightBound;
//QIntValidator *valid;
QPushButton *closeButton;
QPushButton *saveSettingsBtn;
QPushButton *browseButton;
QCheckBox *paraPixCheck;
QCheckBox *setDarkStatusInFrameCheck;
QCheckBox *ignoreFirstCheck;
QCheckBox *ignoreLastCheck;
QRadioButton *nativeScaleButton;
QRadioButton *invert16bitButton;
QRadioButton *invert14bitButton;
QHBoxLayout *bottomLayout;
QLabel *ColorLabel;
QComboBox *ColorScalePicker;
QCheckBox *darkThemeCheck;
QSpinBox *penWidthSpin = NULL;
QLabel *penWidthLabel = NULL;
bool havePreferencesLoaded = false;
settingsT preferences;
public:
preferenceWindow(frameWorker *fw, QTabWidget *qtw, settingsT prefs, QWidget *parent = 0);
settingsT getPrefs();
private:
void createLogFileTab();
void createRenderingTab();
void processPreferences();
void makeStatusMessage(QString internalMessage);
private slots:
void getFilePath();
void enableControls(int ndx);
void enableParaPixMap(bool checked);
void dsInFrameSlot(bool checked);
void invertRange();
void ignoreFirstRow(bool checked);
void ignoreLastRow(bool checked);
void setColorScheme(int index);
void setDarkTheme(bool useDarkChecked);
void setPenWidth(int penWidth);
void saveSettingsNow();
signals:
void saveSettings();
void newPenWidth(int penWidth);
void statusMessage(QString message);
};
#endif