void TimeFormat::SetFromNode(DataNode *parentNode) { if(parentNode == 0) return; DataNode *searchNode = parentNode->GetNode("TimeFormat"); if(searchNode == 0) return; DataNode *node; if((node = searchNode->GetNode("displayMode")) != 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) SetDisplayMode(DisplayMode(ival)); } else if(node->GetNodeType() == STRING_NODE) { DisplayMode value; if(DisplayMode_FromString(node->AsString(), value)) SetDisplayMode(value); } } if((node = searchNode->GetNode("precision")) != 0) SetPrecision(node->AsInt()); }
void ContourOpAttributes::SetFromNode(DataNode *parentNode) { if(parentNode == 0) return; DataNode *searchNode = parentNode->GetNode("ContourOpAttributes"); if(searchNode == 0) return; DataNode *node; if((node = searchNode->GetNode("contourNLevels")) != 0) SetContourNLevels(node->AsInt()); if((node = searchNode->GetNode("contourValue")) != 0) SetContourValue(node->AsDoubleVector()); if((node = searchNode->GetNode("contourPercent")) != 0) SetContourPercent(node->AsDoubleVector()); if((node = searchNode->GetNode("contourMethod")) != 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) SetContourMethod(ContourMethod(ival)); } else if(node->GetNodeType() == STRING_NODE) { ContourMethod value; if(ContourMethod_FromString(node->AsString(), value)) SetContourMethod(value); } } if((node = searchNode->GetNode("minFlag")) != 0) SetMinFlag(node->AsBool()); if((node = searchNode->GetNode("maxFlag")) != 0) SetMaxFlag(node->AsBool()); if((node = searchNode->GetNode("min")) != 0) SetMin(node->AsDouble()); if((node = searchNode->GetNode("max")) != 0) SetMax(node->AsDouble()); if((node = searchNode->GetNode("scaling")) != 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) SetScaling(ContourScaling(ival)); } else if(node->GetNodeType() == STRING_NODE) { ContourScaling value; if(ContourScaling_FromString(node->AsString(), value)) SetScaling(value); } } if((node = searchNode->GetNode("variable")) != 0) SetVariable(node->AsString()); }
void DualMeshAttributes::SetFromNode(DataNode *parentNode) { if(parentNode == 0) return; DataNode *searchNode = parentNode->GetNode("DualMeshAttributes"); if(searchNode == 0) return; DataNode *node; if((node = searchNode->GetNode("mode")) != 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) SetMode(ConversionMode(ival)); } else if(node->GetNodeType() == STRING_NODE) { ConversionMode value; if(ConversionMode_FromString(node->AsString(), value)) SetMode(value); } } }
void RectilinearProject2DAttributes::SetFromNode(DataNode *parentNode) { if(parentNode == 0) return; DataNode *searchNode = parentNode->GetNode("RectilinearProject2DAttributes"); if(searchNode == 0) return; DataNode *node; if((node = searchNode->GetNode("reductionOperator")) != 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) SetReductionOperator(ReductionOperator(ival)); } else if(node->GetNodeType() == STRING_NODE) { ReductionOperator value; if(ReductionOperator_FromString(node->AsString(), value)) SetReductionOperator(value); } } if((node = searchNode->GetNode("mapGrid")) != 0) SetMapGrid(node->AsBool()); }
void MovieSequenceCompositeTransition::ReadUIValues(QWidget *ui, DataNode *node) { const char *mName = "MovieSequenceCompositeTransition::ReadUIValues: "; if(node != 0) { QvisCompositeTransition *UI = (QvisCompositeTransition *)ui; // Read the number of frames. DataNode *nFramesNode = node->GetNode("nFrames"); if(nFramesNode !=0 && nFramesNode->GetNodeType() == INT_NODE) { UI->setNFrames(nFramesNode->AsInt()); } else { debug4 << mName << "nFrames not found in node." << endl; } // Read the reverse flag. DataNode *reverseNode = node->GetNode("reverse"); if(reverseNode !=0 && reverseNode->GetNodeType() == BOOL_NODE) { UI->setReverse(reverseNode->AsBool()); } else { debug4 << mName << "reverse not found in node." << endl; } } }
void DelaunayAttributes::SetFromNode(DataNode *parentNode) { if(parentNode == 0) return; DataNode *searchNode = parentNode->GetNode("DelaunayAttributes"); if(searchNode == 0) return; DataNode *node; if((node = searchNode->GetNode("dimension")) != 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) SetDimension(Dimension(ival)); } else if(node->GetNodeType() == STRING_NODE) { Dimension value; if(Dimension_FromString(node->AsString(), value)) SetDimension(value); } } }
void CartographicProjectionAttributes::SetFromNode(DataNode *parentNode) { if(parentNode == 0) return; DataNode *searchNode = parentNode->GetNode("CartographicProjectionAttributes"); if(searchNode == 0) return; DataNode *node; if((node = searchNode->GetNode("projectionID")) != 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 < 11) SetProjectionID(ProjectionID(ival)); } else if(node->GetNodeType() == STRING_NODE) { ProjectionID value; if(ProjectionID_FromString(node->AsString(), value)) SetProjectionID(value); } } if((node = searchNode->GetNode("centralMeridian")) != 0) SetCentralMeridian(node->AsDouble()); }
void MessageAttributes::SetFromNode(DataNode *parentNode) { if(parentNode == 0) return; DataNode *searchNode = parentNode->GetNode("MessageAttributes"); if(searchNode == 0) return; DataNode *node; if((node = searchNode->GetNode("text")) != 0) SetText(node->AsString()); if((node = searchNode->GetNode("unicode")) != 0) SetUnicode(node->AsUnsignedCharVector()); if((node = searchNode->GetNode("hasUnicode")) != 0) SetHasUnicode(node->AsBool()); if((node = searchNode->GetNode("severity")) != 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 < 5) SetSeverity(Severity(ival)); } else if(node->GetNodeType() == STRING_NODE) { Severity value; if(Severity_FromString(node->AsString(), value)) SetSeverity(value); } } }
void DatabaseCorrelationList::SetFromNode(DataNode *parentNode) { if(parentNode == 0) return; DataNode *searchNode = parentNode->GetNode("DatabaseCorrelationList"); if(searchNode == 0) return; DataNode *node; DataNode **children; // Clear all the DatabaseCorrelations if we got any. bool clearedCorrelations = false; // Go through all of the children and construct a new // DatabaseCorrelation for each one of them. children = searchNode->GetChildren(); if(children != 0) { for(int i = 0; i < searchNode->GetNumChildren(); ++i) { if(children[i]->GetKey() == std::string("DatabaseCorrelation")) { if (!clearedCorrelations) { ClearCorrelations(); clearedCorrelations = true; } DatabaseCorrelation temp; temp.SetFromNode(children[i]); AddCorrelations(temp); } } } if((node = searchNode->GetNode("needPermission")) != 0) SetNeedPermission(node->AsBool()); if((node = searchNode->GetNode("defaultCorrelationMethod")) != 0) SetDefaultCorrelationMethod(node->AsInt()); if((node = searchNode->GetNode("whenToCorrelate")) != 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) SetWhenToCorrelate(WhenToCorrelate(ival)); } else if(node->GetNodeType() == STRING_NODE) { WhenToCorrelate value; if(WhenToCorrelate_FromString(node->AsString(), value)) SetWhenToCorrelate(value); } } }
void MultiCurveAttributes::SetFromNode(DataNode *parentNode) { if(parentNode == 0) return; DataNode *searchNode = parentNode->GetNode("MultiCurveAttributes"); if(searchNode == 0) return; DataNode *node; if((node = searchNode->GetNode("defaultPalette")) != 0) defaultPalette.SetFromNode(node); if((node = searchNode->GetNode("changedColors")) != 0) SetChangedColors(node->AsUnsignedCharVector()); if((node = searchNode->GetNode("colorType")) != 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) SetColorType(ColoringMethod(ival)); } else if(node->GetNodeType() == STRING_NODE) { ColoringMethod value; if(ColoringMethod_FromString(node->AsString(), value)) SetColorType(value); } } if((node = searchNode->GetNode("singleColor")) != 0) singleColor.SetFromNode(node); if((node = searchNode->GetNode("multiColor")) != 0) multiColor.SetFromNode(node); if((node = searchNode->GetNode("lineStyle")) != 0) SetLineStyle(node->AsInt()); if((node = searchNode->GetNode("lineWidth")) != 0) SetLineWidth(node->AsInt()); if((node = searchNode->GetNode("yAxisTitleFormat")) != 0) SetYAxisTitleFormat(node->AsString()); if((node = searchNode->GetNode("useYAxisTickSpacing")) != 0) SetUseYAxisTickSpacing(node->AsBool()); if((node = searchNode->GetNode("yAxisTickSpacing")) != 0) SetYAxisTickSpacing(node->AsDouble()); if((node = searchNode->GetNode("displayMarkers")) != 0) SetDisplayMarkers(node->AsBool()); if((node = searchNode->GetNode("markerVariable")) != 0) SetMarkerVariable(node->AsString()); if((node = searchNode->GetNode("displayIds")) != 0) SetDisplayIds(node->AsBool()); if((node = searchNode->GetNode("idVariable")) != 0) SetIdVariable(node->AsString()); if((node = searchNode->GetNode("legendFlag")) != 0) SetLegendFlag(node->AsBool()); }
void OnionPeelAttributes::SetFromNode(DataNode *parentNode) { if(parentNode == 0) return; DataNode *searchNode = parentNode->GetNode("OnionPeelAttributes"); if(searchNode == 0) return; DataNode *node; if((node = searchNode->GetNode("adjacencyType")) != 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) SetAdjacencyType(NodeFace(ival)); } else if(node->GetNodeType() == STRING_NODE) { NodeFace value; if(NodeFace_FromString(node->AsString(), value)) SetAdjacencyType(value); } } if((node = searchNode->GetNode("useGlobalId")) != 0) SetUseGlobalId(node->AsBool()); if((node = searchNode->GetNode("categoryName")) != 0) SetCategoryName(node->AsString()); if((node = searchNode->GetNode("subsetName")) != 0) SetSubsetName(node->AsString()); if((node = searchNode->GetNode("index")) != 0) SetIndex(node->AsIntVector()); if((node = searchNode->GetNode("logical")) != 0) SetLogical(node->AsBool()); if((node = searchNode->GetNode("requestedLayer")) != 0) SetRequestedLayer(node->AsInt()); if((node = searchNode->GetNode("seedType")) != 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) SetSeedType(SeedIdType(ival)); } else if(node->GetNodeType() == STRING_NODE) { SeedIdType value; if(SeedIdType_FromString(node->AsString(), value)) SetSeedType(value); } } }
void ParallelCoordinatesAttributes::SetFromNode(DataNode *parentNode) { if(parentNode == 0) return; DataNode *searchNode = parentNode->GetNode("ParallelCoordinatesAttributes"); if(searchNode == 0) return; DataNode *node; if((node = searchNode->GetNode("scalarAxisNames")) != 0) SetScalarAxisNames(node->AsStringVector()); if((node = searchNode->GetNode("visualAxisNames")) != 0) SetVisualAxisNames(node->AsStringVector()); if((node = searchNode->GetNode("extentMinima")) != 0) SetExtentMinima(node->AsDoubleVector()); if((node = searchNode->GetNode("extentMaxima")) != 0) SetExtentMaxima(node->AsDoubleVector()); if((node = searchNode->GetNode("drawLines")) != 0) SetDrawLines(node->AsBool()); if((node = searchNode->GetNode("linesColor")) != 0) linesColor.SetFromNode(node); if((node = searchNode->GetNode("drawContext")) != 0) SetDrawContext(node->AsBool()); if((node = searchNode->GetNode("contextGamma")) != 0) SetContextGamma(node->AsFloat()); if((node = searchNode->GetNode("contextNumPartitions")) != 0) SetContextNumPartitions(node->AsInt()); if((node = searchNode->GetNode("contextColor")) != 0) contextColor.SetFromNode(node); if((node = searchNode->GetNode("drawLinesOnlyIfExtentsOn")) != 0) SetDrawLinesOnlyIfExtentsOn(node->AsBool()); if((node = searchNode->GetNode("unifyAxisExtents")) != 0) SetUnifyAxisExtents(node->AsBool()); if((node = searchNode->GetNode("linesNumPartitions")) != 0) SetLinesNumPartitions(node->AsInt()); if((node = searchNode->GetNode("focusGamma")) != 0) SetFocusGamma(node->AsFloat()); if((node = searchNode->GetNode("drawFocusAs")) != 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) SetDrawFocusAs(FocusRendering(ival)); } else if(node->GetNodeType() == STRING_NODE) { FocusRendering value; if(FocusRendering_FromString(node->AsString(), value)) SetDrawFocusAs(value); } } }
void InteractorAttributes::SetFromNode(DataNode *parentNode) { if(parentNode == 0) return; DataNode *searchNode = parentNode->GetNode("InteractorAttributes"); if(searchNode == 0) return; DataNode *node; if((node = searchNode->GetNode("showGuidelines")) != 0) SetShowGuidelines(node->AsBool()); if((node = searchNode->GetNode("clampSquare")) != 0) SetClampSquare(node->AsBool()); if((node = searchNode->GetNode("fillViewportOnZoom")) != 0) SetFillViewportOnZoom(node->AsBool()); if((node = searchNode->GetNode("navigationMode")) != 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) SetNavigationMode(NavigationMode(ival)); } else if(node->GetNodeType() == STRING_NODE) { NavigationMode value; if(NavigationMode_FromString(node->AsString(), value)) SetNavigationMode(value); } } if((node = searchNode->GetNode("axisArraySnap")) != 0) SetAxisArraySnap(node->AsBool()); if((node = searchNode->GetNode("boundingBoxMode")) != 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) SetBoundingBoxMode(BoundingBoxMode(ival)); } else if(node->GetNodeType() == STRING_NODE) { BoundingBoxMode value; if(BoundingBoxMode_FromString(node->AsString(), value)) SetBoundingBoxMode(value); } } }
void MaterialAttributes::SetFromNode(DataNode *parentNode) { if(parentNode == 0) return; DataNode *searchNode = parentNode->GetNode("MaterialAttributes"); if(searchNode == 0) return; DataNode *node; if((node = searchNode->GetNode("smoothing")) != 0) SetSmoothing(node->AsBool()); if((node = searchNode->GetNode("forceMIR")) != 0) SetForceMIR(node->AsBool()); if((node = searchNode->GetNode("cleanZonesOnly")) != 0) SetCleanZonesOnly(node->AsBool()); if((node = searchNode->GetNode("needValidConnectivity")) != 0) SetNeedValidConnectivity(node->AsBool()); if((node = searchNode->GetNode("algorithm")) != 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 < 5) SetAlgorithm(Algorithm(ival)); } else if(node->GetNodeType() == STRING_NODE) { Algorithm value; if(Algorithm_FromString(node->AsString(), value)) SetAlgorithm(value); } } if((node = searchNode->GetNode("iterationEnabled")) != 0) SetIterationEnabled(node->AsBool()); if((node = searchNode->GetNode("numIterations")) != 0) SetNumIterations(node->AsInt()); if((node = searchNode->GetNode("iterationDamping")) != 0) SetIterationDamping(node->AsFloat()); if((node = searchNode->GetNode("simplifyHeavilyMixedZones")) != 0) SetSimplifyHeavilyMixedZones(node->AsBool()); if((node = searchNode->GetNode("maxMaterialsPerZone")) != 0) SetMaxMaterialsPerZone(node->AsInt()); if((node = searchNode->GetNode("isoVolumeFraction")) != 0) SetIsoVolumeFraction(node->AsFloat()); if((node = searchNode->GetNode("annealingTime")) != 0) SetAnnealingTime(node->AsInt()); }
void AnimationAttributes::SetFromNode(DataNode *parentNode) { if(parentNode == 0) return; DataNode *searchNode = parentNode->GetNode("AnimationAttributes"); if(searchNode == 0) return; DataNode *node; if((node = searchNode->GetNode("animationMode")) != 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) SetAnimationMode(AnimationMode(ival)); } else if(node->GetNodeType() == STRING_NODE) { AnimationMode value; if(AnimationMode_FromString(node->AsString(), value)) SetAnimationMode(value); } } if((node = searchNode->GetNode("pipelineCachingMode")) != 0) SetPipelineCachingMode(node->AsBool()); if((node = searchNode->GetNode("frameIncrement")) != 0) SetFrameIncrement(node->AsInt()); if((node = searchNode->GetNode("timeout")) != 0) SetTimeout(node->AsInt()); if((node = searchNode->GetNode("playbackMode")) != 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) SetPlaybackMode(PlaybackMode(ival)); } else if(node->GetNodeType() == STRING_NODE) { PlaybackMode value; if(PlaybackMode_FromString(node->AsString(), value)) SetPlaybackMode(value); } } }
void LagrangianAttributes::SetFromNode(DataNode *parentNode) { if(parentNode == 0) return; DataNode *searchNode = parentNode->GetNode("LagrangianAttributes"); if(searchNode == 0) return; DataNode *node; if((node = searchNode->GetNode("seedPoint")) != 0) SetSeedPoint(node->AsDoubleArray()); if((node = searchNode->GetNode("numSteps")) != 0) SetNumSteps(node->AsInt()); if((node = searchNode->GetNode("XAxisSample")) != 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 < 6) SetXAxisSample(sampleType(ival)); } else if(node->GetNodeType() == STRING_NODE) { sampleType value; if(sampleType_FromString(node->AsString(), value)) SetXAxisSample(value); } } if((node = searchNode->GetNode("YAxisSample")) != 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 < 6) SetYAxisSample(sampleType(ival)); } else if(node->GetNodeType() == STRING_NODE) { sampleType value; if(sampleType_FromString(node->AsString(), value)) SetYAxisSample(value); } } if((node = searchNode->GetNode("variable")) != 0) SetVariable(node->AsString()); }
void MeshManagementAttributes::SetFromNode(DataNode *parentNode) { if(parentNode == 0) return; DataNode *searchNode = parentNode->GetNode("MeshManagementAttributes"); if(searchNode == 0) return; DataNode *node; if((node = searchNode->GetNode("discretizationTolerance")) != 0) { if (node->AsDoubleVector().size() == 3) SetDiscretizationTolerance(node->AsDoubleVector()); else { MeshManagementAttributes tmp; SetDiscretizationTolerance(tmp.GetDiscretizationTolerance()); } } if((node = searchNode->GetNode("discretizationToleranceX")) != 0) SetDiscretizationToleranceX(node->AsDoubleVector()); if((node = searchNode->GetNode("discretizationToleranceY")) != 0) SetDiscretizationToleranceY(node->AsDoubleVector()); if((node = searchNode->GetNode("discretizationToleranceZ")) != 0) SetDiscretizationToleranceZ(node->AsDoubleVector()); if((node = searchNode->GetNode("discretizationMode")) != 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) SetDiscretizationMode(DiscretizationModes(ival)); } else if(node->GetNodeType() == STRING_NODE) { DiscretizationModes value; if(DiscretizationModes_FromString(node->AsString(), value)) SetDiscretizationMode(value); } } if((node = searchNode->GetNode("discretizeBoundaryOnly")) != 0) SetDiscretizeBoundaryOnly(node->AsBool()); if((node = searchNode->GetNode("passNativeCSG")) != 0) SetPassNativeCSG(node->AsBool()); }
static void InitializeDataNodeFromQComboBox(QComboBox *co, DataNode *node) { std::string objectName(co->objectName().toStdString()); DataNode *currentNode = node->GetNode(objectName); if(currentNode != 0) { // Use int or string, depending on what the node was initially. NodeTypeEnum t = currentNode->GetNodeType(); if(t != INT_NODE && t != STRING_NODE) { debug1 << "InitializeDataNodeFromQComboBox: only supports INT_NODE, STRING_NODE" << endl; t = INT_NODE; } node->RemoveNode(objectName); if(t == INT_NODE) node->AddNode(new DataNode(objectName, co->currentIndex())); else if(t == STRING_NODE) { node->AddNode(new DataNode(objectName, co->currentText().toStdString())); } } else { // There's no preference on which type to use so use int. node->AddNode(new DataNode(objectName, co->currentIndex())); } }
static void InitializeDataNodeFromQButtonGroup(QButtonGroup *co, DataNode *node) { std::string objectName(co->objectName().toStdString()); DataNode *currentNode = node->GetNode(objectName); QAbstractButton *sb = co->checkedButton(); if(currentNode != 0) { // Use int or string, depending on what the node was initially. NodeTypeEnum t = currentNode->GetNodeType(); node->RemoveNode(objectName); if(t == STRING_NODE) { if(sb != 0) node->AddNode(new DataNode(objectName, sb->text().toStdString())); else node->AddNode(new DataNode(objectName, int(0))); } else { int index = sb ? co->id(sb) : 0; node->AddNode(new DataNode(objectName, index)); } } else { // There's no preference on which type to use so use int int index = sb ? co->id(sb) : 0; node->AddNode(new DataNode(objectName, index)); } }
void DatabaseCorrelation::SetFromNode(DataNode *parentNode) { if(parentNode == 0) return; DataNode *searchNode = parentNode->GetNode("DatabaseCorrelation"); if(searchNode == 0) return; DataNode *node; if((node = searchNode->GetNode("name")) != 0) SetName(node->AsString()); if((node = searchNode->GetNode("numStates")) != 0) SetNumStates(node->AsInt()); if((node = searchNode->GetNode("method")) != 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 < 5) SetMethod(CorrelationMethod(ival)); } else if(node->GetNodeType() == STRING_NODE) { CorrelationMethod value; if(CorrelationMethod_FromString(node->AsString(), value)) SetMethod(value); } } if((node = searchNode->GetNode("databaseNames")) != 0) SetDatabaseNames(node->AsStringVector()); if((node = searchNode->GetNode("databaseNStates")) != 0) SetDatabaseNStates(node->AsIntVector()); if((node = searchNode->GetNode("databaseTimes")) != 0) SetDatabaseTimes(node->AsDoubleVector()); if((node = searchNode->GetNode("databaseCycles")) != 0) SetDatabaseCycles(node->AsIntVector()); if((node = searchNode->GetNode("indices")) != 0) SetIndices(node->AsIntVector()); if((node = searchNode->GetNode("condensedTimes")) != 0) SetCondensedTimes(node->AsDoubleVector()); if((node = searchNode->GetNode("condensedCycles")) != 0) SetCondensedCycles(node->AsIntVector()); }
void ViewerClientAttributes::SetFromNode(DataNode *parentNode) { if(parentNode == 0) return; DataNode *searchNode = parentNode->GetNode("ViewerClientAttributes"); if(searchNode == 0) return; DataNode *node; if((node = searchNode->GetNode("renderingType")) != 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) SetRenderingType(RenderType(ival)); } else if(node->GetNodeType() == STRING_NODE) { RenderType value; if(RenderType_FromString(node->AsString(), value)) SetRenderingType(value); } } if((node = searchNode->GetNode("id")) != 0) SetId(node->AsInt()); if((node = searchNode->GetNode("title")) != 0) SetTitle(node->AsString()); if((node = searchNode->GetNode("windowIds")) != 0) SetWindowIds(node->AsIntVector()); if((node = searchNode->GetNode("imageWidth")) != 0) SetImageWidth(node->AsInt()); if((node = searchNode->GetNode("imageHeight")) != 0) SetImageHeight(node->AsInt()); if((node = searchNode->GetNode("imageResolutionPcnt")) != 0) SetImageResolutionPcnt(node->AsDouble()); if((node = searchNode->GetNode("externalClient")) != 0) SetExternalClient(node->AsBool()); if((node = searchNode->GetNode("renderingTypes")) != 0) SetRenderingTypes(node->AsIntVector()); }
void ProjectAttributes::SetFromNode(DataNode *parentNode) { if(parentNode == 0) return; DataNode *searchNode = parentNode->GetNode("ProjectAttributes"); if(searchNode == 0) return; DataNode *node; if((node = searchNode->GetNode("projectionType")) != 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 < 6) SetProjectionType(ProjectionType(ival)); } else if(node->GetNodeType() == STRING_NODE) { ProjectionType value; if(ProjectionType_FromString(node->AsString(), value)) SetProjectionType(value); } } 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); } } }
void MovieSequenceRotate::ReadUIValues(QWidget *ui, DataNode *node) { const char *mName = "MovieSequenceRotate::ReadUIValues: "; if(node != 0) { QvisRotationTransition *UI = (QvisRotationTransition *)ui; // Read the start angle and put it into the UI. DataNode *saNode = node->GetNode("startAngle"); if(saNode != 0 && saNode->GetNodeType() == FLOAT_NODE) UI->setStartAngle(saNode->AsFloat()); else { debug4 << mName << "startAngle not found or it was the " << "wrong type." << endl; } // Read the start angle and put it into the UI. DataNode *eaNode = node->GetNode("endAngle"); if(eaNode != 0 && eaNode->GetNodeType() == FLOAT_NODE) UI->setEndAngle(eaNode->AsFloat()); else { debug4 << mName << "endAngle not found or it was the " << "wrong type." << endl; } // Read the number of steps. DataNode *nStepsNode = node->GetNode("nSteps"); if(nStepsNode !=0 && nStepsNode->GetNodeType() == INT_NODE) { UI->setNSteps(nStepsNode->AsInt()); } else { debug4 << mName << "nSteps not found in node." << endl; } } }
void CoordSwapAttributes::SetFromNode(DataNode *parentNode) { if(parentNode == 0) return; DataNode *searchNode = parentNode->GetNode("CoordSwapAttributes"); if(searchNode == 0) return; DataNode *node; if((node = searchNode->GetNode("newCoord1")) != 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) SetNewCoord1(Coord(ival)); } else if(node->GetNodeType() == STRING_NODE) { Coord value; if(Coord_FromString(node->AsString(), value)) SetNewCoord1(value); } } if((node = searchNode->GetNode("newCoord2")) != 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) SetNewCoord2(Coord(ival)); } else if(node->GetNodeType() == STRING_NODE) { Coord value; if(Coord_FromString(node->AsString(), value)) SetNewCoord2(value); } } if((node = searchNode->GetNode("newCoord3")) != 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) SetNewCoord3(Coord(ival)); } else if(node->GetNodeType() == STRING_NODE) { Coord value; if(Coord_FromString(node->AsString(), value)) SetNewCoord3(value); } } }
void TubeAttributes::SetFromNode(DataNode *parentNode) { if(parentNode == 0) return; DataNode *searchNode = parentNode->GetNode("TubeAttributes"); if(searchNode == 0) return; DataNode *node; if((node = searchNode->GetNode("scaleByVarFlag")) != 0) SetScaleByVarFlag(node->AsBool()); if((node = searchNode->GetNode("tubeRadiusType")) != 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) SetTubeRadiusType(TubeRadiusType(ival)); } else if(node->GetNodeType() == STRING_NODE) { TubeRadiusType value; if(TubeRadiusType_FromString(node->AsString(), value)) SetTubeRadiusType(value); } } if((node = searchNode->GetNode("radiusFractionBBox")) != 0) SetRadiusFractionBBox(node->AsDouble()); if((node = searchNode->GetNode("radiusAbsolute")) != 0) SetRadiusAbsolute(node->AsDouble()); if((node = searchNode->GetNode("scaleVariable")) != 0) SetScaleVariable(node->AsString()); if((node = searchNode->GetNode("fineness")) != 0) SetFineness(node->AsInt()); if((node = searchNode->GetNode("capping")) != 0) SetCapping(node->AsBool()); }
void ConeAttributes::SetFromNode(DataNode *parentNode) { if(parentNode == 0) return; DataNode *searchNode = parentNode->GetNode("ConeAttributes"); if(searchNode == 0) return; DataNode *node; if((node = searchNode->GetNode("angle")) != 0) SetAngle(node->AsDouble()); if((node = searchNode->GetNode("origin")) != 0) SetOrigin(node->AsDoubleArray()); if((node = searchNode->GetNode("normal")) != 0) SetNormal(node->AsDoubleArray()); if((node = searchNode->GetNode("representation")) != 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) SetRepresentation(Representation(ival)); } else if(node->GetNodeType() == STRING_NODE) { Representation value; if(Representation_FromString(node->AsString(), value)) SetRepresentation(value); } } if((node = searchNode->GetNode("upAxis")) != 0) SetUpAxis(node->AsDoubleArray()); if((node = searchNode->GetNode("cutByLength")) != 0) SetCutByLength(node->AsBool()); if((node = searchNode->GetNode("length")) != 0) SetLength(node->AsDouble()); }
void FontAttributes::SetFromNode(DataNode *parentNode) { if(parentNode == 0) return; DataNode *searchNode = parentNode->GetNode("FontAttributes"); if(searchNode == 0) return; DataNode *node; if((node = searchNode->GetNode("font")) != 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) SetFont(FontName(ival)); } else if(node->GetNodeType() == STRING_NODE) { FontName value; if(FontName_FromString(node->AsString(), value)) SetFont(value); } } if((node = searchNode->GetNode("scale")) != 0) SetScale(node->AsDouble()); if((node = searchNode->GetNode("useForegroundColor")) != 0) SetUseForegroundColor(node->AsBool()); if((node = searchNode->GetNode("color")) != 0) color.SetFromNode(node); if((node = searchNode->GetNode("bold")) != 0) SetBold(node->AsBool()); if((node = searchNode->GetNode("italic")) != 0) SetItalic(node->AsBool()); }
void AMRStitchCellAttributes::SetFromNode(DataNode *parentNode) { if(parentNode == 0) return; DataNode *searchNode = parentNode->GetNode("AMRStitchCellAttributes"); if(searchNode == 0) return; DataNode *node; if((node = searchNode->GetNode("CreateCellsOfType")) != 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) SetCreateCellsOfType(CreateType(ival)); } else if(node->GetNodeType() == STRING_NODE) { CreateType value; if(CreateType_FromString(node->AsString(), value)) SetCreateCellsOfType(value); } } if((node = searchNode->GetNode("AddCaseNo")) != 0) SetAddCaseNo(node->AsBool()); if((node = searchNode->GetNode("OnlyProcessListedDomains")) != 0) SetOnlyProcessListedDomains(node->AsBool()); if((node = searchNode->GetNode("Domains")) != 0) SetDomains(node->AsIntVector()); if((node = searchNode->GetNode("OnlyProcessLevel")) != 0) SetOnlyProcessLevel(node->AsBool()); if((node = searchNode->GetNode("Level")) != 0) SetLevel(node->AsInt()); }
void ToroidalPoloidalProjection::SetFromNode(DataNode *parentNode) { if(parentNode == 0) return; DataNode *searchNode = parentNode->GetNode("ToroidalPoloidalProjection"); if(searchNode == 0) return; DataNode *node; if((node = searchNode->GetNode("R0")) != 0) SetR0(node->AsDouble()); if((node = searchNode->GetNode("r")) != 0) SetR(node->AsDouble()); if((node = searchNode->GetNode("centroidSource")) != 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) SetCentroidSource(CentroidSource(ival)); } else if(node->GetNodeType() == STRING_NODE) { CentroidSource value; if(CentroidSource_FromString(node->AsString(), value)) SetCentroidSource(value); } } if((node = searchNode->GetNode("centroid")) != 0) SetCentroid(node->AsDoubleArray()); if((node = searchNode->GetNode("project2D")) != 0) SetProject2D(node->AsBool()); }
void MetricThresholdAttributes::SetFromNode(DataNode *parentNode) { if(parentNode == 0) return; DataNode *searchNode = parentNode->GetNode("MetricThresholdAttributes"); if(searchNode == 0) return; DataNode *node; if((node = searchNode->GetNode("preset")) != 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 < 21) SetPreset(Preset(ival)); } else if(node->GetNodeType() == STRING_NODE) { Preset value; if(Preset_FromString(node->AsString(), value)) SetPreset(value); } } if((node = searchNode->GetNode("Hexahedron")) != 0) SetHexahedron(node->AsBool()); if((node = searchNode->GetNode("hex_lower")) != 0) SetHex_lower(node->AsDouble()); if((node = searchNode->GetNode("hex_upper")) != 0) SetHex_upper(node->AsDouble()); if((node = searchNode->GetNode("Tetrahedron")) != 0) SetTetrahedron(node->AsBool()); if((node = searchNode->GetNode("tet_lower")) != 0) SetTet_lower(node->AsDouble()); if((node = searchNode->GetNode("tet_upper")) != 0) SetTet_upper(node->AsDouble()); if((node = searchNode->GetNode("Wedge")) != 0) SetWedge(node->AsBool()); if((node = searchNode->GetNode("wed_lower")) != 0) SetWed_lower(node->AsDouble()); if((node = searchNode->GetNode("wed_upper")) != 0) SetWed_upper(node->AsDouble()); if((node = searchNode->GetNode("Pyramid")) != 0) SetPyramid(node->AsBool()); if((node = searchNode->GetNode("pyr_lower")) != 0) SetPyr_lower(node->AsDouble()); if((node = searchNode->GetNode("pyr_upper")) != 0) SetPyr_upper(node->AsDouble()); if((node = searchNode->GetNode("Triangle")) != 0) SetTriangle(node->AsBool()); if((node = searchNode->GetNode("tri_lower")) != 0) SetTri_lower(node->AsDouble()); if((node = searchNode->GetNode("tri_upper")) != 0) SetTri_upper(node->AsDouble()); if((node = searchNode->GetNode("Quad")) != 0) SetQuad(node->AsBool()); if((node = searchNode->GetNode("quad_lower")) != 0) SetQuad_lower(node->AsDouble()); if((node = searchNode->GetNode("quad_upper")) != 0) SetQuad_upper(node->AsDouble()); }