File indexing completed on 2024-05-12 04:37:38

0001 /*
0002     SPDX-FileCopyrightText: 2008 Vladimir Prus <ghost@cs.msu.su>
0003     SPDX-FileCopyrightText: 2009 Niko Sams <niko.sams@gmail.com>
0004 
0005     SPDX-License-Identifier: GPL-2.0-or-later
0006 */
0007 
0008 #ifndef KDEVPLATFORM_VARIABLETOOLTIP_H
0009 #define KDEVPLATFORM_VARIABLETOOLTIP_H
0010 
0011 #include "../../util/activetooltip.h"
0012 
0013 class QItemSelectionModel;
0014 class QString;
0015 
0016 namespace KDevelop
0017 {
0018     class Variable;
0019     class TreeModel;
0020     class TreeItem;
0021     class AsyncTreeView;
0022 
0023     class VariableToolTip : public ActiveToolTip
0024     {
0025     Q_OBJECT
0026     public:
0027         VariableToolTip(QWidget* parent, const QPoint& position,
0028                         const QString& identifier);
0029         Variable* variable() const { return m_var; };
0030     private Q_SLOTS:
0031         void variableCreated(bool hasValue);
0032         void slotLinkActivated(const QString& link);
0033         void slotRangeChanged(int min, int max);
0034 
0035     private:
0036         TreeModel* m_model;
0037         Variable* m_var;
0038         QItemSelectionModel* m_selection;
0039         int m_itemHeight;
0040         AsyncTreeView* m_view;
0041     };
0042 }
0043 
0044 #endif