本文整理汇总了C++中DataNode::RemoveNode方法的典型用法代码示例。如果您正苦于以下问题:C++ DataNode::RemoveNode方法的具体用法?C++ DataNode::RemoveNode怎么用?C++ DataNode::RemoveNode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataNode
的用法示例。
在下文中一共展示了DataNode::RemoveNode方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: root
void
QvisAppearanceWidget::singleColorOpacityChanged(int opacity)
{
int MultiCurve = viewer->GetPlotIndex("MultiCurve");
AttributeSubject *atts = viewer->DelayedState()->GetPlotAttributes(MultiCurve);
if(atts != 0)
{
DataNode root("root");
atts->CreateNode(&root, true, false);
DataNode *multiCurveNode = root.GetNode("MultiCurveAttributes");
DataNode *singleColorNode = multiCurveNode->GetNode("singleColor");
DataNode *colorAttributeNode = singleColorNode->GetNode("ColorAttribute");
DataNode *colorNode = colorAttributeNode->GetNode("color");
const unsigned char *oldColor = colorNode->AsUnsignedCharArray();
unsigned char newColor[4];
newColor[0] = oldColor[0];
newColor[1] = oldColor[1];
newColor[2] = oldColor[2];
newColor[3] = (unsigned char)opacity;
DataNode *newColorNode = new DataNode("color", newColor, 4);
colorAttributeNode->RemoveNode(colorNode);
colorAttributeNode->AddNode(newColorNode);
atts->SetFromNode(&root);
atts->Notify();
emit multiCurveChanged(atts);
}
}
示例2:
void
QvisLegacyStreamlinePlotWindow::ProcessOldVersions(DataNode *parentNode,
const char *configVersion)
{
if(parentNode == 0)
return;
DataNode *searchNode = parentNode->GetNode("Streamline plot attributes");
if(searchNode == 0)
return;
// Remove height/width information if the config file is older than
// 1.4.1 since this window changed size quite a bit in version 1.4.1.
if (LegacyStreamlineAttributes::VersionLessThan(configVersion, "1.4.1"))
{
searchNode->RemoveNode("width");
searchNode->RemoveNode("height");
}
}
示例3:
// ****************************************************************************
// Method: AnimationAttributes::ProcessOldVersions
//
// Purpose:
// This method creates modifies a DataNode representation of the object
// so it conforms to the newest representation of the object, which can
// can be read back in.
//
// Programmer: Kathleen Bonnell
// Creation: January 12, 2005
//
// Modifications:
//
// ****************************************************************************
void
AnimationAttributes::ProcessOldVersions(DataNode *parentNode,
const char *configVersion)
{
if(parentNode == 0)
return;
DataNode *searchNode = parentNode->GetNode("AnimationAttributes");
if(searchNode == 0)
return;
DataNode *pcNode = searchNode->GetNode("pipelineCachingMode");
if (pcNode == 0)
return;
if (VersionLessThan(configVersion, "1.1.5"))
searchNode->RemoveNode("pipelineCachingMode");
}