ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
QCPSelectableCursor Class Reference

QCustomPlot: selectable cursor interface. More...

#include <ecvQCustomPlot.h>

Inheritance diagram for QCPSelectableCursor:
Collaboration diagram for QCPSelectableCursor:

Public Member Functions

 QCPSelectableCursor (QCPAxis *keyAxis, QCPAxis *valueAxis)
 Default constructor. More...
 
virtual bool isSelectable (QPoint click) const
 
double currentVal () const
 
double minVal () const
 
double maxVal () const
 
void range (double &minVal, double &maxVal) const
 
void setCurrentVal (double val)
 
void setRange (double minVal, double maxVal)
 
double pixelToKey (int pixX) const
 Converts a pixel value (X) to the equivalent key. More...
 
double pixelToValue (int pixY) const
 Converts a pixel value (Y) to the equivalent value. More...
 
virtual void clearData ()
 
double selectTest (const QPointF &pos, bool onlySelectable, QVariant *details=0) const override
 

Protected Member Functions

void drawLegendIcon (QCPPainter *painter, const QRectF &rect) const override
 
QCPRange getKeyRange (bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth) const override
 
QCPRange getValueRange (bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth, const QCPRange &inKeyRange=QCPRange()) const override
 

Protected Attributes

double mCurrentVal
 
double mMinVal
 
double mMaxVal
 
QPoint mLastPos
 
int mLastRadius
 

Detailed Description

QCustomPlot: selectable cursor interface.

Definition at line 173 of file ecvQCustomPlot.h.

Constructor & Destructor Documentation

◆ QCPSelectableCursor()

QCPSelectableCursor::QCPSelectableCursor ( QCPAxis *  keyAxis,
QCPAxis *  valueAxis 
)
inlineexplicit

Default constructor.

Definition at line 178 of file ecvQCustomPlot.h.

Member Function Documentation

◆ clearData()

virtual void QCPSelectableCursor::clearData ( )
inlinevirtual

Definition at line 222 of file ecvQCustomPlot.h.

◆ currentVal()

◆ drawLegendIcon()

void QCPSelectableCursor::drawLegendIcon ( QCPPainter *  painter,
const QRectF &  rect 
) const
inlineoverrideprotected

Definition at line 231 of file ecvQCustomPlot.h.

◆ getKeyRange()

QCPRange QCPSelectableCursor::getKeyRange ( bool &  foundRange,
QCP::SignDomain  inSignDomain = QCP::sdBoth 
) const
inlineoverrideprotected

Definition at line 233 of file ecvQCustomPlot.h.

◆ getValueRange()

QCPRange QCPSelectableCursor::getValueRange ( bool &  foundRange,
QCP::SignDomain  inSignDomain = QCP::sdBoth,
const QCPRange &  inKeyRange = QCPRange() 
) const
inlineoverrideprotected

Definition at line 239 of file ecvQCustomPlot.h.

◆ isSelectable()

virtual bool QCPSelectableCursor::isSelectable ( QPoint  click) const
inlinevirtual

Returns whether the item is "selectable" when the mouse is clicked at a given position

Definition at line 188 of file ecvQCustomPlot.h.

References mLastPos, and mLastRadius.

Referenced by ccHistogramWindow::mousePressEvent().

◆ maxVal()

double QCPSelectableCursor::maxVal ( ) const
inline

Definition at line 197 of file ecvQCustomPlot.h.

References mMaxVal.

Referenced by range(), and setRange().

◆ minVal()

double QCPSelectableCursor::minVal ( ) const
inline

Definition at line 196 of file ecvQCustomPlot.h.

References mMinVal.

Referenced by range(), and setRange().

◆ pixelToKey()

double QCPSelectableCursor::pixelToKey ( int  pixX) const
inline

Converts a pixel value (X) to the equivalent key.

Definition at line 213 of file ecvQCustomPlot.h.

Referenced by ccHistogramWindow::mouseMoveEvent().

◆ pixelToValue()

double QCPSelectableCursor::pixelToValue ( int  pixY) const
inline

Converts a pixel value (Y) to the equivalent value.

Definition at line 217 of file ecvQCustomPlot.h.

◆ range()

void QCPSelectableCursor::range ( double &  minVal,
double &  maxVal 
) const
inline

Definition at line 198 of file ecvQCustomPlot.h.

References maxVal(), minVal(), mMaxVal, and mMinVal.

◆ selectTest()

double QCPSelectableCursor::selectTest ( const QPointF &  pos,
bool  onlySelectable,
QVariant *  details = 0 
) const
inlineoverride

Definition at line 223 of file ecvQCustomPlot.h.

◆ setCurrentVal()

◆ setRange()

void QCPSelectableCursor::setRange ( double  minVal,
double  maxVal 
)
inline

Definition at line 207 of file ecvQCustomPlot.h.

References maxVal(), minVal(), mMaxVal, and mMinVal.

Referenced by ccHistogramWindow::refresh().

Member Data Documentation

◆ mCurrentVal

double QCPSelectableCursor::mCurrentVal
protected

Definition at line 248 of file ecvQCustomPlot.h.

Referenced by currentVal(), QCPHiddenArea::draw(), QCPArrow::draw(), and setCurrentVal().

◆ mLastPos

QPoint QCPSelectableCursor::mLastPos
protected

Definition at line 250 of file ecvQCustomPlot.h.

Referenced by QCPHiddenArea::draw(), QCPArrow::draw(), and isSelectable().

◆ mLastRadius

int QCPSelectableCursor::mLastRadius
protected

Definition at line 251 of file ecvQCustomPlot.h.

Referenced by QCPHiddenArea::draw(), QCPArrow::draw(), and isSelectable().

◆ mMaxVal

double QCPSelectableCursor::mMaxVal
protected

Definition at line 249 of file ecvQCustomPlot.h.

Referenced by QCPHiddenArea::draw(), maxVal(), range(), setCurrentVal(), and setRange().

◆ mMinVal

double QCPSelectableCursor::mMinVal
protected

Definition at line 249 of file ecvQCustomPlot.h.

Referenced by QCPHiddenArea::draw(), minVal(), range(), setCurrentVal(), and setRange().


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