forked from andreikop/qutepart-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
theme.h
67 lines (59 loc) · 2.79 KB
/
theme.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#pragma once
#include <QColor>
#include <QHash>
#include <QJsonObject>
#include <QString>
class QSyntaxHighlighter;
namespace Qutepart {
typedef QHash<QString, QString> QStringHash;
struct ThemeMetaData {
QString copyright;
QString license;
QString name;
QString author;
QString description;
int revision;
};
class Theme {
public:
struct Colors {
static constexpr const char *BackgroundColor = "BackgroundColor";
static constexpr const char *BracketMatching = "BracketMatching";
static constexpr const char *CodeFolding = "CodeFolding";
static constexpr const char *CurrentLine = "CurrentLine";
static constexpr const char *CurrentLineNumber = "CurrentLineNumber";
static constexpr const char *IconBorder = "IconBorder";
static constexpr const char *IndentationLine = "IndentationLine";
static constexpr const char *LineNumbers = "LineNumbers";
static constexpr const char *MarkBookmark = "MarkBookmark";
static constexpr const char *MarkBreakpointActive = "MarkBreakpointActive";
static constexpr const char *MarkBreakpointDisabled = "MarkBreakpointDisabled";
static constexpr const char *MarkBreakpointReached = "MarkBreakpointReached";
static constexpr const char *MarkError = "MarkError ";
static constexpr const char *MarkExecution = "MarkExecution";
static constexpr const char *MarkWarning = "MarkWarning";
static constexpr const char *ModifiedLines = "ModifiedLines";
static constexpr const char *ReplaceHighlight = "ReplaceHighlight";
static constexpr const char *SavedLines = "SavedLines";
static constexpr const char *SearchHighlight = "SearchHighlight";
static constexpr const char *Separator = "Separator";
static constexpr const char *SpellChecking = "SpellChecking";
static constexpr const char *TabMarker = "TabMarker";
static constexpr const char *TemplateBackground = "TemplateBackground";
static constexpr const char *TemplateFocusedPlaceholder = "TemplateFocusedPlaceholder";
static constexpr const char *TemplatePlaceholder = "TemplatePlaceholder";
static constexpr const char *TemplateReadOnlyPlaceholder = "TemplateReadOnlyPlaceholder";
static constexpr const char *TextSelection = "TextSelection";
static constexpr const char *WordWrapMarker = "WordWrapMarker";
};
Theme();
auto loadTheme(const QString &filename) -> bool;
auto getEditorColors() const -> const QHash<QString, QColor> &;
auto getMetaData() const -> const ThemeMetaData &;
// private:
QHash<QString, QHash<QString, QStringHash>> customStyles;
QHash<QString, QColor> editorColors;
QHash<QString, QStringHash> textStyles;
ThemeMetaData metaData;
};
} // namespace Qutepart