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
11class StyleLsp;
12class StyleSci;
13class StyleJsonFile;
14class TextEditPrivate;
15class TextEdit : public ScintillaEditExtern
16{
17 Q_OBJECT
18 TextEditPrivate *const d;
19public:
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
27protected:
28 void dragEnterEvent(QDragEnterEvent *event) override;
29 void dropEvent(QDropEvent *event) override;
30};
31
32#endif // TEXTEDIT_H
33