diff options
author | Ken Moore <moorekou@gmail.com> | 2016-04-19 15:06:37 -0400 |
---|---|---|
committer | Ken Moore <moorekou@gmail.com> | 2016-04-19 15:06:37 -0400 |
commit | 47548322546128c7dab8677e4b2807ef743e26ca (patch) | |
tree | acf95976fb2915d18a0b339bbea7c5ac91b8e697 /desktop-utilities/lumina-textedit/syntaxSupport.h | |
parent | Get find/replace support fully implemented. (diff) | |
download | lumina-47548322546128c7dab8677e4b2807ef743e26ca.tar.gz lumina-47548322546128c7dab8677e4b2807ef743e26ca.tar.bz2 lumina-47548322546128c7dab8677e4b2807ef743e26ca.zip |
Get a full color editor/modifier added to the tool. Now all colors can be changed at will.
Diffstat (limited to 'desktop-utilities/lumina-textedit/syntaxSupport.h')
-rw-r--r-- | desktop-utilities/lumina-textedit/syntaxSupport.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/desktop-utilities/lumina-textedit/syntaxSupport.h b/desktop-utilities/lumina-textedit/syntaxSupport.h index e258aafe..c96c404d 100644 --- a/desktop-utilities/lumina-textedit/syntaxSupport.h +++ b/desktop-utilities/lumina-textedit/syntaxSupport.h @@ -28,6 +28,7 @@ class Custom_Syntax : public QSyntaxHighlighter{ Q_OBJECT private: QSettings *settings; + QString lasttype; QVector<SyntaxRule> rules; QVector<SyntaxRuleSplit> splitrules; @@ -36,12 +37,16 @@ public: settings = set; } ~Custom_Syntax(){} - + static QStringList availableRules(); static QStringList knownColors(); static void SetupDefaultColors(QSettings *settings); static QString ruleForFile(QString filename); void loadRules(QString type); + + void reloadRules(){ + loadRules(lasttype); + } protected: void highlightBlock(const QString &text){ for(int i=0; i<rules.length(); i++){ |