26 #include <dtkCoreSupport/dtkGlobal.h>
30 class axlInspectorObjectSceneWidgetFieldScalarIsoPrivate
37 QSpinBox *iso_count_spin;
38 QDoubleSpinBox *iso_radius_spin;
39 QDoubleSpinBox *iso_range_min_spin;
40 QDoubleSpinBox *iso_range_max_spin;
41 QPushButton *button_reset_min;
42 QPushButton *button_reset_max;
50 QWidget *iso_form =
new QWidget(
this);
51 iso_form->setObjectName(
"axlInspectorObjectSceneWidgetFieldScalarIsoForm");
53 QWidget *iso_form_range_min =
new QWidget(iso_form);
54 QWidget *iso_form_range_max =
new QWidget(iso_form);
56 d->iso_count_spin =
new QSpinBox(iso_form); d->iso_count_spin->setMaximum(1000);
58 d->iso_radius_spin =
new QDoubleSpinBox(iso_form);
59 d->iso_radius_spin->setValue(0.01);
60 d->iso_radius_spin->setMaximum(1000);
61 d->iso_radius_spin->setMinimum(0.0);
62 d->iso_radius_spin->setDecimals(5);
63 d->iso_radius_spin->setSingleStep(0.01);
65 d->iso_range_min_spin =
new QDoubleSpinBox(iso_form);
66 d->iso_range_min_spin->setDecimals(5);
67 d->iso_range_min_spin->setMinimum(-1.e6);
68 d->iso_range_min_spin->setMaximum(1.e6);
71 d->iso_range_max_spin =
new QDoubleSpinBox(iso_form);
72 d->iso_range_max_spin->setDecimals(5);
73 d->iso_range_max_spin->setMinimum(-1.e6);
74 d->iso_range_max_spin->setMaximum(1.e6);
77 d->button_reset_min =
new QPushButton(
"reset", iso_form);
78 d->button_reset_max =
new QPushButton(
"reset", iso_form);
80 QHBoxLayout *iso_form_range_min_layout =
new QHBoxLayout(iso_form_range_min);
81 iso_form_range_min_layout->setContentsMargins(0, 0, 0, 0);
82 iso_form_range_min_layout->addWidget(d->iso_range_min_spin);
83 iso_form_range_min_layout->addWidget(d->button_reset_min);
85 QHBoxLayout *iso_form_range_max_layout =
new QHBoxLayout(iso_form_range_max);
86 iso_form_range_max_layout->setContentsMargins(0, 0, 0, 0);
87 iso_form_range_max_layout->addWidget(d->iso_range_max_spin);
88 iso_form_range_max_layout->addWidget(d->button_reset_max);
90 QFormLayout *iso_form_layout =
new QFormLayout(iso_form);
91 iso_form_layout->setFieldGrowthPolicy(QFormLayout::AllNonFixedFieldsGrow);
92 iso_form_layout->setContentsMargins(0, 0, 0, 0);
93 iso_form_layout->addRow(
"Number of contours:", d->iso_count_spin);
94 iso_form_layout->addRow(
"Radius of tubes:", d->iso_radius_spin);
95 iso_form_layout->addRow(
new QLabel(
"Range",
this));
96 iso_form_layout->addRow(
"Minimum value:", iso_form_range_min);
97 iso_form_layout->addRow(
"Maximum value:", iso_form_range_max);
99 QVBoxLayout *layout =
new QVBoxLayout(
this);
100 layout->setContentsMargins(0, 0, 0, 0);
101 layout->addWidget(
new QLabel(
"Iso contours",
this));
102 layout->addWidget(iso_form);
105 connect(d->iso_count_spin, SIGNAL(valueChanged(
int)),
this, SIGNAL(
isoCountChanged(
int)));
106 connect(d->iso_radius_spin, SIGNAL(valueChanged(
double)),
this, SIGNAL(
isoRadiusChanged(
double)));
107 connect(d->iso_range_min_spin, SIGNAL(valueChanged(
double)),
this, SIGNAL(
isoRangeMinChanged(
double)));
109 connect(d->iso_range_max_spin, SIGNAL(valueChanged(
double)),
this, SIGNAL(
isoRangeMaxChanged(
double)));
122 d->iso_count_spin->setValue(count);
127 d->iso_range_min_spin->setValue(min);
132 d->iso_range_max_spin->setValue(max);
145 this->
setMax(actor->isoRangeMax());
146 this->
setMin(actor->isoRangeMin());
160 this->
setMax(actor->isoRangeMax());
161 this->
setMin(actor->isoRangeMin());
167 this->
setMin(d->field->minValue());
172 this->
setMax(d->field->maxValue());
Class axlAbstractField defines an API for arrays of numeric data.