#include <KDChartRelativePosition.h>
Using RelativePosition you can specify the relative parts of some position information, and you can specify the absolute parts: the reference area, and the position in this area.
To get an absolute position, you have three options:
Definition at line 62 of file KDChartRelativePosition.h.
Public Member Functions | |
Qt::Alignment | alignment () const |
const QPointF | calculatedPoint (const QSizeF &autoSize) const |
Calculate a point, according to the reference area/position and horiz/vert padding. | |
Measure | horizontalPadding () const |
bool | operator!= (const RelativePosition &other) const |
RelativePosition & | operator= (const RelativePosition &other) |
bool | operator== (const RelativePosition &) const |
QObject * | referenceArea () const |
const QPointF | referencePoint () const |
Return the reference point, according to the reference area/position, but ignoring horiz/vert padding. | |
const PositionPoints | referencePoints () const |
Position | referencePosition () const |
RelativePosition (const RelativePosition &) | |
RelativePosition () | |
void | resetReferencePosition () |
Resets the position of the anchor point to the built-in default. | |
qreal | rotation () const |
void | setAlignment (Qt::Alignment flags) |
Specifies the location of the content, that is to be positioned by this RelativePosition. | |
void | setHorizontalPadding (const Measure &padding) |
Specifies the horizontal width of the gap between the anchor point and the content, that is to be positioned by this RelativePosition. | |
void | setReferenceArea (QObject *area) |
Specifies the reference area to be used to find the anchor point. | |
void | setReferencePoints (const PositionPoints &points) |
Specifies a set of points from which the anchor point will be selected. | |
void | setReferencePosition (Position position) |
Specifies the position of the anchor point. | |
void | setRotation (qreal rot) |
void | setVerticalPadding (const Measure &padding) |
Specifies the vertical width of the gap between the anchor point and the content, that is to be positioned by this RelativePosition. | |
Measure | verticalPadding () const |
~RelativePosition () |
|
|
|
|
|
|
|
Referenced by operator<<(), KDChart::AbstractDiagram::paintDataValueText(), and KDChart::Chart::reLayoutFloatingLegends(). |
|
Calculate a point, according to the reference area/position and horiz/vert padding. This method is called at drawing time: The returned point is used as anchor point. Note that calculatedPoint ignores the alignment setting, it just returns the point, so the calling code needs to take alignment into account explicitely.
Referenced by KDChart::Chart::reLayoutFloatingLegends(). |
|
Referenced by operator<<(). |
|
Definition at line 198 of file KDChartRelativePosition.h. References operator==().
00198 { return !operator==( other ); } |
|
|
|
Referenced by operator!=(). |
|
Referenced by operator<<(). |
|
Return the reference point, according to the reference area/position, but ignoring horiz/vert padding. This method is called at drawing time. The returned point is used to test if the label of a data value is to be printed: labels are printed only, if their reference points are either inside or touching the coordinate plane.
|
|
|
|
Referenced by operator<<(). |
|
Resets the position of the anchor point to the built-in default. If the anchor point of a RelativePosition is reset (or never changed from the default setting, resp.) KD Chart will choose an appropriate Position at run-time. e.g. BarDiagrams will use Position::NorthWest / Position::SouthEast for positive / negative values.
|
|
Referenced by operator<<(). |
|
Specifies the location of the content, that is to be positioned by this RelativePosition. Aligning is applied, after horiz./vert. padding was retrieved to calculate the real reference point, so aligning is seen as relative to that point.
|
|
Specifies the horizontal width of the gap between the anchor point and the content, that is to be positioned by this RelativePosition.
|
|
Specifies the reference area to be used to find the anchor point. The reference area's type can be either QWidget, or be derived from KDChart::AbstractArea.
|
|
Specifies a set of points from which the anchor point will be selected.
|
|
Specifies the position of the anchor point. The anchor point of a RelativePosition may be one of the pre-defined points of it's reference area - for details see KDChart::Position.
|
|
|
|
Specifies the vertical width of the gap between the anchor point and the content, that is to be positioned by this RelativePosition.
|
|
Referenced by operator<<(). |