diff options
| author | 2017-04-28 10:06:58 +0200 | |
|---|---|---|
| committer | 2017-04-28 10:06:58 +0200 | |
| commit | 237754b8c2c8828545f2c8295d911a0b11e58e1c (patch) | |
| tree | 1cfd1f4e9230a3fdb79d0d7a6681760b652a23f2 | |
| parent | 12e90b99e7bcc92aaf486eb0ef261e657ce0bb4f (diff) | |
| download | OneRoll-237754b8c2c8828545f2c8295d911a0b11e58e1c.tar.gz OneRoll-237754b8c2c8828545f2c8295d911a0b11e58e1c.zip | |
add splitnode
| -rw-r--r-- | irc/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | mobile/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | node/splitnode.cpp | 6 | ||||
| -rw-r--r-- | node/splitnode.h | 4 |
4 files changed, 8 insertions, 4 deletions
diff --git a/irc/CMakeLists.txt b/irc/CMakeLists.txt index 7a9d60c..73d7e5a 100644 --- a/irc/CMakeLists.txt +++ b/irc/CMakeLists.txt @@ -70,6 +70,7 @@ add_executable( ../node/ifnode.cpp ../node/stringnode.cpp ../node/filternode.cpp + ../node/splitnode.cpp botircdiceparser.cpp main.cpp) diff --git a/mobile/CMakeLists.txt b/mobile/CMakeLists.txt index 24680af..89232c8 100644 --- a/mobile/CMakeLists.txt +++ b/mobile/CMakeLists.txt @@ -90,6 +90,7 @@ SET( diceGui_sources ../node/ifnode.cpp ../node/filternode.cpp ../node/stringnode.cpp + ../node/splitnode.cpp main.cpp maincontroler.cpp commandmodel.cpp diff --git a/node/splitnode.cpp b/node/splitnode.cpp index 5ef082f..7c01910 100644 --- a/node/splitnode.cpp +++ b/node/splitnode.cpp @@ -41,13 +41,15 @@ void SplitNode::run(ExecutionNode* previous) { for(Die* oldDie : dice->getResultList()) { + oldDie->displayed(); m_diceResult->setOperator(oldDie->getOp()); for(qint64 value : oldDie->getListValue()) { Die* tmpdie = new Die(); + tmpdie->setFaces(oldDie->getFaces()); tmpdie->setValue(value); tmpdie->setOp(oldDie->getOp()); - m_diceResult->insertResult(tmpDie); + m_diceResult->insertResult(tmpdie); } } } @@ -63,7 +65,7 @@ QString SplitNode::toString(bool withLabel) const { if(withLabel) { - return QString("%1 [label=\"Merge Node\"]").arg(m_id); + return QString("%1 [label=\"SplitNode Node\"]").arg(m_id); } else { diff --git a/node/splitnode.h b/node/splitnode.h index 1bb092e..6bd97b4 100644 --- a/node/splitnode.h +++ b/node/splitnode.h @@ -19,8 +19,8 @@ * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ -#ifndef MERGENODE_H -#define MERGENODE_H +#ifndef SPLITNODE_H +#define SPLITNODE_H #include "node/executionnode.h" #include "result/diceresult.h" |