aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/result
diff options
context:
space:
mode:
Diffstat (limited to 'result')
-rw-r--r--result/diceresult.cpp10
-rw-r--r--result/diceresult.h9
2 files changed, 19 insertions, 0 deletions
diff --git a/result/diceresult.cpp b/result/diceresult.cpp
index ceb77b8..57e9da4 100644
--- a/result/diceresult.cpp
+++ b/result/diceresult.cpp
@@ -24,6 +24,7 @@
DiceResult::DiceResult()
{
m_resultTypes= (DICE_LIST);
+ 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());
diff --git a/result/diceresult.h b/result/diceresult.h
index 84a4621..fe24277 100644
--- a/result/diceresult.h
+++ b/result/diceresult.h
@@ -66,11 +66,20 @@ public:
* @return
*/
virtual QString toString(bool wl);
+ /**
+ * @brief isHomogeneous
+ */
+ bool isHomogeneous() const;
+ /**
+ * @brief setHomogeneous
+ */
+ void setHomogeneous(bool);
private:
qreal getScalarResult();
private:
QList<Die*> m_diceValues;
+ bool m_homogeneous;
};
#endif // DICERESULT_H