#include <GLViewer_ToolTip.h>

Public Member Functions | |
| GLViewer_ObjectTip (GLViewer_ViewPort2d *) | |
| ~GLViewer_ObjectTip () | |
| virtual bool | eventFilter (QObject *, QEvent *) |
| virtual bool | maybeTip (const QPoint &) |
| void | setText (const QString &theText) |
| QString | getText () const |
Protected Member Functions | |
| void | timeIsOut () |
Private Slots | |
| void | showTip () |
Private Member Functions | |
| void | hideTipAndSleep () |
| void | wakeup (int mseconds=1000) |
Private Attributes | |
| GLViewer_ViewPort2d * | mypViewPort |
| QTimer * | mypTimer |
| QPoint | myPoint |
| QLabel * | mypLabel |
| QString | myText |
ToolTip of GLViewer_Objects
| GLViewer_ObjectTip::GLViewer_ObjectTip | ( | GLViewer_ViewPort2d * | theParent | ) |
constructor
References mypLabel, mypTimer, mypViewPort, and showTip().
| GLViewer_ObjectTip::~GLViewer_ObjectTip | ( | ) |
destructor
References mypLabel.
Custom event filter
References GLViewer_ViewPort2d.getGLWidget(), hideTipAndSleep(), myPoint, mypViewPort, and wakeup().
| bool GLViewer_ObjectTip::maybeTip | ( | const QPoint & | p | ) | [virtual] |
It is called when there is a possibility that a tool tip should be shown
| p | - position of tooltip |
References GLViewer_Context.getCurrentObject(), GLViewer_Object.getName(), GLViewer_ViewFrame.getViewer(), GLViewer_ViewPort2d.getViewFrame(), mypViewPort, and setText().
| void GLViewer_ObjectTip.setText | ( | const QString & | theText | ) |
| QString GLViewer_ObjectTip.getText | ( | ) | const |
| void GLViewer_ObjectTip.timeIsOut | ( | ) | [protected] |
| void GLViewer_ObjectTip::hideTipAndSleep | ( | ) | [private] |
| void GLViewer_ObjectTip::wakeup | ( | int | theTime = 1000 | ) | [private] |
Restarts timer
References mypTimer.
| void GLViewer_ObjectTip::showTip | ( | ) | [private, slot] |
Shows tooltip
References GLViewer_ViewPort2d.getGLWidget(), maybeTip(), mypLabel, myPoint, mypViewPort, and myText.
QTimer* GLViewer_ObjectTip.mypTimer [private] |
QPoint GLViewer_ObjectTip.myPoint [private] |
QLabel* GLViewer_ObjectTip.mypLabel [private] |
QString GLViewer_ObjectTip.myText [private] |