aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/cli/displaytoolbox.h
diff options
context:
space:
mode:
authorRenaud G <renaud@rolisteam.org>2019-03-23 01:15:02 +0100
committerRenaud G <renaud@rolisteam.org>2019-03-23 01:15:02 +0100
commitd0f326f7289add5d84c662c6c813f1c3c88fca4f (patch)
treeb4eef57399baee34b8e349abb3f0f1ea390360b8 /cli/displaytoolbox.h
parent489661ca4599a84033a57a5645e150e4129a70a0 (diff)
downloadOneRoll-d0f326f7289add5d84c662c6c813f1c3c88fca4f.tar.gz
OneRoll-d0f326f7289add5d84c662c6c813f1c3c88fca4f.zip
Add color management for every dice.
Diffstat (limited to 'cli/displaytoolbox.h')
-rw-r--r--cli/displaytoolbox.h12
1 files changed, 9 insertions, 3 deletions
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<ExportedDiceResult>& 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