-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnewcan_decodeparametersdialog.h
54 lines (38 loc) · 1.27 KB
/
newcan_decodeparametersdialog.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
#ifndef NEWCAN_DECODEPARAMETERSDIALOG_H
#define NEWCAN_DECODEPARAMETERSDIALOG_H
#include <QDialog>
#include "Structures.h"
#include <QCheckBox>
namespace Ui {
class NewCAN_DecodeParametersDialog;
}
class NewCAN_DecodeParametersDialog : public QDialog
{
Q_OBJECT
public:
explicit NewCAN_DecodeParametersDialog(QWidget *parent = nullptr);
explicit NewCAN_DecodeParametersDialog(QString qstrID_hex, CAN_DecodeParameters_Stringified preset, QWidget *parent = nullptr);
~NewCAN_DecodeParametersDialog();
signals:
void NewCAN_DecodeParameterAdded(unsigned int ID, CAN_DecodeParameters params);
private:
Ui::NewCAN_DecodeParametersDialog *ui;
QCheckBox* m_chkValueMask[8];
CAN_DecodeParameters::enuValueMask m_mapCheckboxToMask[8];
CAN_DecodeParameters::enuValueMask GetValueMask();
int GetID();
int GetMultiplier();
int GetOffset();
void LoadCheckboxArray();
void LoadCheckboxToMaskMap();
bool hasEmptyField();
void init();
void FillData(QString qstrID_hex, const CAN_DecodeParameters_Stringified& data);
bool m_bError;
private slots:
void FormAccepted();
void Reject_wAlert(QString message);
void on_rbLittleEndian_clicked();
void on_rbBigEndian_clicked();
};
#endif // NEWCAN_DECODEPARAMETERSDIALOG_H