27 #include <dtkCoreSupport/dtkGlobal.h>
31 class axlInspectorObjectSceneWidgetFieldScalarPrivate
40 QPushButton *disp_non_button;
41 QPushButton *disp_col_button;
42 QPushButton *disp_iso_button;
54 d->disp_col_button =
new QPushButton(
"Color mapping");
55 d->disp_col_button->setCheckable(
true);
56 d->disp_col_button->setChecked(
false);
57 d->disp_col_button->setObjectName(
"left");
59 d->disp_iso_button =
new QPushButton(
"Iso contours");
60 d->disp_iso_button->setCheckable(
true);
61 d->disp_iso_button->setChecked(
false);
62 d->disp_iso_button->setObjectName(
"right");
65 d->disp_non_button =
new QPushButton(
"Nothing");
66 d->disp_non_button->setCheckable(
true);
67 d->disp_non_button->setChecked(
false);
68 d->disp_non_button->setObjectName(
"overleft");
70 QHBoxLayout *disp_layout =
new QHBoxLayout;
71 disp_layout->setContentsMargins(0, 0, 0, 0);
72 disp_layout->setSpacing(0);
73 disp_layout->addWidget(d->disp_non_button);
74 disp_layout->addSpacerItem(
new QSpacerItem(10, 1));
75 disp_layout->addWidget(d->disp_col_button);
76 disp_layout->addSpacerItem(
new QSpacerItem(10, 1));
77 disp_layout->addWidget(d->disp_iso_button);
79 d->layout =
new QVBoxLayout(
this);
80 d->layout->setContentsMargins(0, 0, 0, 0);
81 d->layout->addWidget(
new QLabel(
"Display",
this));
82 d->layout->addLayout(disp_layout);
101 d->iso->setCount(count);
133 if (!d->disp_non_button->isChecked())
136 d->disp_non_button->setChecked(
true);
137 d->disp_col_button->setChecked(
false);
138 d->disp_iso_button->setChecked(
false);
141 d->layout->removeWidget(d->col);
147 d->layout->removeWidget(d->iso);
158 if (!d->disp_col_button->isChecked())
161 d->disp_non_button->setChecked(
false);
162 d->disp_col_button->setChecked(
true);
163 d->disp_iso_button->setChecked(
false);
166 d->layout->removeWidget(d->col);
172 d->layout->removeWidget(d->iso);
178 d->col->setField(d->field);
179 d->col->setView(d->view);
184 d->layout->addWidget(d->col);
191 if (!d->disp_iso_button->isChecked())
194 d->disp_non_button->setChecked(
false);
195 d->disp_col_button->setChecked(
false);
196 d->disp_iso_button->setChecked(
true);
199 d->layout->removeWidget(d->col);
205 d->layout->removeWidget(d->iso);
211 d->iso->setField(d->field);
212 d->iso->setView(d->view);
219 d->layout->addWidget(d->iso);
Class axlAbstractField defines an API for arrays of numeric data.