40 lines
816 B
C++
40 lines
816 B
C++
#ifndef PARAMETERBOX_H
|
|
#define PARAMETERBOX_H
|
|
|
|
#include <QWidget>
|
|
|
|
namespace Ui {
|
|
class ParameterBox;
|
|
}
|
|
|
|
class ParameterBox : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
enum pboxMode{
|
|
Info = 0,
|
|
MTemplate = 1
|
|
};
|
|
enum objectType{
|
|
Coil = 0,
|
|
HR = 1
|
|
};
|
|
explicit ParameterBox(QWidget *parent = nullptr, pboxMode Mode = Info, quint16 objectID = 0x80);
|
|
~ParameterBox();
|
|
void setData(QString data);
|
|
void setData(QString name, QString adr, QStringList values);
|
|
quint16 getID(){return ID;}
|
|
objectType getType(){return type;}
|
|
signals:
|
|
void writeParameter(int adr, quint16 value);
|
|
private slots:
|
|
void on_sendButton_clicked();
|
|
private:
|
|
quint16 ID;
|
|
pboxMode boxMode;
|
|
objectType type = HR;
|
|
Ui::ParameterBox *ui;
|
|
};
|
|
|
|
#endif // PARAMETERBOX_H
|