本文整理汇总了C++中PropertyList::append方法的典型用法代码示例。如果您正苦于以下问题:C++ PropertyList::append方法的具体用法?C++ PropertyList::append怎么用?C++ PropertyList::append使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PropertyList
的用法示例。
在下文中一共展示了PropertyList::append方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: InitDeviceModelMessage
void CDeviceModelMessage::InitDeviceModelMessage(QString strFileName_)
{
strFileName_.append("/DeviceModel.xml");
qDebug()<<__FILE__<<__func__<<strFileName_;
QDomDocument doc;
if (CXmlParser::readFile(strFileName_,doc))
{
QDomNodeList DeviceNodeList = doc.elementsByTagName("Device");
for (int i = 0; i < DeviceNodeList.count(); ++i)
{
QDomElement DeviceElement = DeviceNodeList.at(i).toElement();
Device_Type_Property *pDevice_Type_Property = new Device_Type_Property;
QDomNodeList TypeNodeList = DeviceElement.elementsByTagName("Type");
for (int j = 0; j < TypeNodeList.count(); ++j)
{
QDomElement TypeElement = TypeNodeList.at(j).toElement();
QString Type_value = TypeElement.attribute("value");
QDomNodeList propertyNodeList = TypeElement.elementsByTagName("property");
PropertyList *pPropertyList = new PropertyList;
Property *pProperty = NULL;
for (int k = 0; k < propertyNodeList.count(); ++k)
{
QDomElement propertyElement = propertyNodeList.at(k).toElement();
pProperty = new Property;
pProperty->m_name = propertyElement.attribute("name");
pProperty->m_var = propertyElement.attribute("var");
qDebug()<<"--"<<Type_value<<pProperty->m_name<<pProperty->m_var;
pPropertyList->append(pProperty);
}
if ("YX" == Type_value)
{
qDebug()<<"----------------"<<pPropertyList;
pDevice_Type_Property->m_pYXPropertyList = pPropertyList;
}else if ("YC" == Type_value)
{
pDevice_Type_Property->m_pYCPropertyList = pPropertyList;
}else if ("YM" == Type_value)
{
pDevice_Type_Property->m_pYMPropertyList = pPropertyList;
}else if ("YK" == Type_value)
{
pDevice_Type_Property->m_pYKPropertyList = pPropertyList;
}else if ("YS" == Type_value)
{
pDevice_Type_Property->m_pYSPropertyList = pPropertyList;
}
}
if (!m_DeviceTypeMessageMap.contains(DeviceElement.attribute("value")))
{
qDebug()<<__FILE__<<__func__<<DeviceElement.attribute("value")<<"succeed";
m_DeviceTypeMessageMap.insert(DeviceElement.attribute("value"),pDevice_Type_Property);
}else
{
qDebug()<<__FILE__<<__func__<<DeviceElement.attribute("value")<<"fail";
}
}
}
}