From 1a1e43c175bcba94d84dbb1368329fe45827bb16 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 14 Apr 2016 12:49:55 -0400 Subject: Add a start for a Qt text editor (mainly for playing around - but it could turn into something useful down the road). --- .../lumina-textedit/syntaxSupport.cpp | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 desktop-utilities/lumina-textedit/syntaxSupport.cpp (limited to 'desktop-utilities/lumina-textedit/syntaxSupport.cpp') diff --git a/desktop-utilities/lumina-textedit/syntaxSupport.cpp b/desktop-utilities/lumina-textedit/syntaxSupport.cpp new file mode 100644 index 00000000..27664c52 --- /dev/null +++ b/desktop-utilities/lumina-textedit/syntaxSupport.cpp @@ -0,0 +1,26 @@ +//=========================================== +// Lumina-DE source code +// Copyright (c) 2015, Ken Moore +// Available under the 3-clause BSD license +// See the LICENSE file for full details +//=========================================== +#include "syntaxSupport.h" +QStringList Custom_Syntax::availableRules(){ + QStringList avail; + avail << "C++"; + + return avail; +} + +QString Custom_Syntax::ruleForFile(QString filename){ + QString suffix = filename.section(".",-1); + if(suffix=="cpp" || suffix=="hpp" || suffix=="c" || suffix=="h"){ return "C++"; } + return ""; +} + +void Custom_Syntax::loadRules(QString type){ + rules.clear(); + if(type=="C++"){ + + } +} \ No newline at end of file -- cgit