-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettingswindow.h
56 lines (44 loc) · 1.13 KB
/
settingswindow.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
#ifndef SETTINGSWINDOW_H
#define SETTINGSWINDOW_H
#include <QDialog>
#include <QtSerialPort/QSerialPort>
#include <QIntValidator>
namespace Ui {
class SettingsWindow;
}
class QIntValidator;
class SettingsWindow : public QDialog
{
Q_OBJECT
public:
struct Settings {
QString name;
qint32 baudRate;
QString stringBaudRate;
QSerialPort::DataBits dataBits;
QString stringDataBits;
QSerialPort::Parity parity;
QString stringParity;
QSerialPort::StopBits stopBits;
QString stringStopBits;
QSerialPort::FlowControl flowControl;
QString stringFlowControl;
bool localEchoEnabled;
};
explicit SettingsWindow(QWidget *parent = 0);
Settings settingsFun() const;
~SettingsWindow();
private slots:
void showPortInfo(int idx);
void checkCustomBaudRatePolicy(int idx);
void apply();
void on_rescan_clicked();
private:
void fillPortsParameters();
void fillPortsInfo();
void updateSettings();
Ui::SettingsWindow *ui;
Settings currentSettings;
QIntValidator *intValidator;
};
#endif // SETTINGSWINDOW_H