diff options
| author | 2015-04-25 11:43:06 +0200 | |
|---|---|---|
| committer | 2015-04-25 11:43:06 +0200 | |
| commit | 942cf3f75f49d83c4e512d5350f7de69f0ec8aa7 (patch) | |
| tree | dc1bc3470ee90a7950747e0d1d25e4e66a0218c0 /result/diceresult.cpp | |
| parent | 8beb664172cf2c15abb4e12938b8978506471c02 (diff) | |
| parent | 74275e3e17b7f8e9409d86382aa355c36e7005bd (diff) | |
| download | OneRoll-942cf3f75f49d83c4e512d5350f7de69f0ec8aa7.tar.gz OneRoll-942cf3f75f49d83c4e512d5350f7de69f0ec8aa7.zip | |
Merge branch 'master' of github.com:obiwankennedy/DiceParser
Diffstat (limited to 'result/diceresult.cpp')
| -rw-r--r-- | result/diceresult.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/result/diceresult.cpp b/result/diceresult.cpp index f87079a..95122f1 100644 --- a/result/diceresult.cpp +++ b/result/diceresult.cpp @@ -82,3 +82,12 @@ qreal DiceResult::getScalarResult() return 0; } +QString DiceResult::toString() +{ + QStringList scalarSum; + foreach(Die* die,m_diceValues) + { + scalarSum << QString::number(die->getValue()); + } + return QString("DiceResult_Value_%1_dice_%2").arg(getScalarResult()).arg(scalarSum.join('_')); +} |