summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkarsh Simha <akarsh@kde.org>2016-08-17 05:24:05 (GMT)
committerAkarsh Simha <akarsh@kde.org>2016-08-17 05:24:05 (GMT)
commit58c15dea8824115c24e0432c9ecd9ce381346300 (patch)
treefc356411725171fde53d04236d414c36ae0694ab
parenteacb277f4a54e30d98933cc5967c3143deef0c6f (diff)
Parse object name returned by SIMBAD and put it in CatalogEntryData
This is not yet used in a meaningful manner.
-rw-r--r--kstars/tools/nameresolver.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/kstars/tools/nameresolver.cpp b/kstars/tools/nameresolver.cpp
index c98e284..16bd197 100644
--- a/kstars/tools/nameresolver.cpp
+++ b/kstars/tools/nameresolver.cpp
@@ -125,6 +125,14 @@ bool NameResolver::NameResolverInternals::sesameResolver( class CatalogEntryData
}
// Don't know what to do with other magnitudes, until we have a magnitude hash
}
+ else if( xml.name() == "oname" ) { // Primary identifier
+ QRegExp regex(" *([a-ZA-Z][a-zA-Z ]*) *([0-9]+) *");
+ QString contents = xml.readElementText();
+ if( contents.contains( regex ) ) { // Has a simple catalog + ID format (this excludes designations like Foo JHHMMMSS+DDMMSS as CatalogEntryData currently doesn't support them, but includes designations like VII Zw 466, where VII Zw will take the place of the catalog)
+ data.catalog_name = regex.cap(1);
+ data.ID = regex.cap(2).toInt();
+ }
+ }
else
xml.skipCurrentElement();
// TODO: Parse aliases for common names