EtherCAT Graphical User Interface Code 0.0.1
EtherCAT GUI that uses different communication protocols with EtherCAT Master server.
Loading...
Searching...
No Matches
QCPColorScaleAxisRectPrivate Class Reference
Inheritance diagram for QCPColorScaleAxisRectPrivate:
Inheritance graph
Collaboration diagram for QCPColorScaleAxisRectPrivate:
Collaboration graph

Public Member Functions

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

Protected Member Functions

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

Protected Attributes

QCPColorScale * mParentColorScale
QImage mGradientImage
bool mGradientImageInvalidated
Protected Attributes inherited from QCPAxisRect
QBrush mBackgroundBrush
QPixmap mBackgroundPixmap
QPixmap mScaledBackgroundPixmap
bool mBackgroundScaled
Qt::AspectRatioMode mBackgroundScaledMode
QCPLayoutInset * mInsetLayout
Qt::Orientations mRangeDrag
Qt::Orientations mRangeZoom
QList< QPointer< QCPAxis > > mRangeDragHorzAxis
QList< QPointer< QCPAxis > > mRangeDragVertAxis
QList< QPointer< QCPAxis > > mRangeZoomHorzAxis
QList< QPointer< QCPAxis > > mRangeZoomVertAxis
double mRangeZoomFactorHorz
double mRangeZoomFactorVert
QList< QCPRange > mDragStartHorzRange
QList< QCPRange > mDragStartVertRange
QCP::AntialiasedElements mAADragBackup
QCP::AntialiasedElements mNotAADragBackup
bool mDragging
QHash< QCPAxis::AxisType, QList< QCPAxis * > > mAxes
Protected Attributes inherited from QCPLayoutElement
QCPLayout * mParentLayout
QSize mMinimumSize
QSize mMaximumSize
SizeConstraintRect mSizeConstraintRect
QRect mRect
QRect mOuterRect
QMargins mMargins
QMargins mMinimumMargins
QCP::MarginSides mAutoMargins
QHash< QCP::MarginSide, QCPMarginGroup * > mMarginGroups
Protected Attributes inherited from QCPLayerable
bool mVisible
QCustomPlot * mParentPlot
QPointer< QCPLayerable > mParentLayerable
QCPLayer * mLayer
bool mAntialiased

Friends

class QCPColorScale

Additional Inherited Members

Public Types inherited from QCPLayoutElement
enum  UpdatePhase { upPreparation , upMargins , upLayout }
enum  SizeConstraintRect { scrInnerRect , scrOuterRect }
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 occurred, 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 occurred, 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->angleDelta() 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 the 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: