aboutsummaryrefslogtreecommitdiff
path: root/desktop-utilities/lumina-textedit/PlainTextEditor.h
diff options
context:
space:
mode:
authorKen Moore <moorekou@gmail.com>2016-04-15 16:27:42 -0400
committerKen Moore <moorekou@gmail.com>2016-04-15 16:27:42 -0400
commit129b472f1a091d7ba888b7c07b845a90810e9efe (patch)
tree1b408a91fdd565026350f8a83001ede359d58bfe /desktop-utilities/lumina-textedit/PlainTextEditor.h
parentFix up lumina-xconfig so it works better with multiple (3+) monitors and cust... (diff)
downloadlumina-129b472f1a091d7ba888b7c07b845a90810e9efe.tar.gz
lumina-129b472f1a091d7ba888b7c07b845a90810e9efe.tar.bz2
lumina-129b472f1a091d7ba888b7c07b845a90810e9efe.zip
Add a bunch more work on the new lumina-textedit. Putting the tabbed-wrapper in place now (not much connected yet). Also add the beginnings of a "Python" set of syntax rules.
Diffstat (limited to 'desktop-utilities/lumina-textedit/PlainTextEditor.h')
-rw-r--r--desktop-utilities/lumina-textedit/PlainTextEditor.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/desktop-utilities/lumina-textedit/PlainTextEditor.h b/desktop-utilities/lumina-textedit/PlainTextEditor.h
index 81574b32..291f09aa 100644
--- a/desktop-utilities/lumina-textedit/PlainTextEditor.h
+++ b/desktop-utilities/lumina-textedit/PlainTextEditor.h
@@ -12,6 +12,8 @@
#include <QResizeEvent>
#include <QPaintEvent>
+#include "syntaxSupport.h"
+
//QPlainTextEdit subclass for providing the actual text editor functionality
class PlainTextEditor : public QPlainTextEdit{
Q_OBJECT
@@ -21,6 +23,12 @@ public:
//Functions for setting up the editor
void showLineNumbers(bool show = true);
+ void LoadSyntaxRule(QString type);
+
+ //File loading/setting options
+ void LoadFile(QString filepath);
+ void SaveFile();
+ QString currentFile();
//Functions for managing the line number widget (internal - do not need to run directly)
int LNWWidth(); //replacing the LNW size hint detection
@@ -29,12 +37,16 @@ public:
private:
QWidget *LNW; //Line Number Widget
bool showLNW;
+ //Syntax Highlighting class
+ Custom_Syntax *SYNTAX;
//Bracket/Perentheses matching functions
int matchleft, matchright; //positions within the document
void clearMatchData();
void highlightMatch(QChar ch, bool forward, int fromPos);
+ //Flags to keep track of changes
+ bool hasChanges;
private slots:
//Functions for managing the line number widget
void LNW_updateWidth(); // Tied to the QPlainTextEdit::blockCountChanged() signal
@@ -42,9 +54,16 @@ private slots:
void LNW_update(const QRect&, int); // Tied to the QPlainTextEdit::updateRequest() signal
//Function for running the matching routine
void checkMatchChar();
+ //Functions for notifying the parent widget of changes
+ void textChanged();
protected:
void resizeEvent(QResizeEvent *ev);
+
+signals:
+ void UnsavedChanges(QString); //filename
+ void FileLoaded(QString);
+
};
//===========================================================
bgstack15