Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef QXTTOOLTIP_P_H
00026 #define QXTTOOLTIP_P_H
00027
00028 #include <QPointer>
00029 #include <QWidget>
00030 #include <QHash>
00031 #include "qxttooltip.h"
00032
00033 QT_FORWARD_DECLARE_CLASS(QVBoxLayout)
00034
00035 typedef QPointer<QWidget> WidgetPtr;
00036 typedef QPair<WidgetPtr, QRect> WidgetArea;
00037
00038 class QxtToolTipPrivate : public QWidget
00039 {
00040 Q_OBJECT
00041
00042 public:
00043 QxtToolTipPrivate();
00044 ~QxtToolTipPrivate();
00045
00046 static QxtToolTipPrivate* instance();
00047 void show(const QPoint& pos, QWidget* tooltip, QWidget* parent = 0, const QRect& rect = QRect());
00048 void setToolTip(QWidget* tooltip);
00049 bool eventFilter(QObject* parent, QEvent* event);
00050 void hideLater();
00051 QPoint calculatePos(int scr, const QPoint& eventPos) const;
00052 QHash<WidgetPtr, WidgetArea> tooltips;
00053 QVBoxLayout* vbox;
00054
00055 protected:
00056 void enterEvent(QEvent* event);
00057 void paintEvent(QPaintEvent* event);
00058
00059 private:
00060 static QxtToolTipPrivate* self;
00061 QWidget* currentParent;
00062 QRect currentRect;
00063 };
00064
00065 #endif // QXTTOOLTIP_P_H