diff options
| author | 2015-08-20 11:56:10 +0200 | |
|---|---|---|
| committer | 2015-08-20 11:56:10 +0200 | |
| commit | ae81e675a117819aa5a2eb7f9be687aff5a6bb9f (patch) | |
| tree | 4284f5e19a479fb666ab6a931ef1e6f991533dfc /node/listaliasnode.cpp | |
| parent | 8a1c33fb342a3609ec4d22e918c5f847c59c1b91 (diff) | |
| download | OneRoll-ae81e675a117819aa5a2eb7f9be687aff5a6bb9f.tar.gz OneRoll-ae81e675a117819aa5a2eb7f9be687aff5a6bb9f.zip | |
add bool parameter to toString() function in node.
Diffstat (limited to 'node/listaliasnode.cpp')
| -rw-r--r-- | node/listaliasnode.cpp | 23 |
1 files changed, 16 insertions, 7 deletions
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 << "{" <<key->getCommand() << key->getValue()<< "}"; - } - return QString("ListAliasNode [label=\"ListAliasNode %1\"]").arg(resultList.join(",")); + QStringList resultList; + foreach(DiceAlias* key, *m_aliasList) + { + resultList << "{" <<key->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 |