1 2 /* 3 * CodeQuery 4 * Copyright (C) 2013-2017 ruben2020 https://github.com/ruben2020/ 5 * 6 * This Source Code Form is subject to the terms of the Mozilla Public 7 * License, v. 2.0. If a copy of the MPL was not distributed with this 8 * file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 * 10 */ 11 12 13 #ifndef THEMES_H_CQ 14 #define THEMES_H_CQ 15 16 #ifdef USE_QT5 17 #include <QtWidgets> 18 #else 19 #include <QtGui> 20 #endif 21 22 class ScintillaEdit; 23 24 typedef struct 25 { 26 int styleid; 27 const char *fgcolor; 28 const char *bgcolor; 29 int fontstyle; 30 }lexstyle; 31 32 class themes 33 { 34 public: 35 static QStringList getThemesList(void); 36 static void setTheme(const QString& theme, int lang, ScintillaEdit* lexer, const QFont& fontt, QColor& curlinebgcolor, QColor& linenumbgcolor); 37 static void setKeywords(int lang, ScintillaEdit* lexer); 38 static long QC2SC(QColor colour); 39 40 private: 41 static void setThemeStyle(ScintillaEdit* lexer, lexstyle *lxstyle, int lxstylesize, QFont& font1); 42 }; 43 44 45 #endif // THEMES_H_CQ 46 47