Debian Codegraph @

kysdk-qtwidgets/src/klineeditframe.h

raw
1 /*
2 *
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: Sisheng He <[email protected]>
20 *
21 */
22 #ifndef LINEEDITWIDGET_H
23 #define LINEEDITWIDGET_H
24
25 #include "kbaseframe.h"
26 #include "klabel.h"
27 #include <QLineEdit>
28
29 /**
30 * @defgroup ContainerModules
31 * @brief 创建一个带 QLineEdit 的 Frame
32 * @since 3.0.1.0
33 * {
34 */
35
36 namespace kdk
37 {
38
39 class KLineEditFramePrivate;
40
41 class KLineEditFrame : public KBaseFrame
42 {
43 Q_OBJECT
44
45 public:
46 /**
47 * @brief 创建一个带 QLineEdit 的 Frame
48 *
49 * @param title: text of m_settingName
50 * @param style: 设置圆角(None:无圆角,Top:上圆角,Bottom:下圆角,Around:四圆角)
51 * @param parent
52 */
53 explicit KLineEditFrame(const QString title, QWidget *parent = nullptr, BorderRadiusStyle style = BorderRadiusStyle::None);
54 /**
55 * @brief
56 *
57 */
58 ~KLineEditFrame();
59
60 /**
61 * @brief 获取输入框
62 *
63 * @return QLineEdit
64 */
65 QLineEdit *lineEdit();
66
67 /**
68 * @brief 获取label
69 *
70 * @return QLabel
71 */
72 KLabel *titleLabel();
73
74 /**
75 * @brief 获取layout
76 *
77 * @return QHBoxLayout
78 */
79 QHBoxLayout *mainHLayout();
80
81 private:
82 Q_DECLARE_PRIVATE(KLineEditFrame)
83 KLineEditFramePrivate *const d_ptr;
84 };
85
86 }
87
88 #endif // LINEEDITWIDGET_H