diff options
Diffstat (limited to 'result/diceresult.cpp')
| -rw-r--r-- | result/diceresult.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/result/diceresult.cpp b/result/diceresult.cpp index 74aa4e1..37db727 100644 --- a/result/diceresult.cpp +++ b/result/diceresult.cpp @@ -23,7 +23,8 @@ DiceResult::DiceResult() { - m_resultTypes= (DICE_LIST); + m_resultTypes= (DICE_LIST | SCALAR); + m_homogeneous = true; } void DiceResult::insertResult(Die* die) { @@ -33,6 +34,15 @@ QList<Die*>& DiceResult::getResultList() { return m_diceValues; } +bool DiceResult::isHomogeneous() const +{ + return m_homogeneous; +} +void DiceResult::setHomogeneous(bool b) +{ + m_homogeneous = b; +} + void DiceResult::setResultList(QList<Die*> list) { qDeleteAll(m_diceValues.begin(), m_diceValues.end()); @@ -62,6 +72,10 @@ QVariant DiceResult::getResult(RESULT_TYPE type) return QVariant(); } +/*bool DiceResult::hasResultOfType(RESULT_TYPE type) const +{ + return (m_resultTypes & type); +}*/ qreal DiceResult::getScalarResult() { if(m_diceValues.size()==1) |