27 #include <dtkCoreSupport/dtkAbstractProcessFactory.h>
28 #include <dtkCoreSupport/dtkAbstractProcess.h>
29 #include <dtkGuiSupport/dtkColorButton.h>
36 class axlInspectorToolCreatorLinePrivate
39 QSlider *sliderOpacity;
40 dtkColorButton *colorButton;
43 QDoubleSpinBox *spinBoxCoordinateFirst_x;
44 QDoubleSpinBox *spinBoxCoordinateFirst_y;
45 QDoubleSpinBox *spinBoxCoordinateFirst_z;
47 QDoubleSpinBox *spinBoxCoordinateSecond_x;
48 QDoubleSpinBox *spinBoxCoordinateSecond_y;
49 QDoubleSpinBox *spinBoxCoordinateSecond_z;
54 QVBoxLayout *layout =
new QVBoxLayout(
this);
57 QPushButton *button =
new QPushButton(
"Create",
this);
58 connect(button, SIGNAL(clicked()),
this, SLOT(
run()));
60 layout->addWidget(
new QLabel(
"axlInspectorToolCreatorLine",
this));
61 layout->addWidget(button);
73 d->controller = controller;
79 axlPoint *firstPoint =
new axlPoint(d->spinBoxCoordinateFirst_x->value(), d->spinBoxCoordinateFirst_y->value(), d->spinBoxCoordinateFirst_z->value());
80 axlPoint *secondPoint =
new axlPoint(d->spinBoxCoordinateSecond_x->value(), d->spinBoxCoordinateSecond_y->value(), d->spinBoxCoordinateSecond_z->value());
83 dynamicLine->setProcess(lineCreator);
84 dynamicLine->setInput(firstPoint);
85 dynamicLine->setInput(secondPoint);
86 dynamicLine->update();
90 line->setParent(dynamicLine);
92 line->
setColor(d->colorButton->color());
93 double opacity = 1.0 - 0.01 * d->sliderOpacity->value();
Class axlPoint defines 3D points.
Class axlLine defines 3D lines.
Class axlDataDynamic defines a dynamic object.
void setOpacity(const double &opacity)
void setColor(double r, double g, double b)