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
12class QFrame;
13class QLineEdit;
14class QToolButton;
15class VariableListView;
16
17class VariableLineEdit : public QWidget
18{
19 Q_OBJECT
20
21public:
22 explicit VariableLineEdit(QWidget *parent = nullptr);
23 ~VariableLineEdit() override = default;
24
25 static void addKateItems(VariableListView *listview);
26 QString text();
27
28public Q_SLOTS:
29 void editVariables();
30 void setText(const QString &text);
31 void clear();
32 void updateVariableLine();
33
34Q_SIGNALS:
35 void textChanged(const QString &);
36
37private:
38 std::unique_ptr<QFrame> m_popup;
39 QLineEdit *m_lineedit = nullptr;
40 QToolButton *m_button = nullptr;
41 VariableListView *m_listview = nullptr;
42};
43
44#endif
45

source code of ktexteditor/src/variableeditor/variablelineedit.h