Debian Codegraph @

kysdk-qtwidgets/src/ktexteditor.h

raw
1 /*
2 * libkysdk-qtwidgets's Library
3 *
4 * Copyright (C) 2024, KylinSoft Co., Ltd.
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 3 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this library. If not, see <https://www.gnu.org/licenses/>.
18 *
19 * Authors: Zhenyu Wang <[email protected]>
20 *
21 */
22
23 #ifndef KTEXTEDITOR_H
24 #define KTEXTEDITOR_H
25
26 #include "gui_g.h"
27 #include <QTextEdit>
28 #include <QWidget>
29
30 namespace kdk
31 {
32
33 /**
34 * @defgroup TextEditModule
35 * @since 2.5.2.0
36 * {
37 */
38 class KTextEditorPrivate;
39
40 class GUI_EXPORT KTextEditor : public QWidget
41 {
42 Q_OBJECT
43 public:
44 KTextEditor(QWidget *parent = nullptr);
45
46 /**
47 * @brief 获取QTextedit
48 * @return
49 */
50 QTextEdit *textEdit();
51
52 protected:
53 void paintEvent(QPaintEvent *event);
54 bool eventFilter(QObject *watched, QEvent *event);
55
56 private:
57 Q_DECLARE_PRIVATE(KTextEditor)
58 KTextEditorPrivate *const d_ptr;
59 };
60 }
61 #endif // KTEXTEDITOR_H