This commit is contained in:
wmayer
2013-04-28 14:31:12 +02:00
parent 9eb917af08
commit ecc61ba784
4 changed files with 19 additions and 19 deletions

View File

@@ -204,7 +204,7 @@ void AbstractSplitView::OnChange(ParameterGrp::SubjectType &rCaller,ParameterGrp
} }
else if (strcmp(Reason,"Gradient") == 0) { else if (strcmp(Reason,"Gradient") == 0) {
for (std::vector<View3DInventorViewer*>::iterator it = _viewer.begin(); it != _viewer.end(); ++it) for (std::vector<View3DInventorViewer*>::iterator it = _viewer.begin(); it != _viewer.end(); ++it)
(*it)->setGradientBackgroud((rGrp.GetBool("Gradient",true))); (*it)->setGradientBackground((rGrp.GetBool("Gradient",true)));
} }
else if (strcmp(Reason,"UseAntialiasing") == 0) { else if (strcmp(Reason,"UseAntialiasing") == 0) {
for (std::vector<View3DInventorViewer*>::iterator it = _viewer.begin(); it != _viewer.end(); ++it) for (std::vector<View3DInventorViewer*>::iterator it = _viewer.begin(); it != _viewer.end(); ++it)
@@ -238,9 +238,9 @@ void AbstractSplitView::OnChange(ParameterGrp::SubjectType &rCaller,ParameterGrp
for (std::vector<View3DInventorViewer*>::iterator it = _viewer.begin(); it != _viewer.end(); ++it) { for (std::vector<View3DInventorViewer*>::iterator it = _viewer.begin(); it != _viewer.end(); ++it) {
(*it)->setBackgroundColor(SbColor(r1, g1, b1)); (*it)->setBackgroundColor(SbColor(r1, g1, b1));
if (rGrp.GetBool("UseBackgroundColorMid",false) == false) if (rGrp.GetBool("UseBackgroundColorMid",false) == false)
(*it)->setGradientBackgroudColor(SbColor(r2, g2, b2), SbColor(r3, g3, b3)); (*it)->setGradientBackgroundColor(SbColor(r2, g2, b2), SbColor(r3, g3, b3));
else else
(*it)->setGradientBackgroudColor(SbColor(r2, g2, b2), SbColor(r3, g3, b3), SbColor(r4, g4, b4)); (*it)->setGradientBackgroundColor(SbColor(r2, g2, b2), SbColor(r3, g3, b3), SbColor(r4, g4, b4));
} }
} }
} }

View File

@@ -307,7 +307,7 @@ void View3DInventor::OnChange(ParameterGrp::SubjectType &rCaller,ParameterGrp::M
_viewer->setAnimationEnabled(rGrp.GetBool("UseAutoRotation",true)); _viewer->setAnimationEnabled(rGrp.GetBool("UseAutoRotation",true));
} }
else if (strcmp(Reason,"Gradient") == 0) { else if (strcmp(Reason,"Gradient") == 0) {
_viewer->setGradientBackgroud((rGrp.GetBool("Gradient",true))); _viewer->setGradientBackground((rGrp.GetBool("Gradient",true)));
} }
else if (strcmp(Reason,"UseAntialiasing") == 0) { else if (strcmp(Reason,"UseAntialiasing") == 0) {
_viewer->getGLRenderAction()->setSmoothing(rGrp.GetBool("UseAntialiasing",false)); _viewer->getGLRenderAction()->setSmoothing(rGrp.GetBool("UseAntialiasing",false));
@@ -357,9 +357,9 @@ void View3DInventor::OnChange(ParameterGrp::SubjectType &rCaller,ParameterGrp::M
r4 = ((col4 >> 24) & 0xff) / 255.0; g4 = ((col4 >> 16) & 0xff) / 255.0; b4 = ((col4 >> 8) & 0xff) / 255.0; r4 = ((col4 >> 24) & 0xff) / 255.0; g4 = ((col4 >> 16) & 0xff) / 255.0; b4 = ((col4 >> 8) & 0xff) / 255.0;
_viewer->setBackgroundColor(SbColor(r1, g1, b1)); _viewer->setBackgroundColor(SbColor(r1, g1, b1));
if (rGrp.GetBool("UseBackgroundColorMid",false) == false) if (rGrp.GetBool("UseBackgroundColorMid",false) == false)
_viewer->setGradientBackgroudColor(SbColor(r2, g2, b2), SbColor(r3, g3, b3)); _viewer->setGradientBackgroundColor(SbColor(r2, g2, b2), SbColor(r3, g3, b3));
else else
_viewer->setGradientBackgroudColor(SbColor(r2, g2, b2), SbColor(r3, g3, b3), SbColor(r4, g4, b4)); _viewer->setGradientBackgroundColor(SbColor(r2, g2, b2), SbColor(r3, g3, b3), SbColor(r4, g4, b4));
} }
} }

View File

@@ -258,7 +258,7 @@ View3DInventorViewer::View3DInventorViewer (QWidget *parent, const char *name,
setViewing(false); setViewing(false);
setBackgroundColor(SbColor(0.1f, 0.1f, 0.1f)); setBackgroundColor(SbColor(0.1f, 0.1f, 0.1f));
setGradientBackgroud(true); setGradientBackground(true);
// set some callback functions for user interaction // set some callback functions for user interaction
addStartCallback(interactionStartCB); addStartCallback(interactionStartCB);
@@ -420,7 +420,7 @@ void View3DInventorViewer::handleEventCB(void * ud, SoEventCallback * n)
SoGLWidgetElement::set(action->getState(), qobject_cast<QGLWidget*>(that->getGLWidget())); SoGLWidgetElement::set(action->getState(), qobject_cast<QGLWidget*>(that->getGLWidget()));
} }
void View3DInventorViewer::setGradientBackgroud(bool on) void View3DInventorViewer::setGradientBackground(bool on)
{ {
if (on && backgroundroot->findChild(pcBackGround) == -1) if (on && backgroundroot->findChild(pcBackGround) == -1)
backgroundroot->addChild(pcBackGround); backgroundroot->addChild(pcBackGround);
@@ -428,15 +428,15 @@ void View3DInventorViewer::setGradientBackgroud(bool on)
backgroundroot->removeChild(pcBackGround); backgroundroot->removeChild(pcBackGround);
} }
void View3DInventorViewer::setGradientBackgroudColor(const SbColor& fromColor, void View3DInventorViewer::setGradientBackgroundColor(const SbColor& fromColor,
const SbColor& toColor) const SbColor& toColor)
{ {
pcBackGround->setColorGradient(fromColor, toColor); pcBackGround->setColorGradient(fromColor, toColor);
} }
void View3DInventorViewer::setGradientBackgroudColor(const SbColor& fromColor, void View3DInventorViewer::setGradientBackgroundColor(const SbColor& fromColor,
const SbColor& toColor, const SbColor& toColor,
const SbColor& midColor) const SbColor& midColor)
{ {
pcBackGround->setColorGradient(fromColor, toColor, midColor); pcBackGround->setColorGradient(fromColor, toColor, midColor);
} }

View File

@@ -254,12 +254,12 @@ public:
*/ */
void viewSelection(); void viewSelection();
void setGradientBackgroud(bool b); void setGradientBackground(bool b);
void setGradientBackgroudColor(const SbColor& fromColor, void setGradientBackgroundColor(const SbColor& fromColor,
const SbColor& toColor); const SbColor& toColor);
void setGradientBackgroudColor(const SbColor& fromColor, void setGradientBackgroundColor(const SbColor& fromColor,
const SbColor& toColor, const SbColor& toColor,
const SbColor& midColor); const SbColor& midColor);
void setEnabledFPSCounter(bool b); void setEnabledFPSCounter(bool b);
void setNavigationType(Base::Type); void setNavigationType(Base::Type);
NavigationStyle* navigationStyle() const; NavigationStyle* navigationStyle() const;