From d0f326f7289add5d84c662c6c813f1c3c88fca4f Mon Sep 17 00:00:00 2001 From: Renaud G Date: Sat, 23 Mar 2019 01:15:02 +0100 Subject: Add color management for every dice. --- cli/displaytoolbox.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'cli/displaytoolbox.h') diff --git a/cli/displaytoolbox.h b/cli/displaytoolbox.h index 34859e9..30b7ba3 100644 --- a/cli/displaytoolbox.h +++ b/cli/displaytoolbox.h @@ -9,16 +9,22 @@ class DisplayToolBox { public: + enum class Output + { + Svg, + Terminal, + Json, + Image + }; DisplayToolBox(); #ifdef PAINTER_OP - static QString makeImage(QString scalarText, QString resultStr, QJsonArray array, bool withColor, QString cmd, - QString comment, bool allSameFaceCount, bool allSameColor); + static QString makeImage(QByteArray svgCode); #endif 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); + static QString diceResultToString(QJsonObject val, Output type, bool hasColor); }; #endif // GENERATEIMAGE_H -- cgit v1.2.3-70-g09d2