From 8904bc61ad71f407fbefa4b80793ba424f2ce88b Mon Sep 17 00:00:00 2001 From: Renaud G Date: Sun, 14 Jan 2018 02:34:21 +0100 Subject: -rework display -add support for new output format: SVG, IMAGE, JSON. --- cli/displaytoolbox.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'cli/displaytoolbox.h') 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 #include -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 &diceList, bool &allSameFaceCount, bool &allSameColor); + static QString diceToSvg(QJsonArray array, bool withColor, bool allSameColor, bool allSameFaceCount); + static QString diceResultToString(QJsonObject val); }; -- cgit v1.2.3-70-g09d2