#include "QtWidgetsClass_Strip.h"

 

void QtWidgetsClass_Strip::FEKOSimulationDataparamsChanged_slots()
{
	if (this->simulationparams->imagemode == FEKOBase::FEKOImageMode::Strip) {
		this->ui.lineEdit_PRF->setText(QString::number(this->simulationparams->getPRFCount()));
		this->ui.lineEdit_Start_x->setText(QString::number(this->simulationparams->start_x));
		this->ui.lineEdit_start_y->setText(QString::number(this->simulationparams->start_y));
		this->ui.lineEdit_start_z->setText(QString::number(this->simulationparams->start_z));
		this->ui.lineEdit_end_x->setText(QString::number(this->simulationparams->end_x));
		this->ui.lineEdit_end_y->setText(QString::number(this->simulationparams->end_y));
		this->ui.lineEdit_end_z->setText(QString::number(this->simulationparams->end_z));
	}
	else if (this->simulationparams->imagemode == FEKOBase::FEKOImageMode::Scane) {
		this->ui.lineEdit_PRF->setText(QString::number(this->simulationparams->getPRFCount()));
		this->ui.lineEdit_Start_x->setText(QString::number(this->simulationparams->start_x));
		this->ui.lineEdit_start_y->setText(QString::number(this->simulationparams->start_y));
		this->ui.lineEdit_start_z->setText(QString::number(this->simulationparams->start_z));
		this->ui.lineEdit_end_x->setText(QString::number(this->simulationparams->end_x));
		this->ui.lineEdit_end_y->setText(QString::number(this->simulationparams->end_y));
		this->ui.lineEdit_end_z->setText(QString::number(this->simulationparams->end_z));
	}
	else {
		return;
	}

}

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

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

QtWidgetsClass_Strip::~QtWidgetsClass_Strip()
{}


void QtWidgetsClass_Strip::on_pushButton_OK_clicked() {


	//void OKClick(double incAngle, double refRange, double start_x, double start_y, double start_z, double end_x, double end_y, double end_z, size_t prfcount);
	this->simulationparams->setPRFCount(this->ui.lineEdit_PRF->text().toInt());
	this->simulationparams->setStart_x(this->ui.lineEdit_Start_x->text().toDouble());
	this->simulationparams->setStart_y(this->ui.lineEdit_start_y->text().toDouble());
	this->simulationparams->setStart_z(this->ui.lineEdit_start_z->text().toDouble());
	this->simulationparams->setEnd_x(this->ui.lineEdit_end_x->text().toDouble());
	this->simulationparams->setEnd_y(this->ui.lineEdit_end_y->text().toDouble());
	this->simulationparams->setEnd_z(this->ui.lineEdit_end_z->text().toDouble());
	this->simulationparams->setImagemode(FEKOBase::FEKOImageMode::Strip);
	emit this->OKClick();

}