44 QVBoxLayout* layout =
new QVBoxLayout(
this);
47 if(captions.isEmpty())
48 captions = QStringList() <<
"X (mm)" <<
"Y (mm)" <<
"Z (mm)";
50 for (
int i=0; i<captions.size(); ++i)
55 layout->addWidget(mRange[i]);
56 if(i >= captions.size())
57 mRange[i]->setVisible(
false);
63 mRange[dim]->setVisible(visible);
68 for (
int i=0; i<mRange.size(); ++i)
70 mRange[i]->blockSignals(
true);
71 mRange[i]->setRange(
DoubleRange(range.begin()[2*i], range.begin()[2*i+1], 1));
72 mRange[i]->setValue(value.begin()[2*i], value.begin()[2*i+1]);
73 mRange[i]->blockSignals(
false);
80 std::vector< std::pair<double, double> >
values;
81 for(
unsigned i = 0; i < 3; ++i)
82 values.push_back(std::make_pair(0, 0));
85 for(
unsigned i = 0; i < mRange.size(); ++i)
89 values[0].first, values[0].second,
90 values[1].first, values[1].second,
91 values[2].first, values[2].second);
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.
CompositeGenerator< T > values(T val1, T val2)
boost::shared_ptr< class DoublePairProperty > DoublePairPropertyPtr
static DoublePairPropertyPtr initialize(const QString &uid, QString name, QString help, DoubleRange range, int decimals, QDomNode root=QDomNode())
Namespace for all CustusX production code.