Custom tooltip for AIS_InteractiveObjects and SelectMgr_EntityOwners in the OCC Viewer.
#include <OCCViewer_ToolTip.h>

Public Slots | |
| void | onToolTip (QPoint, QString &, QFont &, QRect &, QRect &) |
Signals | |
| void | toolTipFor (const Handle_SelectMgr_EntityOwner &, QString &) |
| void | toolTipFor (const Handle_AIS_InteractiveObject &, QString &) |
| void | maybeTip (QPoint, QString &, QFont &, QRect &, QRect &) |
Public Member Functions | |
| OCCViewer_ToolTip (OCCViewer_ViewWindow *) | |
| virtual | ~OCCViewer_ToolTip () |
| QFont | font () const |
| void | setFont (const QFont &) |
| void | hideTip () |
| virtual void | showTip (const QPoint &aPos, const QString &text, const QRect &aWidgetRegion) |
| virtual void | showTip (const QRect &aRegion, const QString &text, const QRect &aWidgetRegion) |
| virtual bool | eventFilter (QObject *o, QEvent *e) |
| void | setWakeUpDelayTime (int) |
| void | setShowDelayTime (int) |
| int | wakeUpDelayTime () const |
| int | showDelayTime () const |
Protected Slots | |
| void | onSleepTimeOut () |
| void | onWakeUpTimeOut () |
Protected Member Functions | |
| virtual void | maybeTip (const QPoint &) |
| virtual void | mousePressEvent (QMouseEvent *) |
| virtual void | mouseDoubleClickEvent (QMouseEvent *) |
| QTimer * | sleepTimer () const |
| QTimer * | wakeUpTimer () const |
Private Attributes | |
| OCCViewer_ViewWindow * | myWnd |
| QFont | myFont |
| OCCViewer_ToolTip::OCCViewer_ToolTip | ( | OCCViewer_ViewWindow * | wnd | ) |
Constructor
| wnd | - window where the tooltip should be assigned |
References QtxToolTip.maybeTip(), and onToolTip().
| OCCViewer_ToolTip::~OCCViewer_ToolTip | ( | ) | [virtual] |
Destructor
| QFont OCCViewer_ToolTip::font | ( | ) | const |
References myFont.
| void OCCViewer_ToolTip::setFont | ( | const QFont & | f | ) |
| void OCCViewer_ToolTip.toolTipFor | ( | const Handle_SelectMgr_EntityOwner & | , |
| QString & | |||
| ) | [signal] |
Called when owner is detected; allows to redefine tooltip text for owner
| void OCCViewer_ToolTip.toolTipFor | ( | const Handle_AIS_InteractiveObject & | , |
| QString & | |||
| ) | [signal] |
Called when object is detected; allows to redefine tooltip text for object
| void OCCViewer_ToolTip::onToolTip | ( | QPoint | p, |
| QString & | str, | ||
| QFont & | f, | ||
| QRect & | txtRect, | ||
| QRect & | rect | ||
| ) | [slot] |
Tooltip handler
| p | - current point |
| str | - returned tooltip text |
| f | - returned tooltip font |
| txtRect | - returned tooltip text rectangle |
| rect | - returned tooltip rectangle |
References SUIT_ViewWindow.getViewManager(), SUIT_ViewManager.getViewModel(), Handle(), myFont, myWnd, PyInterp.obj, and toolTipFor().
| void QtxToolTip::hideTip | ( | ) | [inherited] |
Hides tooltip
References QtxToolTip.mySleepTimer, and QtxToolTip.myWidgetRegion.
| void QtxToolTip::showTip | ( | const QPoint & | aPos, |
| const QString & | text, | ||
| const QRect & | aWidgetRegion | ||
| ) | [virtual, inherited] |
Shows tool tip
| aPos | - position |
| text | - tooltip text |
| aWidgetRegion | - rectangle |
| void QtxToolTip::showTip | ( | const QRect & | aRegion, |
| const QString & | text, | ||
| const QRect & | aWidgetRegion | ||
| ) | [virtual, inherited] |
Shows tool tip
| aRegion | - tooltip region |
| text | - tooltip text |
| aWidgetRegion | - widget rectangle |
References QtxToolTip.myShowDelayTime, QtxToolTip.mySleepTimer, and QtxToolTip.myWidgetRegion.
Custom event filter
Reimplemented in Plot2d_ToolTip.
References QtxToolTip.hideTip(), QtxToolTip.myWakeUpDelayTime, QtxToolTip.myWakeUpTimer, and QtxToolTip.myWidgetRegion.
| void QtxToolTip::setWakeUpDelayTime | ( | int | theTime | ) | [inherited] |
| void QtxToolTip::setShowDelayTime | ( | int | theTime | ) | [inherited] |
| int QtxToolTip.wakeUpDelayTime | ( | ) | const [inherited] |
| int QtxToolTip.showDelayTime | ( | ) | const [inherited] |
| void QtxToolTip.maybeTip | ( | QPoint | , |
| QString & | , | ||
| QFont & | , | ||
| QRect & | , | ||
| QRect & | |||
| ) | [signal, inherited] |
| void QtxToolTip::maybeTip | ( | const QPoint & | pos | ) | [protected, virtual, inherited] |
It is called when there is a possibility that a tool tip should be shown and must decide whether there is a tool tip for the point p in the widget that this QToolTip object relates to
| pos | - position |
References QtxToolTip.maybeTip(), and QtxToolTip.showTip().
| void QtxToolTip::onSleepTimeOut | ( | ) | [protected, slot, inherited] |
SLOT: called when sleep time is out
References QtxToolTip.hideTip(), and QtxToolTip.mySleepTimer.
| void QtxToolTip::onWakeUpTimeOut | ( | ) | [protected, slot, inherited] |
SLOT: called when wake time is out
References QtxToolTip.maybeTip(), and QtxToolTip.myWakeUpTimer.
| void QtxToolTip::mousePressEvent | ( | QMouseEvent * | e | ) | [protected, virtual, inherited] |
Custom mouse press event handler
References QtxToolTip.hideTip().
| void QtxToolTip::mouseDoubleClickEvent | ( | QMouseEvent * | e | ) | [protected, virtual, inherited] |
Custom mouse double click event handler
References QtxToolTip.hideTip().
| QTimer * QtxToolTip::sleepTimer | ( | ) | const [protected, inherited] |
References QtxToolTip.mySleepTimer.
| QTimer * QtxToolTip::wakeUpTimer | ( | ) | const [protected, inherited] |
References QtxToolTip.myWakeUpTimer.
OCCViewer_ViewWindow* OCCViewer_ToolTip.myWnd [private] |
QFont OCCViewer_ToolTip.myFont [private] |