diff options
| author | 2015-10-11 16:06:53 +0200 | |
|---|---|---|
| committer | 2015-10-11 16:06:53 +0200 | |
| commit | 2036d7d5e028c08b022390d607a2ead188e7cc90 (patch) | |
| tree | a527c6409927189d1a5d126ac1576eab7e93caf5 /node/dicerollernode.cpp | |
| parent | 84691771b54365160f5b1d54033e00187dbbf043 (diff) | |
| parent | 29f0126a7b8ae3479597252f5056d5e67b6ed10d (diff) | |
| download | OneRoll-2036d7d5e028c08b022390d607a2ead188e7cc90.tar.gz OneRoll-2036d7d5e028c08b022390d607a2ead188e7cc90.zip | |
Merge branch 'rangeInList'
resolved conflicts and merge rangeInList in master.
Conflicts:
HelpMe.md
diceparser.cpp
parsingtoolbox.cpp
result/result.cpp
result/stringresult.h
Diffstat (limited to 'node/dicerollernode.cpp')
| -rw-r--r-- | node/dicerollernode.cpp | 39 |
1 files changed, 10 insertions, 29 deletions
diff --git a/node/dicerollernode.cpp b/node/dicerollernode.cpp index 06148fc..73a7218 100644 --- a/node/dicerollernode.cpp +++ b/node/dicerollernode.cpp @@ -8,30 +8,7 @@ #include <QTime> -//DiceRoller::DiceRoller(QMutex* mutex,DiceResult* diceResult,int faces,int count) -// : m_mutex(mutex),m_sharedDiceResult(diceResult),m_faces(faces),m_diceCount(count) -//{ -//} - -//void DiceRoller::run() -//{ -// for(quint64 i=0; i < m_diceCount ; ++i) -// { -// Die* die = new Die(); -// die->setFaces(m_faces); -// die->roll(); -// m_mutex->lock(); -// m_sharedDiceResult->insertResult(die); -// m_mutex->unlock(); -// } -//} - - - -////////////////////////////////////////////////// -/// \brief DiceRollerNode::DiceRollerNode -////////////////////////////////////////////////// DiceRollerNode::DiceRollerNode(quint64 faces,qint64 offset) : m_faces(faces),m_diceResult(new DiceResult()),m_offset(offset) { @@ -61,19 +38,23 @@ void DiceRollerNode::run(ExecutionNode* previous) m_nextNode->run(this); } } - } - - - + } } quint64 DiceRollerNode::getFaces() { return m_faces; } -QString DiceRollerNode::toString() const +QString DiceRollerNode::toString(bool wl) const { - return QString("DiceRollerNode"); + if(wl) + { + return QString("%1 [label=\"DiceRollerNode faces: %2\"]").arg(m_id).arg(m_faces); + } + else + { + return m_id; + } } qint64 DiceRollerNode::getPriority() const { |