44 QVBoxLayout* layout =
new QVBoxLayout(
this);
48 caption <<
"X (mm)" <<
"Y (mm)" <<
"Z (mm)";
50 for (
int i=0; i<caption.size(); ++i)
54 connect(mRange[i], SIGNAL(valueChanged(
double,
double)),
this, SIGNAL(
changed()));
55 layout->addWidget(mRange[i]);
61 mRange[dim]->setVisible(visible);
66 for (
int i=0; i<3; ++i)
68 mRange[i]->blockSignals(
true);
69 mRange[i]->setRange(
DoubleRange(range.begin()[2*i], range.begin()[2*i+1], 1));
70 mRange[i]->setValue(value.begin()[2*i], value.begin()[2*i+1]);
71 mRange[i]->blockSignals(
false);
77 std::pair<double, double> x = mRange[0]->getValue();
78 std::pair<double, double> y = mRange[1]->getValue();
79 std::pair<double, double> z = mRange[2]->getValue();
Utility class for describing a bounded numeric range.
Representation of a floating-point bounding box in 3D. The data are stored as {xmin,xmax,ymin,ymax,zmin,zmax}, in order to simplify communication with vtk.
boost::shared_ptr< class DoublePairProperty > DoublePairPropertyPtr
static DoublePairPropertyPtr initialize(const QString &uid, QString name, QString help, DoubleRange range, int decimals, QDomNode root=QDomNode())