Gra zręcznościowa „Straszna Epidemia"  V1.2
Projekt Wizualizacja Danych Sensorycznych Kewin Gałuszka rok akademicki 2019/2020
Dokumentacja klasy QCPAxis

Manages a single axis inside a QCustomPlot. Więcej...

#include <qcustomplot.h>

Diagram dziedziczenia dla QCPAxis
Diagram współpracy dla QCPAxis:

Typy publiczne

enum  AxisType { atLeft = 0x01, atRight = 0x02, atTop = 0x04, atBottom = 0x08 }
 
enum  LabelSide { lsInside, lsOutside }
 
enum  ScaleType { stLinear, stLogarithmic }
 
enum  SelectablePart { spNone = 0, spAxis = 0x001, spTickLabels = 0x002, spAxisLabel = 0x004 }
 

Sygnały

void rangeChanged (const QCPRange &newRange)
 
void rangeChanged (const QCPRange &newRange, const QCPRange &oldRange)
 
void scaleTypeChanged (QCPAxis::ScaleType scaleType)
 
void selectionChanged (const QCPAxis::SelectableParts &parts)
 
void selectableChanged (const QCPAxis::SelectableParts &parts)
 
- Sygnały dziedziczone z QCPLayerable
void layerChanged (QCPLayer *newLayer)
 

Metody publiczne

 QCPAxis (QCPAxisRect *parent, AxisType type)
 
virtual ~QCPAxis ()
 
AxisType axisType () const
 
QCPAxisRectaxisRect () const
 
ScaleType scaleType () const
 
const QCPRange range () const
 
bool rangeReversed () const
 
QSharedPointer< QCPAxisTickerticker () const
 
bool ticks () const
 
bool tickLabels () const
 
int tickLabelPadding () const
 
QFont tickLabelFont () const
 
QColor tickLabelColor () const
 
double tickLabelRotation () const
 
LabelSide tickLabelSide () const
 
QString numberFormat () const
 
int numberPrecision () const
 
QVector< double > tickVector () const
 
QVector< QString > tickVectorLabels () const
 
int tickLengthIn () const
 
int tickLengthOut () const
 
bool subTicks () const
 
int subTickLengthIn () const
 
int subTickLengthOut () const
 
QPen basePen () const
 
QPen tickPen () const
 
QPen subTickPen () const
 
QFont labelFont () const
 
QColor labelColor () const
 
QString label () const
 
int labelPadding () const
 
int padding () const
 
int offset () const
 
SelectableParts selectedParts () const
 
SelectableParts selectableParts () const
 
QFont selectedTickLabelFont () const
 
QFont selectedLabelFont () const
 
QColor selectedTickLabelColor () const
 
QColor selectedLabelColor () const
 
QPen selectedBasePen () const
 
QPen selectedTickPen () const
 
QPen selectedSubTickPen () const
 
QCPLineEnding lowerEnding () const
 
QCPLineEnding upperEnding () const
 
QCPGridgrid () const
 
Q_SLOT void setScaleType (QCPAxis::ScaleType type)
 
Q_SLOT void setRange (const QCPRange &range)
 
void setRange (double lower, double upper)
 
void setRange (double position, double size, Qt::AlignmentFlag alignment)
 
void setRangeLower (double lower)
 
void setRangeUpper (double upper)
 
void setRangeReversed (bool reversed)
 
void setTicker (QSharedPointer< QCPAxisTicker > ticker)
 
void setTicks (bool show)
 
void setTickLabels (bool show)
 
void setTickLabelPadding (int padding)
 
void setTickLabelFont (const QFont &font)
 
void setTickLabelColor (const QColor &color)
 
void setTickLabelRotation (double degrees)
 
void setTickLabelSide (LabelSide side)
 
void setNumberFormat (const QString &formatCode)
 
void setNumberPrecision (int precision)
 
void setTickLength (int inside, int outside=0)
 
void setTickLengthIn (int inside)
 
void setTickLengthOut (int outside)
 
void setSubTicks (bool show)
 
void setSubTickLength (int inside, int outside=0)
 
void setSubTickLengthIn (int inside)
 
void setSubTickLengthOut (int outside)
 
void setBasePen (const QPen &pen)
 
void setTickPen (const QPen &pen)
 
void setSubTickPen (const QPen &pen)
 
void setLabelFont (const QFont &font)
 
void setLabelColor (const QColor &color)
 
void setLabel (const QString &str)
 
void setLabelPadding (int padding)
 
void setPadding (int padding)
 
void setOffset (int offset)
 
void setSelectedTickLabelFont (const QFont &font)
 
void setSelectedLabelFont (const QFont &font)
 
void setSelectedTickLabelColor (const QColor &color)
 
void setSelectedLabelColor (const QColor &color)
 
void setSelectedBasePen (const QPen &pen)
 
void setSelectedTickPen (const QPen &pen)
 
void setSelectedSubTickPen (const QPen &pen)
 
Q_SLOT void setSelectableParts (const QCPAxis::SelectableParts &selectableParts)
 
Q_SLOT void setSelectedParts (const QCPAxis::SelectableParts &selectedParts)
 
void setLowerEnding (const QCPLineEnding &ending)
 
void setUpperEnding (const QCPLineEnding &ending)
 
virtual double selectTest (const QPointF &pos, bool onlySelectable, QVariant *details=0) const Q_DECL_OVERRIDE
 
Qt::Orientation orientation () const
 
int pixelOrientation () const
 
void moveRange (double diff)
 
void scaleRange (double factor)
 
void scaleRange (double factor, double center)
 
void setScaleRatio (const QCPAxis *otherAxis, double ratio=1.0)
 
void rescale (bool onlyVisiblePlottables=false)
 
double pixelToCoord (double value) const
 
double coordToPixel (double value) const
 
SelectablePart getPartAt (const QPointF &pos) const
 
QList< QCPAbstractPlottable * > plottables () const
 
QList< QCPGraph * > graphs () const
 
QList< QCPAbstractItem * > items () const
 
- Metody publiczne dziedziczone z QCPLayerable
 QCPLayerable (QCustomPlot *plot, QString targetLayer=QString(), QCPLayerable *parentLayerable=0)
 
virtual ~QCPLayerable ()
 
bool visible () const
 
QCustomPlotparentPlot () const
 
QCPLayerableparentLayerable () const
 
QCPLayerlayer () 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
 

Statyczne metody publiczne

static AxisType marginSideToAxisType (QCP::MarginSide side)
 
static Qt::Orientation orientation (AxisType type)
 
static AxisType opposite (AxisType type)
 

Metody chronione

virtual int calculateMargin ()
 
virtual void applyDefaultAntialiasingHint (QCPPainter *painter) const Q_DECL_OVERRIDE
 
virtual void draw (QCPPainter *painter) Q_DECL_OVERRIDE
 
virtual QCP::Interaction selectionCategory () const Q_DECL_OVERRIDE
 
virtual void selectEvent (QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged) Q_DECL_OVERRIDE
 
virtual void deselectEvent (bool *selectionStateChanged) 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
 
void setupTickVectors ()
 
QPen getBasePen () const
 
QPen getTickPen () const
 
QPen getSubTickPen () const
 
QFont getTickLabelFont () const
 
QFont getLabelFont () const
 
QColor getTickLabelColor () const
 
QColor getLabelColor () const
 
- Metody chronione dziedziczone z QCPLayerable
virtual void parentPlotInitialized (QCustomPlot *parentPlot)
 
virtual QRect clipRect () const
 
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
 

Atrybuty chronione

AxisType mAxisType
 
QCPAxisRectmAxisRect
 
int mPadding
 
Qt::Orientation mOrientation
 
SelectableParts mSelectableParts
 
SelectableParts mSelectedParts
 
QPen mBasePen
 
QPen mSelectedBasePen
 
QString mLabel
 
QFont mLabelFont
 
QFont mSelectedLabelFont
 
QColor mLabelColor
 
QColor mSelectedLabelColor
 
bool mTickLabels
 
QFont mTickLabelFont
 
QFont mSelectedTickLabelFont
 
QColor mTickLabelColor
 
QColor mSelectedTickLabelColor
 
int mNumberPrecision
 
QLatin1Char mNumberFormatChar
 
bool mNumberBeautifulPowers
 
bool mTicks
 
bool mSubTicks
 
QPen mTickPen
 
QPen mSelectedTickPen
 
QPen mSubTickPen
 
QPen mSelectedSubTickPen
 
QCPRange mRange
 
bool mRangeReversed
 
ScaleType mScaleType
 
QCPGridmGrid
 
QCPAxisPainterPrivatemAxisPainter
 
QSharedPointer< QCPAxisTickermTicker
 
QVector< double > mTickVector
 
QVector< QString > mTickVectorLabels
 
QVector< double > mSubTickVector
 
bool mCachedMarginValid
 
int mCachedMargin
 
bool mDragging
 
QCPRange mDragStartRange
 
QCP::AntialiasedElements mAADragBackup
 
QCP::AntialiasedElements mNotAADragBackup
 
- Atrybuty chronione dziedziczone z QCPLayerable
bool mVisible
 
QCustomPlotmParentPlot
 
QPointer< QCPLayerablemParentLayerable
 
QCPLayermLayer
 
bool mAntialiased
 

Przyjaciele

class QCustomPlot
 
class QCPGrid
 
class QCPAxisRect
 

Opis szczegółowy

Manages a single axis inside a QCustomPlot.

Usually doesn't need to be instantiated externally. Access QCustomPlot's default four axes via QCustomPlot::xAxis (bottom), QCustomPlot::yAxis (left), QCustomPlot::xAxis2 (top) and QCustomPlot::yAxis2 (right).

Axes are always part of an axis rect, see QCPAxisRect.

Naming convention of axis parts


Overview of the spacings and paddings that define the geometry of an axis. The dashed gray line on the left represents the QCustomPlot widget border.

Each axis holds an instance of QCPAxisTicker which is used to generate the tick coordinates and tick labels. You can access the currently installed ticker or set a new one (possibly one of the specialized subclasses, or your own subclass) via setTicker. For details, see the documentation of QCPAxisTicker.

Definicja w linii 1919 pliku qcustomplot.h.

Dokumentacja składowych wyliczanych

◆ AxisType

Defines at which side of the axis rect the axis will appear. This also affects how the tick marks are drawn, on which side the labels are placed etc.

Wartości wyliczeń
atLeft 

0x01 Axis is vertical and on the left side of the axis rect

atRight 

0x02 Axis is vertical and on the right side of the axis rect

atTop 

0x04 Axis is horizontal and on the top side of the axis rect

atBottom 

0x08 Axis is horizontal and on the bottom side of the axis rect

Definicja w linii 1972 pliku qcustomplot.h.

◆ LabelSide

Defines on which side of the axis the tick labels (numbers) shall appear.

Zobacz również
setTickLabelSide
Wartości wyliczeń
lsInside 

Tick labels will be displayed inside the axis rect and clipped to the inner axis rect.

lsOutside 

Tick labels will be displayed outside the axis rect.

Definicja w linii 1985 pliku qcustomplot.h.

◆ ScaleType

Defines the scale of an axis.

Zobacz również
setScaleType
Wartości wyliczeń
stLinear 

Linear scaling.

stLogarithmic 

Logarithmic scaling with correspondingly transformed axis coordinates (possibly also setTicker to a QCPAxisTickerLog instance).

Definicja w linii 1993 pliku qcustomplot.h.

◆ SelectablePart

Defines the selectable parts of an axis.

Zobacz również
setSelectableParts, setSelectedParts
Wartości wyliczeń
spNone 

None of the selectable parts.

spAxis 

The axis backbone and tick marks.

spTickLabels 

Tick labels (numbers) of this axis (as a whole, not individually)

spAxisLabel 

The axis label.

Definicja w linii 2001 pliku qcustomplot.h.

Dokumentacja konstruktora i destruktora

◆ QCPAxis()

QCPAxis::QCPAxis ( QCPAxisRect parent,
AxisType  type 
)
explicit

Constructs an Axis instance of Type type for the axis rect parent.

Usually it isn't necessary to instantiate axes directly, because you can let QCustomPlot create them for you with QCPAxisRect::addAxis. If you want to use own QCPAxis-subclasses however, create them manually and then inject them also via QCPAxisRect::addAxis.

Definicja w linii 7506 pliku qcustomplot.cpp.

Oto graf wywołań dla tej funkcji:

◆ ~QCPAxis()

QCPAxis::~QCPAxis ( )
virtual

Definicja w linii 7574 pliku qcustomplot.cpp.

Dokumentacja funkcji składowych

◆ applyDefaultAntialiasingHint()

void QCPAxis::applyDefaultAntialiasingHint ( QCPPainter painter) const
protectedvirtual

Implementuje QCPLayerable.

Definicja w linii 8956 pliku qcustomplot.cpp.

Oto graf wywołań dla tej funkcji:

◆ axisRect()

QCPAxisRect* QCPAxis::axisRect ( ) const
inline

Definicja w linii 2015 pliku qcustomplot.h.

Oto graf wywoływań tej funkcji:

◆ axisType()

AxisType QCPAxis::axisType ( ) const
inline

Definicja w linii 2014 pliku qcustomplot.h.

Oto graf wywoływań tej funkcji:

◆ basePen()

QPen QCPAxis::basePen ( ) const
inline

Definicja w linii 2036 pliku qcustomplot.h.

◆ calculateMargin()

int QCPAxis::calculateMargin ( )
protectedvirtual

Definicja w linii 9117 pliku qcustomplot.cpp.

Oto graf wywołań dla tej funkcji:

◆ coordToPixel()

double QCPAxis::coordToPixel ( double  value) const

Transforms value, in coordinates of the axis, to pixel coordinates of the QCustomPlot widget.

Definicja w linii 8604 pliku qcustomplot.cpp.

Oto graf wywołań dla tej funkcji:
Oto graf wywoływań tej funkcji:

◆ deselectEvent()

void QCPAxis::deselectEvent ( bool *  selectionStateChanged)
protectedvirtual

Reimplementowana z QCPLayerable.

Definicja w linii 8802 pliku qcustomplot.cpp.

Oto graf wywołań dla tej funkcji:

◆ draw()

void QCPAxis::draw ( QCPPainter painter)
protectedvirtual

Implementuje QCPLayerable.

Definicja w linii 8967 pliku qcustomplot.cpp.

Oto graf wywołań dla tej funkcji:

◆ getBasePen()

QPen QCPAxis::getBasePen ( ) const
protected

Definicja w linii 9038 pliku qcustomplot.cpp.

Oto graf wywoływań tej funkcji:

◆ getLabelColor()

QColor QCPAxis::getLabelColor ( ) const
protected

Definicja w linii 9098 pliku qcustomplot.cpp.

Oto graf wywoływań tej funkcji:

◆ getLabelFont()

QFont QCPAxis::getLabelFont ( ) const
protected

Definicja w linii 9078 pliku qcustomplot.cpp.

Oto graf wywoływań tej funkcji:

◆ getPartAt()

QCPAxis::SelectablePart QCPAxis::getPartAt ( const QPointF &  pos) const

Returns the part of the axis that is hit by pos (in pixels). The return value of this function is independent of the user-selectable parts defined with setSelectableParts. Further, this function does not change the current selection state of the axis.

If the axis is not visible (setVisible), this function always returns spNone.

Zobacz również
setSelectedParts, setSelectableParts, QCustomPlot::setInteractions

Definicja w linii 8662 pliku qcustomplot.cpp.

Oto graf wywołań dla tej funkcji:
Oto graf wywoływań tej funkcji:

◆ getSubTickPen()

QPen QCPAxis::getSubTickPen ( ) const
protected

Definicja w linii 9058 pliku qcustomplot.cpp.

Oto graf wywoływań tej funkcji:

◆ getTickLabelColor()

QColor QCPAxis::getTickLabelColor ( ) const
protected

Definicja w linii 9088 pliku qcustomplot.cpp.

Oto graf wywoływań tej funkcji:

◆ getTickLabelFont()

QFont QCPAxis::getTickLabelFont ( ) const
protected

Definicja w linii 9068 pliku qcustomplot.cpp.

Oto graf wywoływań tej funkcji:

◆ getTickPen()

QPen QCPAxis::getTickPen ( ) const
protected

Definicja w linii 9048 pliku qcustomplot.cpp.

Oto graf wywoływań tej funkcji:

◆ graphs()

QList< QCPGraph * > QCPAxis::graphs ( ) const

Returns a list of all the graphs that have this axis as key or value axis.

Zobacz również
plottables, items

Definicja w linii 8715 pliku qcustomplot.cpp.

◆ grid()

QCPGrid * QCPAxis::grid ( ) const
inline

Returns the QCPGrid instance belonging to this axis. Access it to set details about the way the grid is displayed.

Definicja w linii 2056 pliku qcustomplot.h.

Oto graf wywoływań tej funkcji:

◆ items()

QList< QCPAbstractItem * > QCPAxis::items ( ) const

Returns a list of all the items that are associated with this axis. An item is considered associated with an axis if at least one of its positions uses the axis as key or value axis.

Zobacz również
plottables, graphs

Definicja w linii 8734 pliku qcustomplot.cpp.

◆ label()

QString QCPAxis::label ( ) const
inline

Definicja w linii 2041 pliku qcustomplot.h.

◆ labelColor()

QColor QCPAxis::labelColor ( ) const
inline

Definicja w linii 2040 pliku qcustomplot.h.

◆ labelFont()

QFont QCPAxis::labelFont ( ) const
inline

Definicja w linii 2039 pliku qcustomplot.h.

◆ labelPadding()

int QCPAxis::labelPadding ( ) const

Definicja w linii 7637 pliku qcustomplot.cpp.

◆ lowerEnding()

QCPLineEnding QCPAxis::lowerEnding ( ) const

Definicja w linii 7649 pliku qcustomplot.cpp.

◆ marginSideToAxisType()

QCPAxis::AxisType QCPAxis::marginSideToAxisType ( QCP::MarginSide  side)
static

Transforms a margin side to the logically corresponding axis type. (QCP::msLeft to QCPAxis::atLeft, QCP::msRight to QCPAxis::atRight, etc.)

Definicja w linii 8758 pliku qcustomplot.cpp.

Oto graf wywoływań tej funkcji:

◆ mouseMoveEvent()

void QCPAxis::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.

Zobacz również
mousePressEvent, mouseReleaseEvent, mouseDoubleClickEvent, wheelEvent

Reimplementowana z QCPLayerable.

Definicja w linii 8863 pliku qcustomplot.cpp.

Oto graf wywołań dla tej funkcji:

◆ mousePressEvent()

void QCPAxis::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().

Zobacz również
mouseMoveEvent, mouseReleaseEvent, mouseDoubleClickEvent, wheelEvent

Reimplementowana z QCPLayerable.

Definicja w linii 8825 pliku qcustomplot.cpp.

Oto graf wywołań dla tej funkcji:

◆ mouseReleaseEvent()

void QCPAxis::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.

Zobacz również
mousePressEvent, mouseMoveEvent, mouseDoubleClickEvent, wheelEvent

Reimplementowana z QCPLayerable.

Definicja w linii 8897 pliku qcustomplot.cpp.

Oto graf wywołań dla tej funkcji:

◆ moveRange()

void QCPAxis::moveRange ( double  diff)

If the scale type (setScaleType) is stLinear, diff is added to the lower and upper bounds of the range. The range is simply moved by diff.

If the scale type is stLogarithmic, the range bounds are multiplied by diff. This corresponds to an apparent "linear" move in logarithmic scaling by a distance of log(diff).

Definicja w linii 8415 pliku qcustomplot.cpp.

◆ numberFormat()

QString QCPAxis::numberFormat ( ) const

Definicja w linii 7599 pliku qcustomplot.cpp.

Oto graf wywoływań tej funkcji:

◆ numberPrecision()

int QCPAxis::numberPrecision ( ) const
inline

Definicja w linii 2028 pliku qcustomplot.h.

Oto graf wywoływań tej funkcji:

◆ offset()

int QCPAxis::offset ( ) const

Definicja w linii 7643 pliku qcustomplot.cpp.

Oto graf wywoływań tej funkcji:

◆ opposite()

QCPAxis::AxisType QCPAxis::opposite ( QCPAxis::AxisType  type)
static

Returns the axis type that describes the opposite axis of an axis with the specified type.

Definicja w linii 8775 pliku qcustomplot.cpp.

◆ orientation() [1/2]

Qt::Orientation QCPAxis::orientation ( ) const
inline

Returns the orientation of this axis. The axis orientation (horizontal or vertical) is deduced from the axis type (left, top, right or bottom).

Zobacz również
orientation(AxisType type), pixelOrientation

Definicja w linii 2108 pliku qcustomplot.h.

Oto graf wywoływań tej funkcji:

◆ orientation() [2/2]

static Qt::Orientation QCPAxis::orientation ( AxisType  type)
inlinestatic

Returns the orientation of the specified axis type

Zobacz również
orientation(), pixelOrientation

Definicja w linii 2123 pliku qcustomplot.h.

◆ padding()

int QCPAxis::padding ( ) const
inline

Definicja w linii 2043 pliku qcustomplot.h.

Oto graf wywoływań tej funkcji:

◆ pixelOrientation()

int QCPAxis::pixelOrientation ( ) const
inline

Returns which direction points towards higher coordinate values/keys, in pixel space.

This method returns either 1 or -1. If it returns 1, then going in the positive direction along the orientation of the axis in pixels corresponds to going from lower to higher axis coordinates. On the other hand, if this method returns -1, going to smaller pixel values corresponds to going from lower to higher axis coordinates.

For example, this is useful to easily shift axis coordinates by a certain amount given in pixels, without having to care about reversed or vertically aligned axes:

double newKey = keyAxis->pixelToCoord(keyAxis->coordToPixel(oldKey)+10*keyAxis->pixelOrientation());

newKey will then contain a key that is ten pixels towards higher keys, starting from oldKey.

Definicja w linii 2109 pliku qcustomplot.h.

Oto graf wywoływań tej funkcji:

◆ pixelToCoord()

double QCPAxis::pixelToCoord ( double  value) const

Transforms value, in pixel coordinates of the QCustomPlot widget, to axis coordinates.

Definicja w linii 8566 pliku qcustomplot.cpp.

Oto graf wywołań dla tej funkcji:
Oto graf wywoływań tej funkcji:

◆ plottables()

QList< QCPAbstractPlottable * > QCPAxis::plottables ( ) const

Returns a list of all the plottables that have this axis as key or value axis.

If you are only interested in plottables of type QCPGraph, see graphs.

Zobacz również
graphs, items

Definicja w linii 8697 pliku qcustomplot.cpp.

Oto graf wywoływań tej funkcji:

◆ range()

const QCPRange QCPAxis::range ( ) const
inline

Definicja w linii 2017 pliku qcustomplot.h.

Oto graf wywoływań tej funkcji:

◆ rangeChanged [1/2]

void QCPAxis::rangeChanged ( const QCPRange newRange)
signal

This signal is emitted when the range of this axis has changed. You can connect it to the setRange slot of another axis to communicate the new range to the other axis, in order for it to be synchronized.

You may also manipulate/correct the range with setRange in a slot connected to this signal. This is useful if for example a maximum range span shall not be exceeded, or if the lower/upper range shouldn't go beyond certain values (see QCPRange::bounded). For example, the following slot would limit the x axis to ranges between 0 and 10:

customPlot->xAxis->setRange(newRange.bounded(0, 10))
Oto graf wywoływań tej funkcji:

◆ rangeChanged [2/2]

void QCPAxis::rangeChanged ( const QCPRange newRange,
const QCPRange oldRange 
)
signal

To jest metoda przeciążona, udostępniona dla wygody. Różni się od powyższej metody tylko zestawem akceptowanych argumentów.

Additionally to the new range, this signal also provides the previous range held by the axis as oldRange.

◆ rangeReversed()

bool QCPAxis::rangeReversed ( ) const
inline

Definicja w linii 2018 pliku qcustomplot.h.

Oto graf wywoływań tej funkcji:

◆ rescale()

void QCPAxis::rescale ( bool  onlyVisiblePlottables = false)

Changes the axis range such that all plottables associated with this axis are fully visible in that dimension.

Zobacz również
QCPAbstractPlottable::rescaleAxes, QCustomPlot::rescaleAxes

Definicja w linii 8517 pliku qcustomplot.cpp.

Oto graf wywołań dla tej funkcji:
Oto graf wywoływań tej funkcji:

◆ scaleRange() [1/2]

void QCPAxis::scaleRange ( double  factor)

Scales the range of this axis by factor around the center of the current axis range. For example, if factor is 2.0, then the axis range will double its size, and the point at the axis range center won't have changed its position in the QCustomPlot widget (i.e. coordinates around the center will have moved symmetrically closer).

If you wish to scale around a different coordinate than the current axis range center, use the overload scaleRange(double factor, double center).

Definicja w linii 8440 pliku qcustomplot.cpp.

Oto graf wywołań dla tej funkcji:
Oto graf wywoływań tej funkcji:

◆ scaleRange() [2/2]

void QCPAxis::scaleRange ( double  factor,
double  center 
)

To jest metoda przeciążona, udostępniona dla wygody. Różni się od powyższej metody tylko zestawem akceptowanych argumentów.

Scales the range of this axis by factor around the coordinate center. For example, if factor is 2.0, center is 1.0, then the axis range will double its size, and the point at coordinate 1.0 won't have changed its position in the QCustomPlot widget (i.e. coordinates around 1.0 will have moved symmetrically closer to 1.0).

Zobacz również
scaleRange(double factor)

Definicja w linii 8454 pliku qcustomplot.cpp.

Oto graf wywołań dla tej funkcji:

◆ scaleType()

ScaleType QCPAxis::scaleType ( ) const
inline

Definicja w linii 2016 pliku qcustomplot.h.

Oto graf wywoływań tej funkcji:

◆ scaleTypeChanged

void QCPAxis::scaleTypeChanged ( QCPAxis::ScaleType  scaleType)
signal

This signal is emitted when the scale type changes, by calls to setScaleType

Oto graf wywoływań tej funkcji:

◆ selectableChanged

void QCPAxis::selectableChanged ( const QCPAxis::SelectableParts &  parts)
signal

This signal is emitted when the selectability changes, by calls to setSelectableParts

Oto graf wywoływań tej funkcji:

◆ selectableParts()

SelectableParts QCPAxis::selectableParts ( ) const
inline

Definicja w linii 2046 pliku qcustomplot.h.

◆ selectedBasePen()

QPen QCPAxis::selectedBasePen ( ) const
inline

Definicja w linii 2051 pliku qcustomplot.h.

◆ selectedLabelColor()

QColor QCPAxis::selectedLabelColor ( ) const
inline

Definicja w linii 2050 pliku qcustomplot.h.

◆ selectedLabelFont()

QFont QCPAxis::selectedLabelFont ( ) const
inline

Definicja w linii 2048 pliku qcustomplot.h.

◆ selectedParts()

SelectableParts QCPAxis::selectedParts ( ) const
inline

Definicja w linii 2045 pliku qcustomplot.h.

Oto graf wywoływań tej funkcji:

◆ selectedSubTickPen()

QPen QCPAxis::selectedSubTickPen ( ) const
inline

Definicja w linii 2053 pliku qcustomplot.h.

◆ selectedTickLabelColor()

QColor QCPAxis::selectedTickLabelColor ( ) const
inline

Definicja w linii 2049 pliku qcustomplot.h.

◆ selectedTickLabelFont()

QFont QCPAxis::selectedTickLabelFont ( ) const
inline

Definicja w linii 2047 pliku qcustomplot.h.

◆ selectedTickPen()

QPen QCPAxis::selectedTickPen ( ) const
inline

Definicja w linii 2052 pliku qcustomplot.h.

◆ selectEvent()

void QCPAxis::selectEvent ( QMouseEvent *  event,
bool  additive,
const QVariant &  details,
bool *  selectionStateChanged 
)
protectedvirtual

Reimplementowana z QCPLayerable.

Definicja w linii 8788 pliku qcustomplot.cpp.

Oto graf wywołań dla tej funkcji:

◆ selectionCategory()

QCP::Interaction QCPAxis::selectionCategory ( ) const
protectedvirtual

Reimplementowana z QCPLayerable.

Definicja w linii 9161 pliku qcustomplot.cpp.

◆ selectionChanged

void QCPAxis::selectionChanged ( const QCPAxis::SelectableParts &  parts)
signal

This signal is emitted when the selection state of this axis has changed, either by user interaction or by a direct call to setSelectedParts.

Oto graf wywoływań tej funkcji:

◆ selectTest()

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

This function is used to decide whether a click hits a layerable object or not.

pos is a point in pixel coordinates on the QCustomPlot surface. This function returns the shortest pixel distance of this point to the object. If the object is either invisible or the distance couldn't be determined, -1.0 is returned. Further, if onlySelectable is true and the object is not selectable, -1.0 is returned, too.

If the object is represented not by single lines but by an area like a QCPItemText or the bars of a QCPBars plottable, a click inside the area should also be considered a hit. In these cases this function thus returns a constant value greater zero but still below the parent plot's selection tolerance. (typically the selectionTolerance multiplied by 0.99).

Providing a constant value for area objects allows selecting line objects even when they are obscured by such area objects, by clicking close to the lines (i.e. closer than 0.99*selectionTolerance).

The actual setting of the selection state is not done by this function. This is handled by the parent QCustomPlot when the mouseReleaseEvent occurs, and the finally selected object is notified via the selectEvent/ deselectEvent methods.

details is an optional output parameter. Every layerable subclass may place any information in details. This information will be passed to selectEvent when the parent QCustomPlot decides on the basis of this selectTest call, that the object was successfully selected. The subsequent call to selectEvent will carry the details. This is useful for multi-part objects (like QCPAxis). This way, a possibly complex calculation to decide which part was clicked is only done once in selectTest. The result (i.e. the actually clicked part) can then be placed in details. So in the subsequent selectEvent, the decision which part was selected doesn't have to be done a second time for a single selection operation.

In the case of 1D Plottables (QCPAbstractPlottable1D, like QCPGraph or QCPBars) details will be set to a QCPDataSelection, describing the closest data point to pos.

You may pass 0 as details to indicate that you are not interested in those selection details.

Zobacz również
selectEvent, deselectEvent, mousePressEvent, wheelEvent, QCustomPlot::setInteractions, QCPAbstractPlottable1D::selectTestRect

Reimplementowana z QCPLayerable.

Definicja w linii 8678 pliku qcustomplot.cpp.

Oto graf wywołań dla tej funkcji:

◆ setBasePen()

void QCPAxis::setBasePen ( const QPen &  pen)

Sets the pen, the axis base line is drawn with.

Zobacz również
setTickPen, setSubTickPen

Definicja w linii 8192 pliku qcustomplot.cpp.

◆ setLabel()

void QCPAxis::setLabel ( const QString &  str)

Sets the text of the axis label that will be shown below/above or next to the axis, depending on its orientation. To disable axis labels, pass an empty string as str.

Definicja w linii 8245 pliku qcustomplot.cpp.

◆ setLabelColor()

void QCPAxis::setLabelColor ( const QColor &  color)

Sets the color of the axis label.

Zobacz również
setLabelFont

Definicja w linii 8236 pliku qcustomplot.cpp.

◆ setLabelFont()

void QCPAxis::setLabelFont ( const QFont &  font)

Sets the font of the axis label.

Zobacz również
setLabelColor

Definicja w linii 8222 pliku qcustomplot.cpp.

◆ setLabelPadding()

void QCPAxis::setLabelPadding ( int  padding)

Sets the distance between the tick labels and the axis label.

Zobacz również
setTickLabelPadding, setPadding

Definicja w linii 8259 pliku qcustomplot.cpp.

Oto graf wywołań dla tej funkcji:
Oto graf wywoływań tej funkcji:

◆ setLowerEnding()

void QCPAxis::setLowerEnding ( const QCPLineEnding ending)

Sets the style for the lower axis ending. See the documentation of QCPLineEnding for available styles.

For horizontal axes, this method refers to the left ending, for vertical axes the bottom ending. Note that this meaning does not change when the axis range is reversed with setRangeReversed.

Zobacz również
setUpperEnding

Definicja w linii 8388 pliku qcustomplot.cpp.

Oto graf wywoływań tej funkcji:

◆ setNumberFormat()

void QCPAxis::setNumberFormat ( const QString &  formatCode)

Sets the number format for the numbers in tick labels. This formatCode is an extended version of the format code used e.g. by QString::number() and QLocale::toString(). For reference about that, see the "Argument Formats" section in the detailed description of the QString class.

formatCode is a string of one, two or three characters. The first character is identical to the normal format code used by Qt. In short, this means: 'e'/'E' scientific format, 'f' fixed format, 'g'/'G' scientific or fixed, whichever is shorter.

The second and third characters are optional and specific to QCustomPlot:
If the first char was 'e' or 'g', numbers are/might be displayed in the scientific format, e.g. "5.5e9", which is ugly in a plot. So when the second char of formatCode is set to 'b' (for "beautiful"), those exponential numbers are formatted in a more natural way, i.e. "5.5 [multiplication sign] 10 [superscript] 9". By default, the multiplication sign is a centered dot. If instead a cross should be shown (as is usual in the USA), the third char of formatCode can be set to 'c'. The inserted multiplication signs are the UTF-8 characters 215 (0xD7) for the cross and 183 (0xB7) for the dot.

Examples for formatCode:

  • g normal format code behaviour. If number is small, fixed format is used, if number is large, normal scientific format is used
  • gb If number is small, fixed format is used, if number is large, scientific format is used with beautifully typeset decimal powers and a dot as multiplication sign
  • ebc All numbers are in scientific format with beautifully typeset decimal power and a cross as multiplication sign
  • fb illegal format code, since fixed format doesn't support (or need) beautifully typeset decimal powers. Format code will be reduced to 'f'.
  • hello illegal format code, since first char is not 'e', 'E', 'f', 'g' or 'G'. Current format code will not be changed.

Definicja w linii 8014 pliku qcustomplot.cpp.

Oto graf wywoływań tej funkcji:

◆ setNumberPrecision()

void QCPAxis::setNumberPrecision ( int  precision)

Sets the precision of the tick label numbers. See QLocale::toString(double i, char f, int prec) for details. The effect of precisions are most notably for number Formats starting with 'e', see setNumberFormat

Definicja w linii 8074 pliku qcustomplot.cpp.

Oto graf wywoływań tej funkcji:

◆ setOffset()

void QCPAxis::setOffset ( int  offset)

Sets the offset the axis has to its axis rect side.

If an axis rect side has multiple axes and automatic margin calculation is enabled for that side, only the offset of the inner most axis has meaning (even if it is set to be invisible). The offset of the other, outer axes is controlled automatically, to place them at appropriate positions.

Definicja w linii 8295 pliku qcustomplot.cpp.

Oto graf wywołań dla tej funkcji:

◆ setPadding()

void QCPAxis::setPadding ( int  padding)

Sets the padding of the axis.

When QCPAxisRect::setAutoMargins is enabled, the padding is the additional outer most space, that is left blank.

The axis padding has no meaning if QCPAxisRect::setAutoMargins is disabled.

Zobacz również
setLabelPadding, setTickLabelPadding

Definicja w linii 8278 pliku qcustomplot.cpp.

Oto graf wywołań dla tej funkcji:
Oto graf wywoływań tej funkcji:

◆ setRange() [1/3]

void QCPAxis::setRange ( const QCPRange range)

Sets the range of the axis.

This slot may be connected with the rangeChanged signal of another axis so this axis is always synchronized with the other axis range, when it changes.

To invert the direction of an axis, use setRangeReversed.

Definicja w linii 7694 pliku qcustomplot.cpp.

Oto graf wywołań dla tej funkcji:
Oto graf wywoływań tej funkcji:

◆ setRange() [2/3]

void QCPAxis::setRange ( double  lower,
double  upper 
)

To jest metoda przeciążona, udostępniona dla wygody. Różni się od powyższej metody tylko zestawem akceptowanych argumentów.

Sets the lower and upper bound of the axis range.

To invert the direction of an axis, use setRangeReversed.

There is also a slot to set a range, see setRange(const QCPRange &range).

Definicja w linii 7764 pliku qcustomplot.cpp.

Oto graf wywołań dla tej funkcji:

◆ setRange() [3/3]

void QCPAxis::setRange ( double  position,
double  size,
Qt::AlignmentFlag  alignment 
)

To jest metoda przeciążona, udostępniona dla wygody. Różni się od powyższej metody tylko zestawem akceptowanych argumentów.

Sets the range of the axis.

The position coordinate indicates together with the alignment parameter, where the new range will be positioned. size defines the size of the new axis range. alignment may be Qt::AlignLeft, Qt::AlignRight or Qt::AlignCenter. This will cause the left border, right border, or center of the range to be aligned with position. Any other values of alignment will default to Qt::AlignCenter.

Definicja w linii 7795 pliku qcustomplot.cpp.

Oto graf wywołań dla tej funkcji:

◆ setRangeLower()

void QCPAxis::setRangeLower ( double  lower)

Sets the lower bound of the axis range. The upper bound is not changed.

Zobacz również
setRange

Definicja w linii 7809 pliku qcustomplot.cpp.

Oto graf wywołań dla tej funkcji:

◆ setRangeReversed()

void QCPAxis::setRangeReversed ( bool  reversed)

Sets whether the axis range (direction) is displayed reversed. Normally, the values on horizontal axes increase left to right, on vertical axes bottom to top. When reversed is set to true, the direction of increasing values is inverted.

Note that the range and data interface stays the same for reversed axes, e.g. the lower part of the setRange interface will still reference the mathematically smaller number than the upper part.

Definicja w linii 7858 pliku qcustomplot.cpp.

Oto graf wywoływań tej funkcji:

◆ setRangeUpper()

void QCPAxis::setRangeUpper ( double  upper)

Sets the upper bound of the axis range. The lower bound is not changed.

Zobacz również
setRange

Definicja w linii 7831 pliku qcustomplot.cpp.

Oto graf wywołań dla tej funkcji:

◆ setScaleRatio()

void QCPAxis::setScaleRatio ( const QCPAxis otherAxis,
double  ratio = 1.0 
)

Scales the range of this axis to have a certain scale ratio to otherAxis. The scaling will be done around the center of the current axis range.

For example, if ratio is 1, this axis is the yAxis and otherAxis is xAxis, graphs plotted with those axes will appear in a 1:1 aspect ratio, independent of the aspect ratio the axis rect has.

This is an operation that changes the range of this axis once, it doesn't fix the scale ratio indefinitely. Note that calling this function in the constructor of the QCustomPlot's parent won't have the desired effect, since the widget dimensions aren't defined yet, and a resizeEvent will follow.

Definicja w linii 8493 pliku qcustomplot.cpp.

Oto graf wywołań dla tej funkcji:

◆ setScaleType()

void QCPAxis::setScaleType ( QCPAxis::ScaleType  type)

Sets whether the axis uses a linear scale or a logarithmic scale.

Note that this method controls the coordinate transformation. For logarithmic scales, you will likely also want to use a logarithmic tick spacing and labeling, which can be achieved by setting the axis ticker to an instance of QCPAxisTickerLog :

See the documentation of QCPAxisTickerLog about the details of logarithmic axis tick creation.

setNumberPrecision

Definicja w linii 7674 pliku qcustomplot.cpp.

Oto graf wywołań dla tej funkcji:
Oto graf wywoływań tej funkcji:

◆ setSelectableParts()

void QCPAxis::setSelectableParts ( const QCPAxis::SelectableParts &  selectableParts)

Sets whether the user can (de-)select the parts in selectable by clicking on the QCustomPlot surface. (When QCustomPlot::setInteractions contains iSelectAxes.)

However, even when selectable is set to a value not allowing the selection of a specific part, it is still possible to set the selection of this part manually, by calling setSelectedParts directly.

Zobacz również
SelectablePart, setSelectedParts

Definicja w linii 7722 pliku qcustomplot.cpp.

Oto graf wywoływań tej funkcji:

◆ setSelectedBasePen()

void QCPAxis::setSelectedBasePen ( const QPen &  pen)

Sets the pen that is used to draw the axis base line when selected.

Zobacz również
setBasePen, setSelectableParts, setSelectedParts, QCustomPlot::setInteractions

Definicja w linii 8353 pliku qcustomplot.cpp.

◆ setSelectedLabelColor()

void QCPAxis::setSelectedLabelColor ( const QColor &  color)

Sets the color that is used for the axis label when it is selected.

Zobacz również
setLabelColor, setSelectableParts, setSelectedParts, QCustomPlot::setInteractions

Definicja w linii 8343 pliku qcustomplot.cpp.

◆ setSelectedLabelFont()

void QCPAxis::setSelectedLabelFont ( const QFont &  font)

Sets the font that is used for the axis label when it is selected.

Zobacz również
setLabelFont, setSelectableParts, setSelectedParts, QCustomPlot::setInteractions

Definicja w linii 8319 pliku qcustomplot.cpp.

◆ setSelectedParts()

void QCPAxis::setSelectedParts ( const QCPAxis::SelectableParts &  selectedParts)

Sets the selected state of the respective axis parts described by SelectablePart. When a part is selected, it uses a different pen/font.

The entire selection mechanism for axes is handled automatically when QCustomPlot::setInteractions contains iSelectAxes. You only need to call this function when you wish to change the selection state manually.

This function can change the selection state of a part, independent of the setSelectableParts setting.

emits the selectionChanged signal when selected is different from the previous selection state.

Zobacz również
SelectablePart, setSelectableParts, selectTest, setSelectedBasePen, setSelectedTickPen, setSelectedSubTickPen, setSelectedTickLabelFont, setSelectedLabelFont, setSelectedTickLabelColor, setSelectedLabelColor

Definicja w linii 7746 pliku qcustomplot.cpp.

Oto graf wywoływań tej funkcji:

◆ setSelectedSubTickPen()

void QCPAxis::setSelectedSubTickPen ( const QPen &  pen)

Sets the pen that is used to draw the subticks when selected.

Zobacz również
setSubTickPen, setSelectableParts, setSelectedParts, QCustomPlot::setInteractions

Definicja w linii 8373 pliku qcustomplot.cpp.

◆ setSelectedTickLabelColor()

void QCPAxis::setSelectedTickLabelColor ( const QColor &  color)

Sets the color that is used for tick labels when they are selected.

Zobacz również
setTickLabelColor, setSelectableParts, setSelectedParts, QCustomPlot::setInteractions

Definicja w linii 8330 pliku qcustomplot.cpp.

◆ setSelectedTickLabelFont()

void QCPAxis::setSelectedTickLabelFont ( const QFont &  font)

Sets the font that is used for tick labels when they are selected.

Zobacz również
setTickLabelFont, setSelectableParts, setSelectedParts, QCustomPlot::setInteractions

Definicja w linii 8305 pliku qcustomplot.cpp.

◆ setSelectedTickPen()

void QCPAxis::setSelectedTickPen ( const QPen &  pen)

Sets the pen that is used to draw the (major) ticks when selected.

Zobacz również
setTickPen, setSelectableParts, setSelectedParts, QCustomPlot::setInteractions

Definicja w linii 8363 pliku qcustomplot.cpp.

◆ setSubTickLength()

void QCPAxis::setSubTickLength ( int  inside,
int  outside = 0 
)

Sets the length of the subticks in pixels. inside is the length the subticks will reach inside the plot and outside is the length they will reach outside the plot. If outside is greater than zero, the tick labels and axis label will increase their distance to the axis accordingly, so they won't collide with the ticks.

Zobacz również
setTickLength, setSubTickLengthIn, setSubTickLengthOut

Definicja w linii 8151 pliku qcustomplot.cpp.

Oto graf wywołań dla tej funkcji:

◆ setSubTickLengthIn()

void QCPAxis::setSubTickLengthIn ( int  inside)

Sets the length of the inward subticks in pixels. inside is the length the subticks will reach inside the plot.

Zobacz również
setSubTickLengthOut, setSubTickLength, setTickLength

Definicja w linii 8163 pliku qcustomplot.cpp.

Oto graf wywoływań tej funkcji:

◆ setSubTickLengthOut()

void QCPAxis::setSubTickLengthOut ( int  outside)

Sets the length of the outward subticks in pixels. outside is the length the subticks will reach outside the plot. If outside is greater than zero, the tick labels will increase their distance to the axis accordingly, so they won't collide with the ticks.

Zobacz również
setSubTickLengthIn, setSubTickLength, setTickLength

Definicja w linii 8178 pliku qcustomplot.cpp.

Oto graf wywoływań tej funkcji:

◆ setSubTickPen()

void QCPAxis::setSubTickPen ( const QPen &  pen)

Sets the pen, subtick marks will be drawn with.

Zobacz również
setSubTickCount, setSubTickLength, setBasePen

Definicja w linii 8212 pliku qcustomplot.cpp.

◆ setSubTicks()

void QCPAxis::setSubTicks ( bool  show)

Sets whether sub tick marks are displayed.

Sub ticks are only potentially visible if (major) ticks are also visible (see setTicks)

Zobacz również
setTicks

Definicja w linii 8134 pliku qcustomplot.cpp.

◆ setTicker()

void QCPAxis::setTicker ( QSharedPointer< QCPAxisTicker ticker)

The axis ticker is responsible for generating the tick positions and tick labels. See the documentation of QCPAxisTicker for details on how to work with axis tickers.

You can change the tick positioning/labeling behaviour of this axis by setting a different QCPAxisTicker subclass using this method. If you only wish to modify the currently installed axis ticker, access it via ticker.

Since the ticker is stored in the axis as a shared pointer, multiple axes may share the same axis ticker simply by passing the same shared pointer to multiple axes.

Zobacz również
ticker

Definicja w linii 7876 pliku qcustomplot.cpp.

Oto graf wywołań dla tej funkcji:

◆ setTickLabelColor()

void QCPAxis::setTickLabelColor ( const QColor &  color)

Sets the color of the tick labels.

Zobacz również
setTickLabels, setTickLabelFont

Definicja w linii 7948 pliku qcustomplot.cpp.

◆ setTickLabelFont()

void QCPAxis::setTickLabelFont ( const QFont &  font)

Sets the font of the tick labels.

Zobacz również
setTickLabels, setTickLabelColor

Definicja w linii 7934 pliku qcustomplot.cpp.

◆ setTickLabelPadding()

void QCPAxis::setTickLabelPadding ( int  padding)

Sets the distance between the axis base line (including any outward ticks) and the tick labels.

Zobacz również
setLabelPadding, setPadding

Definicja w linii 7920 pliku qcustomplot.cpp.

Oto graf wywołań dla tej funkcji:
Oto graf wywoływań tej funkcji:

◆ setTickLabelRotation()

void QCPAxis::setTickLabelRotation ( double  degrees)

Sets the rotation of the tick labels. If degrees is zero, the labels are drawn normally. Else, the tick labels are drawn rotated by degrees clockwise. The specified angle is bound to values from -90 to 90 degrees.

If degrees is exactly -90, 0 or 90, the tick labels are centered on the tick coordinate. For other angles, the label is drawn with an offset such that it seems to point toward or away from the tick mark.

Definicja w linii 7962 pliku qcustomplot.cpp.

◆ setTickLabels()

void QCPAxis::setTickLabels ( bool  show)

Sets whether tick labels are displayed. Tick labels are the numbers drawn next to tick marks.

Definicja w linii 7905 pliku qcustomplot.cpp.

Oto graf wywoływań tej funkcji:

◆ setTickLabelSide()

void QCPAxis::setTickLabelSide ( LabelSide  side)

Sets whether the tick labels (numbers) shall appear inside or outside the axis rect.

The usual and default setting is lsOutside. Very compact plots sometimes require tick labels to be inside the axis rect, to save space. If side is set to lsInside, the tick labels appear on the inside are additionally clipped to the axis rect.

Definicja w linii 7978 pliku qcustomplot.cpp.

◆ setTickLength()

void QCPAxis::setTickLength ( int  inside,
int  outside = 0 
)

Sets the length of the ticks in pixels. inside is the length the ticks will reach inside the plot and outside is the length they will reach outside the plot. If outside is greater than zero, the tick labels and axis label will increase their distance to the axis accordingly, so they won't collide with the ticks.

Zobacz również
setSubTickLength, setTickLengthIn, setTickLengthOut

Definicja w linii 8091 pliku qcustomplot.cpp.

Oto graf wywołań dla tej funkcji:

◆ setTickLengthIn()

void QCPAxis::setTickLengthIn ( int  inside)

Sets the length of the inward ticks in pixels. inside is the length the ticks will reach inside the plot.

Zobacz również
setTickLengthOut, setTickLength, setSubTickLength

Definicja w linii 8103 pliku qcustomplot.cpp.

Oto graf wywoływań tej funkcji:

◆ setTickLengthOut()

void QCPAxis::setTickLengthOut ( int  outside)

Sets the length of the outward ticks in pixels. outside is the length the ticks will reach outside the plot. If outside is greater than zero, the tick labels and axis label will increase their distance to the axis accordingly, so they won't collide with the ticks.

Zobacz również
setTickLengthIn, setTickLength, setSubTickLength

Definicja w linii 8118 pliku qcustomplot.cpp.

Oto graf wywoływań tej funkcji:

◆ setTickPen()

void QCPAxis::setTickPen ( const QPen &  pen)

Sets the pen, tick marks will be drawn with.

Zobacz również
setTickLength, setBasePen

Definicja w linii 8202 pliku qcustomplot.cpp.

◆ setTicks()

void QCPAxis::setTicks ( bool  show)

Sets whether tick marks are displayed.

Note that setting show to false does not imply that tick labels are invisible, too. To achieve that, see setTickLabels.

Zobacz również
setSubTicks

Definicja w linii 7893 pliku qcustomplot.cpp.

Oto graf wywoływań tej funkcji:

◆ setUpperEnding()

void QCPAxis::setUpperEnding ( const QCPLineEnding ending)

Sets the style for the upper axis ending. See the documentation of QCPLineEnding for available styles.

For horizontal axes, this method refers to the right ending, for vertical axes the top ending. Note that this meaning does not change when the axis range is reversed with setRangeReversed.

Zobacz również
setLowerEnding

Definicja w linii 8403 pliku qcustomplot.cpp.

Oto graf wywoływań tej funkcji:

◆ setupTickVectors()

void QCPAxis::setupTickVectors ( )
protected

Definicja w linii 9023 pliku qcustomplot.cpp.

Oto graf wywołań dla tej funkcji:

◆ subTickLengthIn()

int QCPAxis::subTickLengthIn ( ) const

Definicja w linii 7625 pliku qcustomplot.cpp.

◆ subTickLengthOut()

int QCPAxis::subTickLengthOut ( ) const

Definicja w linii 7631 pliku qcustomplot.cpp.

◆ subTickPen()

QPen QCPAxis::subTickPen ( ) const
inline

Definicja w linii 2038 pliku qcustomplot.h.

◆ subTicks()

bool QCPAxis::subTicks ( ) const
inline

Definicja w linii 2033 pliku qcustomplot.h.

Oto graf wywoływań tej funkcji:

◆ ticker()

QSharedPointer< QCPAxisTicker > QCPAxis::ticker ( ) const
inline

Returns a modifiable shared pointer to the currently installed axis ticker. The axis ticker is responsible for generating the tick positions and tick labels of this axis. You can access the QCPAxisTicker with this method and modify basic properties such as the approximate tick count (QCPAxisTicker::setTickCount).

You can gain more control over the axis ticks by setting a different QCPAxisTicker subclass, see the documentation there. A new axis ticker can be set with setTicker.

Since the ticker is stored in the axis as a shared pointer, multiple axes may share the same axis ticker simply by passing the same shared pointer to multiple axes.

Zobacz również
setTicker

Definicja w linii 2019 pliku qcustomplot.h.

Oto graf wywoływań tej funkcji:

◆ tickLabelColor()

QColor QCPAxis::tickLabelColor ( ) const
inline

Definicja w linii 2024 pliku qcustomplot.h.

◆ tickLabelFont()

QFont QCPAxis::tickLabelFont ( ) const
inline

Definicja w linii 2023 pliku qcustomplot.h.

◆ tickLabelPadding()

int QCPAxis::tickLabelPadding ( ) const

Definicja w linii 7581 pliku qcustomplot.cpp.

◆ tickLabelRotation()

double QCPAxis::tickLabelRotation ( ) const

Definicja w linii 7587 pliku qcustomplot.cpp.

◆ tickLabels()

bool QCPAxis::tickLabels ( ) const
inline

Definicja w linii 2021 pliku qcustomplot.h.

Oto graf wywoływań tej funkcji:

◆ tickLabelSide()

QCPAxis::LabelSide QCPAxis::tickLabelSide ( ) const

Definicja w linii 7593 pliku qcustomplot.cpp.

◆ tickLengthIn()

int QCPAxis::tickLengthIn ( ) const

Definicja w linii 7613 pliku qcustomplot.cpp.

◆ tickLengthOut()

int QCPAxis::tickLengthOut ( ) const

Definicja w linii 7619 pliku qcustomplot.cpp.

◆ tickPen()

QPen QCPAxis::tickPen ( ) const
inline

Definicja w linii 2037 pliku qcustomplot.h.

◆ ticks()

bool QCPAxis::ticks ( ) const
inline

Definicja w linii 2020 pliku qcustomplot.h.

Oto graf wywoływań tej funkcji:

◆ tickVector()

QVector<double> QCPAxis::tickVector ( ) const
inline

Definicja w linii 2029 pliku qcustomplot.h.

◆ tickVectorLabels()

QVector<QString> QCPAxis::tickVectorLabels ( ) const
inline

Definicja w linii 2030 pliku qcustomplot.h.

◆ upperEnding()

QCPLineEnding QCPAxis::upperEnding ( ) const

Definicja w linii 7655 pliku qcustomplot.cpp.

◆ wheelEvent()

void QCPAxis::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.

Zobacz również
mousePressEvent, mouseMoveEvent, mouseReleaseEvent, mouseDoubleClickEvent

Reimplementowana z QCPLayerable.

Definicja w linii 8924 pliku qcustomplot.cpp.

Oto graf wywołań dla tej funkcji:

Dokumentacja przyjaciół i funkcji związanych

◆ QCPAxisRect

friend class QCPAxisRect
friend

Definicja w linii 2214 pliku qcustomplot.h.

◆ QCPGrid

friend class QCPGrid
friend

Definicja w linii 2213 pliku qcustomplot.h.

◆ QCustomPlot

friend class QCustomPlot
friend

Definicja w linii 2212 pliku qcustomplot.h.

Dokumentacja atrybutów składowych

◆ mAADragBackup

QCP::AntialiasedElements QCPAxis::mAADragBackup
protected

Definicja w linii 2181 pliku qcustomplot.h.

◆ mAxisPainter

QCPAxisPainterPrivate* QCPAxis::mAxisPainter
protected

Definicja w linii 2172 pliku qcustomplot.h.

◆ mAxisRect

QCPAxisRect* QCPAxis::mAxisRect
protected

Definicja w linii 2137 pliku qcustomplot.h.

◆ mAxisType

AxisType QCPAxis::mAxisType
protected

Definicja w linii 2136 pliku qcustomplot.h.

◆ mBasePen

QPen QCPAxis::mBasePen
protected

Definicja w linii 2142 pliku qcustomplot.h.

◆ mCachedMargin

int QCPAxis::mCachedMargin
protected

Definicja w linii 2178 pliku qcustomplot.h.

◆ mCachedMarginValid

bool QCPAxis::mCachedMarginValid
protected

Definicja w linii 2177 pliku qcustomplot.h.

◆ mDragging

bool QCPAxis::mDragging
protected

Definicja w linii 2179 pliku qcustomplot.h.

◆ mDragStartRange

QCPRange QCPAxis::mDragStartRange
protected

Definicja w linii 2180 pliku qcustomplot.h.

◆ mGrid

QCPGrid* QCPAxis::mGrid
protected

Definicja w linii 2171 pliku qcustomplot.h.

◆ mLabel

QString QCPAxis::mLabel
protected

Definicja w linii 2146 pliku qcustomplot.h.

◆ mLabelColor

QColor QCPAxis::mLabelColor
protected

Definicja w linii 2148 pliku qcustomplot.h.

◆ mLabelFont

QFont QCPAxis::mLabelFont
protected

Definicja w linii 2147 pliku qcustomplot.h.

◆ mNotAADragBackup

QCP::AntialiasedElements QCPAxis::mNotAADragBackup
protected

Definicja w linii 2181 pliku qcustomplot.h.

◆ mNumberBeautifulPowers

bool QCPAxis::mNumberBeautifulPowers
protected

Definicja w linii 2157 pliku qcustomplot.h.

◆ mNumberFormatChar

QLatin1Char QCPAxis::mNumberFormatChar
protected

Definicja w linii 2156 pliku qcustomplot.h.

◆ mNumberPrecision

int QCPAxis::mNumberPrecision
protected

Definicja w linii 2155 pliku qcustomplot.h.

◆ mOrientation

Qt::Orientation QCPAxis::mOrientation
protected

Definicja w linii 2140 pliku qcustomplot.h.

◆ mPadding

int QCPAxis::mPadding
protected

Definicja w linii 2139 pliku qcustomplot.h.

◆ mRange

QCPRange QCPAxis::mRange
protected

Definicja w linii 2166 pliku qcustomplot.h.

◆ mRangeReversed

bool QCPAxis::mRangeReversed
protected

Definicja w linii 2167 pliku qcustomplot.h.

◆ mScaleType

ScaleType QCPAxis::mScaleType
protected

Definicja w linii 2168 pliku qcustomplot.h.

◆ mSelectableParts

SelectableParts QCPAxis::mSelectableParts
protected

Definicja w linii 2141 pliku qcustomplot.h.

◆ mSelectedBasePen

QPen QCPAxis::mSelectedBasePen
protected

Definicja w linii 2142 pliku qcustomplot.h.

◆ mSelectedLabelColor

QColor QCPAxis::mSelectedLabelColor
protected

Definicja w linii 2148 pliku qcustomplot.h.

◆ mSelectedLabelFont

QFont QCPAxis::mSelectedLabelFont
protected

Definicja w linii 2147 pliku qcustomplot.h.

◆ mSelectedParts

SelectableParts QCPAxis::mSelectedParts
protected

Definicja w linii 2141 pliku qcustomplot.h.

◆ mSelectedSubTickPen

QPen QCPAxis::mSelectedSubTickPen
protected

Definicja w linii 2164 pliku qcustomplot.h.

◆ mSelectedTickLabelColor

QColor QCPAxis::mSelectedTickLabelColor
protected

Definicja w linii 2154 pliku qcustomplot.h.

◆ mSelectedTickLabelFont

QFont QCPAxis::mSelectedTickLabelFont
protected

Definicja w linii 2153 pliku qcustomplot.h.

◆ mSelectedTickPen

QPen QCPAxis::mSelectedTickPen
protected

Definicja w linii 2163 pliku qcustomplot.h.

◆ mSubTickPen

QPen QCPAxis::mSubTickPen
protected

Definicja w linii 2164 pliku qcustomplot.h.

◆ mSubTicks

bool QCPAxis::mSubTicks
protected

Definicja w linii 2161 pliku qcustomplot.h.

◆ mSubTickVector

QVector<double> QCPAxis::mSubTickVector
protected

Definicja w linii 2176 pliku qcustomplot.h.

◆ mTicker

QSharedPointer<QCPAxisTicker> QCPAxis::mTicker
protected

Definicja w linii 2173 pliku qcustomplot.h.

◆ mTickLabelColor

QColor QCPAxis::mTickLabelColor
protected

Definicja w linii 2154 pliku qcustomplot.h.

◆ mTickLabelFont

QFont QCPAxis::mTickLabelFont
protected

Definicja w linii 2153 pliku qcustomplot.h.

◆ mTickLabels

bool QCPAxis::mTickLabels
protected

Definicja w linii 2151 pliku qcustomplot.h.

◆ mTickPen

QPen QCPAxis::mTickPen
protected

Definicja w linii 2163 pliku qcustomplot.h.

◆ mTicks

bool QCPAxis::mTicks
protected

Definicja w linii 2160 pliku qcustomplot.h.

◆ mTickVector

QVector<double> QCPAxis::mTickVector
protected

Definicja w linii 2174 pliku qcustomplot.h.

◆ mTickVectorLabels

QVector<QString> QCPAxis::mTickVectorLabels
protected

Definicja w linii 2175 pliku qcustomplot.h.


Dokumentacja dla tej klasy została wygenerowana z plików: