From 247d9e6b004b2920d696245838b9969690637fd2 Mon Sep 17 00:00:00 2001 From: Aleks Kissinger Date: Fri, 3 Aug 2018 23:22:11 +0200 Subject: support for RGB colors, edit color and name in style editor --- src/tikzit.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/tikzit.h') diff --git a/src/tikzit.h b/src/tikzit.h index 3369962..35b19de 100644 --- a/src/tikzit.h +++ b/src/tikzit.h @@ -62,10 +62,12 @@ #include #include +#include #include #include #include #include +#include // Number of pixels between (0,0) and (1,0) at 100% zoom level. This should be // divisible by 8 to avoid rounding errors with e.g. grid-snapping. @@ -115,13 +117,20 @@ public: void quit(); void init(QApplication *app); + // convenience functions for named colors + QColor colorByIndex(int i); + QColor colorByName(QString name); + QString nameForColor(QColor col); + void openTikzStyles(); - void loadStyles(QString fileName); + bool loadStyles(QString fileName); void showStyleEditor(); TikzStyles *styles() const; QString styleFile() const; //StylePalette *stylePalette() const; + QString styleFilePath() const; + public slots: void focusChanged(QWidget *old, QWidget *nw); private: @@ -135,7 +144,10 @@ private: MainWindow *_activeWindow; TikzStyles *_styles; QString _styleFile; + QString _styleFilePath; StyleEditor *_styleEditor; + QStringList _colNames; + QVector _cols; }; extern Tikzit *tikzit; -- cgit v1.2.3