10#include <QTextCharFormat>
42 QString
name() {
return name_; }
46 bool bold() {
return bold_; }
56 QColor foregroundColor_;
57 QColor backgroundColor_;
73 const QList<TextThemeRule*>&
rules() {
return themeRules_; }
76 void fillFormatForTextScopeList(
const TextScopeList *scopeList, QTextCharFormat* format );
78 QString
name() {
return name_; }
80 QString
uuid() {
return uuid_; }
125 QColor backgroundColor_;
127 QColor foregroundColor_;
128 QColor invisiblesColor_;
129 QColor lineHighlightColor_;
130 QColor selectionColor_;
131 QColor findHighlightBackgroundColor_;
132 QColor findHighlightForegroundColor_;
133 QColor selectionBorderColor_;
134 QColor activeGuideColor_;
136 QColor bracketForegroundColor_;
137 QString bracketOptions_;
139 QColor bracketContentsForegroundColor_;
140 QString bracketContentsOptions_;
142 QString tagsOptions_;
146 QList<TextThemeRule*> themeRules_;
169 void setThemeByName(
const QString& themeName );
170 QString themeName()
const;
176 QTextCharFormat getTextScopeFormat(QVector<ScopedTextRange *> &activeRanges);
177 void appendFormatRange(QVector<QTextLayout::FormatRange>& rangeList,
int start,
int end, QVector<edbee::ScopedTextRange *> &activeRanges );
182 void invalidateLayouts();
183 void themePointerChanged(
const QString& name,
TextTheme* oldTheme,
TextTheme* newTheme );
216 QString themeName(
int idx );
219 QString lastErrorMessage()
const;
220 void setTheme(
const QString& name,
TextTheme* theme );
223 void themePointerChanged(
const QString& name,
TextTheme* oldTheme,
TextTheme* newTheme );
229 QStringList themeNames_;
230 QHash<QString,TextTheme*> themeMap_;
232 QString lastErrorMessage_;
The texteditor manager, It manages all singleton objects for the editor It performs the initializatio...
Definition edbee.h:27
This class 'defines' a single document scope.
Definition textdocumentscopes.h:254
A base scoped text range.
Definition textdocumentscopes.h:176
This clas represents a text buffer change and is used to pass around between events This is a sharedd...
Definition textbuffer.h:45
This is the base and abstract class of a text document A TextDocument is the model part of the editor...
Definition textdocument.h:42
The texteditor works via the controller. The controller is the central point/mediator which maps/cont...
Definition texteditorcontroller.h:39
A list of text-scopes. on a certian location, usually more then one scope is available on a given loc...
Definition textdocumentscopes.h:61
Our first version of scope-selector only support a list of scopes Thus the Descendant (space) selecto...
Definition textdocumentscopes.h:112
This class defines a single theme.
Definition texttheme.h:68
QColor activeGuideColor()
Definition texttheme.h:101
QColor backgroundColor()
Definition texttheme.h:83
void setFindHighlightBackgroundColor(const QColor &color)
Definition texttheme.h:96
void setActiveGuideColor(const QColor &color)
Definition texttheme.h:102
QColor invisiblesColor()
Definition texttheme.h:89
void setUuid(const QString &uuid)
Definition texttheme.h:81
QString bracketContentsOptions()
Definition texttheme.h:111
QColor selectionBorderColor()
Definition texttheme.h:99
QColor caretColor()
Definition texttheme.h:85
void setCaretColor(const QColor &color)
Definition texttheme.h:86
QColor findHighlightBackgroundColor()
Definition texttheme.h:95
const QList< TextThemeRule * > & rules()
Definition texttheme.h:73
void setBracketForegroundColor(const QColor &color)
Definition texttheme.h:105
void setBracketContentsForegroundColor(const QColor &color)
Definition texttheme.h:110
void setBracketOptions(const QString &str)
Definition texttheme.h:107
void setInvisiblesColor(const QColor &color)
Definition texttheme.h:90
void setTagsOptions(const QString &str)
Definition texttheme.h:115
QString uuid()
Definition texttheme.h:80
void setBackgroundColor(const QColor &color)
Definition texttheme.h:84
QColor selectionColor()
Definition texttheme.h:93
void setSelectionColor(const QColor &color)
Definition texttheme.h:94
QColor lineHighlightColor()
Definition texttheme.h:91
void setName(const QString &name)
Definition texttheme.h:79
TextTheme()
Definition texttheme.cpp:60
void setBracketContentsOptions(const QString &str)
Definition texttheme.h:112
QString tagsOptions()
Definition texttheme.h:114
QColor foregroundColor()
Definition texttheme.h:87
QString name()
Definition texttheme.h:78
void setLineHighlightColor(const QColor &color)
Definition texttheme.h:92
QColor bracketContentsForegroundColor()
Definition texttheme.h:109
QColor bracketForegroundColor()
Definition texttheme.h:104
void setFindHighlightForegroundColor(const QColor &color)
Definition texttheme.h:98
void setSelectionBorderColor(const QColor &color)
Definition texttheme.h:100
QString bracketOptions()
Definition texttheme.h:106
void setForegroundColor(const QColor &color)
Definition texttheme.h:88
QColor findHighlightForegroundColor()
Definition texttheme.h:97
TextThemeManager()
Constructs the theme manager And intialises a fallback theme.
Definition texttheme.cpp:321
void clear()
clears all items
Definition texttheme.cpp:339
TextTheme * readThemeFile(const QString &fileName, const QString &name=QString())
This method loads the given theme file. The theme manager stays owner of the given theme.
Definition texttheme.cpp:376
int themeCount()
Definition texttheme.h:215
TextTheme * fallbackTheme() const
Definition texttheme.h:218
friend class Edbee
Definition texttheme.h:234
void listAllThemes(const QString &themePath=QString())
This method loads all theme names from the given theme path (*.tmTheme files)
Definition texttheme.cpp:349
The styles available in tmTheme files.
Definition texttheme.h:35
bool matchesScopeList(const TextScopeList *scopes)
This method checks if the given scopelist matches the scope selector.
Definition texttheme.cpp:43
QColor foregroundColor()
Definition texttheme.h:44
QString name()
Definition texttheme.h:42
QColor backgroundColor()
Definition texttheme.h:45
bool italic()
Definition texttheme.h:47
void fillFormat(QTextCharFormat *format)
Definition texttheme.cpp:48
TextScopeSelector * scopeSelector()
Definition texttheme.h:43
bool underline()
Definition texttheme.h:48
TextThemeRule(const QString &name, const QString &selector, QColor foreground=QColor(), QColor background=QColor(), bool bold=false, bool italic=false, bool underline=false)
Definition texttheme.cpp:25
bool bold()
Definition texttheme.h:46
TextThemeStyler(TextEditorController *controller)
Constructs the theme styler.
Definition texttheme.cpp:125
TextEditorController * controller()
Definition texttheme.h:166
QVector< QTextLayout::FormatRange > getLineFormatRanges(int lineIdx)
This method returns a reference to the given line format. WARNING this reference is ONLY valid very s...
Definition texttheme.cpp:148
#define EDBEE_EXPORT
Definition exports.h:15
QT Acessibility has an issue with reporting blank lines between elements lines. defining 'WINDOWS_EMP...
Definition commentcommand.cpp:20