36 this->scaleZ->setValidator(
new QDoubleValidator(0, 100, 8,
this));
38 this->transX->setValidator(
new QDoubleValidator(
this));
39 this->transY->setValidator(
new QDoubleValidator(
this));
40 this->transZ->setValidator(
new QDoubleValidator(
this));
48 connect(this->activeScalarComboBox,
49 SIGNAL(currentIndexChanged(
const QString&)),
this,
67 transformTabWidget->setEnabled(
true);
69 auto* transform_filter =
70 dynamic_cast<vtkTransformFilter*
>(
_item->transformFilter());
73 actorPropertiesGroupBox->setEnabled(
true);
74 vtkProperty* vtkProps =
75 static_cast<vtkActor*
>(
_item->actor())->GetProperty();
76 diffuseColorPickerButton->setColor(vtkProps->GetDiffuseColor());
77 visibleEdgesCheckBox->setChecked(vtkProps->GetEdgeVisibility());
78 edgeColorPickerButton->setColor(vtkProps->GetEdgeColor());
79 opacitySlider->setValue(
80 static_cast<int>(vtkProps->GetOpacity() * 100.0));
83 static_cast<vtkTransform*
>(transform_filter->GetTransform());
87 transform->GetScale(scale);
89 transform->GetPosition(trans);
93 this->scaleZ->blockSignals(
true);
94 this->transX->blockSignals(
true);
95 this->transY->blockSignals(
true);
96 this->transZ->blockSignals(
true);
97 this->scaleZ->setText(QString::number(scale[2]));
98 this->transX->setText(QString::number(trans[0] / scale[0]));
99 this->transY->setText(QString::number(trans[1] / scale[1]));
100 this->transZ->setText(QString::number(trans[2] / scale[2]));
101 this->scaleZ->blockSignals(
false);
102 this->transX->blockSignals(
false);
103 this->transY->blockSignals(
false);
104 this->transZ->blockSignals(
false);
110 QString activeAttribute =
_item->GetActiveAttribute();
111 if (activeAttribute.length() > 0)
113 for (
int i = 0; i < this->activeScalarComboBox->count(); i++)
115 QString itemText = this->activeScalarComboBox->itemText(i);
116 if (itemText.compare(activeAttribute) == 0)
118 this->activeScalarComboBox->setCurrentIndex(i);
127 actorPropertiesGroupBox->setEnabled(
false);
131 transform->GetOriginTranslation(trans);
132 this->transX->blockSignals(
true);
133 this->transY->blockSignals(
true);
134 this->transZ->blockSignals(
true);
135 this->transX->setText(QString::number(trans[0]));
136 this->transY->setText(QString::number(trans[1]));
137 this->transZ->setText(QString::number(trans[2]));
138 this->transX->blockSignals(
false);
139 this->transY->blockSignals(
false);
140 this->transZ->blockSignals(
false);
149 actorPropertiesGroupBox->setEnabled(
false);
150 transformTabWidget->setEnabled(
false);
151 this->activeScalarComboBox->clear();
252 static_cast<QFormLayout*
>(this->scrollAreaWidgetContents->layout());
253 while (layout->count())
255 delete layout->takeAt(0)->widget();
258 QMap<QString, QVariant>* propMap =
nullptr;
259 QMap<QString, QList<QVariant>>* propVecMap =
nullptr;
262 if (algProps ==
nullptr)
263 WARN(
"VtkAlgorithmProperties null!");
284 QMapIterator<QString, QVariant> i(*propMap);
288 QString key = i.key();
289 QVariant value = i.value();
293 switch (value.type())
295 case QVariant::Double:
297 QString::number(value.toDouble()), key,
298 QVariant::Double, algProps);
299 connect(lineEdit, SIGNAL(editingFinished()),
this,
301 layout->addRow(key, lineEdit);
306 QString::number(value.toInt()), key, QVariant::Int,
308 connect(lineEdit, SIGNAL(editingFinished()),
this,
310 layout->addRow(key, lineEdit);
316 connect(checkbox, SIGNAL(stateChanged(
int)),
this,
318 layout->addRow(key, checkbox);
329 QMapIterator<QString, QList<QVariant>> i(*propVecMap);
333 QString key = i.key();
334 QList<QVariant> values = i.value();
338 QList<QString> valuesAsString;
339 foreach (QVariant variant, values)
340 valuesAsString.push_back(variant.toString());
344 valuesAsString, key, values.front().type(), algProps);
345 connect(vectorEdit, SIGNAL(editingFinished()),
this,
347 layout->addRow(key, vectorEdit);
356 dataSetAttributesList.push_back(
"Solid Color");
357 this->activeScalarComboBox->blockSignals(
true);
358 this->activeScalarComboBox->clear();
359 this->activeScalarComboBox->insertItems(0, dataSetAttributesList);
360 this->activeScalarComboBox->blockSignals(
false);
362 QList<QString>::iterator it = dataSetAttributesList.begin();
363 if (active_array_name.length() == 0)
370 for (it = dataSetAttributesList.begin();
371 it != dataSetAttributesList.end();
374 if (active_array_name.compare((*it).right((*it).length() - 2)) == 0)
376 this->activeScalarComboBox->setCurrentIndex(idx);