Stellarium  0.16.1
List of all members | Public Types | Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends
QCPAxis Class Reference
+ Inheritance diagram for QCPAxis:
+ Collaboration diagram for QCPAxis:

Public Types

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

Signals

void ticksRequest ()
 
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)
 
- Signals inherited from QCPLayerable
void layerChanged (QCPLayer *newLayer)
 

Public Member Functions

 QCPAxis (QCPAxisRect *parent, AxisType type)
 
AxisType axisType () const
 
QCPAxisRectaxisRect () const
 
ScaleType scaleType () const
 
double scaleLogBase () const
 
const QCPRange range () const
 
bool rangeReversed () const
 
bool autoTicks () const
 
int autoTickCount () const
 
bool autoTickLabels () const
 
bool autoTickStep () const
 
bool autoSubTicks () const
 
bool ticks () const
 
bool tickLabels () const
 
int tickLabelPadding () const
 
LabelType tickLabelType () const
 
QFont tickLabelFont () const
 
QColor tickLabelColor () const
 
double tickLabelRotation () const
 
LabelSide tickLabelSide () const
 
QString dateTimeFormat () const
 
Qt::TimeSpec dateTimeSpec () const
 
QString numberFormat () const
 
int numberPrecision () const
 
double tickStep () const
 
QVector< double > tickVector () const
 
QVector< QString > tickVectorLabels () const
 
int tickLengthIn () const
 
int tickLengthOut () const
 
int subTickCount () 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)
 
void setScaleLogBase (double base)
 
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 setAutoTicks (bool on)
 
void setAutoTickCount (int approximateCount)
 
void setAutoTickLabels (bool on)
 
void setAutoTickStep (bool on)
 
void setAutoSubTicks (bool on)
 
void setTicks (bool show)
 
void setTickLabels (bool show)
 
void setTickLabelPadding (int padding)
 
void setTickLabelType (LabelType type)
 
void setTickLabelFont (const QFont &font)
 
void setTickLabelColor (const QColor &color)
 
void setTickLabelRotation (double degrees)
 
void setTickLabelSide (LabelSide side)
 
void setDateTimeFormat (const QString &format)
 
void setDateTimeSpec (const Qt::TimeSpec &timeSpec)
 
void setNumberFormat (const QString &formatCode)
 
void setNumberPrecision (int precision)
 
void setTickStep (double step)
 
void setTickVector (const QVector< double > &vec)
 
void setTickVectorLabels (const QVector< QString > &vec)
 
void setTickLength (int inside, int outside=0)
 
void setTickLengthIn (int inside)
 
void setTickLengthOut (int outside)
 
void setSubTickCount (int count)
 
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
 
Qt::Orientation orientation () const
 
void moveRange (double diff)
 
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
 
- Public Member Functions inherited from QCPLayerable
 QCPLayerable (QCustomPlot *plot, QString targetLayer=QString(), QCPLayerable *parentLayerable=0)
 
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
 

Static Public Member Functions

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

Protected Member Functions

virtual void setupTickVectors ()
 
virtual void generateAutoTicks ()
 
virtual int calculateAutoSubTickCount (double tickStep) const
 
virtual int calculateMargin ()
 
virtual void applyDefaultAntialiasingHint (QCPPainter *painter) const
 
virtual void draw (QCPPainter *painter)
 
virtual QCP::Interaction selectionCategory () const
 
virtual void selectEvent (QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged)
 
virtual void deselectEvent (bool *selectionStateChanged)
 
void visibleTickBounds (int &lowIndex, int &highIndex) const
 
double baseLog (double value) const
 
double basePow (double value) const
 
QPen getBasePen () const
 
QPen getTickPen () const
 
QPen getSubTickPen () const
 
QFont getTickLabelFont () const
 
QFont getLabelFont () const
 
QColor getTickLabelColor () const
 
QColor getLabelColor () const
 
- Protected Member Functions inherited from QCPLayerable
virtual void parentPlotInitialized (QCustomPlot *parentPlot)
 
virtual QRect clipRect () const
 
void initializeParentPlot (QCustomPlot *parentPlot)
 
void setParentLayerable (QCPLayerable *parentLayerable)
 
bool moveToLayer (QCPLayer *layer, bool prepend)
 
void applyAntialiasingHint (QCPPainter *painter, bool localAntialiased, QCP::AntialiasedElement overrideElement) const
 

Protected Attributes

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
 
bool mAutoTickLabels
 
LabelType mTickLabelType
 
QFont mTickLabelFont
 
QFont mSelectedTickLabelFont
 
QColor mTickLabelColor
 
QColor mSelectedTickLabelColor
 
QString mDateTimeFormat
 
Qt::TimeSpec mDateTimeSpec
 
int mNumberPrecision
 
QLatin1Char mNumberFormatChar
 
bool mNumberBeautifulPowers
 
bool mTicks
 
double mTickStep
 
int mSubTickCount
 
int mAutoTickCount
 
bool mAutoTicks
 
bool mAutoTickStep
 
bool mAutoSubTicks
 
QPen mTickPen
 
QPen mSelectedTickPen
 
QPen mSubTickPen
 
QPen mSelectedSubTickPen
 
QCPRange mRange
 
bool mRangeReversed
 
ScaleType mScaleType
 
double mScaleLogBase
 
double mScaleLogBaseLogInv
 
QCPGridmGrid
 
QCPAxisPainterPrivatemAxisPainter
 
int mLowestVisibleTick
 
int mHighestVisibleTick
 
QVector< double > mTickVector
 
QVector< QString > mTickVectorLabels
 
QVector< double > mSubTickVector
 
bool mCachedMarginValid
 
int mCachedMargin
 
- Protected Attributes inherited from QCPLayerable
bool mVisible
 
QCustomPlotmParentPlot
 
QPointer< QCPLayerablemParentLayerable
 
QCPLayermLayer
 
bool mAntialiased
 

Friends

class QCustomPlot
 
class QCPGrid
 
class QCPAxisRect
 

Detailed Description

Definition at line 980 of file qcustomplot.h.

Member Enumeration Documentation

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.

Enumerator
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

Definition at line 1042 of file qcustomplot.h.

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

See also
setTickLabelSide
Enumerator
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.

Definition at line 1064 of file qcustomplot.h.

When automatic tick label generation is enabled (setAutoTickLabels), defines how the coordinate of the tick is interpreted, i.e. translated into a string.

See also
setTickLabelType
Enumerator
ltNumber 

Tick coordinate is regarded as normal number and will be displayed as such. (see setNumberFormat)

ltDateTime 

Tick coordinate is regarded as a date/time (seconds since 1970-01-01T00:00:00 UTC) and will be displayed and formatted as such. (for details, see setDateTimeFormat)

Definition at line 1055 of file qcustomplot.h.

Defines the scale of an axis.

See also
setScaleType
Enumerator
stLinear 

Linear scaling.

stLogarithmic 

Logarithmic scaling with correspondingly transformed plots and (major) tick marks at every base power (see setScaleLogBase).

Definition at line 1072 of file qcustomplot.h.

Defines the selectable parts of an axis.

See also
setSelectableParts, setSelectedParts
Enumerator
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.

Definition at line 1080 of file qcustomplot.h.


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