26 #include <dtkCoreSupport/dtkGlobal.h>
30 class axlInspectorObjectSceneWidgetFieldScalarColPrivate
37 QSpinBox *col_count_spin;
38 QDoubleSpinBox *col_range_min_spin;
39 QDoubleSpinBox *col_range_max_spin;
40 QPushButton *button_reset_min;
41 QPushButton *button_reset_max;
49 QWidget *col_form =
new QWidget(
this);
50 col_form->setObjectName(
"axlInspectorObjectSceneWidgetFieldScalarColForm");
52 QWidget *col_form_range_min =
new QWidget(col_form);
53 QWidget *col_form_range_max =
new QWidget(col_form);
55 d->col_range_min_spin =
new QDoubleSpinBox(col_form);
56 d->col_range_min_spin->setDecimals(6);
57 d->col_range_min_spin->setMinimum(-1.e6);
58 d->col_range_min_spin->setMaximum(1.e6);
60 d->col_range_max_spin =
new QDoubleSpinBox(col_form);
61 d->col_range_max_spin->setDecimals(6);
62 d->col_range_max_spin->setMinimum(-1.e6);
63 d->col_range_max_spin->setMaximum(1.e6);
65 d->button_reset_min =
new QPushButton(
"reset", col_form);
66 d->button_reset_max =
new QPushButton(
"reset", col_form);
68 QHBoxLayout *col_form_range_min_layout =
new QHBoxLayout(col_form_range_min);
69 col_form_range_min_layout->setContentsMargins(0, 0, 0, 0);
70 col_form_range_min_layout->addWidget(d->col_range_min_spin);
71 col_form_range_min_layout->addWidget(d->button_reset_min);
73 QHBoxLayout *col_form_range_max_layout =
new QHBoxLayout(col_form_range_max);
74 col_form_range_max_layout->setContentsMargins(0, 0, 0, 0);
75 col_form_range_max_layout->addWidget(d->col_range_max_spin);
76 col_form_range_max_layout->addWidget(d->button_reset_max);
78 QFormLayout *col_form_layout =
new QFormLayout(col_form);
79 col_form_layout->setFieldGrowthPolicy(QFormLayout::AllNonFixedFieldsGrow);
80 col_form_layout->setContentsMargins(0, 0, 0, 0);
81 col_form_layout->addRow(
new QLabel(
"Range",
this));
82 col_form_layout->addRow(
"Minimum value:", col_form_range_min);
83 col_form_layout->addRow(
"Maximum value:", col_form_range_max);
85 QVBoxLayout *layout =
new QVBoxLayout(
this);
86 layout->setContentsMargins(0, 0, 0, 0);
87 layout->addWidget(col_form);
90 connect(d->col_range_min_spin, SIGNAL(valueChanged(
double)),
this, SIGNAL(
colRangeMinChanged(
double)));
92 connect(d->col_range_max_spin, SIGNAL(valueChanged(
double)),
this, SIGNAL(
colRangeMaxChanged(
double)));
105 d->col_range_min_spin->setValue(min);
110 d->col_range_max_spin->setValue(max);
121 this->
setMax(actor->colRangeMax());
122 this->
setMin(actor->colRangeMin());
134 this->
setMax(actor->colRangeMax());
135 this->
setMin(actor->colRangeMin());
141 this->
setMin(d->field->minValue());
146 this->
setMax(d->field->maxValue());
Class axlAbstractField defines an API for arrays of numeric data.