aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/cli/displaytoolbox.h
diff options
context:
space:
mode:
authorRenaud G <renaud@rolisteam.org>2018-01-14 02:34:21 +0100
committerRenaud G <renaud@rolisteam.org>2018-01-14 02:34:21 +0100
commit8904bc61ad71f407fbefa4b80793ba424f2ce88b (patch)
tree47b0962c82a45b8cd5291132c7d96ef5cfbe5425 /cli/displaytoolbox.h
parent12bfa92a9d35299a2eeb456b11238a6bd9669146 (diff)
downloadOneRoll-8904bc61ad71f407fbefa4b80793ba424f2ce88b.tar.gz
OneRoll-8904bc61ad71f407fbefa4b80793ba424f2ce88b.zip
-rework display
-add support for new output format: SVG, IMAGE, JSON.
Diffstat (limited to 'cli/displaytoolbox.h')
-rw-r--r--cli/displaytoolbox.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/cli/displaytoolbox.h b/cli/displaytoolbox.h
index 077831f..0b6cd12 100644
--- a/cli/displaytoolbox.h
+++ b/cli/displaytoolbox.h
@@ -5,11 +5,18 @@
#include <QString>
#include <QJsonArray>
-class ImageGenerator
+#include "diceparser.h"
+
+class DisplayToolBox
{
public:
- ImageGenerator();
- static QString makeImage(QJsonArray array,bool allSameFaceCount);
+ DisplayToolBox();
+ static QString makeImage(QString scalarText, QString resultStr,QJsonArray array, bool withColor, QString cmd, QString comment, bool allSameFaceCount,bool allSameColor);
+ static QString colorToTermCode(QString str);
+ static QString diceToText(QJsonArray array, bool withColor,bool allSameFaceCount, bool allSameColor);
+ static QJsonArray diceToJson(QList<ExportedDiceResult> &diceList, bool &allSameFaceCount, bool &allSameColor);
+ static QString diceToSvg(QJsonArray array, bool withColor, bool allSameColor, bool allSameFaceCount);
+ static QString diceResultToString(QJsonObject val);
};