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/listaliasnode.cpp | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) (limited to 'node/listaliasnode.cpp') diff --git a/node/listaliasnode.cpp b/node/listaliasnode.cpp index ddb8ac9..7af202c 100644 --- a/node/listaliasnode.cpp +++ b/node/listaliasnode.cpp @@ -58,14 +58,23 @@ QString ListAliasNode::buildList() const } return result; } -QString ListAliasNode::toString() const +QString ListAliasNode::toString(bool wl) const { - QStringList resultList; - foreach(DiceAlias* key, *m_aliasList) - { - resultList << "{" <getCommand() << key->getValue()<< "}"; - } - return QString("ListAliasNode [label=\"ListAliasNode %1\"]").arg(resultList.join(",")); + QStringList resultList; + foreach(DiceAlias* key, *m_aliasList) + { + resultList << "{" <getCommand() << key->getValue()<< "}"; + } + + if(wl) + { + return QString("%1 [label=\"ListAliasNode %2\"]").arg(m_id).arg(resultList.join(",")); + } + else + { + return m_id; + } + } qint64 ListAliasNode::getPriority() const -- cgit v1.2.3-70-g09d2