26 #include <dtkCoreSupport/dtkAbstractProcessFactory.h>
27 #include <dtkCoreSupport/dtkAbstractProcess.h>
28 #include <dtkGuiSupport/dtkColorButton.h>
32 class axlInspectorToolCreatorPointSetPrivate
35 QSlider *sliderOpacity;
36 dtkColorButton *colorButton;
39 QSpinBox *spinBoxNumPoints;
44 QVBoxLayout *layout =
new QVBoxLayout(
this);
47 d->sliderOpacity =
new QSlider(Qt::Horizontal,
this);
49 QHBoxLayout *layoutOpacity =
new QHBoxLayout;
50 layoutOpacity->addWidget(
new QLabel(
"Opacity",
this));
51 layoutOpacity->addWidget(d->sliderOpacity);
52 d->sliderOpacity->setMaximum(100);
55 d->colorButton =
new dtkColorButton(
this);
57 QHBoxLayout *layoutColorButton =
new QHBoxLayout;
58 layoutColorButton->addWidget(
new QLabel(
"Color",
this));
59 layoutColorButton->addWidget(d->colorButton);
60 d->colorButton->setColor(QColor(
"#a0a0a4"));
63 QHBoxLayout *layoutNumPoints =
new QHBoxLayout;
64 QLabel *labelNumPoints =
new QLabel(
"NumPoints",
this);
65 d->spinBoxNumPoints =
new QSpinBox(
this);
66 d->spinBoxNumPoints->setMaximum(10000);
67 d->spinBoxNumPoints->setMinimum(1);
68 d->spinBoxNumPoints->setValue(1);
69 layoutNumPoints->addWidget(labelNumPoints);
70 layoutNumPoints->addWidget(d->spinBoxNumPoints);
72 QPushButton *button =
new QPushButton(
"Create",
this);
73 connect(button, SIGNAL(clicked()),
this, SLOT(
run()));
75 layout->addWidget(
new QLabel(
"axlInspectorToolCreatorPointSet",
this));
76 layout->addLayout(layoutNumPoints);
77 layout->addLayout(layoutOpacity);
78 layout->addLayout(layoutColorButton);
79 layout->addWidget(button);
91 d->controller = controller;
98 for(
int i = 0; i < d->spinBoxNumPoints->value(); i++)
104 newPointSet->
setColor(d->colorButton->color());
105 double opacity = 1.0 - 0.01 * d->sliderOpacity->value();
Class axlPoint defines 3D points.
void push_back(axlPoint *p)
void setOpacity(const double &opacity)
void setSize(const double &size)
void setColor(double r, double g, double b)