aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorRenaud G <renaud@rolisteam.org>2014-12-09 22:09:23 +0100
committerRenaud G <renaud@rolisteam.org>2014-12-09 22:09:23 +0100
commitf8d862bb3066774bb6c3c71f46954a3ef5f96d66 (patch)
treec93047fe3bd0c5c45870a2c9fbd5d0f3edd85857
parentbf1a7ffc6f9e989cae1e34f8bb6ba826dd98d88e (diff)
downloadOneRoll-f8d862bb3066774bb6c3c71f46954a3ef5f96d66.tar.gz
OneRoll-f8d862bb3066774bb6c3c71f46954a3ef5f96d66.zip
-implementation of HelpNode.
-rw-r--r--node/helpnode.cpp7
-rw-r--r--node/helpnode.h1
2 files changed, 6 insertions, 2 deletions
diff --git a/node/helpnode.cpp b/node/helpnode.cpp
index a11c2b3..8fc7e93 100644
--- a/node/helpnode.cpp
+++ b/node/helpnode.cpp
@@ -2,21 +2,24 @@
HelpNode::HelpNode()
{
+ m_result = new StringResult();
}
void HelpNode::run(ExecutionNode* previous)
{
+ StringResult* txtResult = dynamic_cast<StringResult*>(m_result);
if(NULL != previous)
{
+ txtResult->setText(toString());
}
else
{
-
+ txtResult->setText(previous->getHelp());
}
}
QString HelpNode::toString()const
{
- return QObject::tr("see full documentation at: <a href=\"https://github.com/obiwankennedy/DiceParser/blob/master/HelpMe.md\">https://github.com/obiwankennedy/DiceParser/blob/master/HelpMe.md</a>");
+ return QObject::tr("Rolisteam Dice Parser: Full documentation at: <a href=\"https://github.com/obiwankennedy/DiceParser/blob/master/HelpMe.md\">https://github.com/obiwankennedy/DiceParser/blob/master/HelpMe.md</a>");
}
qint64 HelpNode::getPriority() const
diff --git a/node/helpnode.h b/node/helpnode.h
index f8b3f78..27f38b3 100644
--- a/node/helpnode.h
+++ b/node/helpnode.h
@@ -32,6 +32,7 @@ public:
* @return
*/
virtual qint64 getPriority() const;
+
};
#endif // HELPNODE_H