Commit 13c6dd97 authored by LACROIX Romain's avatar LACROIX Romain

Minimum value = 0 for radii and sizes/lengths.

parent 0afd6da6
......@@ -259,7 +259,7 @@ dtkVisualizationDecoratorVectorStreamTracer::dtkVisualizationDecoratorVectorStre
seed_pos1_y->setObjectName("Position Y");
dtkVisualizationWidgetsScalarControl *seed_pos1_z = new dtkVisualizationWidgetsScalarControl;
seed_pos1_z->setObjectName("Position Z");
dtkVisualizationWidgetsScalarControl *seed_radius = new dtkVisualizationWidgetsScalarControl;
dtkVisualizationWidgetsScalarControl *seed_radius = new dtkVisualizationWidgetsScalarPositiveControl;
seed_radius->setObjectName("Radius");
//////////
......
......@@ -45,3 +45,8 @@ dtkVisualizationWidgetsScalarControl::dtkVisualizationWidgetsScalarControl(QWidg
emit reset();
});
}
dtkVisualizationWidgetsScalarPositiveControl::dtkVisualizationWidgetsScalarPositiveControl(QWidget *parent) : dtkVisualizationWidgetsScalarControl(parent)
{
spbox->setMinimum(0);
}
......@@ -23,10 +23,18 @@ public:
signals:
void valueChanged(double);
void reset();
private:
protected:
// TODO move in private d-pointer (and remove forward declarations above)
// TODO show pos+radius or pos1+pos2 depending on sphere/line
// TODO plug other direction : with observers
QDoubleSpinBox *spbox;
QPushButton *breset;
};
class DTKVISUALIZATIONWIDGETS_EXPORT dtkVisualizationWidgetsScalarPositiveControl : public dtkVisualizationWidgetsScalarControl
{
Q_OBJECT
public:
dtkVisualizationWidgetsScalarPositiveControl(QWidget *parent = nullptr);
};
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment