From 07c5f6ec23fcf9237a24e71adcfacabce677f818 Mon Sep 17 00:00:00 2001 From: Renaud G Date: Fri, 29 Apr 2022 10:48:09 +0200 Subject: Change file organization. --- src/bin/cli/displaytoolbox.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/bin/cli/displaytoolbox.h (limited to 'src/bin/cli/displaytoolbox.h') diff --git a/src/bin/cli/displaytoolbox.h b/src/bin/cli/displaytoolbox.h new file mode 100644 index 0000000..5a22b0f --- /dev/null +++ b/src/bin/cli/displaytoolbox.h @@ -0,0 +1,29 @@ +#ifndef GENERATEIMAGE_H +#define GENERATEIMAGE_H + +#include +#include + +#include "diceparser/diceparser.h" + +class DisplayToolBox +{ +public: + enum class Output + { + Svg, + Terminal, + Json, + Image + }; + DisplayToolBox(); +#ifdef PAINTER_OP + static QString makeImage(QByteArray svgCode); +#endif + static QString colorToIntCode(QString str); + static QString colorToTermCode(QString str); + static QString diceToSvg(QJsonArray array, bool withColor, bool allSameColor, bool allSameFaceCount); + static QString diceResultToString(QJsonObject val, Output type, bool hasColor); +}; + +#endif // GENERATEIMAGE_H -- cgit v1.2.3-70-g09d2