1 | /* |
2 | SPDX-FileCopyrightText: 2011-2018 Dominik Haumann <dhaumann@kde.org> |
3 | |
4 | SPDX-License-Identifier: LGPL-2.0-or-later |
5 | */ |
6 | |
7 | #ifndef VARIABLE_LINE_EDIT_H |
8 | #define VARIABLE_LINE_EDIT_H |
9 | |
10 | #include <QWidget> |
11 | |
12 | class QFrame; |
13 | class QLineEdit; |
14 | class QToolButton; |
15 | class VariableListView; |
16 | |
17 | class VariableLineEdit : public QWidget |
18 | { |
19 | Q_OBJECT |
20 | |
21 | public: |
22 | explicit VariableLineEdit(QWidget *parent = nullptr); |
23 | ~VariableLineEdit() override = default; |
24 | |
25 | static void addKateItems(VariableListView *listview); |
26 | QString text(); |
27 | |
28 | public Q_SLOTS: |
29 | void editVariables(); |
30 | void setText(const QString &text); |
31 | void clear(); |
32 | void updateVariableLine(); |
33 | |
34 | Q_SIGNALS: |
35 | void textChanged(const QString &); |
36 | |
37 | private: |
38 | std::unique_ptr<QFrame> ; |
39 | QLineEdit *m_lineedit = nullptr; |
40 | QToolButton *m_button = nullptr; |
41 | VariableListView *m_listview = nullptr; |
42 | }; |
43 | |
44 | #endif |
45 | |