#include "QtWidgetsClass_ImageSetting.h"

 

void QtWidgetsClass_ImageSetting::FEKOSimulationDataparamsChanged_slots()
{
	this->ui.lineEdit_minX->setText(QString::number(this->simulationparams->getX_min()));
	this->ui.lineEdit__maxX->setText(QString::number(this->simulationparams->getX_max()));
	this->ui.lineEdit__minY->setText(QString::number(this->simulationparams->getY_min()));
	this->ui.lineEdit__maxY->setText(QString::number(this->simulationparams->getY_max()));
	this->ui.lineEdit_planeZ->setText(QString::number(this->simulationparams->getZ_plane()));
	this->ui.lineEdit_height->setText(QString::number(this->simulationparams->getImageheight()));
	this->ui.lineEdit_width->setText(QString::number(this->simulationparams->getImagewidth()));
}

void QtWidgetsClass_ImageSetting::bandingsetFEKOSimulationDataparams()
{
	QObject::connect(this->simulationparams.get(), SIGNAL(FEKOSimulationDataparamsChanged()), this, SLOT(FEKOSimulationDataparamsChanged_slots()));

}

QtWidgetsClass_ImageSetting::QtWidgetsClass_ImageSetting(QWidget *parent)
	: QWidget(parent)
{
	ui.setupUi(this);
}

QtWidgetsClass_ImageSetting::~QtWidgetsClass_ImageSetting()
{}



void QtWidgetsClass_ImageSetting::on_pushButton_OK_clicked() {

	this->simulationparams->setX_min(this->ui.lineEdit_minX->text().toDouble());
	this->simulationparams->setX_max(this->ui.lineEdit__maxX->text().toDouble());
	this->simulationparams->setY_min(this->ui.lineEdit__minY->text().toDouble());
	this->simulationparams->setY_max(this->ui.lineEdit__maxY->text().toDouble());
	this->simulationparams->setZ_plane(this->ui.lineEdit_planeZ->text().toDouble());
	this->simulationparams->setImageheight(this->ui.lineEdit_height->text().toInt());
	this->simulationparams->setImagewidth(this->ui.lineEdit_width->text().toInt());
	  

	emit this->OKClick();
}