diff options
| author | 2019-09-05 00:40:40 +0200 | |
|---|---|---|
| committer | 2019-09-05 00:40:40 +0200 | |
| commit | 1c875b651df3afafe1df6b8ae412124d67e526a6 (patch) | |
| tree | e79f03a998c10f9d546b4ece060af68956bacca4 /die.cpp | |
| parent | b0ec3dfffda7991eee5775dcebb04731ba6a8389 (diff) | |
| download | OneRoll-1c875b651df3afafe1df6b8ae412124d67e526a6.tar.gz OneRoll-1c875b651df3afafe1df6b8ae412124d67e526a6.zip | |
Copy die but prevent them to be displayed twice.
Diffstat (limited to 'die.cpp')
| -rw-r--r-- | die.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -24,10 +24,12 @@ #include <QDateTime> #include <QDebug> +#include <QUuid> #include <chrono> Die::Die() - : m_hasValue(false) + : m_uuid(QUuid::createUuid().toString(QUuid::WithoutBraces)) + , m_hasValue(false) , m_displayStatus(false) , m_highlighted(true) , m_base(1) @@ -43,6 +45,7 @@ Die::Die(const Die& die) m_rollResult= die.m_rollResult; m_selected= die.m_selected; m_hasValue= die.m_hasValue; + m_uuid= die.m_uuid; m_displayStatus= die.m_displayStatus; m_maxValue= die.m_maxValue; m_highlighted= die.m_highlighted; @@ -226,3 +229,12 @@ void Die::setOp(const Die::ArithmeticOperator& op) { m_op= op; } +QString Die::getUuid() const +{ + return m_uuid; +} + +void Die::setUuid(const QString& uuid) +{ + m_uuid= uuid; +} |