39 lines
785 B
C++
39 lines
785 B
C++
#include "LoraSettingsGui.h"
|
|
#include "ui_LoraSettingsGui.h"
|
|
#include "ProgramSettings.h"
|
|
|
|
CLoraSettingsGui::CLoraSettingsGui(QWidget *parent) :
|
|
QWidget(parent),
|
|
ui(new Ui::CLoraSettingsGui)
|
|
{
|
|
ui->setupUi(this);
|
|
}
|
|
|
|
CLoraSettingsGui::~CLoraSettingsGui()
|
|
{
|
|
delete ui;
|
|
}
|
|
|
|
CLoraSettingsGui::SetSettings(CSettings *settings)
|
|
{
|
|
ui->mLoraAddressSpinBx->setValue(settings->mChaletLoraAddress);
|
|
ui->mComportComboBox->setCurrentText(settings->mChaletComPort);
|
|
return RET_OK;
|
|
}
|
|
|
|
quint16 CLoraSettingsGui::GetChaletLoraAddress()
|
|
{
|
|
quint16 Add = ui->mLoraAddressSpinBx->value();
|
|
return Add;
|
|
}
|
|
|
|
quint8 CLoraSettingsGui::GetChaletLoraChannel()
|
|
{
|
|
return 4;
|
|
}
|
|
|
|
QString CLoraSettingsGui::GetChaletLoraComPort()
|
|
{
|
|
return ui->mComportComboBox->currentText();
|
|
}
|