From ae81e675a117819aa5a2eb7f9be687aff5a6bb9f Mon Sep 17 00:00:00 2001 From: Renaud G Date: Thu, 20 Aug 2015 11:56:10 +0200 Subject: add bool parameter to toString() function in node. --- node/helpnode.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'node/helpnode.cpp') diff --git a/node/helpnode.cpp b/node/helpnode.cpp index 6108e4d..d5fc2c9 100644 --- a/node/helpnode.cpp +++ b/node/helpnode.cpp @@ -29,9 +29,16 @@ void HelpNode::run(ExecutionNode* previous) m_nextNode->run(this); } } -QString HelpNode::toString() const +QString HelpNode::toString(bool wl) const { - return QObject::tr("Rolisteam Dice Parser:\nFull documentation at: %1 \n").arg(m_path); + if(wl) + { + return QString("%1 [label=\"Rolisteam Dice Parser:\nFull documentation at: %2\"]").arg(m_id).arg(m_path); + } + else + { + return m_id; + } } qint64 HelpNode::getPriority() const -- cgit v1.2.3-70-g09d2 From b7a58837e1ad1412a5fece212d4619bedc4a5d4c Mon Sep 17 00:00:00 2001 From: Renaud G Date: Thu, 20 Aug 2015 12:29:05 +0200 Subject: fix compilation --- node/helpnode.cpp | 3 +-- result/stringresult.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'node/helpnode.cpp') diff --git a/node/helpnode.cpp b/node/helpnode.cpp index d5fc2c9..376f48a 100644 --- a/node/helpnode.cpp +++ b/node/helpnode.cpp @@ -14,8 +14,7 @@ void HelpNode::run(ExecutionNode* previous) { if(previous->getResult() == NULL) { - txtResult->setText(toString()); - + txtResult->setText(tr("Rolisteam Dice Parser:\nFull documentation at: %1").arg(m_path)); } else { diff --git a/result/stringresult.h b/result/stringresult.h index 5a6b26c..37739a2 100644 --- a/result/stringresult.h +++ b/result/stringresult.h @@ -36,7 +36,7 @@ public: * @brief toString * @return */ - virtual QString toString(); + virtual QString toString(bool ); private: QString m_value; }; -- cgit v1.2.3-70-g09d2 From d4061b6d9660d8dfc0a478fb252b93ec3dfd0f1c Mon Sep 17 00:00:00 2001 From: Renaud G Date: Thu, 20 Aug 2015 12:31:23 +0200 Subject: fix compilation --- node/helpnode.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'node/helpnode.cpp') diff --git a/node/helpnode.cpp b/node/helpnode.cpp index 376f48a..d4a5d4b 100644 --- a/node/helpnode.cpp +++ b/node/helpnode.cpp @@ -14,7 +14,7 @@ void HelpNode::run(ExecutionNode* previous) { if(previous->getResult() == NULL) { - txtResult->setText(tr("Rolisteam Dice Parser:\nFull documentation at: %1").arg(m_path)); + txtResult->setText(QObject::tr("Rolisteam Dice Parser:\nFull documentation at: %1").arg(m_path)); } else { -- cgit v1.2.3-70-g09d2