Version: 6.3.1
Public Slots | Signals | Public Member Functions | Protected Slots | Protected Member Functions | Private Attributes

OCCViewer_ToolTip Class Reference

Custom tooltip for AIS_InteractiveObjects and SelectMgr_EntityOwners in the OCC Viewer.

#include <OCCViewer_ToolTip.h>

Inheritance diagram for OCCViewer_ToolTip:
Inheritance graph

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_ViewWindowmyWnd
QFont myFont

Constructor & Destructor Documentation

OCCViewer_ToolTip::OCCViewer_ToolTip ( OCCViewer_ViewWindow wnd)

Constructor

Parameters:
wnd- window where the tooltip should be assigned

References QtxToolTip.maybeTip(), and onToolTip().

OCCViewer_ToolTip::~OCCViewer_ToolTip ( ) [virtual]

Destructor


Member Function Documentation

QFont OCCViewer_ToolTip::font ( ) const
Returns:
font of the tooltip

References myFont.

void OCCViewer_ToolTip::setFont ( const QFont &  f)

Change font of the tooltip

Parameters:
f- new font

References myFont.

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

Parameters:
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

Parameters:
aPos- position
text- tooltip text
aWidgetRegion- rectangle
void QtxToolTip::showTip ( const QRect &  aRegion,
const QString &  text,
const QRect &  aWidgetRegion 
) [virtual, inherited]

Shows tool tip

Parameters:
aRegion- tooltip region
text- tooltip text
aWidgetRegion- widget rectangle

References QtxToolTip.myShowDelayTime, QtxToolTip.mySleepTimer, and QtxToolTip.myWidgetRegion.

bool QtxToolTip::eventFilter ( QObject o,
QEvent e 
) [virtual, inherited]
void QtxToolTip::setWakeUpDelayTime ( int  theTime) [inherited]

Sets wake delay time

Parameters:
theTime

References QtxToolTip.myWakeUpDelayTime.

void QtxToolTip::setShowDelayTime ( int  theTime) [inherited]

Sets show delay time

Parameters:
theTime

References QtxToolTip.myShowDelayTime.

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

Parameters:
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]
Returns:
timer measuring time of sleeping

References QtxToolTip.mySleepTimer.

QTimer * QtxToolTip::wakeUpTimer ( ) const [protected, inherited]
Returns:
timer measuring time of waking up

References QtxToolTip.myWakeUpTimer.


Field Documentation

QFont OCCViewer_ToolTip.myFont [private]
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS