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

0001 /*
0002     SPDX-FileCopyrightText: 2008 David Nolden <david.nolden.kdevelop@art-master.de>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-only
0005 */
0006 
0007 #ifndef KDEVPLATFORM_NAVIGATIONTOOLTIP_H
0008 #define KDEVPLATFORM_NAVIGATIONTOOLTIP_H
0009 
0010 #include <QPointer>
0011 
0012 #include <util/activetooltip.h>
0013 
0014 #include <language/languageexport.h>
0015 
0016 namespace KDevelop {
0017 ///A tooltip that just emebed the given widget.
0018 ///
0019 ///TODO: 4.3 - cleanup indentation
0020 ///      introduce getter for widget, use that in context browser
0021 class KDEVPLATFORMLANGUAGE_EXPORT NavigationToolTip
0022     : public ActiveToolTip
0023 {
0024     Q_OBJECT
0025 
0026 public:
0027     ///@param parent The parent. Must not be zero, because else the tooltip will never be shown.
0028     ///@param point Global coordinate of the point where the tooltip should be shown.
0029     ///@param navigationWidget The widget that should be embedded.
0030     NavigationToolTip(QWidget* parent, const QPoint& point, QWidget* navigationWidget);
0031 
0032 private Q_SLOTS:
0033     void sizeHintChanged();
0034 
0035 private:
0036     void setNavigationWidget(QWidget*);
0037     QPointer<QWidget> m_navigationWidget;
0038 };
0039 }
0040 
0041 #endif // KDEVPLATFORM_NAVIGATIONTOOLTIP_H