KWidgetsAddons

ktooltipwidget.h
1 /*
2  This file is part of the KDE project
3  SPDX-FileCopyrightText: 2017 Elvis Angelaccio <[email protected]>
4 
5  SPDX-License-Identifier: LGPL-2.1-or-later
6 */
7 
8 #ifndef KTOOLTIPWIDGET_H
9 #define KTOOLTIPWIDGET_H
10 
11 #include <kwidgetsaddons_export.h>
12 
13 #include <QWidget>
14 
38 class KWIDGETSADDONS_EXPORT KToolTipWidget : public QWidget
39 {
40  Q_OBJECT
41  Q_PROPERTY(int hideDelay READ hideDelay WRITE setHideDelay)
42 
43 public:
44  explicit KToolTipWidget(QWidget *parent = nullptr);
45  ~KToolTipWidget() override;
46 
55  void showAt(const QPoint &pos, QWidget *content, QWindow *transientParent);
56 
70  void showBelow(const QRect &rect, QWidget *content, QWindow *transientParent);
71 
76  int hideDelay() const;
77 
78 public Q_SLOTS:
79 
85  void hideLater();
86 
91  void setHideDelay(int delay);
92 
93 Q_SIGNALS:
98  void hidden();
99 
100 protected:
101  void enterEvent(QEvent *) override;
102  void hideEvent(QHideEvent *) override;
103  void leaveEvent(QEvent *) override;
104  void paintEvent(QPaintEvent *event) override;
105 
106 private:
107  class KToolTipWidgetPrivate;
109 
111 };
112 
113 #endif
virtual void paintEvent(QPaintEvent *event)
virtual void hideEvent(QHideEvent *event)
A tooltip that contains a QWidget.
virtual void enterEvent(QEvent *event)
Q_PROPERTY(...)
Q_DISABLE_COPY(Class)
virtual void leaveEvent(QEvent *event)
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Thu Sep 17 2020 22:44:10 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.