Back to index

salome-gui  6.5.0
Public Member Functions
QxGraph_ToolTip Class Reference

#include <QxGraph_CanvasView.h>

List of all members.

Public Member Functions

 QxGraph_ToolTip (QWidget *theWidget, QToolTipGroup *theGroup=0)
 ~QxGraph_ToolTip ()
virtual void maybeTip (const QPoint &theMousePos)
 Shows tooltip if necessary.

Detailed Description

Definition at line 104 of file QxGraph_CanvasView.h.

Constructor & Destructor Documentation

QxGraph_ToolTip::QxGraph_ToolTip ( QWidget *  theWidget,
QToolTipGroup *  theGroup = 0 
) [inline]

Definition at line 107 of file QxGraph_CanvasView.h.

    QToolTip(theWidget, theGroup) {}

Definition at line 109 of file QxGraph_CanvasView.h.

{ remove(parentWidget()); }

Member Function Documentation

void QxGraph_ToolTip::maybeTip ( const QPoint &  theMousePos) [virtual]

Shows tooltip if necessary.

Definition at line 740 of file QxGraph_CanvasView.cxx.

  QCanvasItemList aList = ((QCanvasView*)parentWidget())->canvas()->collisions(theMousePos);
  for (QCanvasItemList::Iterator it = aList.begin(); it != aList.end(); ++it) {
    QxGraph_ActiveItem* anActItem = dynamic_cast<QxGraph_ActiveItem*>( *it );
    if (anActItem)
        QRect aRect;
        QString aText = anActItem->getToolTipText(theMousePos, aRect);
        int avX, avY;
        QWMatrix aWM = ((QCanvasView*)parentWidget())->worldMatrix();
                                                           avX, avY);
        QRect aTipRect(avX, avY, (int)(aRect.width()*aWM.m11()), (int)(aRect.height()*aWM.m22()));
        if (!aText.isEmpty())
          tip(aTipRect, aText);

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