Skip to content
Snippets Groups Projects
Commit 2fbbe2d1 authored by Mikhail Svechnikov's avatar Mikhail Svechnikov
Browse files

rm JobItem mapper from FitComparisonWidget

parent 9b513d59
Branches
Tags
1 merge request!911GUI refactoring: JobItem mappers are fully removed
Pipeline #65656 passed
......@@ -173,7 +173,6 @@ void ParameterTuningWidget::subscribeToItem()
updateParameterModel();
updateDragAndDropSettings();
// status
connect(jobItem(), &JobItem::jobStatusChanged, this,
[=](const JobStatus) {updateJobStatus();}, Qt::UniqueConnection);
......
......@@ -126,12 +126,8 @@ void RunFitControlWidget::subscribeToItem()
updateIterationsCountLabel();
jobItem()->mapper()->setOnPropertyChange(
[this](const QString& name) {
if (JobItem::isStatusPropertyName(name))
updateControlElements();
},
this);
connect(jobItem(), &JobItem::jobStatusChanged, this,
[=](const JobStatus) {updateControlElements();}, Qt::UniqueConnection);
}
void RunFitControlWidget::unsubscribeFromItem()
......
......@@ -106,7 +106,6 @@ void JobPropertiesWidget::setItem(JobItem* item)
void JobPropertiesWidget::notifyJobPropertyChange()
{
// comments
connect(
m_item, &JobItem::jobCommentsChanged, this, [=](const QString&) {
if(m_item && m_item->getComments() != m_commentsEditor->toPlainText()) {
......
......@@ -87,14 +87,12 @@ void FitComparisonWidget::subscribeToItem()
if (!jobItem()->isValidForFitting())
return;
jobItem()->mapper()->setOnPropertyChange(
[this](const QString& name) {
if (JobItem::isStatusPropertyName(name)) {
if (jobItem()->isCompleted())
onResetViewAction();
}
},
this);
connect(jobItem(), &JobItem::jobStatusChanged, this,
[=](const JobStatus) {
if (jobItem()->isCompleted())
onResetViewAction();
},
Qt::UniqueConnection);
m_comparisonController->setItem(jobItem());
m_realDataPlot->setItem(realDataItem());
......
......@@ -86,14 +86,12 @@ void FitComparisonWidget1D::subscribeToItem()
if (!jobItem()->isValidForFitting())
return;
jobItem()->mapper()->setOnPropertyChange(
[this](const QString& name) {
if (JobItem::isStatusPropertyName(name)) {
if (jobItem()->isCompleted())
onResetViewAction();
}
},
this);
connect(jobItem(), &JobItem::jobStatusChanged, this,
[=](const JobStatus) {
if (jobItem()->isCompleted())
onResetViewAction();
},
Qt::UniqueConnection);
m_comparisonController->setItem(jobItem());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment