-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdialog.h
56 lines (43 loc) · 954 Bytes
/
dialog.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
//
// Created by user on 29.10.2020.
//
#ifndef GUI_DIALOG_H
#define GUI_DIALOG_H
#include <QtWidgets>
namespace Ui {
class Dialog;
}
class Dialog : public QDialog
{
Q_OBJECT
public:
enum enControllerType {
els27 =0,
elm327 =1
};
inline const char* ToString(enControllerType v)
{
switch (v)
{
case els27: return "els27";
case elm327: return "elm327";
default: return "";
}
}
struct settings {
enControllerType type;
std::string port_name;
int baudrate{};
bool maximize{};
bool autodetect{};
};
explicit Dialog(QWidget *parent = nullptr);
[[nodiscard]] settings getSettings() const { return m_settings; };
private:
Ui::Dialog *ui;
enControllerType m_selectedType;
settings m_settings;
signals:
void btnOk_click();
};
#endif //GUI_DIALOG_H