Cute Chess 0.1
QCPColorScaleAxisRectPrivate Class Reference
Inheritance diagram for QCPColorScaleAxisRectPrivate:
QCPAxisRect QCPLayoutElement QCPLayerable QObject

Public Member Functions

 QCPColorScaleAxisRectPrivate (QCPColorScale *parentColorScale)
Public Member Functions inherited from QCPAxisRect
QList< QCPAxis * > addAxes (QCPAxis::AxisTypes types)
QCPAxisaddAxis (QCPAxis::AxisType type, QCPAxis *axis=0)
QList< QCPAxis * > axes () const
QList< QCPAxis * > axes (QCPAxis::AxisTypes types) const
QCPAxisaxis (QCPAxis::AxisType type, int index=0) const
int axisCount (QCPAxis::AxisType type) const
QPixmap background () const
QBrush backgroundBrush () const
bool backgroundScaled () const
Qt::AspectRatioMode backgroundScaledMode () const
int bottom () const
QPoint bottomLeft () const
QPoint bottomRight () const
QPoint center () const
virtual QList< QCPLayoutElement * > elements (bool recursive) const Q_DECL_OVERRIDE
QList< QCPGraph * > graphs () const
int height () const
QCPLayoutInsetinsetLayout () const
QList< QCPAbstractItem * > items () const
int left () const
QList< QCPAbstractPlottable * > plottables () const
 QCPAxisRect (QCustomPlot *parentPlot, bool setupDefaultAxes=true)
Qt::Orientations rangeDrag () const
QList< QCPAxis * > rangeDragAxes (Qt::Orientation orientation)
QCPAxisrangeDragAxis (Qt::Orientation orientation)
Qt::Orientations rangeZoom () const
QList< QCPAxis * > rangeZoomAxes (Qt::Orientation orientation)
QCPAxisrangeZoomAxis (Qt::Orientation orientation)
double rangeZoomFactor (Qt::Orientation orientation)
bool removeAxis (QCPAxis *axis)
int right () const
void setBackground (const QBrush &brush)
void setBackground (const QPixmap &pm)
void setBackground (const QPixmap &pm, bool scaled, Qt::AspectRatioMode mode=Qt::KeepAspectRatioByExpanding)
void setBackgroundScaled (bool scaled)
void setBackgroundScaledMode (Qt::AspectRatioMode mode)
void setRangeDrag (Qt::Orientations orientations)
void setRangeDragAxes (QCPAxis *horizontal, QCPAxis *vertical)
void setRangeDragAxes (QList< QCPAxis * > axes)
void setRangeDragAxes (QList< QCPAxis * > horizontal, QList< QCPAxis * > vertical)
void setRangeZoom (Qt::Orientations orientations)
void setRangeZoomAxes (QCPAxis *horizontal, QCPAxis *vertical)
void setRangeZoomAxes (QList< QCPAxis * > axes)
void setRangeZoomAxes (QList< QCPAxis * > horizontal, QList< QCPAxis * > vertical)
void setRangeZoomFactor (double factor)
void setRangeZoomFactor (double horizontalFactor, double verticalFactor)
void setupFullAxesBox (bool connectRanges=false)
QSize size () const
int top () const
QPoint topLeft () const
QPoint topRight () const
int width () const
void zoom (const QRectF &pixelRect)
void zoom (const QRectF &pixelRect, const QList< QCPAxis * > &affectedAxes)
Public Member Functions inherited from QCPLayoutElement
QCP::MarginSides autoMargins () const
QCPLayoutlayout () const
QCPMarginGroupmarginGroup (QCP::MarginSide side) const
QHash< QCP::MarginSide, QCPMarginGroup * > marginGroups () const
QMargins margins () const
virtual QSize maximumOuterSizeHint () const
QSize maximumSize () const
QMargins minimumMargins () const
virtual QSize minimumOuterSizeHint () const
QSize minimumSize () const
QRect outerRect () const
 QCPLayoutElement (QCustomPlot *parentPlot=0)
QRect rect () const
virtual double selectTest (const QPointF &pos, bool onlySelectable, QVariant *details=0) const Q_DECL_OVERRIDE
void setAutoMargins (QCP::MarginSides sides)
void setMarginGroup (QCP::MarginSides sides, QCPMarginGroup *group)
void setMargins (const QMargins &margins)
void setMaximumSize (const QSize &size)
void setMaximumSize (int width, int height)
void setMinimumMargins (const QMargins &margins)
void setMinimumSize (const QSize &size)
void setMinimumSize (int width, int height)
void setOuterRect (const QRect &rect)
void setSizeConstraintRect (SizeConstraintRect constraintRect)
SizeConstraintRect sizeConstraintRect () const
Public Member Functions inherited from QCPLayerable
bool antialiased () const
QCPLayerlayer () const
QCPLayerableparentLayerable () const
QCustomPlotparentPlot () const
 QCPLayerable (QCustomPlot *plot, QString targetLayer=QString(), QCPLayerable *parentLayerable=0)
bool realVisibility () const
void setAntialiased (bool enabled)
bool setLayer (const QString &layerName)
Q_SLOT bool setLayer (QCPLayer *layer)
void setVisible (bool on)
bool visible () const

Protected Member Functions

Q_SLOT void axisSelectableChanged (QCPAxis::SelectableParts selectableParts)
Q_SLOT void axisSelectionChanged (QCPAxis::SelectableParts selectedParts)
virtual int calculateAutoMargin (QCP::MarginSide side) Q_DECL_OVERRIDE
virtual void draw (QCPPainter *painter) Q_DECL_OVERRIDE
virtual void mouseMoveEvent (QMouseEvent *event, const QPointF &startPos) Q_DECL_OVERRIDE
virtual void mousePressEvent (QMouseEvent *event, const QVariant &details) Q_DECL_OVERRIDE
virtual void mouseReleaseEvent (QMouseEvent *event, const QPointF &startPos) Q_DECL_OVERRIDE
virtual void update (UpdatePhase phase) Q_DECL_OVERRIDE
void updateGradientImage ()
virtual void wheelEvent (QWheelEvent *event) Q_DECL_OVERRIDE
Protected Member Functions inherited from QCPAxisRect
virtual void applyDefaultAntialiasingHint (QCPPainter *painter) const Q_DECL_OVERRIDE
void drawBackground (QCPPainter *painter)
virtual void layoutChanged () Q_DECL_OVERRIDE
void updateAxesOffset (QCPAxis::AxisType type)
Protected Member Functions inherited from QCPLayoutElement
virtual void parentPlotInitialized (QCustomPlot *parentPlot) Q_DECL_OVERRIDE
Protected Member Functions inherited from QCPLayerable
void applyAntialiasingHint (QCPPainter *painter, bool localAntialiased, QCP::AntialiasedElement overrideElement) const
virtual QRect clipRect () const
virtual void deselectEvent (bool *selectionStateChanged)
void initializeParentPlot (QCustomPlot *parentPlot)
virtual void mouseDoubleClickEvent (QMouseEvent *event, const QVariant &details)
bool moveToLayer (QCPLayer *layer, bool prepend)
virtual void selectEvent (QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged)
virtual QCP::Interaction selectionCategory () const
void setParentLayerable (QCPLayerable *parentLayerable)

Protected Attributes

QImage mGradientImage
bool mGradientImageInvalidated
QCPColorScalemParentColorScale
Protected Attributes inherited from QCPAxisRect
QCP::AntialiasedElements mAADragBackup
QHash< QCPAxis::AxisType, QList< QCPAxis * > > mAxes
QBrush mBackgroundBrush
QPixmap mBackgroundPixmap
bool mBackgroundScaled
Qt::AspectRatioMode mBackgroundScaledMode
bool mDragging
QList< QCPRangemDragStartHorzRange
QList< QCPRangemDragStartVertRange
QCPLayoutInsetmInsetLayout
QCP::AntialiasedElements mNotAADragBackup
Qt::Orientations mRangeDrag
QList< QPointer< QCPAxis > > mRangeDragHorzAxis
QList< QPointer< QCPAxis > > mRangeDragVertAxis
Qt::Orientations mRangeZoom
double mRangeZoomFactorHorz
double mRangeZoomFactorVert
QList< QPointer< QCPAxis > > mRangeZoomHorzAxis
QList< QPointer< QCPAxis > > mRangeZoomVertAxis
QPixmap mScaledBackgroundPixmap
Protected Attributes inherited from QCPLayoutElement
QCP::MarginSides mAutoMargins
QHash< QCP::MarginSide, QCPMarginGroup * > mMarginGroups
QMargins mMargins
QSize mMaximumSize
QMargins mMinimumMargins
QSize mMinimumSize
QRect mOuterRect
QCPLayoutmParentLayout
QRect mRect
SizeConstraintRect mSizeConstraintRect
Protected Attributes inherited from QCPLayerable
bool mAntialiased
QCPLayermLayer
QPointer< QCPLayerablemParentLayerable
QCustomPlotmParentPlot
bool mVisible

Friends

class QCPColorScale

Additional Inherited Members

Public Types inherited from QCPLayoutElement
enum  SizeConstraintRect { scrInnerRect , scrOuterRect }
enum  UpdatePhase { upPreparation , upMargins , upLayout }
Signals inherited from QCPLayerable
void layerChanged (QCPLayer *newLayer)

Constructor & Destructor Documentation

◆ QCPColorScaleAxisRectPrivate()

QCPColorScaleAxisRectPrivate::QCPColorScaleAxisRectPrivate ( QCPColorScale * parentColorScale)
explicit

Creates a new instance, as a child of parentColorScale.

Member Function Documentation

◆ calculateAutoMargin()

int QCPAxisRect::calculateAutoMargin ( QCP::MarginSide side)
protectedvirtual

Reimplemented from QCPAxisRect.

◆ draw()

void QCPColorScaleAxisRectPrivate::draw ( QCPPainter * painter)
protectedvirtual

Reimplemented from QCPAxisRect.

◆ mouseMoveEvent()

void QCPAxisRect::mouseMoveEvent ( QMouseEvent * event,
const QPointF & startPos )
protectedvirtual

This event gets called when the user moves the mouse while holding a mouse button, after this layerable has become the mouse grabber by accepting the preceding mousePressEvent.

The current pixel position of the cursor on the QCustomPlot widget is accessible via event->pos(). The parameter startPos indicates the position where the initial mousePressEvent occured, that started the mouse interaction.

The default implementation does nothing.

See also
mousePressEvent, mouseReleaseEvent, mouseDoubleClickEvent, wheelEvent

Reimplemented from QCPAxisRect.

◆ mousePressEvent()

void QCPAxisRect::mousePressEvent ( QMouseEvent * event,
const QVariant & details )
protectedvirtual

This event gets called when the user presses a mouse button while the cursor is over the layerable. Whether a cursor is over the layerable is decided by a preceding call to selectTest.

The current pixel position of the cursor on the QCustomPlot widget is accessible via event->pos(). The parameter details contains layerable-specific details about the hit, which were generated in the previous call to selectTest. For example, One-dimensional plottables like QCPGraph or QCPBars convey the clicked data point in the details parameter, as QCPDataSelection packed as QVariant. Multi-part objects convey the specific SelectablePart that was hit (e.g. QCPAxis::SelectablePart in the case of axes).

QCustomPlot uses an event propagation system that works the same as Qt's system. If your layerable doesn't reimplement the mousePressEvent or explicitly calls event->ignore() in its reimplementation, the event will be propagated to the next layerable in the stacking order.

Once a layerable has accepted the mousePressEvent, it is considered the mouse grabber and will receive all following calls to mouseMoveEvent or mouseReleaseEvent for this mouse interaction (a "mouse interaction" in this context ends with the release).

The default implementation does nothing except explicitly ignoring the event with event->ignore().

See also
mouseMoveEvent, mouseReleaseEvent, mouseDoubleClickEvent, wheelEvent

Reimplemented from QCPAxisRect.

◆ mouseReleaseEvent()

void QCPAxisRect::mouseReleaseEvent ( QMouseEvent * event,
const QPointF & startPos )
protectedvirtual

This event gets called when the user releases the mouse button, after this layerable has become the mouse grabber by accepting the preceding mousePressEvent.

The current pixel position of the cursor on the QCustomPlot widget is accessible via event->pos(). The parameter startPos indicates the position where the initial mousePressEvent occured, that started the mouse interaction.

The default implementation does nothing.

See also
mousePressEvent, mouseMoveEvent, mouseDoubleClickEvent, wheelEvent

Reimplemented from QCPAxisRect.

◆ update()

void QCPAxisRect::update ( UpdatePhase phase)
protectedvirtual

This method is called automatically upon replot and doesn't need to be called by users of QCPAxisRect.

Calls the base class implementation to update the margins (see QCPLayoutElement::update), and finally passes the rect to the inset layout (insetLayout) and calls its QCPInsetLayout::update function.

\seebaseclassmethod

Reimplemented from QCPAxisRect.

◆ wheelEvent()

void QCPAxisRect::wheelEvent ( QWheelEvent * event)
protectedvirtual

This event gets called when the user turns the mouse scroll wheel while the cursor is over the layerable. Whether a cursor is over the layerable is decided by a preceding call to selectTest.

The current pixel position of the cursor on the QCustomPlot widget is accessible via event->pos().

The event->delta() indicates how far the mouse wheel was turned, which is usually +/- 120 for single rotation steps. However, if the mouse wheel is turned rapidly, multiple steps may accumulate to one event, making event->delta() larger. On the other hand, if the wheel has very smooth steps or none at all, the delta may be smaller.

The default implementation does nothing.

See also
mousePressEvent, mouseMoveEvent, mouseReleaseEvent, mouseDoubleClickEvent

Reimplemented from QCPAxisRect.


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