1 | // SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. |
2 | // |
3 | // SPDX-License-Identifier: GPL-3.0-or-later |
4 | |
5 | #ifndef TEXTEDIT_H |
6 | #define TEXTEDIT_H |
7 | |
8 | #include <QTextEdit> |
9 | #include "scintillaeditextern.h" |
10 | |
11 | class StyleLsp; |
12 | class StyleSci; |
13 | class StyleJsonFile; |
14 | class TextEditPrivate; |
15 | class TextEdit : public ScintillaEditExtern |
16 | { |
17 | Q_OBJECT |
18 | TextEditPrivate *const d; |
19 | public: |
20 | explicit TextEdit(QWidget * parent = nullptr); |
21 | virtual ~TextEdit(); |
22 | virtual void setFile(const QString &filePath) override; |
23 | virtual StyleLsp *getStyleLsp() const {return nullptr;} |
24 | virtual StyleSci *getStyleSci() const {return nullptr;} |
25 | virtual StyleJsonFile *getStyleFile() const {return nullptr;} |
26 | |
27 | protected: |
28 | void dragEnterEvent(QDragEnterEvent *event) override; |
29 | void dropEvent(QDropEvent *event) override; |
30 | }; |
31 | |
32 | #endif // TEXTEDIT_H |
33 | |