#include "relayitemsettingswidget.h"
#include "ui_relayitemsettingswidget.h"


RelayItemSettingsWidget::RelayItemSettingsWidget(std::weak_ptr<Relay> relay, QWidget *parent) :
	QWidget(parent),
	ui(new Ui::RelayItemSettingsWidget)
{
	ui->setupUi(this);
	auto relayPtr = relay.lock();
	if(relayPtr)
	{
		ui->label_ID->setText(QString::number(relayPtr->getId()));
		ui->label_Addr->setText(QString::number(relayPtr->getAddress(),2));
	}
}

RelayItemSettingsWidget::~RelayItemSettingsWidget()
{
	delete ui;
}
