util
activetooltip.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef ACTIVE_TOOLTIP_H
00020 #define ACTIVE_TOOLTIP_H
00021
00022 #include <QtGui/QWidget>
00023 #include "utilexport.h"
00024
00025 namespace KDevelop {
00026
00028 class KDEVPLATFORMUTIL_EXPORT ActiveToolTipManager : public QObject {
00029 Q_OBJECT
00030 friend class ActiveToolTip;
00031 private Q_SLOTS:
00032 void doVisibility();
00033 };
00034
00045 class KDEVPLATFORMUTIL_EXPORT ActiveToolTip : public QWidget
00046 {
00047 Q_OBJECT
00048 public:
00049
00050 ActiveToolTip(QWidget *parent, const QPoint& position);
00051 ~ActiveToolTip();
00052
00062 static void showToolTip(ActiveToolTip* tooltip, float priority = 100, QString uniqueId = QString());
00063
00064 bool eventFilter(QObject *object, QEvent *e);
00065
00066 bool insideThis(QObject* object);
00067
00068 void showEvent(QShowEvent*);
00069
00070 void resizeEvent(QResizeEvent*);
00071
00072 void moveEvent(QMoveEvent*);
00073
00074 void adjustRect();
00075
00077 void addFriendWidget(QWidget* widget);
00078
00080 void addExtendRect(QRect rect);
00081
00083 void setBoundingGeometry(QRect geometry);
00084 Q_SIGNALS:
00085 void resized();
00086 private:
00087 virtual void closeEvent(QCloseEvent* );
00088 void updateMouseDistance();
00089
00090 class ActiveToolTipPrivate* const d;
00091 };
00092
00093 }
00094
00095 #endif