Commit 418dd416 authored by allens's avatar allens

removed SetNode from the .code file to use the auto generated version, also did minor code cleamup

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@23751 18c085ea-50e0-402c-830e-de6fd14e8384
parent aefceb0c
......@@ -263,8 +263,7 @@ QvisTransformWindow::CreateWindowContents()
this, SLOT(translateZProcessText()));
mainLayout->addWidget(translateZ, 8,6);
transformVectors1 = new QCheckBox(tr("Transform vectors"),
firstPage);
transformVectors1 = new QCheckBox(tr("Transform vectors"), firstPage);
mainLayout->addWidget(transformVectors1, 9, 0);
connect(transformVectors1, SIGNAL(toggled(bool)),
this, SLOT(transformVectorsChanged(bool)));
......@@ -310,10 +309,11 @@ QvisTransformWindow::CreateWindowContents()
outputCoord->addButton(oSph, 2);
outputCoordLayout->addWidget(oSph, 2, 0);
continuousPhi = new QCheckBox(tr("phi on a semi-infinite domain"), outputFrame);
continuousPhi = new QCheckBox(tr("phi on a semi-infinite domain"),
outputFrame);
outputCoordLayout->addWidget(continuousPhi, 1, 1);
connect(continuousPhi, SIGNAL(toggled(bool)),
this, SLOT(continuousPhiChanged(bool)));
outputCoordLayout->addWidget(continuousPhi, 1, 1);
continuousPhiLabel = new QLabel(tr(" (lines only)"), secondPage);
outputCoordLayout->addWidget(continuousPhiLabel, 2, 1);
......@@ -404,8 +404,7 @@ QvisTransformWindow::CreateWindowContents()
connect(linearInvert, SIGNAL(toggled(bool)),
this, SLOT(linearInvertChanged(bool)));
transformVectors3 = new QCheckBox(tr("Transform vectors"),
thirdPage);
transformVectors3 = new QCheckBox(tr("Transform vectors"), thirdPage);
thirdPageLayout->addWidget(transformVectors3, 5, 2, 1, 2);
connect(transformVectors3, SIGNAL(toggled(bool)),
this, SLOT(transformVectorsChanged(bool)));
......@@ -635,6 +634,7 @@ QvisTransformWindow::UpdateWindow(bool doAll)
continuousPhi->blockSignals(true);
continuousPhi->setChecked(atts->GetContinuousPhi());
continuousPhi->blockSignals(false);
break;
case TransformAttributes::ID_m00:
temp.setNum(atts->GetM00());
m00->setText(temp);
......
......@@ -78,7 +78,7 @@
<Field name="outputCoordSys" label="Desired Coordinate System" type="enum" subtype="CoordinateSystem">
Spherical
</Field>
<Field name="continuousPhi" label="Continuous Phi" type="bool">
<Field name="continuousPhi" label="ContinuousPhi" type="bool">
false
</Field>
<Field name="m00" label="m00" type="double">
......@@ -132,7 +132,6 @@
<Field name="m33" label="m33" type="double">
1.000000
</Field>
<Field name="invertLinearTransform" label="invertLinearTransform" type="bool">
false
</Field>
......@@ -146,8 +145,6 @@
</Function>
<Function name="CreateCompatible" user="false" member="true">
</Function>
<Function name="SetFromNode" user="false" member="true">
</Function>
<Include file="source" quoted="false">
BoxExtents.h
</Include>
......
......@@ -1035,38 +1035,11 @@ TransformAttributes::SetFromNode(DataNode *parentNode)
if((node = searchNode->GetNode("doRotate")) != 0)
SetDoRotate(node->AsBool());
if((node = searchNode->GetNode("rotateOrigin")) != 0)
{
if(node->GetNodeType() == DOUBLE_ARRAY_NODE)
{
SetRotateOrigin(node->AsDoubleArray());
}
else if(node->GetNodeType() == FLOAT_ARRAY_NODE)
{
const float *fa = node->AsFloatArray();
double da[3] = {fa[0], fa[1], fa[2]};
SetRotateOrigin(da);
}
}
SetRotateOrigin(node->AsDoubleArray());
if((node = searchNode->GetNode("rotateAxis")) != 0)
{
if(node->GetNodeType() == DOUBLE_ARRAY_NODE)
{
SetRotateAxis(node->AsDoubleArray());
}
else if(node->GetNodeType() == FLOAT_ARRAY_NODE)
{
const float *fa = node->AsFloatArray();
double da[3] = {fa[0], fa[1], fa[2]};
SetRotateAxis(da);
}
}
SetRotateAxis(node->AsDoubleArray());
if((node = searchNode->GetNode("rotateAmount")) != 0)
{
if(node->GetNodeType() == DOUBLE_NODE)
SetRotateAmount(node->AsDouble());
else if(node->GetNodeType() == FLOAT_NODE)
SetRotateAmount((double)node->AsFloat());
}
SetRotateAmount(node->AsDouble());
if((node = searchNode->GetNode("rotateType")) != 0)
{
// Allow enums to be int or string in the config file
......@@ -1086,62 +1059,21 @@ TransformAttributes::SetFromNode(DataNode *parentNode)
if((node = searchNode->GetNode("doScale")) != 0)
SetDoScale(node->AsBool());
if((node = searchNode->GetNode("scaleOrigin")) != 0)
{
if(node->GetNodeType() == DOUBLE_ARRAY_NODE)
{
SetScaleOrigin(node->AsDoubleArray());
}
else if(node->GetNodeType() == FLOAT_ARRAY_NODE)
{
const float *fa = node->AsFloatArray();
double da[3] = {fa[0], fa[1], fa[2]};
SetScaleOrigin(da);
}
}
SetScaleOrigin(node->AsDoubleArray());
if((node = searchNode->GetNode("scaleX")) != 0)
{
if(node->GetNodeType() == DOUBLE_NODE)
SetScaleX(node->AsDouble());
else if(node->GetNodeType() == FLOAT_NODE)
SetScaleX((double)node->AsFloat());
}
SetScaleX(node->AsDouble());
if((node = searchNode->GetNode("scaleY")) != 0)
{
if(node->GetNodeType() == DOUBLE_NODE)
SetScaleY(node->AsDouble());
else if(node->GetNodeType() == FLOAT_NODE)
SetScaleY((double)node->AsFloat());
}
SetScaleY(node->AsDouble());
if((node = searchNode->GetNode("scaleZ")) != 0)
{
if(node->GetNodeType() == DOUBLE_NODE)
SetScaleZ(node->AsDouble());
else if(node->GetNodeType() == FLOAT_NODE)
SetScaleZ((double)node->AsFloat());
}
SetScaleZ(node->AsDouble());
if((node = searchNode->GetNode("doTranslate")) != 0)
SetDoTranslate(node->AsBool());
if((node = searchNode->GetNode("translateX")) != 0)
{
if(node->GetNodeType() == DOUBLE_NODE)
SetTranslateX(node->AsDouble());
else if(node->GetNodeType() == FLOAT_NODE)
SetTranslateX((double)node->AsFloat());
}
SetTranslateX(node->AsDouble());
if((node = searchNode->GetNode("translateY")) != 0)
{
if(node->GetNodeType() == DOUBLE_NODE)
SetTranslateY(node->AsDouble());
else if(node->GetNodeType() == FLOAT_NODE)
SetTranslateY((double)node->AsFloat());
}
SetTranslateY(node->AsDouble());
if((node = searchNode->GetNode("translateZ")) != 0)
{
if(node->GetNodeType() == DOUBLE_NODE)
SetTranslateZ(node->AsDouble());
else if(node->GetNodeType() == FLOAT_NODE)
SetTranslateZ((double)node->AsFloat());
}
SetTranslateZ(node->AsDouble());
if((node = searchNode->GetNode("transformType")) != 0)
{
// Allow enums to be int or string in the config file
......@@ -1190,6 +1122,8 @@ TransformAttributes::SetFromNode(DataNode *parentNode)
SetOutputCoordSys(value);
}
}
if((node = searchNode->GetNode("continuousPhi")) != 0)
SetContinuousPhi(node->AsBool());
if((node = searchNode->GetNode("m00")) != 0)
SetM00(node->AsDouble());
if((node = searchNode->GetNode("m01")) != 0)
......@@ -1243,6 +1177,7 @@ TransformAttributes::SetFromNode(DataNode *parentNode)
if((node = searchNode->GetNode("transformVectors")) != 0)
SetTransformVectors(node->AsBool());
}
///////////////////////////////////////////////////////////////////////////////
// Set property methods
///////////////////////////////////////////////////////////////////////////////
......
......@@ -92,244 +92,3 @@ TransformAttributes::CreateCompatible(const std::string &tname) const
return retval;
}
Function: SetFromNode
Declaration: virtual void SetFromNode(DataNode *);
Definition:
// ****************************************************************************
// Method: TransformAttributes::SetFromNode
//
// Purpose:
// This method sets attributes in this object from values in a DataNode representation of the object.
//
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: omitted
//
// Modifications:
//
// ****************************************************************************
void
TransformAttributes::SetFromNode(DataNode *parentNode)
{
if(parentNode == 0)
return;
DataNode *searchNode = parentNode->GetNode("TransformAttributes");
if(searchNode == 0)
return;
DataNode *node;
if((node = searchNode->GetNode("doRotate")) != 0)
SetDoRotate(node->AsBool());
if((node = searchNode->GetNode("rotateOrigin")) != 0)
{
if(node->GetNodeType() == DOUBLE_ARRAY_NODE)
{
SetRotateOrigin(node->AsDoubleArray());
}
else if(node->GetNodeType() == FLOAT_ARRAY_NODE)
{
const float *fa = node->AsFloatArray();
double da[3] = {fa[0], fa[1], fa[2]};
SetRotateOrigin(da);
}
}
if((node = searchNode->GetNode("rotateAxis")) != 0)
{
if(node->GetNodeType() == DOUBLE_ARRAY_NODE)
{
SetRotateAxis(node->AsDoubleArray());
}
else if(node->GetNodeType() == FLOAT_ARRAY_NODE)
{
const float *fa = node->AsFloatArray();
double da[3] = {fa[0], fa[1], fa[2]};
SetRotateAxis(da);
}
}
if((node = searchNode->GetNode("rotateAmount")) != 0)
{
if(node->GetNodeType() == DOUBLE_NODE)
SetRotateAmount(node->AsDouble());
else if(node->GetNodeType() == FLOAT_NODE)
SetRotateAmount((double)node->AsFloat());
}
if((node = searchNode->GetNode("rotateType")) != 0)
{
// Allow enums to be int or string in the config file
if(node->GetNodeType() == INT_NODE)
{
int ival = node->AsInt();
if(ival >= 0 && ival < 2)
SetRotateType(AngleType(ival));
}
else if(node->GetNodeType() == STRING_NODE)
{
AngleType value;
if(AngleType_FromString(node->AsString(), value))
SetRotateType(value);
}
}
if((node = searchNode->GetNode("doScale")) != 0)
SetDoScale(node->AsBool());
if((node = searchNode->GetNode("scaleOrigin")) != 0)
{
if(node->GetNodeType() == DOUBLE_ARRAY_NODE)
{
SetScaleOrigin(node->AsDoubleArray());
}
else if(node->GetNodeType() == FLOAT_ARRAY_NODE)
{
const float *fa = node->AsFloatArray();
double da[3] = {fa[0], fa[1], fa[2]};
SetScaleOrigin(da);
}
}
if((node = searchNode->GetNode("scaleX")) != 0)
{
if(node->GetNodeType() == DOUBLE_NODE)
SetScaleX(node->AsDouble());
else if(node->GetNodeType() == FLOAT_NODE)
SetScaleX((double)node->AsFloat());
}
if((node = searchNode->GetNode("scaleY")) != 0)
{
if(node->GetNodeType() == DOUBLE_NODE)
SetScaleY(node->AsDouble());
else if(node->GetNodeType() == FLOAT_NODE)
SetScaleY((double)node->AsFloat());
}
if((node = searchNode->GetNode("scaleZ")) != 0)
{
if(node->GetNodeType() == DOUBLE_NODE)
SetScaleZ(node->AsDouble());
else if(node->GetNodeType() == FLOAT_NODE)
SetScaleZ((double)node->AsFloat());
}
if((node = searchNode->GetNode("doTranslate")) != 0)
SetDoTranslate(node->AsBool());
if((node = searchNode->GetNode("translateX")) != 0)
{
if(node->GetNodeType() == DOUBLE_NODE)
SetTranslateX(node->AsDouble());
else if(node->GetNodeType() == FLOAT_NODE)
SetTranslateX((double)node->AsFloat());
}
if((node = searchNode->GetNode("translateY")) != 0)
{
if(node->GetNodeType() == DOUBLE_NODE)
SetTranslateY(node->AsDouble());
else if(node->GetNodeType() == FLOAT_NODE)
SetTranslateY((double)node->AsFloat());
}
if((node = searchNode->GetNode("translateZ")) != 0)
{
if(node->GetNodeType() == DOUBLE_NODE)
SetTranslateZ(node->AsDouble());
else if(node->GetNodeType() == FLOAT_NODE)
SetTranslateZ((double)node->AsFloat());
}
if((node = searchNode->GetNode("transformType")) != 0)
{
// Allow enums to be int or string in the config file
if(node->GetNodeType() == INT_NODE)
{
int ival = node->AsInt();
if(ival >= 0 && ival < 3)
SetTransformType(TransformType(ival));
}
else if(node->GetNodeType() == STRING_NODE)
{
TransformType value;
if(TransformType_FromString(node->AsString(), value))
SetTransformType(value);
}
}
if((node = searchNode->GetNode("inputCoordSys")) != 0)
{
// Allow enums to be int or string in the config file
if(node->GetNodeType() == INT_NODE)
{
int ival = node->AsInt();
if(ival >= 0 && ival < 3)
SetInputCoordSys(CoordinateSystem(ival));
}
else if(node->GetNodeType() == STRING_NODE)
{
CoordinateSystem value;
if(CoordinateSystem_FromString(node->AsString(), value))
SetInputCoordSys(value);
}
}
if((node = searchNode->GetNode("outputCoordSys")) != 0)
{
// Allow enums to be int or string in the config file
if(node->GetNodeType() == INT_NODE)
{
int ival = node->AsInt();
if(ival >= 0 && ival < 3)
SetOutputCoordSys(CoordinateSystem(ival));
}
else if(node->GetNodeType() == STRING_NODE)
{
CoordinateSystem value;
if(CoordinateSystem_FromString(node->AsString(), value))
SetOutputCoordSys(value);
}
}
if((node = searchNode->GetNode("m00")) != 0)
SetM00(node->AsDouble());
if((node = searchNode->GetNode("m01")) != 0)
SetM01(node->AsDouble());
if((node = searchNode->GetNode("m02")) != 0)
SetM02(node->AsDouble());
if((node = searchNode->GetNode("m03")) != 0)
SetM03(node->AsDouble());
if((node = searchNode->GetNode("m10")) != 0)
SetM10(node->AsDouble());
if((node = searchNode->GetNode("m11")) != 0)
SetM11(node->AsDouble());
if((node = searchNode->GetNode("m12")) != 0)
SetM12(node->AsDouble());
if((node = searchNode->GetNode("m13")) != 0)
SetM13(node->AsDouble());
if((node = searchNode->GetNode("m20")) != 0)
SetM20(node->AsDouble());
if((node = searchNode->GetNode("m21")) != 0)
SetM21(node->AsDouble());
if((node = searchNode->GetNode("m22")) != 0)
SetM22(node->AsDouble());
if((node = searchNode->GetNode("m23")) != 0)
SetM23(node->AsDouble());
if((node = searchNode->GetNode("m30")) != 0)
SetM30(node->AsDouble());
if((node = searchNode->GetNode("m31")) != 0)
SetM31(node->AsDouble());
if((node = searchNode->GetNode("m32")) != 0)
SetM32(node->AsDouble());
if((node = searchNode->GetNode("m33")) != 0)
SetM33(node->AsDouble());
if((node = searchNode->GetNode("invertLinearTransform")) != 0)
SetInvertLinearTransform(node->AsBool());
if((node = searchNode->GetNode("vectorTransformMethod")) != 0)
{
// Allow enums to be int or string in the config file
if(node->GetNodeType() == INT_NODE)
{
int ival = node->AsInt();
if(ival >= 0 && ival < 4)
SetVectorTransformMethod(VectorTransformMethod(ival));
}
else if(node->GetNodeType() == STRING_NODE)
{
VectorTransformMethod value;
if(VectorTransformMethod_FromString(node->AsString(), value))
SetVectorTransformMethod(value);
}
}
if((node = searchNode->GetNode("transformVectors")) != 0)
SetTransformVectors(node->AsBool());
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment