move from tabs to spaces
This commit is contained in:
parent
a6aad07f05
commit
fa45072998
86 changed files with 2611 additions and 2486 deletions
|
|
@ -1,48 +1,50 @@
|
|||
#include "polynomalactorwidget.h"
|
||||
#include "ui_polynomalactorwidget.h"
|
||||
|
||||
PolynomalActorWidget::PolynomalActorWidget(std::shared_ptr<PolynomalActor> actor, SensorStore* sensors, QWidget *parent):
|
||||
QWidget(parent),
|
||||
sensors_(sensors),
|
||||
actor_(actor),
|
||||
ui(new Ui::PolynomalActorWidget)
|
||||
PolynomalActorWidget::PolynomalActorWidget(std::shared_ptr<PolynomalActor> actor, SensorStore* sensors,
|
||||
QWidget *parent):
|
||||
QWidget(parent),
|
||||
sensors_(sensors),
|
||||
actor_(actor),
|
||||
ui(new Ui::PolynomalActorWidget)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
if(sensors)ui->listView->sensorsChanged(*(sensors->getSensors()));
|
||||
else
|
||||
{
|
||||
ui->listView->hide();
|
||||
ui->label->hide();
|
||||
}
|
||||
ui->setupUi(this);
|
||||
if(sensors)ui->listView->sensorsChanged(*(sensors->getSensors()));
|
||||
else
|
||||
{
|
||||
ui->listView->hide();
|
||||
ui->label->hide();
|
||||
}
|
||||
|
||||
double pow3, pow2, pow1, pow0;
|
||||
double pow3, pow2, pow1, pow0;
|
||||
|
||||
actor_->getCoeffiancts(pow3, pow2, pow1, pow0);
|
||||
actor_->getCoeffiancts(pow3, pow2, pow1, pow0);
|
||||
|
||||
ui->doubleSpinBox_pow0->setValue(pow0);
|
||||
ui->doubleSpinBox_pow1->setValue(pow1);
|
||||
ui->doubleSpinBox_pow2->setValue(pow2);
|
||||
ui->doubleSpinBox_pow3->setValue(pow3);
|
||||
ui->doubleSpinBox_pow0->setValue(pow0);
|
||||
ui->doubleSpinBox_pow1->setValue(pow1);
|
||||
ui->doubleSpinBox_pow2->setValue(pow2);
|
||||
ui->doubleSpinBox_pow3->setValue(pow3);
|
||||
|
||||
connect(ui->doubleSpinBox_pow3, &QDoubleSpinBox::editingFinished, this, &PolynomalActorWidget::setPow);
|
||||
connect(ui->doubleSpinBox_pow2, &QDoubleSpinBox::editingFinished, this, &PolynomalActorWidget::setPow);
|
||||
connect(ui->doubleSpinBox_pow1, &QDoubleSpinBox::editingFinished, this, &PolynomalActorWidget::setPow);
|
||||
connect(ui->doubleSpinBox_pow0, &QDoubleSpinBox::editingFinished, this, &PolynomalActorWidget::setPow);
|
||||
connect(ui->listView, &SensorListWidget::clicked, this, &PolynomalActorWidget::setSensor);
|
||||
connect(ui->doubleSpinBox_pow3, &QDoubleSpinBox::editingFinished, this, &PolynomalActorWidget::setPow);
|
||||
connect(ui->doubleSpinBox_pow2, &QDoubleSpinBox::editingFinished, this, &PolynomalActorWidget::setPow);
|
||||
connect(ui->doubleSpinBox_pow1, &QDoubleSpinBox::editingFinished, this, &PolynomalActorWidget::setPow);
|
||||
connect(ui->doubleSpinBox_pow0, &QDoubleSpinBox::editingFinished, this, &PolynomalActorWidget::setPow);
|
||||
connect(ui->listView, &SensorListWidget::clicked, this, &PolynomalActorWidget::setSensor);
|
||||
|
||||
}
|
||||
|
||||
PolynomalActorWidget::~PolynomalActorWidget()
|
||||
{
|
||||
delete ui;
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void PolynomalActorWidget::setPow()
|
||||
{
|
||||
actor_->setCoeffiancts(ui->doubleSpinBox_pow3->value(), ui->doubleSpinBox_pow2->value(), ui->doubleSpinBox_pow1->value(), ui->doubleSpinBox_pow0->value());
|
||||
actor_->setCoeffiancts(ui->doubleSpinBox_pow3->value(), ui->doubleSpinBox_pow2->value(),
|
||||
ui->doubleSpinBox_pow1->value(), ui->doubleSpinBox_pow0->value());
|
||||
}
|
||||
|
||||
void PolynomalActorWidget::setSensor(const QModelIndex &index)
|
||||
{
|
||||
actor_->setSensor(sensors_->getSensors()->at(index.row()));
|
||||
actor_->setSensor(sensors_->getSensors()->at(index.row()));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue