KTextEditor

variablelistview.h
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_LIST_VIEW_H
8#define VARIABLE_LIST_VIEW_H
9
10#include <QScrollArea>
11#include <map>
12
13class VariableItem;
14class VariableEditor;
15
16class VariableListView : public QScrollArea
17{
19
20public:
21 explicit VariableListView(const QString &variableLine, QWidget *parent = nullptr);
22
23 void addItem(VariableItem *item);
24
25 /// always returns the up-to-date variables line
26 QString variableLine();
27
29 void aboutToHide();
30 void changed(); // unused right now
31
32protected:
33 void resizeEvent(QResizeEvent *event) override;
34 void hideEvent(QHideEvent *event) override;
35
36 void parseVariables(const QString &line);
37
38 std::vector<VariableItem *> m_items;
39 std::vector<VariableEditor *> m_editors;
40 std::map<QString, QString> m_variables;
41};
42
43#endif
Q_OBJECTQ_OBJECT
Q_SIGNALSQ_SIGNALS
QObject * parent() const const
virtual bool event(QEvent *e) override
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 4 2024 12:03:01 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.