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
 
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)
 
QBindable< QStringbindableObjectName ()
 
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 () const const
 
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 QRegularExpression &re, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (Qt::FindChildOptions options) const const
 
bool inherits (const char *className) const const
 
void installEventFilter (QObject *filterObj)
 
bool isQuickItemType () const const
 
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_EMIT Q_EMIT
 
 Q_ENUM (...)
 
 Q_ENUM_NS (...)
 
 Q_ENUMS (...)
 
 Q_FLAG (...)
 
 Q_FLAG_NS (...)
 
 Q_FLAGS (...)
 
 Q_GADGET Q_GADGET
 
 Q_GADGET_EXPORT (EXPORT_MACRO)
 
 Q_INTERFACES (...)
 
 Q_INVOKABLE Q_INVOKABLE
 
 Q_MOC_INCLUDE Q_MOC_INCLUDE
 
 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
 
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 setObjectName (QAnyStringView name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool setProperty (const char *name, QVariant &&value)
 
bool signalsBlocked () const const
 
int startTimer (int interval, Qt::TimerType timerType)
 
int startTimer (std::chrono::milliseconds interval, 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
 
void drawBackground (QCPPainter *painter)
 
virtual void layoutChanged () override
 
void updateAxesOffset (QCPAxis::AxisType type)
 
- 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 }
 
- Public Types inherited from QObject
typedef  QObjectList
 
- 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)
 

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 5356 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 20571 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 20701 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 20676 of file qcustomplot.cpp.

◆ calculateAutoMargin()

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

Returns the margin size for this side. It is used if automatic margins is enabled for this side (see setAutoMargins). If a minimum margin was set with setMinimumMargins, the returned value will not be smaller than the specified minimum margin.

The default implementation just returns the respective manual margin (setMargins) or the minimum margin, whichever is larger.

Reimplemented from QCPAxisRect.

Definition at line 5025 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 20611 of file qcustomplot.cpp.

◆ mouseMoveEvent()

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

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

Reimplemented from QCPAxisRect.

Definition at line 5029 of file qcustomplot.cpp.

◆ mousePressEvent()

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

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

Reimplemented from QCPAxisRect.

Definition at line 5028 of file qcustomplot.cpp.

◆ mouseReleaseEvent()

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

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.

Definition at line 5030 of file qcustomplot.cpp.

◆ update()

void QCPAxisRect::update ( UpdatePhase phase)
overrideprotectedvirtual

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.

Definition at line 5000 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 20633 of file qcustomplot.cpp.

◆ wheelEvent()

void QCPAxisRect::wheelEvent ( QWheelEvent * event)
overrideprotectedvirtual

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).

Reimplemented from QCPAxisRect.

Definition at line 5031 of file qcustomplot.cpp.

Member Data Documentation

◆ mGradientImage

QImage QCPColorScaleAxisRectPrivate::mGradientImage
protected

Definition at line 5363 of file qcustomplot.h.

◆ mGradientImageInvalidated

bool QCPColorScaleAxisRectPrivate::mGradientImageInvalidated
protected

Definition at line 5364 of file qcustomplot.h.

◆ mParentColorScale

QCPColorScale* QCPColorScaleAxisRectPrivate::mParentColorScale
protected

Definition at line 5362 of file qcustomplot.h.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:04:48 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.