1/*
2 SPDX-FileCopyrightText: 2022 Waqar Ahmed <waqar.17a@gmail.com>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6#ifndef KTEXTEDITOR_DOC_TIP_H
7#define KTEXTEDITOR_DOC_TIP_H
8
9#include <QStackedWidget>
10#include <QTextBrowser>
11
12class DocTip final : public QFrame
13{
14public:
15 explicit DocTip(QWidget *parent = nullptr);
16 void updatePosition(QWidget *completionWidget);
17
18 QWidget *currentWidget();
19
20 void setText(const QString &);
21 void setWidget(QWidget *w);
22
23 void clearWidgets();
24
25private:
26 QStackedWidget m_stack;
27 QTextBrowser *const m_textView;
28 std::vector<QWidget *> m_widgets;
29};
30
31#endif
32

source code of ktexteditor/src/completion/documentation_tip.h