19 #include "ui_vp1drawoptionsform.h"
20 #include <Inventor/nodes/SoGroup.h>
21 #include <Inventor/nodes/SoComplexity.h>
22 #include <Inventor/nodes/SoLightModel.h>
23 #include <Inventor/nodes/SoDrawStyle.h>
29 Ui::DrawOptionsForm
ui;
46 m_d->
ui.setupUi(
this);
56 m_d->
group->setName(
"DrawOptionsGroup");
94 const int val =
m_d->
ui.horizontalSlider_complexity->value();
95 const int min =
m_d->
ui.horizontalSlider_complexity->minimum();
96 const int max =
m_d->
ui.horizontalSlider_complexity->maximum();
101 return std::min<double>(1.0,std::max<double>(0.0,(
val-
min)/(
max*1.0)));
107 int min =
m_d->
ui.horizontalSlider_complexity->minimum();
108 int max =
m_d->
ui.horizontalSlider_complexity->maximum();
110 if (
m_d->
ui.horizontalSlider_complexity->value()!=newval) {
111 m_d->
ui.horizontalSlider_complexity->setValue(newval);
133 if (
m_d->
ui.checkBox_useBaseLightModel->isChecked()==
b)
135 m_d->
ui.checkBox_useBaseLightModel->setChecked(
b);
145 m_d->
ui.label_curve_realism->setVisible(!
b);
146 m_d->
ui.horizontalSlider_complexity->setVisible(!
b);
156 m_d->
ui.label_linewidths->setVisible(!
b);
157 m_d->
ui.horizontalSlider_linewidths->setVisible(!
b);
167 m_d->
ui.label_pointsizes->setVisible(!
b);
168 m_d->
ui.horizontalSlider_pointsizes->setVisible(!
b);
178 m_d->
ui.checkBox_useBaseLightModel->setVisible(!
b);
189 if (drawStyleAttached)
192 if (!drawStyleAttached)
198 if (complexityAttached)
201 if (!complexityAttached)
207 if (lightModelAttachedGoal!=lightModelAttached) {
208 if (lightModelAttached)
224 complexityval = std::min<double>(1.0,std::max<double>(0.0,0.01+0.991*complexityval));
249 s.widgetHandled(
m_d->
ui.horizontalSlider_linewidths);
250 s.widgetHandled(
m_d->
ui.horizontalSlider_pointsizes);
252 s.save(
m_d->
ui.horizontalSlider_complexity);
253 s.save(
m_d->
ui.checkBox_useBaseLightModel);
255 s.widgetHandled(
this);
271 s.widgetHandled(
m_d->
ui.horizontalSlider_linewidths);
272 s.widgetHandled(
m_d->
ui.horizontalSlider_pointsizes);
274 s.restore(
m_d->
ui.horizontalSlider_complexity);
275 s.restore(
m_d->
ui.checkBox_useBaseLightModel);
277 s.widgetHandled(
this);
278 s.warnUnrestored(
this);