From 88e5130bd86992819a036ef982733b5ee344d656 Mon Sep 17 00:00:00 2001 From: Renaud G Date: Thu, 21 May 2015 10:48:10 +0200 Subject: add API to set the link to documentation --- node/helpnode.cpp | 7 ++++++- node/helpnode.h | 7 +++++++ 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'node') diff --git a/node/helpnode.cpp b/node/helpnode.cpp index d41464b..6108e4d 100644 --- a/node/helpnode.cpp +++ b/node/helpnode.cpp @@ -1,6 +1,7 @@ #include "helpnode.h" HelpNode::HelpNode() + : m_path("https://github.com/obiwankennedy/DiceParser/blob/master/HelpMe.md") { m_result = new StringResult(); } @@ -30,10 +31,14 @@ void HelpNode::run(ExecutionNode* previous) } QString HelpNode::toString() const { - return QObject::tr("Rolisteam Dice Parser:\nFull documentation at: https://github.com/obiwankennedy/DiceParser/blob/master/HelpMe.md \n"); + return QObject::tr("Rolisteam Dice Parser:\nFull documentation at: %1 \n").arg(m_path); } qint64 HelpNode::getPriority() const { return 0; } +void HelpNode::setHelpPath(QString path) +{ + m_path = path; +} diff --git a/node/helpnode.h b/node/helpnode.h index 3a949d9..88a0842 100644 --- a/node/helpnode.h +++ b/node/helpnode.h @@ -32,6 +32,13 @@ public: * @return */ virtual qint64 getPriority() const; + /** + * @brief setHelpPath + * @param path + */ + void setHelpPath(QString path); +private: + QString m_path; }; -- cgit v1.2.3-70-g09d2