aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/bin/cli/displaytoolbox.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/cli/displaytoolbox.h')
-rw-r--r--src/bin/cli/displaytoolbox.h29
1 files changed, 29 insertions, 0 deletions
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 <QJsonArray>
+#include <QString>
+
+#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