Back to index

salome-gui  6.5.0
Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions
Plot2d_QwtPlotPicker Class Reference

#include <Plot2d_ViewFrame.h>

List of all members.

Public Member Functions

 Plot2d_QwtPlotPicker (int xAxis, int yAxis, int selectionFlags, RubberBand rubberBand, DisplayMode trackerMode, QwtPlotCanvas *canvas)
 Plot2d_QwtPlotPicker (int xAxis, int yAxis, QwtPlotCanvas *canvas)
virtual ~Plot2d_QwtPlotPicker ()

Public Attributes

QList< QwtPlotMarker * > pMarkers
QMap< QwtPlotMarker *, QwtText > pMarkersToolTip

Static Public Attributes

static const double BOUND_HV_SIZE = 0.2

Protected Member Functions

virtual QwtText trackerText (const QwtDoublePoint &pos) const

Detailed Description

Definition at line 448 of file Plot2d_ViewFrame.h.


Constructor & Destructor Documentation

Plot2d_QwtPlotPicker::Plot2d_QwtPlotPicker ( int  xAxis,
int  yAxis,
int  selectionFlags,
RubberBand  rubberBand,
DisplayMode  trackerMode,
QwtPlotCanvas *  canvas 
)

Definition at line 4090 of file Plot2d_ViewFrame.cxx.

: QwtPlotPicker( xAxis,
                 yAxis,
                 selectionFlags,
                 rubberBand,
                 trackerMode,
                 canvas)    // of drawing zone QwtPlot
{
}
Plot2d_QwtPlotPicker::Plot2d_QwtPlotPicker ( int  xAxis,
int  yAxis,
QwtPlotCanvas *  canvas 
)

Definition at line 4105 of file Plot2d_ViewFrame.cxx.

: QwtPlotPicker( xAxis,
                 yAxis,
                 canvas)
{
}

Definition at line 4114 of file Plot2d_ViewFrame.cxx.

{
}

Member Function Documentation

QwtText Plot2d_QwtPlotPicker::trackerText ( const QwtDoublePoint &  pos) const [protected, virtual]

Definition at line 4121 of file Plot2d_ViewFrame.cxx.

{
  for (QList<QwtPlotMarker* >::const_iterator pMarkerIt = pMarkers.begin();
                                              pMarkerIt != pMarkers.end();
                                              ++pMarkerIt )
  {
      QwtPlotMarker* pMarker = *pMarkerIt;
      if ( pMarker != NULL )
      {
          QwtDoubleRect  bound0        = pMarker->boundingRect();
          QwtDoublePoint center_bound0 = bound0.center();
          double left = center_bound0.x()-(BOUND_HV_SIZE/2.);
          double top  = center_bound0.y()-(BOUND_HV_SIZE/2.);
         
          QwtDoubleRect  bound( left, top , BOUND_HV_SIZE, BOUND_HV_SIZE);
         
          if( bound.contains(pos) )
          {
            //QString toolTip =  "X="  + QString::number( pMarker->xValue() )
            //                 + " Y=" + QString::number( pMarker->yValue() );
            return pMarkersToolTip[pMarker];
          }
      }       
  }
      
  return QwtText();      
}

Member Data Documentation

const double Plot2d_QwtPlotPicker::BOUND_HV_SIZE = 0.2 [static]

Definition at line 451 of file Plot2d_ViewFrame.h.

QList<QwtPlotMarker*> Plot2d_QwtPlotPicker::pMarkers

Definition at line 466 of file Plot2d_ViewFrame.h.

QMap<QwtPlotMarker*, QwtText> Plot2d_QwtPlotPicker::pMarkersToolTip

Definition at line 467 of file Plot2d_ViewFrame.h.


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