Part Dimension: alterations to existing files

Not sure what is happening with View3dInventorViewer.h.
    The only REAL change, beyond the addition of dim functions, is
    the removal of the member arrowrotation. It wasn't referenced anywhere.
This commit is contained in:
blobfish
2013-12-17 09:43:55 -05:00
parent 32134f64f0
commit 59e69bbe0e
8 changed files with 313 additions and 18 deletions

View File

@@ -152,6 +152,9 @@ View3DInventor::View3DInventor(Gui::Document* pcDocument, QWidget* parent, Qt::W
OnChange(*hGrp,"OrbitStyle");
OnChange(*hGrp,"Sensitivity");
OnChange(*hGrp,"ResetCursorPosition");
OnChange(*hGrp,"DimensionsVisible");
OnChange(*hGrp,"Dimensions3dVisible");
OnChange(*hGrp,"DimensionsDeltaVisible");
stopSpinTimer = new QTimer(this);
connect(stopSpinTimer, SIGNAL(timeout()), this, SLOT(stopAnimating()));
@@ -360,7 +363,28 @@ void View3DInventor::OnChange(ParameterGrp::SubjectType &rCaller,ParameterGrp::M
else
_viewer->setCameraType(SoPerspectiveCamera::getClassTypeId());
}
else {
else if (strcmp(Reason, "DimensionsVisible") == 0)
{
if (rGrp.GetBool("DimensionsVisible", true))
_viewer->turnAllDimensionsOn();
else
_viewer->turnAllDimensionsOff();
}
else if (strcmp(Reason, "Dimensions3dVisible") == 0)
{
if (rGrp.GetBool("Dimensions3dVisible", true))
_viewer->turn3dDimensionsOn();
else
_viewer->turn3dDimensionsOff();
}
else if (strcmp(Reason, "DimensionsDeltaVisible") == 0)
{
if (rGrp.GetBool("DimensionsDeltaVisible", true))
_viewer->turnDeltaDimensionsOn();
else
_viewer->turnDeltaDimensionsOff();
}
else{
unsigned long col1 = rGrp.GetUnsigned("BackgroundColor",3940932863UL);
unsigned long col2 = rGrp.GetUnsigned("BackgroundColor2",859006463UL); // default color (dark blue)
unsigned long col3 = rGrp.GetUnsigned("BackgroundColor3",2880160255UL); // default color (blue/grey)