From db6e2bb254328386603701c6b8edba9fa6623d7f Mon Sep 17 00:00:00 2001 From: Nils Schwabe Date: Fri, 21 Mar 2014 15:37:45 +0100 Subject: - display the keywords in the desciption box --- src/vsession.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/vsession.cpp') 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 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 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); } } -- cgit v1.2.3-55-g7522