Browse Source

Improving DOM view of messages

QGC4.4
pixhawk 14 years ago
parent
commit
8ad9bf604e
  1. 19
      src/ui/mavlink/DomModel.cc

19
src/ui/mavlink/DomModel.cc

@ -36,7 +36,26 @@ QVariant DomModel::data(const QModelIndex &index, int role) const @@ -36,7 +36,26 @@ QVariant DomModel::data(const QModelIndex &index, int role) const
switch (index.column()) {
case 0:
{
if (node.nodeName() == "message")
{
for (int i = 0; i < attributeMap.count(); ++i) {
QDomNode attribute = attributeMap.item(i);
if (attribute.nodeName() == "name") return attribute.nodeValue();
}
}
if (node.nodeName() == "field")
{
for (int i = 0; i < attributeMap.count(); ++i) {
QDomNode attribute = attributeMap.item(i);
if (attribute.nodeName() == "name") return attribute.nodeValue();
}
}
else
{
return node.nodeName();
}
}
case 1:
for (int i = 0; i < attributeMap.count(); ++i) {
QDomNode attribute = attributeMap.item(i);

Loading…
Cancel
Save