summaryrefslogtreecommitdiffstats
path: root/src/vsession.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/vsession.cpp')
-rw-r--r--src/vsession.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/vsession.cpp b/src/vsession.cpp
index f8512fc..ba7a478 100644
--- a/src/vsession.cpp
+++ b/src/vsession.cpp
@@ -69,6 +69,19 @@ QString VSession::getAttribute(const QString &nodeName,
.attribute(attribute);
}
+QList<QString> VSession::keywords() const {
+ return this->keywords_;
+}
+
+void VSession::readKeywords() {
+ QDomNode keywordsNode = this->doc_.namedItem("eintrag").namedItem("keywords");
+ for (QDomElement el(keywordsNode.firstChildElement("keyword"));
+ !el.isNull();
+ el = el.nextSiblingElement("keyword")) {
+ this->keywords_.append(el.text());
+ }
+}
+
QString VSession::getNodeText(const QString& nodeName) const {
return this->doc_.namedItem(nodeName).toText().data();
}
@@ -360,6 +373,7 @@ QList<Session*> VSession::readXmlFile(const QString& filepath) {
dummy.appendChild(dummy.importNode(el, true));
VSession* e = new VSession;
if (e->init(dummy.toString(), dirName)) {
+ e->readKeywords();
retval.append(e);
}
}