Debian Codegraph @

kysdk-qtwidgets/src/klineedit.h

raw
1 /*
2 * libkysdk-qtwidgets's Library
3 *
4 * Copyright (C) 2023, 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 KLINEEDIT_H
24 #define KLINEEDIT_H
25
26 #include "gui_g.h"
27 #include <QLineEdit>
28 #include <QPushButton>
29
30 namespace kdk
31 {
32
33 class KLineEditPrivate;
34
35 /**
36 * @defgroup InputBoxModule
37 * @since 2.5.2.0
38 * {
39 */
40
41 class GUI_EXPORT KLineEdit : public QLineEdit
42 {
43 Q_OBJECT
44 public:
45 KLineEdit(QWidget *parent = nullptr);
46
47 /**
48 * @brief 获取按钮
49 * @return
50 */
51 QPushButton *pushbutton();
52
53 protected:
54 void resizeEvent(QResizeEvent *event);
55 bool eventFilter(QObject *watched, QEvent *event);
56
57 private:
58 Q_DECLARE_PRIVATE(KLineEdit)
59 KLineEditPrivate *const d_ptr;
60 };
61
62 }
63 #endif // KLINEEDIT_H