Stellarium  0.90.0
List of all members | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
QCPItemPosition Class Reference
+ Inheritance diagram for QCPItemPosition:
+ Collaboration diagram for QCPItemPosition:

Public Types

enum  PositionType { ptAbsolute, ptViewportRatio, ptAxisRectRatio, ptPlotCoords }
 

Public Member Functions

 QCPItemPosition (QCustomPlot *parentPlot, QCPAbstractItem *parentItem, const QString name)
 
PositionType type () const
 
PositionType typeX () const
 
PositionType typeY () const
 
QCPItemAnchorparentAnchor () const
 
QCPItemAnchorparentAnchorX () const
 
QCPItemAnchorparentAnchorY () const
 
double key () const
 
double value () const
 
QPointF coords () const
 
QCPAxiskeyAxis () const
 
QCPAxisvalueAxis () const
 
QCPAxisRectaxisRect () const
 
virtual QPointF pixelPoint () const
 
void setType (PositionType type)
 
void setTypeX (PositionType type)
 
void setTypeY (PositionType type)
 
bool setParentAnchor (QCPItemAnchor *parentAnchor, bool keepPixelPosition=false)
 
bool setParentAnchorX (QCPItemAnchor *parentAnchor, bool keepPixelPosition=false)
 
bool setParentAnchorY (QCPItemAnchor *parentAnchor, bool keepPixelPosition=false)
 
void setCoords (double key, double value)
 
void setCoords (const QPointF &coords)
 
void setAxes (QCPAxis *keyAxis, QCPAxis *valueAxis)
 
void setAxisRect (QCPAxisRect *axisRect)
 
void setPixelPoint (const QPointF &pixelPoint)
 
- Public Member Functions inherited from QCPItemAnchor
 QCPItemAnchor (QCustomPlot *parentPlot, QCPAbstractItem *parentItem, const QString name, int anchorId=-1)
 
QString name () const
 

Protected Member Functions

virtual QCPItemPositiontoQCPItemPosition ()
 
- Protected Member Functions inherited from QCPItemAnchor
void addChildX (QCPItemPosition *pos)
 
void removeChildX (QCPItemPosition *pos)
 
void addChildY (QCPItemPosition *pos)
 
void removeChildY (QCPItemPosition *pos)
 

Protected Attributes

PositionType mPositionTypeX
 
PositionType mPositionTypeY
 
QPointer< QCPAxismKeyAxis
 
QPointer< QCPAxismValueAxis
 
QPointer< QCPAxisRectmAxisRect
 
double mKey
 
double mValue
 
QCPItemAnchormParentAnchorX
 
QCPItemAnchormParentAnchorY
 
- Protected Attributes inherited from QCPItemAnchor
QString mName
 
QCustomPlotmParentPlot
 
QCPAbstractItemmParentItem
 
int mAnchorId
 
QSet< QCPItemPosition * > mChildrenX
 
QSet< QCPItemPosition * > mChildrenY
 

Detailed Description

Definition at line 1540 of file qcustomplot.h.

Member Enumeration Documentation

Defines the ways an item position can be specified. Thus it defines what the numbers passed to setCoords actually mean.

See also
setType
Enumerator
ptAbsolute 

Static positioning in pixels, starting from the top left corner of the viewport/widget.

ptViewportRatio 

Static positioning given by a fraction of the viewport size.

For example, if you call setCoords(0, 0), the position will be at the top left corner of the viewport/widget. setCoords(1, 1) will be at the bottom right corner, setCoords(0.5, 0) will be horizontally centered and vertically at the top of the viewport/widget, etc.

ptAxisRectRatio 

Static positioning given by a fraction of the axis rect size (see setAxisRect).

For example, if you call setCoords(0, 0), the position will be at the top left corner of the axis rect. setCoords(1, 1) will be at the bottom right corner, setCoords(0.5, 0) will be horizontally centered and vertically at the top of the axis rect, etc. You can also go beyond the axis rect by providing negative coordinates or coordinates larger than 1.

ptPlotCoords 

Dynamic positioning at a plot coordinate defined by two axes (see setAxes).

Definition at line 1549 of file qcustomplot.h.


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