46 lines
789 B
C++
46 lines
789 B
C++
#include "dialogtest.h"
|
|
#include "ui_dialogtest.h"
|
|
|
|
DialogTest::DialogTest(QWidget *parent)
|
|
: QDialog(parent)
|
|
, ui(new Ui::DialogTest)
|
|
{
|
|
ui->setupUi(this);
|
|
}
|
|
|
|
DialogTest::~DialogTest()
|
|
{
|
|
delete ui;
|
|
}
|
|
|
|
void DialogTest::on_pushButton_clicked()
|
|
{
|
|
deleteLater();
|
|
}
|
|
|
|
|
|
void DialogTest::on_pushButton_2_clicked()
|
|
{
|
|
QByteArray data(4,0);
|
|
data[0]=ui->lineEdit->text().toUInt();
|
|
data[1]=ui->lineEdit_2->text().toUInt();
|
|
data[2]=ui->lineEdit_3->text().toUInt();
|
|
data[3]=ui->lineEdit_4->text().toUInt();
|
|
emit testSendRegSPI(data);
|
|
}
|
|
|
|
|
|
void DialogTest::on_pushButton_3_clicked()
|
|
{
|
|
emit testSendSPI0();
|
|
}
|
|
|
|
|
|
void DialogTest::on_pushButton_4_clicked()
|
|
{
|
|
QByteArray data;
|
|
data.append(ui->lineEdit->text().toUInt());
|
|
emit testReadRegSPI(data);
|
|
}
|
|
|