Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 &)
 
- Signals inherited from QtxToolTip
void maybeTip (QPoint, QString &, QFont &, QRect &, QRect &)
 

Public Member Functions

 OCCViewer_ToolTip (OCCViewer_ViewWindow *)
 
virtual ~OCCViewer_ToolTip ()
 
QFont font () const
 
void setFont (const QFont &)
 
- Public Member Functions inherited from QtxToolTip
 QtxToolTip (QWidget *=0)
 
virtual ~QtxToolTip ()
 
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
 

Private Attributes

OCCViewer_ViewWindowmyWnd
 
QFont myFont
 

Additional Inherited Members

- Protected Slots inherited from QtxToolTip
void onSleepTimeOut ()
 
void onWakeUpTimeOut ()
 
- Protected Member Functions inherited from QtxToolTip
virtual void maybeTip (const QPoint &)
 
virtual void mousePressEvent (QMouseEvent *)
 
virtual void mouseDoubleClickEvent (QMouseEvent *)
 
QTimer * sleepTimer () const
 
QTimer * wakeUpTimer () const
 

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::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, obj, and toolTipFor().

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

Member Data Documentation

QFont OCCViewer_ToolTip::myFont
private
OCCViewer_ViewWindow* OCCViewer_ToolTip::myWnd
private

The documentation for this class was generated from the following files: