summaryrefslogtreecommitdiffstats
path: root/src/vsession.cpp
diff options
context:
space:
mode:
authorNils Schwabe2014-03-21 15:37:45 +0100
committerNils Schwabe2014-03-21 15:37:45 +0100
commitdb6e2bb254328386603701c6b8edba9fa6623d7f (patch)
tree9b529e9fb0a89736dc53d027814f268b37ee26fd /src/vsession.cpp
parent- added tab view (diff)
downloadvmchooser2-db6e2bb254328386603701c6b8edba9fa6623d7f.tar.gz
vmchooser2-db6e2bb254328386603701c6b8edba9fa6623d7f.tar.xz
vmchooser2-db6e2bb254328386603701c6b8edba9fa6623d7f.zip
- display the keywords in the desciption box
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);
}
}