aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/cli/displaytoolbox.h
diff options
context:
space:
mode:
authorRenaud G <renaud@rolisteam.org>2019-03-23 11:34:11 +0100
committerGitHub <noreply@github.com>2019-03-23 11:34:11 +0100
commit607b8284672c75f134616a826e3475be4cf8e277 (patch)
tree9c340127d0b34ef50218f8ca2f6a3281eb743ba4 /cli/displaytoolbox.h
parent8aac692215539f3de44f1f5ee1cb8cdca76068fa (diff)
parentd0f326f7289add5d84c662c6c813f1c3c88fca4f (diff)
downloadOneRoll-607b8284672c75f134616a826e3475be4cf8e277.tar.gz
OneRoll-607b8284672c75f134616a826e3475be4cf8e277.zip
Merge pull request #38 from Rolisteam/fix-color-display
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