You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
722 B
C++
29 lines
722 B
C++
#include "common.h"
|
|
|
|
|
|
QString getAttributeStr(const QDomElement& Element, const QString& szAttribute)
|
|
{
|
|
QDomNamedNodeMap Attributes = Element.attributes();
|
|
|
|
for(int z = 0;z < Attributes.count();z++)
|
|
{
|
|
QDomNode Node = Attributes.item(z);
|
|
if(!Node.toAttr().name().compare(szAttribute, Qt::CaseInsensitive))
|
|
return(Node.toAttr().nodeValue());
|
|
}
|
|
return("");
|
|
}
|
|
|
|
qint16 getAttributeInt(const QDomElement& Element, const QString& szAttribute)
|
|
{
|
|
QDomNamedNodeMap Attributes = Element.attributes();
|
|
|
|
for(int z = 0;z < Attributes.count();z++)
|
|
{
|
|
QDomNode Node = Attributes.item(z);
|
|
if(!Node.toAttr().name().compare(szAttribute, Qt::CaseInsensitive))
|
|
return(Node.toAttr().nodeValue().toInt());
|
|
}
|
|
return(-1);
|
|
}
|