1.修复了一些类的isTerminal没有被初始化的bug

2.修复了一些地方判断下一个Terminal的bug
Signed-off-by: facat@lab.com <facat@lab.com>
This commit is contained in:
facat@lab.com
2014-12-06 21:48:07 +08:00
parent 38025aa1fc
commit 69cd117f35
14 changed files with 229 additions and 41 deletions

View File

@@ -10,7 +10,7 @@ bool ACLineSegment::derivedParse(QXmlStreamReader &reader)
{
QString terminal;
terminal=reader.attributes().value("rdf:resource").toString();
this->terminalA=terminal.replace("#","").leftRef(-1);//返回整个字符串的Ref
this->terminalA=terminal.replace("#","").leftRef(-1).toString();//返回整个字符串的Ref
qDebug()<<"got "<<"ConductingEquipment.Terminals "<<this->terminalA<<"\n";
this->isTerminalA=false;
}
@@ -18,19 +18,28 @@ bool ACLineSegment::derivedParse(QXmlStreamReader &reader)
{
QString terminal;
terminal=reader.attributes().value("rdf:resource").toString();
this->terminalB=terminal.replace("#","").leftRef(-1);//返回整个字符串的Ref
this->terminalB=terminal.replace("#","").leftRef(-1).toString();//返回整个字符串的Ref
qDebug()<<"got "<<"ConductingEquipment.Terminals "<<this->terminalB<<"\n";
}
if("ConductingEquipment.Substation"==reader.name() && reader.attributes().hasAttribute("rdf:resource"))
{
QString ss;
ss=reader.attributes().value("rdf:resource").toString();
this->containsOfSubstation=ss.replace("#","").leftRef(-1);//返回整个字符串的Ref
this->containsOfSubstation=ss.replace("#","").leftRef(-1).toString();//返回整个字符串的Ref
qDebug()<<"got "<<"ConductingEquipment.Substation "<<this->containsOfSubstation<<"\n";
}
return true;
}
QString ACLineSegment::getTerminalA()
{
return this->terminalA;
}
QString ACLineSegment::getTerminalB()
{
return this->terminalB;
}
bool ACLineSegment::parse(QXmlStreamReader &reader)
{
return this->parseBasicInfo(reader);