QCPColorScaleAxisRectPrivate

Search for usage in LXR

Inheritance diagram for QCPColorScaleAxisRectPrivate:

Public Member Functions

 QCPColorScaleAxisRectPrivate (QCPColorScale *parentColorScale)
 
- Public Member Functions inherited from QCPAxisRect
 QCPAxisRect (QCustomPlot *parentPlot, bool setupDefaultAxes=true)
 
QList< QCPAxis * > addAxes (QCPAxis::AxisTypes types)
 
QCPAxisaddAxis (QCPAxis::AxisType type, QCPAxis *axis=nullptr)
 
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 override
 
QList< QCPGraph * > graphs () const
 
int height () const
 
QCPLayoutInsetinsetLayout () const
 
QList< QCPAbstractItem * > items () const
 
int left () const
 
QList< QCPAbstractPlottable * > plottables () const
 
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
 
virtual void update (UpdatePhase phase) override
 
int width () const
 
void zoom (const QRectF &pixelRect)
 
void zoom (const QRectF &pixelRect, const QList< QCPAxis * > &affectedAxes)
 
- Public Member Functions inherited from QCPLayoutElement
 QCPLayoutElement (QCustomPlot *parentPlot=nullptr)
 
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
 
QRect rect () const
 
virtual double selectTest (const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const 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
 QCPLayerable (QCustomPlot *plot, QString targetLayer=QString(), QCPLayerable *parentLayerable=nullptr)
 
bool antialiased () const
 
QCPLayerlayer () const
 
QCPLayerableparentLayerable () const
 
QCustomPlotparentPlot () const
 
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
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
bool blockSignals (bool block)
 
const QObjectListchildren () const const
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method) const const
 
bool disconnect (const QObject *receiver, const char *method) const const
 
void dumpObjectInfo ()
 
void dumpObjectInfo () const const
 
void dumpObjectTree ()
 
void dumpObjectTree () const const
 
QList< QByteArraydynamicPropertyNames () const const
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
findChild (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegExp &regExp, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QString &name, Qt::FindChildOptions options) const const
 
bool inherits (const char *className) const const
 
void installEventFilter (QObject *filterObj)
 
bool isWidgetType () const const
 
bool isWindowType () const const
 
void killTimer (int id)
 
virtual const QMetaObjectmetaObject () const const
 
void moveToThread (QThread *targetThread)
 
QString objectName () const const
 
void objectNameChanged (const QString &objectName)
 
QObjectparent () const const
 
QVariant property (const char *name) const const
 
 Q_CLASSINFO (Name, Value)
 
 Q_DISABLE_COPY (Class)
 
 Q_DISABLE_COPY_MOVE (Class)
 
 Q_DISABLE_MOVE (Class)
 
 Q_EMIT Q_EMIT
 
 Q_ENUM (...)
 
 Q_ENUM_NS (...)
 
 Q_ENUMS (...)
 
 Q_FLAG (...)
 
 Q_FLAG_NS (...)
 
 Q_FLAGS (...)
 
 Q_GADGET Q_GADGET
 
 Q_INTERFACES (...)
 
 Q_INVOKABLE Q_INVOKABLE
 
 Q_NAMESPACE Q_NAMESPACE
 
 Q_NAMESPACE_EXPORT (EXPORT_MACRO)
 
 Q_OBJECT Q_OBJECT
 
 Q_PROPERTY (...)
 
 Q_REVISION Q_REVISION
 
 Q_SET_OBJECT_NAME (Object)
 
 Q_SIGNAL Q_SIGNAL
 
 Q_SIGNALS Q_SIGNALS
 
 Q_SLOT Q_SLOT
 
 Q_SLOTS Q_SLOTS
 
qFindChild (const QObject *obj, const QString &name)
 
QList< T > qFindChildren (const QObject *obj, const QRegExp &regExp)
 
QList< T > qFindChildren (const QObject *obj, const QString &name)
 
qobject_cast (const QObject *object)
 
qobject_cast (QObject *object)
 
 QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
 
void removeEventFilter (QObject *obj)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool signalsBlocked () const const
 
int startTimer (int interval, Qt::TimerType timerType)
 
int startTimer (std::chrono::milliseconds time, Qt::TimerType timerType)
 
QThreadthread () const const
 

Protected Member Functions

Q_SLOT void axisSelectableChanged (QCPAxis::SelectableParts selectableParts)
 
Q_SLOT void axisSelectionChanged (QCPAxis::SelectableParts selectedParts)
 
virtual int calculateAutoMargin (QCP::MarginSide side) override
 
virtual void draw (QCPPainter *painter) override
 
virtual void mouseMoveEvent (QMouseEvent *event, const QPointF &startPos) override
 
virtual void mousePressEvent (QMouseEvent *event, const QVariant &details) override
 
virtual void mouseReleaseEvent (QMouseEvent *event, const QPointF &startPos) override
 
virtual void update (UpdatePhase phase) override
 
void updateGradientImage ()
 
virtual void wheelEvent (QWheelEvent *event) override
 
- Protected Member Functions inherited from QCPAxisRect
virtual void applyDefaultAntialiasingHint (QCPPainter *painter) const override
 
virtual int calculateAutoMargin (QCP::MarginSide side) override
 
void drawBackground (QCPPainter *painter)
 
virtual void layoutChanged () override
 
virtual void mouseMoveEvent (QMouseEvent *event, const QPointF &startPos) override
 
virtual void mousePressEvent (QMouseEvent *event, const QVariant &details) override
 
virtual void mouseReleaseEvent (QMouseEvent *event, const QPointF &startPos) override
 
void updateAxesOffset (QCPAxis::AxisType type)
 
virtual void wheelEvent (QWheelEvent *event) override
 
- Protected Member Functions inherited from QCPLayoutElement
virtual void parentPlotInitialized (QCustomPlot *parentPlot) 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 Member Functions inherited from QObject
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
bool isSignalConnected (const QMetaMethod &signal) const const
 
int receivers (const char *signal) const const
 
QObjectsender () const const
 
int senderSignalIndex () const const
 
virtual void timerEvent (QTimerEvent *event)
 

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
 

Additional Inherited Members

- Public Types inherited from QCPLayoutElement
enum  SizeConstraintRect { scrInnerRect, scrOuterRect }
 
enum  UpdatePhase { upPreparation, upMargins, upLayout }
 
- Properties inherited from QObject
 objectName
 
- Signals inherited from QCPLayerable
void layerChanged (QCPLayer *newLayer)
 
- Static Public Member Functions inherited from QObject
QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, Functor functor)
 
bool disconnect (const QMetaObject::Connection &connection)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
bool disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 
- Public Attributes inherited from QObject
typedef QObjectList
 

Detailed Description

An axis rect subclass for use in a QCPColorScale.

This is a private class and not part of the public QCustomPlot interface.

It provides the axis rect functionality for the QCPColorScale class.

Definition at line 5302 of file qcustomplot.h.

Constructor & Destructor Documentation

◆ QCPColorScaleAxisRectPrivate()

QCPColorScaleAxisRectPrivate::QCPColorScaleAxisRectPrivate ( QCPColorScale parentColorScale)
explicit

Creates a new instance, as a child of parentColorScale.

Definition at line 20565 of file qcustomplot.cpp.

Member Function Documentation

◆ axisSelectableChanged()

void QCPColorScaleAxisRectPrivate::axisSelectableChanged ( QCPAxis::SelectableParts  selectableParts)
protected

This slot is connected to the selectableChanged signals of the four axes in the constructor. It synchronizes the selectability of the axes.

Definition at line 20695 of file qcustomplot.cpp.

◆ axisSelectionChanged()

void QCPColorScaleAxisRectPrivate::axisSelectionChanged ( QCPAxis::SelectableParts  selectedParts)
protected

This slot is connected to the selectionChanged signals of the four axes in the constructor. It synchronizes the selection state of the axes.

Definition at line 20670 of file qcustomplot.cpp.

◆ draw()

void QCPColorScaleAxisRectPrivate::draw ( QCPPainter painter)
overrideprotectedvirtual

Updates the color gradient image if necessary, by calling updateGradientImage, then draws it. Then the axes are drawn by calling the QCPAxisRect::draw base class implementation.

\seebaseclassmethod

Reimplemented from QCPAxisRect.

Definition at line 20605 of file qcustomplot.cpp.

◆ mouseMoveEvent()

void QCPAxisRect::mouseMoveEvent
overrideprotected

Event handler for when the mouse is moved on the axis rect. If range dragging was activated in a preceding mousePressEvent, the range is moved accordingly.

See also
mousePressEvent, mouseReleaseEvent

Definition at line 18571 of file qcustomplot.cpp.

◆ mousePressEvent()

void QCPAxisRect::mousePressEvent
overrideprotected

Event handler for when a mouse button is pressed on the axis rect. If the left mouse button is pressed, the range dragging interaction is initialized (the actual range manipulation happens in the mouseMoveEvent).

The mDragging flag is set to true and some anchor points are set that are needed to determine the distance the mouse was dragged in the mouse move/release events later.

See also
mouseMoveEvent, mouseReleaseEvent

Definition at line 18539 of file qcustomplot.cpp.

◆ update()

void QCPAxisRect::update
overrideprotected

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

Definition at line 17987 of file qcustomplot.cpp.

◆ updateGradientImage()

void QCPColorScaleAxisRectPrivate::updateGradientImage ( )
protected

Uses the current gradient of the parent QCPColorScale (specified in the constructor) to generate a gradient image. This gradient image will be used in the draw method.

Definition at line 20627 of file qcustomplot.cpp.

◆ wheelEvent()

void QCPAxisRect::wheelEvent
overrideprotected

Event handler for mouse wheel events. If rangeZoom is Qt::Horizontal, Qt::Vertical or both, the ranges of the axes defined as rangeZoomHorzAxis and rangeZoomVertAxis are scaled. The center of the scaling operation is the current cursor position inside the axis rect. The scaling factor is dependent on the mouse wheel delta (which direction the wheel was rotated) to provide a natural zooming feel. The Strength of the zoom can be controlled via setRangeZoomFactor.

Note, that event->angleDelta() is usually +/-120 for single rotation steps. However, if the mouse wheel is turned rapidly, many steps may bunch up to one event, so the delta may then be multiples of 120. This is taken into account here, by calculating wheelSteps and using it as exponent of the range zoom factor. This takes care of the wheel direction automatically, by inverting the factor, when the wheel step is negative (f^-1 = 1/f).

Definition at line 18657 of file qcustomplot.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Aug 18 2022 03:56:48 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.