-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdlgadcindatatype.h
49 lines (39 loc) · 1.38 KB
/
dlgadcindatatype.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
/*********************************************************************
* Copyright EoF Software Labs. All Rights Reserved.
* Copyright EoF Software Labs Authors.
* Written by B. Eschrich ([email protected])
* SPDX-License-Identifier: GPL v3
**********************************************************************/
#pragma once
#include <QDialog>
#include <QMap>
#include <QPushButton>
#include <wsanaloginmbrtu.h>
namespace Ui {
class DlgAdcInDataType;
}
class DlgAdcInDataType: public QDialog
{
Q_OBJECT
public:
explicit DlgAdcInDataType(WSAnalogInMbRtu* rtu, QWidget* parent = nullptr);
~DlgAdcInDataType();
uint channelType(quint8 channel);
void setChannelTypes(const QMap<quint8, WSAnalogInMbRtu::TChannelType>& types);
const QMap<quint8, WSAnalogInMbRtu::TChannelType>& channelTypes() const;
private slots:
void on_cbChannel_activated(int index);
void on_rbMode0_clicked(bool checked);
void on_rbMode1_clicked(bool checked);
void on_rbMode2_clicked(bool checked);
void on_rbMode3_clicked(bool checked);
void on_rbMode4_clicked(bool checked);
void on_buttonBox_accepted();
private:
Ui::DlgAdcInDataType* ui;
WSAnalogInMbRtu* m_rtu;
QMap<quint8, WSAnalogInMbRtu::TChannelType> m_channelTypes;
quint8 m_channel;
QPushButton* m_btnSave;
inline void setTypeOption(quint8 channel, WSAnalogInMbRtu::TChannelType type);
};