diff options
| author | 2014-12-06 17:33:25 -0500 | |
|---|---|---|
| committer | 2014-12-06 17:33:25 -0500 | |
| commit | 7167ce41b61d2ba2cdb526777a4233eb84a3b66a (patch) | |
| tree | a35c14143716e1f2c98f808c81f89426045a946f /SQLiteStudio3/guiSQLiteStudio/uiscriptingedit.h | |
Imported Upstream version 2.99.6upstream/2.99.6
Diffstat (limited to 'SQLiteStudio3/guiSQLiteStudio/uiscriptingedit.h')
| -rw-r--r-- | SQLiteStudio3/guiSQLiteStudio/uiscriptingedit.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/SQLiteStudio3/guiSQLiteStudio/uiscriptingedit.h b/SQLiteStudio3/guiSQLiteStudio/uiscriptingedit.h new file mode 100644 index 0000000..fdd2df8 --- /dev/null +++ b/SQLiteStudio3/guiSQLiteStudio/uiscriptingedit.h @@ -0,0 +1,37 @@ +#ifndef UISCRIPTINGEDIT_H +#define UISCRIPTINGEDIT_H + +#include "uiloaderpropertyhandler.h" +#include "common/global.h" +#include "guiSQLiteStudio_global.h" +#include <QObject> + +class QSyntaxHighlighter; + +class GUI_API_EXPORT UiScriptingEdit : public UiLoaderPropertyHandler +{ + public: + UiScriptingEdit(); + + const char* getPropertyName() const; + void handle(QWidget* widget, const QVariant& value); + + private: + class EditUpdater : public QObject + { + public: + EditUpdater(QWidget* widget); + + bool eventFilter(QObject* obj, QEvent* e); + + private: + void installNewHighlighter(const QVariant& prop); + + QWidget* watchedWidget = nullptr; + QString currentLang; + QSyntaxHighlighter* currentHighlighter = nullptr; + bool changingHighlighter = false; + }; +}; + +#endif // UISCRIPTINGEDIT_H |
