Cartesian coordinate plane. More...
#include <KDChartCartesianCoordinatePlane.h>
Public Types | |
enum | AxesCalcMode { Linear, Logarithmic } |
Public Slots | |
void | adjustHorizontalRangeToData () |
Adjust horizontal range settings to the ranges covered by the model's data values. | |
void | adjustRangesToData () |
Adjust both, horizontal and vertical range settings to the ranges covered by the model's data values. | |
void | adjustVerticalRangeToData () |
Adjust vertical range settings to the ranges covered by the model's data values. | |
void | layoutPlanes () |
Calling layoutPlanes() on the plane triggers the global KDChart::Chart::slotLayoutPlanes(). | |
void | relayout () |
Calling relayout() on the plane triggers the global KDChart::Chart::slotRelayout(). | |
void | setGridNeedsRecalculate () |
Used by the chart to clear the cached grid data. | |
void | update () |
Calling update() on the plane triggers the global KDChart::Chart::update(). | |
Signals | |
void | destroyedCoordinatePlane (AbstractCoordinatePlane *) |
Emitted when this coordinate plane is destroyed. | |
void | geometryChanged (QRect, QRect) |
Emitted after the geometry of the Coordinate Plane has been changed. | |
void | internal_geometryChanged (QRect, QRect) |
void | needLayoutPlanes () |
Emitted when plane needs to trigger the Chart's layouting of the coord. | |
void | needRelayout () |
Emitted when plane needs to trigger the Chart's layouting. | |
void | needUpdate () |
Emitted when plane needs to update its drawings. | |
void | positionChanged (AbstractArea *) |
void | propertiesChanged () |
Emitted upon change of a property of the Coordinate Plane or any of its components. | |
Public Member Functions | |
void | addDiagram (AbstractDiagram *diagram) |
Adds a diagram to this coordinate plane. | |
void | alignToReferencePoint (const RelativePosition &position) |
const bool | autoAdjustGridToZoom () const |
Return the status of the built-in grid adjusting feature. | |
unsigned int | autoAdjustHorizontalRangeToData () const |
Returns the maximal allowed percent of the horizontal space covered by the coordinate plane that may be empty. | |
unsigned int | autoAdjustVerticalRangeToData () const |
Returns the maximal allowed percent of the vertical space covered by the coordinate plane that may be empty. | |
AxesCalcMode | axesCalcModeX () const |
AxesCalcMode | axesCalcModeY () const |
BackgroundAttributes | backgroundAttributes () const |
virtual int | bottomOverlap (bool doNotRecalculate=false) const |
This is called at layout time by KDChart:AutoSpacerLayoutItem::sizeHint(). | |
CartesianCoordinatePlane (Chart *parent=0) | |
bool | compare (const AbstractAreaBase *other) const |
Returns true if both areas have the same settings. | |
AbstractDiagram * | diagram () |
QRectF | diagramArea () const |
Returns the (physical) area occupied by the diagram. | |
ConstAbstractDiagramList | diagrams () const |
AbstractDiagramList | diagrams () |
bool | doesIsometricScaling () const |
virtual Qt::Orientations | expandingDirections () const |
pure virtual in QLayoutItem | |
FrameAttributes | frameAttributes () const |
virtual QRect | geometry () const |
pure virtual in QLayoutItem | |
void | getFrameLeadings (int &left, int &top, int &right, int &bottom) const |
GridAttributes | globalGridAttributes () const |
const GridAttributes | gridAttributes (Qt::Orientation orientation) const |
DataDimensionsList | gridDimensionsList () |
Returns the dimensions used for drawing the grid lines. | |
bool | hasFixedDataCoordinateSpaceRelation () const |
bool | hasOwnGridAttributes (Qt::Orientation orientation) const |
QPair< qreal, qreal > | horizontalRange () const |
virtual bool | isEmpty () const |
pure virtual in QLayoutItem | |
bool | isHorizontalRangeReversed () const |
bool | isRubberBandZoomingEnabled () const |
bool | isVerticalRangeReversed () const |
const bool | isVisiblePoint (const QPointF &point) const |
Tests, if a point is visible on the coordinate plane. | |
virtual int | leftOverlap (bool doNotRecalculate=false) const |
This is called at layout time by KDChart::AutoSpacerLayoutItem::sizeHint(). | |
QRectF | logicalArea () const |
Returns the logical area, i.e., the rectangle defined by the very top left and very bottom right coordinate. | |
virtual QSize | maximumSize () const |
pure virtual in QLayoutItem | |
virtual QSize | minimumSize () const |
pure virtual in QLayoutItem | |
virtual QSize | minimumSizeHint () const |
[reimplemented] | |
virtual void | mouseDoubleClickEvent (QMouseEvent *event) |
virtual void | mouseMoveEvent (QMouseEvent *event) |
virtual void | mousePressEvent (QMouseEvent *event) |
virtual void | mouseReleaseEvent (QMouseEvent *event) |
virtual void | paint (QPainter *) |
reimpl | |
virtual void | paintAll (QPainter &painter) |
Call paintAll, if you want the background and the frame to be drawn before the normal paint() is invoked automatically. | |
virtual void | paintBackground (QPainter &painter, const QRect &rectangle) |
virtual void | paintCtx (PaintContext *context) |
Default impl: Paint the complete item using its layouted position and size. | |
virtual void | paintFrame (QPainter &painter, const QRect &rectangle) |
virtual void | paintIntoRect (QPainter &painter, const QRect &rect) |
Draws the background and frame, then calls paint(). | |
const Chart * | parent () const |
Chart * | parent () |
QLayout * | parentLayout () |
AbstractCoordinatePlane * | referenceCoordinatePlane () const |
There are two ways, in which planes can be caused to interact, in where they are put layouting wise: The first is the reference plane. | |
void | removeFromParentLayout () |
virtual void | replaceDiagram (AbstractDiagram *diagram, AbstractDiagram *oldDiagram=0) |
Replaces the old diagram, or appends the diagram, it there is none yet. | |
void | resetGridAttributes (Qt::Orientation orientation) |
Reset the attributes to be used for grid lines drawn in horizontal direction (or in vertical direction, resp. | |
virtual int | rightOverlap (bool doNotRecalculate=false) const |
This is called at layout time by KDChart::AutoSpacerLayoutItem::sizeHint(). | |
void | setAutoAdjustGridToZoom (bool autoAdjust) |
Disable / re-enable the built-in grid adjusting feature. | |
void | setAutoAdjustHorizontalRangeToData (unsigned int percentEmpty=67) |
Automatically adjust horizontal range settings to the ranges covered by the model's values, when ever the data have changed, and then emit horizontalRangeAutomaticallyAdjusted. | |
void | setAutoAdjustVerticalRangeToData (unsigned int percentEmpty=67) |
Automatically adjust vertical range settings to the ranges covered by the model's values, when ever the data have changed, and then emit verticalRangeAutomaticallyAdjusted. | |
void | setAxesCalcModes (AxesCalcMode mode) |
Specifies the calculation modes for all axes. | |
void | setAxesCalcModeX (AxesCalcMode mode) |
Specifies the calculation mode for all Abscissa axes. | |
void | setAxesCalcModeY (AxesCalcMode mode) |
Specifies the calculation mode for all Ordinate axes. | |
void | setBackgroundAttributes (const BackgroundAttributes &a) |
void | setFixedDataCoordinateSpaceRelation (bool fixed) |
Allows to specify a fixed data-space / coordinate-space relation. | |
void | setFrameAttributes (const FrameAttributes &a) |
void | setGeometry (const QRect &r) |
reimplement from AbstractCoordinatePlane | |
void | setGlobalGridAttributes (const GridAttributes &) |
Set the grid attributes to be used by this coordinate plane. | |
void | setGridAttributes (Qt::Orientation orientation, const GridAttributes &) |
Set the attributes to be used for grid lines drawn in horizontal direction (or in vertical direction, resp. | |
void | setHorizontalRange (const QPair< qreal, qreal > &range) |
Set the boundaries of the visible value space displayed in horizontal direction. | |
void | setHorizontalRangeReversed (bool reverse) |
Sets whether the horizontal range should be reversed or not, i.e. | |
void | setIsometricScaling (bool onOff) |
void | setParent (Chart *parent) |
Called internally by KDChart::Chart. | |
void | setParentLayout (QLayout *lay) |
virtual void | setParentWidget (QWidget *widget) |
Inform the item about its widget: This enables the item, to trigger that widget's update, whenever the size of the item's contents has changed. | |
void | setReferenceCoordinatePlane (AbstractCoordinatePlane *plane) |
Set another coordinate plane to be used as the reference plane for this one. | |
void | setRubberBandZoomingEnabled (bool enable) |
Enables or disables zooming with a rubber band using the mouse. | |
void | setVerticalRange (const QPair< qreal, qreal > &range) |
Set the boundaries of the visible value space displayed in vertical direction. | |
void | setVerticalRangeReversed (bool reverse) |
Sets whether the vertical range should be reversed or not, i.e. | |
void | setXAxisStartAtZero (bool fixedStart) |
Allows to fix the lower bound of X axis to zero when diagram is in first quadrant. | |
virtual void | setZoomCenter (const QPointF ¢er) |
virtual void | setZoomFactors (double factorX, double factorY) |
virtual void | setZoomFactorX (double factor) |
virtual void | setZoomFactorY (double factor) |
AbstractCoordinatePlane * | sharedAxisMasterPlane (QPainter *p=0) |
reimpl | |
virtual QSize | sizeHint () const |
pure virtual in QLayoutItem | |
virtual void | sizeHintChanged () const |
Report changed size hint: ask the parent widget to recalculate the layout. | |
virtual QSizePolicy | sizePolicy () const |
[reimplemented] | |
virtual void | takeDiagram (AbstractDiagram *diagram) |
Removes the diagram from the plane, without deleting it. | |
virtual int | topOverlap (bool doNotRecalculate=false) const |
This is called at layout time by KDChart::AutoSpacerLayoutItem::sizeHint(). | |
const QPointF | translate (const QPointF &diagramPoint) const |
Translate the given point in value space coordinates to a position in pixel space. | |
QPair< qreal, qreal > | verticalRange () const |
QRectF | visibleDataRange () const |
Returns the currently visible data range. | |
QRectF | visibleDiagramArea () const |
Returns the visible part of the diagram area, i.e. | |
bool | xAxisStartAtZero () const |
virtual QPointF | zoomCenter () const |
virtual double | zoomFactorX () const |
virtual double | zoomFactorY () const |
~CartesianCoordinatePlane () | |
Static Public Member Functions | |
static void | paintBackgroundAttributes (QPainter &painter, const QRect &rectangle, const KDChart::BackgroundAttributes &attributes) |
static void | paintFrameAttributes (QPainter &painter, const QRect &rectangle, const KDChart::FrameAttributes &attributes) |
Protected Slots | |
void | slotLayoutChanged (AbstractDiagram *) |
Protected Member Functions | |
QRectF | adjustedToMaxEmptyInnerPercentage (const QRectF &r, unsigned int percentX, unsigned int percentY) const |
virtual QRect | areaGeometry () const |
virtual QRectF | calculateRawDataBoundingRect () const |
bool | doneSetZoomCenter (const QPointF ¢er) |
bool | doneSetZoomFactorX (double factor) |
bool | doneSetZoomFactorY (double factor) |
virtual QRectF | drawingArea () const |
virtual DataDimensionsList | getDataDimensionsList () const |
QRectF | getRawDataBoundingRectFromDiagrams () const |
void | handleFixedDataCoordinateSpaceRelation (const QRectF &geometry) |
QRect | innerRect () const |
void | layoutDiagrams () |
Distribute the available space among the diagrams and axes. | |
void | paintEvent (QPaintEvent *) |
virtual void | positionHasChanged () |
const QPointF | translateBack (const QPointF &screenPoint) const |
Protected Attributes | |
QWidget * | mParent |
QLayout * | mParentLayout |
Cartesian coordinate plane.
Definition at line 39 of file KDChartCartesianCoordinatePlane.h.
enum KDChart::AbstractCoordinatePlane::AxesCalcMode [inherited] |
Definition at line 54 of file KDChartAbstractCoordinatePlane.h.
CartesianCoordinatePlane::CartesianCoordinatePlane | ( | Chart * | parent = 0 |
) | [explicit] |
Definition at line 68 of file KDChartCartesianCoordinatePlane.cpp.
CartesianCoordinatePlane::~CartesianCoordinatePlane | ( | ) |
Definition at line 74 of file KDChartCartesianCoordinatePlane.cpp.
void CartesianCoordinatePlane::addDiagram | ( | AbstractDiagram * | diagram | ) | [virtual] |
Adds a diagram to this coordinate plane.
diagram | The diagram to add. |
Reimplemented from KDChart::AbstractCoordinatePlane.
Reimplemented in KDChart::LeveyJenningsCoordinatePlane.
Definition at line 85 of file KDChartCartesianCoordinatePlane.cpp.
References KDChart::AbstractCoordinatePlane::propertiesChanged(), and slotLayoutChanged().
QRectF CartesianCoordinatePlane::adjustedToMaxEmptyInnerPercentage | ( | const QRectF & | r, | |
unsigned int | percentX, | |||
unsigned int | percentY | |||
) | const [protected] |
Definition at line 182 of file KDChartCartesianCoordinatePlane.cpp.
References axesCalcModeX(), axesCalcModeY(), d, and KDChart::AbstractCoordinatePlane::Logarithmic.
Referenced by calculateRawDataBoundingRect().
void CartesianCoordinatePlane::adjustHorizontalRangeToData | ( | ) | [slot] |
Adjust horizontal range settings to the ranges covered by the model's data values.
Definition at line 705 of file KDChartCartesianCoordinatePlane.cpp.
References d, getRawDataBoundingRectFromDiagrams(), layoutDiagrams(), and KDChart::AbstractCoordinatePlane::propertiesChanged().
void CartesianCoordinatePlane::adjustRangesToData | ( | ) | [slot] |
Adjust both, horizontal and vertical range settings to the ranges covered by the model's data values.
Definition at line 694 of file KDChartCartesianCoordinatePlane.cpp.
References d, getRawDataBoundingRectFromDiagrams(), layoutDiagrams(), and KDChart::AbstractCoordinatePlane::propertiesChanged().
void CartesianCoordinatePlane::adjustVerticalRangeToData | ( | ) | [slot] |
Adjust vertical range settings to the ranges covered by the model's data values.
Definition at line 714 of file KDChartCartesianCoordinatePlane.cpp.
References d, getRawDataBoundingRectFromDiagrams(), layoutDiagrams(), and KDChart::AbstractCoordinatePlane::propertiesChanged().
void AbstractAreaBase::alignToReferencePoint | ( | const RelativePosition & | position | ) | [inherited] |
Definition at line 88 of file KDChartAbstractAreaBase.cpp.
QRect AbstractArea::areaGeometry | ( | ) | const [protected, virtual, inherited] |
Implements KDChart::AbstractAreaBase.
Definition at line 147 of file KDChartAbstractArea.cpp.
Referenced by drawingArea(), KDChart::TernaryCoordinatePlane::layoutDiagrams(), KDChart::PolarCoordinatePlane::layoutDiagrams(), KDChart::TernaryCoordinatePlane::paint(), KDChart::CartesianAxis::paint(), KDChart::AbstractArea::paintAll(), and KDChart::CartesianAxis::paintCtx().
const bool CartesianCoordinatePlane::autoAdjustGridToZoom | ( | ) | const |
Return the status of the built-in grid adjusting feature.
Definition at line 821 of file KDChartCartesianCoordinatePlane.cpp.
References d.
unsigned int CartesianCoordinatePlane::autoAdjustHorizontalRangeToData | ( | ) | const |
Returns the maximal allowed percent of the horizontal space covered by the coordinate plane that may be empty.
Definition at line 747 of file KDChartCartesianCoordinatePlane.cpp.
References d.
unsigned int CartesianCoordinatePlane::autoAdjustVerticalRangeToData | ( | ) | const |
Returns the maximal allowed percent of the vertical space covered by the coordinate plane that may be empty.
Definition at line 752 of file KDChartCartesianCoordinatePlane.cpp.
References d.
CartesianCoordinatePlane::AxesCalcMode CartesianCoordinatePlane::axesCalcModeX | ( | ) | const |
Definition at line 630 of file KDChartCartesianCoordinatePlane.cpp.
References d.
Referenced by adjustedToMaxEmptyInnerPercentage(), and getDataDimensionsList().
CartesianCoordinatePlane::AxesCalcMode CartesianCoordinatePlane::axesCalcModeY | ( | ) | const |
Definition at line 625 of file KDChartCartesianCoordinatePlane.cpp.
References d.
Referenced by adjustedToMaxEmptyInnerPercentage(), and getDataDimensionsList().
BackgroundAttributes AbstractAreaBase::backgroundAttributes | ( | ) | const [inherited] |
Definition at line 118 of file KDChartAbstractAreaBase.cpp.
References d.
Referenced by KDChart::AbstractAreaBase::compare(), and updateCommonBrush().
int AbstractArea::bottomOverlap | ( | bool | doNotRecalculate = false |
) | const [virtual, inherited] |
This is called at layout time by KDChart:AutoSpacerLayoutItem::sizeHint().
The method triggers AbstractArea::sizeHint() to find out the amount of overlap at the bottom edge of the area.
Definition at line 98 of file KDChartAbstractArea.cpp.
References d.
Referenced by KDChart::AutoSpacerLayoutItem::sizeHint().
QRectF CartesianCoordinatePlane::calculateRawDataBoundingRect | ( | ) | const [protected, virtual] |
Definition at line 228 of file KDChartCartesianCoordinatePlane.cpp.
References adjustedToMaxEmptyInnerPercentage(), d, and getRawDataBoundingRectFromDiagrams().
Referenced by getDataDimensionsList().
bool AbstractAreaBase::compare | ( | const AbstractAreaBase * | other | ) | const [inherited] |
Returns true if both areas have the same settings.
Definition at line 73 of file KDChartAbstractAreaBase.cpp.
References KDChart::AbstractAreaBase::backgroundAttributes(), and KDChart::AbstractAreaBase::frameAttributes().
void KDChart::AbstractCoordinatePlane::destroyedCoordinatePlane | ( | AbstractCoordinatePlane * | ) | [signal, inherited] |
Emitted when this coordinate plane is destroyed.
Referenced by KDChart::AbstractCoordinatePlane::~AbstractCoordinatePlane().
AbstractDiagram * AbstractCoordinatePlane::diagram | ( | ) | [inherited] |
Definition at line 127 of file KDChartAbstractCoordinatePlane.cpp.
References d.
Referenced by KDChart::Widget::diagram(), getRawDataBoundingRectFromDiagrams(), KDChart::TernaryCoordinatePlane::layoutDiagrams(), KDChart::PolarCoordinatePlane::layoutDiagrams(), setGeometry(), KDChart::PolarCoordinatePlane::setStartPosition(), KDChart::Widget::setType(), and sharedAxisMasterPlane().
QRectF CartesianCoordinatePlane::diagramArea | ( | ) | const |
Returns the (physical) area occupied by the diagram.
Unless zoom is applied (which is also true when a fixed data coordinate / space relation is used),
diagramArea() == drawingArea()
Definition at line 367 of file KDChartCartesianCoordinatePlane.cpp.
References d, and logicalArea().
Referenced by visibleDiagramArea().
ConstAbstractDiagramList AbstractCoordinatePlane::diagrams | ( | ) | const [inherited] |
Definition at line 142 of file KDChartAbstractCoordinatePlane.cpp.
References d.
AbstractDiagramList AbstractCoordinatePlane::diagrams | ( | ) | [inherited] |
Definition at line 137 of file KDChartAbstractCoordinatePlane.cpp.
References d.
Referenced by KDChart::Chart::event(), getDataDimensionsList(), getRawDataBoundingRectFromDiagrams(), KDChart::TernaryCoordinatePlane::layoutDiagrams(), KDChart::PolarCoordinatePlane::layoutDiagrams(), layoutDiagrams(), KDChart::Chart::mouseDoubleClickEvent(), KDChart::Chart::mouseMoveEvent(), KDChart::Chart::mousePressEvent(), KDChart::Chart::mouseReleaseEvent(), KDChart::TernaryCoordinatePlane::paint(), KDChart::PolarCoordinatePlane::paint(), paint(), and setGeometry().
bool CartesianCoordinatePlane::doesIsometricScaling | ( | ) | const |
Definition at line 543 of file KDChartCartesianCoordinatePlane.cpp.
References d.
bool CartesianCoordinatePlane::doneSetZoomCenter | ( | const QPointF & | center | ) | [protected] |
Definition at line 570 of file KDChartCartesianCoordinatePlane.cpp.
References d.
Referenced by handleFixedDataCoordinateSpaceRelation(), and setZoomCenter().
bool CartesianCoordinatePlane::doneSetZoomFactorX | ( | double | factor | ) | [protected] |
Definition at line 548 of file KDChartCartesianCoordinatePlane.cpp.
References d.
Referenced by handleFixedDataCoordinateSpaceRelation(), setZoomFactors(), and setZoomFactorX().
bool CartesianCoordinatePlane::doneSetZoomFactorY | ( | double | factor | ) | [protected] |
Definition at line 559 of file KDChartCartesianCoordinatePlane.cpp.
References d.
Referenced by handleFixedDataCoordinateSpaceRelation(), setZoomFactors(), and setZoomFactorY().
QRectF CartesianCoordinatePlane::drawingArea | ( | ) | const [protected, virtual] |
Definition at line 325 of file KDChartCartesianCoordinatePlane.cpp.
References KDChart::AbstractArea::areaGeometry().
Referenced by layoutDiagrams(), paint(), setGeometry(), visibleDataRange(), and visibleDiagramArea().
Qt::Orientations KDChart::AbstractCoordinatePlane::expandingDirections | ( | ) | const [virtual, inherited] |
pure virtual in QLayoutItem
Definition at line 222 of file KDChartAbstractCoordinatePlane.cpp.
FrameAttributes AbstractAreaBase::frameAttributes | ( | ) | const [inherited] |
Definition at line 104 of file KDChartAbstractAreaBase.cpp.
References d.
Referenced by KDChart::Legend::clone(), KDChart::AbstractAreaBase::compare(), and updateCommonBrush().
QRect KDChart::AbstractCoordinatePlane::geometry | ( | ) | const [virtual, inherited] |
pure virtual in QLayoutItem
Definition at line 262 of file KDChartAbstractCoordinatePlane.cpp.
References d.
Referenced by KDChart::Chart::mouseDoubleClickEvent(), KDChart::Chart::mouseMoveEvent(), KDChart::AbstractCoordinatePlane::mouseMoveEvent(), KDChart::Chart::mousePressEvent(), KDChart::Chart::mouseReleaseEvent(), KDChart::AbstractCoordinatePlane::mouseReleaseEvent(), KDChart::PolarDiagram::paint(), KDChart::PolarCoordinatePlane::paint(), and setGeometry().
void KDChart::AbstractCoordinatePlane::geometryChanged | ( | QRect | , | |
QRect | ||||
) | [signal, inherited] |
Emitted after the geometry of the Coordinate Plane has been changed.
and control has returned to the event loop.
Parameters are the the old geometry, the new geometry.
DataDimensionsList CartesianCoordinatePlane::getDataDimensionsList | ( | ) | const [protected, virtual] |
Implements KDChart::AbstractCoordinatePlane.
Definition at line 273 of file KDChartCartesianCoordinatePlane.cpp.
References axesCalcModeX(), axesCalcModeY(), calculateRawDataBoundingRect(), KDChart::AbstractDiagram::datasetDimension(), KDChart::AbstractCoordinatePlane::diagrams(), gridAttributes(), KDChart::GridAttributes::gridGranularitySequence(), KDChart::GridAttributes::gridStepWidth(), KDChart::GridAttributes::gridSubStepWidth(), KDChart::BarDiagram::orientation(), and KDChart::AbstractCartesianDiagram::referenceDiagram().
void AbstractAreaBase::getFrameLeadings | ( | int & | left, | |
int & | top, | |||
int & | right, | |||
int & | bottom | |||
) | const [inherited] |
Definition at line 210 of file KDChartAbstractAreaBase.cpp.
References d.
Referenced by KDChart::AbstractAreaBase::innerRect(), and KDChart::AbstractAreaWidget::paintAll().
QRectF CartesianCoordinatePlane::getRawDataBoundingRectFromDiagrams | ( | ) | const [protected] |
Definition at line 155 of file KDChartCartesianCoordinatePlane.cpp.
References KDChart::AbstractDiagram::dataBoundaries(), KDChart::AbstractCoordinatePlane::diagram(), and KDChart::AbstractCoordinatePlane::diagrams().
Referenced by adjustHorizontalRangeToData(), adjustRangesToData(), adjustVerticalRangeToData(), and calculateRawDataBoundingRect().
GridAttributes KDChart::AbstractCoordinatePlane::globalGridAttributes | ( | ) | const [inherited] |
Definition at line 171 of file KDChartAbstractCoordinatePlane.cpp.
References d.
Referenced by KDChart::PolarCoordinatePlane::gridAttributes(), and gridAttributes().
const GridAttributes CartesianCoordinatePlane::gridAttributes | ( | Qt::Orientation | orientation | ) | const |
Definition at line 777 of file KDChartCartesianCoordinatePlane.cpp.
References d, KDChart::AbstractCoordinatePlane::globalGridAttributes(), and hasOwnGridAttributes().
Referenced by getDataDimensionsList().
KDChart::DataDimensionsList KDChart::AbstractCoordinatePlane::gridDimensionsList | ( | ) | [inherited] |
Returns the dimensions used for drawing the grid lines.
Returned data is the result of (cached) grid calculations, so - if you need that information for your own tasks - make sure to call again this function after every data modification that has changed the data range, since grid calculation is based upon the data range, thus the grid start/end might have changed if the data was changed.
Definition at line 176 of file KDChartAbstractCoordinatePlane.cpp.
References d.
Referenced by layoutDiagrams().
void CartesianCoordinatePlane::handleFixedDataCoordinateSpaceRelation | ( | const QRectF & | geometry | ) | [protected] |
Definition at line 482 of file KDChartCartesianCoordinatePlane.cpp.
References d, doneSetZoomCenter(), doneSetZoomFactorX(), doneSetZoomFactorY(), KDChart::AbstractCoordinatePlane::propertiesChanged(), zoomCenter(), zoomFactorX(), and zoomFactorY().
Referenced by layoutDiagrams().
bool CartesianCoordinatePlane::hasFixedDataCoordinateSpaceRelation | ( | ) | const |
Definition at line 464 of file KDChartCartesianCoordinatePlane.cpp.
References d.
Referenced by KDChart::TextAttributes::calculatedFont().
bool CartesianCoordinatePlane::hasOwnGridAttributes | ( | Qt::Orientation | orientation | ) | const |
Definition at line 800 of file KDChartCartesianCoordinatePlane.cpp.
References d.
Referenced by gridAttributes().
QPair< qreal, qreal > CartesianCoordinatePlane::horizontalRange | ( | ) | const |
Definition at line 684 of file KDChartCartesianCoordinatePlane.cpp.
References d.
QRect AbstractAreaBase::innerRect | ( | ) | const [protected, inherited] |
Definition at line 226 of file KDChartAbstractAreaBase.cpp.
References KDChart::AbstractAreaBase::areaGeometry(), and KDChart::AbstractAreaBase::getFrameLeadings().
Referenced by KDChart::TextArea::paintAll(), and KDChart::AbstractArea::paintAll().
void KDChart::AbstractCoordinatePlane::internal_geometryChanged | ( | QRect | , | |
QRect | ||||
) | [signal, inherited] |
Referenced by KDChart::AbstractCoordinatePlane::setGeometry().
bool KDChart::AbstractCoordinatePlane::isEmpty | ( | ) | const [virtual, inherited] |
pure virtual in QLayoutItem
Definition at line 215 of file KDChartAbstractCoordinatePlane.cpp.
Referenced by layoutDiagrams().
bool CartesianCoordinatePlane::isHorizontalRangeReversed | ( | ) | const |
Definition at line 883 of file KDChartCartesianCoordinatePlane.cpp.
References d.
bool KDChart::AbstractCoordinatePlane::isRubberBandZoomingEnabled | ( | ) | const [inherited] |
Definition at line 296 of file KDChartAbstractCoordinatePlane.cpp.
References d.
bool CartesianCoordinatePlane::isVerticalRangeReversed | ( | ) | const |
Definition at line 898 of file KDChartCartesianCoordinatePlane.cpp.
References d.
const bool KDChart::AbstractCoordinatePlane::isVisiblePoint | ( | const QPointF & | point | ) | const [inherited] |
Tests, if a point is visible on the coordinate plane.
Definition at line 424 of file KDChartAbstractCoordinatePlane.cpp.
References d.
void CartesianCoordinatePlane::layoutDiagrams | ( | ) | [protected, virtual] |
Distribute the available space among the diagrams and axes.
Implements KDChart::AbstractCoordinatePlane.
Definition at line 381 of file KDChartCartesianCoordinatePlane.cpp.
References d, KDChart::AbstractCoordinatePlane::diagrams(), drawingArea(), KDChart::AbstractCoordinatePlane::gridDimensionsList(), handleFixedDataCoordinateSpaceRelation(), KDChart::AbstractCoordinatePlane::isEmpty(), logicalArea(), and KDChart::AbstractCoordinatePlane::update().
Referenced by adjustHorizontalRangeToData(), adjustRangesToData(), adjustVerticalRangeToData(), setAutoAdjustHorizontalRangeToData(), setAutoAdjustVerticalRangeToData(), setHorizontalRange(), setHorizontalRangeReversed(), setIsometricScaling(), setVerticalRange(), setVerticalRangeReversed(), and slotLayoutChanged().
void KDChart::AbstractCoordinatePlane::layoutPlanes | ( | ) | [slot, inherited] |
Calling layoutPlanes() on the plane triggers the global KDChart::Chart::slotLayoutPlanes().
Definition at line 279 of file KDChartAbstractCoordinatePlane.cpp.
References KDChart::AbstractCoordinatePlane::needLayoutPlanes().
Referenced by KDChart::AbstractCoordinatePlane::addDiagram(), KDChart::CartesianAxis::layoutPlanes(), KDChart::AbstractCartesianDiagram::layoutPlanes(), KDChart::AbstractCoordinatePlane::replaceDiagram(), and KDChart::AbstractCoordinatePlane::takeDiagram().
int AbstractArea::leftOverlap | ( | bool | doNotRecalculate = false |
) | const [virtual, inherited] |
This is called at layout time by KDChart::AutoSpacerLayoutItem::sizeHint().
The method triggers AbstractArea::sizeHint() to find out the amount of overlap at the left edge of the area.
Definition at line 74 of file KDChartAbstractArea.cpp.
References d.
Referenced by KDChart::AutoSpacerLayoutItem::sizeHint().
QRectF CartesianCoordinatePlane::logicalArea | ( | ) | const |
Returns the logical area, i.e., the rectangle defined by the very top left and very bottom right coordinate.
Definition at line 338 of file KDChartCartesianCoordinatePlane.cpp.
References d, KDChart::DataDimension::distance(), KDChart::DataDimension::end, and KDChart::DataDimension::start.
Referenced by diagramArea(), and layoutDiagrams().
QSize KDChart::AbstractCoordinatePlane::maximumSize | ( | ) | const [virtual, inherited] |
pure virtual in QLayoutItem
Definition at line 227 of file KDChartAbstractCoordinatePlane.cpp.
Referenced by KDChart::AbstractCoordinatePlane::sizeHint().
QSize KDChart::AbstractCoordinatePlane::minimumSize | ( | ) | const [virtual, inherited] |
pure virtual in QLayoutItem
Definition at line 234 of file KDChartAbstractCoordinatePlane.cpp.
QSize KDChart::AbstractCoordinatePlane::minimumSizeHint | ( | ) | const [virtual, inherited] |
[reimplemented]
Reimplemented in KDChart::TernaryCoordinatePlane.
Definition at line 154 of file KDChartAbstractCoordinatePlane.cpp.
void KDChart::AbstractCoordinatePlane::mouseDoubleClickEvent | ( | QMouseEvent * | event | ) | [virtual, inherited] |
Definition at line 341 of file KDChartAbstractCoordinatePlane.cpp.
References d, and KDChart::AbstractCoordinatePlane::mousePressEvent().
Referenced by KDChart::Chart::mouseDoubleClickEvent().
void KDChart::AbstractCoordinatePlane::mouseMoveEvent | ( | QMouseEvent * | event | ) | [virtual, inherited] |
Definition at line 405 of file KDChartAbstractCoordinatePlane.cpp.
References d, and KDChart::AbstractCoordinatePlane::geometry().
Referenced by KDChart::Chart::mouseMoveEvent().
void KDChart::AbstractCoordinatePlane::mousePressEvent | ( | QMouseEvent * | event | ) | [virtual, inherited] |
Definition at line 301 of file KDChartAbstractCoordinatePlane.cpp.
References KDChart::ZoomParameters::center(), d, KDChart::AbstractCoordinatePlane::parent(), KDChart::AbstractCoordinatePlane::setZoomCenter(), KDChart::AbstractCoordinatePlane::setZoomFactorX(), KDChart::AbstractCoordinatePlane::setZoomFactorY(), KDChart::ZoomParameters::xFactor, and KDChart::ZoomParameters::yFactor.
Referenced by KDChart::AbstractCoordinatePlane::mouseDoubleClickEvent(), and KDChart::Chart::mousePressEvent().
void KDChart::AbstractCoordinatePlane::mouseReleaseEvent | ( | QMouseEvent * | event | ) | [virtual, inherited] |
Definition at line 355 of file KDChartAbstractCoordinatePlane.cpp.
References d, KDChart::AbstractCoordinatePlane::geometry(), KDChart::AbstractCoordinatePlane::setZoomCenter(), KDChart::AbstractCoordinatePlane::setZoomFactorX(), KDChart::AbstractCoordinatePlane::setZoomFactorY(), KDChart::AbstractCoordinatePlane::zoomCenter(), KDChart::AbstractCoordinatePlane::zoomFactorX(), and KDChart::AbstractCoordinatePlane::zoomFactorY().
Referenced by KDChart::Chart::mouseReleaseEvent().
void KDChart::AbstractCoordinatePlane::needLayoutPlanes | ( | ) | [signal, inherited] |
Emitted when plane needs to trigger the Chart's layouting of the coord.
planes.
Referenced by KDChart::AbstractCoordinatePlane::layoutPlanes().
void KDChart::AbstractCoordinatePlane::needRelayout | ( | ) | [signal, inherited] |
Emitted when plane needs to trigger the Chart's layouting.
Referenced by KDChart::AbstractCoordinatePlane::relayout().
void KDChart::AbstractCoordinatePlane::needUpdate | ( | ) | [signal, inherited] |
Emitted when plane needs to update its drawings.
Referenced by KDChart::AbstractCoordinatePlane::update().
void CartesianCoordinatePlane::paint | ( | QPainter * | painter | ) | [virtual] |
reimpl
Implements KDChart::AbstractLayoutItem.
Definition at line 98 of file KDChartCartesianCoordinatePlane.cpp.
References d, KDChart::AbstractCoordinatePlane::diagrams(), drawingArea(), KDChart::PaintContext::setCoordinatePlane(), KDChart::PaintContext::setPainter(), and KDChart::PaintContext::setRectangle().
void AbstractArea::paintAll | ( | QPainter & | painter | ) | [virtual, inherited] |
Call paintAll, if you want the background and the frame to be drawn before the normal paint() is invoked automatically.
Reimplemented from KDChart::AbstractLayoutItem.
Reimplemented in KDChart::TernaryAxis.
Definition at line 120 of file KDChartAbstractArea.cpp.
References KDChart::AbstractArea::areaGeometry(), d, KDChart::AbstractAreaBase::innerRect(), KDChart::AbstractLayoutItem::paint(), KDChart::AbstractAreaBase::paintBackground(), and KDChart::AbstractAreaBase::paintFrame().
Referenced by KDChart::AbstractArea::paintIntoRect().
void AbstractAreaBase::paintBackground | ( | QPainter & | painter, | |
const QRect & | rectangle | |||
) | [virtual, inherited] |
Definition at line 194 of file KDChartAbstractAreaBase.cpp.
References d, and KDChart::AbstractAreaBase::paintBackgroundAttributes().
Referenced by KDChart::TextArea::paintAll(), KDChart::AbstractAreaWidget::paintAll(), and KDChart::AbstractArea::paintAll().
void AbstractAreaBase::paintBackgroundAttributes | ( | QPainter & | painter, | |
const QRect & | rectangle, | |||
const KDChart::BackgroundAttributes & | attributes | |||
) | [static, inherited] |
Definition at line 125 of file KDChartAbstractAreaBase.cpp.
References KDChart::BackgroundAttributes::BackgroundPixmapModeCentered, KDChart::BackgroundAttributes::BackgroundPixmapModeNone, KDChart::BackgroundAttributes::BackgroundPixmapModeScaled, KDChart::BackgroundAttributes::BackgroundPixmapModeStretched, KDChart::BackgroundAttributes::brush(), KDChart::BackgroundAttributes::isVisible(), KDChart::BackgroundAttributes::pixmap(), and KDChart::BackgroundAttributes::pixmapMode().
Referenced by KDChart::AbstractAreaBase::paintBackground().
void KDChart::AbstractLayoutItem::paintCtx | ( | PaintContext * | context | ) | [virtual, inherited] |
Default impl: Paint the complete item using its layouted position and size.
Reimplemented in KDChart::CartesianAxis, KDChart::LeveyJenningsAxis, and KDChart::TernaryAxis.
Definition at line 75 of file KDChartLayoutItems.cpp.
References KDChart::AbstractLayoutItem::paint(), and KDChart::PaintContext::painter().
void KDChart::CartesianCoordinatePlane::paintEvent | ( | QPaintEvent * | ) | [protected] |
void AbstractAreaBase::paintFrame | ( | QPainter & | painter, | |
const QRect & | rectangle | |||
) | [virtual, inherited] |
Definition at line 202 of file KDChartAbstractAreaBase.cpp.
References d, and KDChart::AbstractAreaBase::paintFrameAttributes().
Referenced by KDChart::TextArea::paintAll(), KDChart::AbstractAreaWidget::paintAll(), and KDChart::AbstractArea::paintAll().
void AbstractAreaBase::paintFrameAttributes | ( | QPainter & | painter, | |
const QRect & | rectangle, | |||
const KDChart::FrameAttributes & | attributes | |||
) | [static, inherited] |
Definition at line 175 of file KDChartAbstractAreaBase.cpp.
References KDChart::FrameAttributes::isVisible(), KDChart::FrameAttributes::pen(), and KDChart::PrintingParameters::scalePen().
Referenced by KDChart::AbstractAreaBase::paintFrame().
void AbstractArea::paintIntoRect | ( | QPainter & | painter, | |
const QRect & | rect | |||
) | [virtual, inherited] |
Draws the background and frame, then calls paint().
In most cases there is no need to overwrite this method in a derived class, but you would overwrite AbstractLayoutItem::paint() instead.
Definition at line 108 of file KDChartAbstractArea.cpp.
References KDChart::AbstractArea::paintAll().
const KDChart::Chart * KDChart::AbstractCoordinatePlane::parent | ( | ) | const [inherited] |
Definition at line 204 of file KDChartAbstractCoordinatePlane.cpp.
References d.
KDChart::Chart * KDChart::AbstractCoordinatePlane::parent | ( | ) | [inherited] |
Definition at line 209 of file KDChartAbstractCoordinatePlane.cpp.
References d.
Referenced by KDChart::AbstractCoordinatePlane::mousePressEvent(), KDChart::LeveyJenningsAxis::paintAsAbscissa(), and KDChart::LeveyJenningsAxis::paintAsOrdinate().
QLayout* KDChart::AbstractLayoutItem::parentLayout | ( | ) | [inherited] |
Definition at line 76 of file KDChartLayoutItems.h.
void KDChart::AbstractArea::positionChanged | ( | AbstractArea * | ) | [signal, inherited] |
Referenced by KDChart::AbstractArea::positionHasChanged().
void AbstractArea::positionHasChanged | ( | ) | [protected, virtual, inherited] |
Reimplemented from KDChart::AbstractAreaBase.
Definition at line 152 of file KDChartAbstractArea.cpp.
References KDChart::AbstractArea::positionChanged().
void KDChart::AbstractCoordinatePlane::propertiesChanged | ( | ) | [signal, inherited] |
Emitted upon change of a property of the Coordinate Plane or any of its components.
Referenced by addDiagram(), adjustHorizontalRangeToData(), adjustRangesToData(), adjustVerticalRangeToData(), handleFixedDataCoordinateSpaceRelation(), setAutoAdjustGridToZoom(), setAutoAdjustHorizontalRangeToData(), setAutoAdjustVerticalRangeToData(), setAxesCalcModes(), setAxesCalcModeX(), setAxesCalcModeY(), KDChart::PolarCoordinatePlane::setGridAttributes(), setGridAttributes(), setHorizontalRange(), setHorizontalRangeReversed(), setIsometricScaling(), setVerticalRange(), setVerticalRangeReversed(), setZoomCenter(), setZoomFactors(), setZoomFactorX(), and setZoomFactorY().
AbstractCoordinatePlane * KDChart::AbstractCoordinatePlane::referenceCoordinatePlane | ( | ) | const [inherited] |
There are two ways, in which planes can be caused to interact, in where they are put layouting wise: The first is the reference plane.
If such a reference plane is set, on a plane, it will use the same cell in the layout as that one. In addition to this, planes can share an axis. In that case they will be laid out in relation to each other as suggested by the position of the axis. If, for example Plane1 and Plane2 share an axis at position Left, that will result in the layout: Axis Plane1 Plane 2, vertically. If Plane1 also happens to be Plane2's reference plane, both planes are drawn over each other. The reference plane concept allows two planes to share the same space even if neither has any axis, and in case there are shared axis, it is used to decided, whether the planes should be painted on top of each other or laid out vertically or horizontally next to each other.
Definition at line 194 of file KDChartAbstractCoordinatePlane.cpp.
References d.
void KDChart::AbstractCoordinatePlane::relayout | ( | ) | [slot, inherited] |
Calling relayout() on the plane triggers the global KDChart::Chart::slotRelayout().
Definition at line 273 of file KDChartAbstractCoordinatePlane.cpp.
References KDChart::AbstractCoordinatePlane::needRelayout().
Referenced by KDChart::AbstractCoordinatePlane::addDiagram(), and KDChart::AbstractCoordinatePlane::takeDiagram().
void KDChart::AbstractLayoutItem::removeFromParentLayout | ( | ) | [inherited] |
Definition at line 80 of file KDChartLayoutItems.h.
Referenced by KDChart::Chart::takeCoordinatePlane().
void AbstractCoordinatePlane::replaceDiagram | ( | AbstractDiagram * | diagram, | |
AbstractDiagram * | oldDiagram = 0 | |||
) | [virtual, inherited] |
Replaces the old diagram, or appends the diagram, it there is none yet.
diagram | The diagram to be used instead of the old diagram. This parameter must not be zero, or the method will do nothing. | |
oldDiagram | The diagram to be removed by the new diagram. This diagram will be deleted automatically. If the parameter is omitted, the very first diagram will be replaced. In case, there was no diagram yet, the new diagram will just be added. |
Definition at line 90 of file KDChartAbstractCoordinatePlane.cpp.
References KDChart::AbstractCoordinatePlane::addDiagram(), d, KDChart::AbstractCoordinatePlane::layoutDiagrams(), KDChart::AbstractCoordinatePlane::layoutPlanes(), KDChart::AbstractCoordinatePlane::takeDiagram(), and KDChart::AbstractCoordinatePlane::update().
Referenced by KDChart::Widget::setType().
void CartesianCoordinatePlane::resetGridAttributes | ( | Qt::Orientation | orientation | ) |
Reset the attributes to be used for grid lines drawn in horizontal direction (or in vertical direction, resp.
). By calling this method you specify that the global attributes set by AbstractCoordinatePlane::setGlobalGridAttributes be used.
Definition at line 770 of file KDChartCartesianCoordinatePlane.cpp.
References KDChart::AbstractCoordinatePlane::update().
int AbstractArea::rightOverlap | ( | bool | doNotRecalculate = false |
) | const [virtual, inherited] |
This is called at layout time by KDChart::AutoSpacerLayoutItem::sizeHint().
The method triggers AbstractArea::sizeHint() to find out the amount of overlap at the right edge of the area.
Definition at line 82 of file KDChartAbstractArea.cpp.
References d.
Referenced by KDChart::AutoSpacerLayoutItem::sizeHint().
void CartesianCoordinatePlane::setAutoAdjustGridToZoom | ( | bool | autoAdjust | ) |
Disable / re-enable the built-in grid adjusting feature.
By default additional lines will be drawn in a Linear grid when zooming in.
Definition at line 809 of file KDChartCartesianCoordinatePlane.cpp.
References d, and KDChart::AbstractCoordinatePlane::propertiesChanged().
void CartesianCoordinatePlane::setAutoAdjustHorizontalRangeToData | ( | unsigned int | percentEmpty = 67 |
) |
Automatically adjust horizontal range settings to the ranges covered by the model's values, when ever the data have changed, and then emit horizontalRangeAutomaticallyAdjusted.
By default the horizontal range is adjusted automatically, if more than 67 percent of the available horizontal space would be empty otherwise.
Range setting is adjusted if more than percentEmpty
percent of the horizontal space covered by the coordinate plane would otherwise be empty. Automatic range adjusting can happen, when either all of the data are positive or all are negative.
Set percentEmpty to 100 to disable automatic range adjusting.
percentEmpty | The maximal percentage of horizontal space that may be empty. |
Definition at line 723 of file KDChartCartesianCoordinatePlane.cpp.
References d, layoutDiagrams(), and KDChart::AbstractCoordinatePlane::propertiesChanged().
void CartesianCoordinatePlane::setAutoAdjustVerticalRangeToData | ( | unsigned int | percentEmpty = 67 |
) |
Automatically adjust vertical range settings to the ranges covered by the model's values, when ever the data have changed, and then emit verticalRangeAutomaticallyAdjusted.
By default the vertical range is adjusted automatically, if more than 67 percent of the available vertical space would be empty otherwise.
Range setting is adjusted if more than percentEmpty
percent of the horizontal space covered by the coordinate plane would otherwise be empty. Automatic range adjusting can happen, when either all of the data are positive or all are negative.
Set percentEmpty to 100 to disable automatic range adjusting.
percentEmpty | The maximal percentage of horizontal space that may be empty. |
Definition at line 735 of file KDChartCartesianCoordinatePlane.cpp.
References d, layoutDiagrams(), and KDChart::AbstractCoordinatePlane::propertiesChanged().
void CartesianCoordinatePlane::setAxesCalcModes | ( | AxesCalcMode | mode | ) |
Specifies the calculation modes for all axes.
Definition at line 635 of file KDChartCartesianCoordinatePlane.cpp.
References d, and KDChart::AbstractCoordinatePlane::propertiesChanged().
void CartesianCoordinatePlane::setAxesCalcModeX | ( | AxesCalcMode | mode | ) |
Specifies the calculation mode for all Abscissa axes.
Definition at line 653 of file KDChartCartesianCoordinatePlane.cpp.
References d, and KDChart::AbstractCoordinatePlane::propertiesChanged().
void CartesianCoordinatePlane::setAxesCalcModeY | ( | AxesCalcMode | mode | ) |
Specifies the calculation mode for all Ordinate axes.
Definition at line 645 of file KDChartCartesianCoordinatePlane.cpp.
References d, and KDChart::AbstractCoordinatePlane::propertiesChanged().
void AbstractAreaBase::setBackgroundAttributes | ( | const BackgroundAttributes & | a | ) | [inherited] |
Definition at line 109 of file KDChartAbstractAreaBase.cpp.
References d, and KDChart::AbstractAreaBase::positionHasChanged().
void CartesianCoordinatePlane::setFixedDataCoordinateSpaceRelation | ( | bool | fixed | ) |
Allows to specify a fixed data-space / coordinate-space relation.
If set to true then fixed bar widths are used, so you see more bars as the window is made wider.
This allows to completely restrict the size of bars in a graph such that, upon resizing a window, the graphs coordinate plane will grow (add more ticks to x- and y-coordinates) rather than have the image grow.
Definition at line 443 of file KDChartCartesianCoordinatePlane.cpp.
References d.
void AbstractAreaBase::setFrameAttributes | ( | const FrameAttributes & | a | ) | [inherited] |
Definition at line 95 of file KDChartAbstractAreaBase.cpp.
References d, and KDChart::AbstractAreaBase::positionHasChanged().
Referenced by KDChart::Legend::clone().
void CartesianCoordinatePlane::setGeometry | ( | const QRect & | r | ) | [virtual] |
reimplement from AbstractCoordinatePlane
Reimplemented from KDChart::AbstractCoordinatePlane.
Definition at line 915 of file KDChartCartesianCoordinatePlane.cpp.
References KDChart::AbstractCoordinatePlane::diagram(), KDChart::AbstractCoordinatePlane::diagrams(), drawingArea(), KDChart::AbstractCoordinatePlane::geometry(), and KDChart::AbstractDiagram::resize().
void KDChart::AbstractCoordinatePlane::setGlobalGridAttributes | ( | const GridAttributes & | a | ) | [inherited] |
Set the grid attributes to be used by this coordinate plane.
To disable grid painting, for example, your code should like this:
GridAttributes ga = plane->globalGridAttributes();
ga.setGlobalGridVisible( false );
plane->setGlobalGridAttributes( ga );
Definition at line 165 of file KDChartAbstractCoordinatePlane.cpp.
References d, and KDChart::AbstractCoordinatePlane::update().
void CartesianCoordinatePlane::setGridAttributes | ( | Qt::Orientation | orientation, | |
const GridAttributes & | a | |||
) |
Set the attributes to be used for grid lines drawn in horizontal direction (or in vertical direction, resp.
).
To disable horizontal grid painting, for example, your code should like this:
GridAttributes ga = plane->gridAttributes( Qt::Horizontal ); ga.setGridVisible( false ); plane-setGridAttributes( Qt::Horizontal, ga );
Definition at line 757 of file KDChartCartesianCoordinatePlane.cpp.
References d, KDChart::AbstractCoordinatePlane::propertiesChanged(), and KDChart::AbstractCoordinatePlane::update().
void KDChart::AbstractCoordinatePlane::setGridNeedsRecalculate | ( | ) | [slot, inherited] |
Used by the chart to clear the cached grid data.
Definition at line 184 of file KDChartAbstractCoordinatePlane.cpp.
References d.
Referenced by KDChart::Chart::resizeEvent().
void CartesianCoordinatePlane::setHorizontalRange | ( | const QPair< qreal, qreal > & | range | ) |
Set the boundaries of the visible value space displayed in horizontal direction.
This is also known as the horizontal viewport.
By default the horizontal range is adjusted to the range covered by the model's data, see setAutoAdjustHorizontalRangeToData for details. Calling setHorizontalRange with a valid range disables this default automatic adjusting, while on the other hand automatic adjusting will set these ranges.
To disable use of this range you can either pass an empty pair by using the default constructor QPair() or you can set both values to the same which constitutes a null range.
range | a pair of values representing the smalles and the largest horizontal value space coordinate displayed. |
Definition at line 661 of file KDChartCartesianCoordinatePlane.cpp.
References d, layoutDiagrams(), and KDChart::AbstractCoordinatePlane::propertiesChanged().
void CartesianCoordinatePlane::setHorizontalRangeReversed | ( | bool | reverse | ) |
Sets whether the horizontal range should be reversed or not, i.e.
small values to the left and large values to the right (the default) or vice versa.
reverse | Whether the horizontal range should be reversed or not |
Definition at line 873 of file KDChartCartesianCoordinatePlane.cpp.
References d, layoutDiagrams(), and KDChart::AbstractCoordinatePlane::propertiesChanged().
void CartesianCoordinatePlane::setIsometricScaling | ( | bool | onOff | ) |
Definition at line 533 of file KDChartCartesianCoordinatePlane.cpp.
References d, layoutDiagrams(), and KDChart::AbstractCoordinatePlane::propertiesChanged().
void KDChart::AbstractCoordinatePlane::setParent | ( | KDChart::Chart * | parent | ) | [inherited] |
Called internally by KDChart::Chart.
Definition at line 199 of file KDChartAbstractCoordinatePlane.cpp.
References d.
Referenced by KDChart::Chart::addCoordinatePlane(), and KDChart::Chart::takeCoordinatePlane().
void KDChart::AbstractLayoutItem::setParentLayout | ( | QLayout * | lay | ) | [inherited] |
Definition at line 72 of file KDChartLayoutItems.h.
void KDChart::AbstractLayoutItem::setParentWidget | ( | QWidget * | widget | ) | [virtual, inherited] |
Inform the item about its widget: This enables the item, to trigger that widget's update, whenever the size of the item's contents has changed.
Thus, you need to call setParentWidget on every item, that has a non-fixed size.
Definition at line 62 of file KDChartLayoutItems.cpp.
References KDChart::AbstractLayoutItem::mParent.
Referenced by KDChart::HeaderFooter::setParent(), and KDChart::AbstractCartesianDiagram::takeAxis().
void KDChart::AbstractCoordinatePlane::setReferenceCoordinatePlane | ( | AbstractCoordinatePlane * | plane | ) | [inherited] |
Set another coordinate plane to be used as the reference plane for this one.
plane | The coordinate plane to be used the reference plane for this one.
|
Definition at line 189 of file KDChartAbstractCoordinatePlane.cpp.
References d.
void KDChart::AbstractCoordinatePlane::setRubberBandZoomingEnabled | ( | bool | enable | ) | [inherited] |
Enables or disables zooming with a rubber band using the mouse.
Definition at line 285 of file KDChartAbstractCoordinatePlane.cpp.
References d.
void CartesianCoordinatePlane::setVerticalRange | ( | const QPair< qreal, qreal > & | range | ) |
Set the boundaries of the visible value space displayed in vertical direction.
This is also known as the vertical viewport.
By default the vertical range is adjusted to the range covered by the model's data, see setAutoAdjustVerticalRangeToData for details. Calling setVerticalRange with a valid range disables this default automatic adjusting, while on the other hand automatic adjusting will set these ranges.
To disable use of this range you can either pass an empty pair by using the default constructor QPair() or you can set setting both values to the same which constitutes a null range.
range | a pair of values representing the smalles and the largest vertical value space coordinate displayed. |
Definition at line 672 of file KDChartCartesianCoordinatePlane.cpp.
References d, layoutDiagrams(), and KDChart::AbstractCoordinatePlane::propertiesChanged().
void CartesianCoordinatePlane::setVerticalRangeReversed | ( | bool | reverse | ) |
Sets whether the vertical range should be reversed or not, i.e.
small values at the bottom and large values at the top (the default) or vice versa.
reverse | Whether the vertical range should be reversed or not |
Definition at line 888 of file KDChartCartesianCoordinatePlane.cpp.
References d, layoutDiagrams(), and KDChart::AbstractCoordinatePlane::propertiesChanged().
void CartesianCoordinatePlane::setXAxisStartAtZero | ( | bool | fixedStart | ) |
Allows to fix the lower bound of X axis to zero when diagram is in first quadrant.
The default behavior is to lower x or y bound to be 0. If this behaviour is not wanted, either CartesianCoordinatePlane::setHorizontalRange could be used instead of letting KDChart auto-adjust the ranges, or this method can be used to disable this behavior.
Definition at line 469 of file KDChartCartesianCoordinatePlane.cpp.
References d.
void CartesianCoordinatePlane::setZoomCenter | ( | const QPointF & | center | ) | [virtual] |
Reimplemented from KDChart::AbstractCoordinatePlane.
Definition at line 602 of file KDChartCartesianCoordinatePlane.cpp.
References doneSetZoomCenter(), and KDChart::AbstractCoordinatePlane::propertiesChanged().
void CartesianCoordinatePlane::setZoomFactors | ( | double | factorX, | |
double | factorY | |||
) | [virtual] |
Reimplemented from KDChart::AbstractCoordinatePlane.
Definition at line 581 of file KDChartCartesianCoordinatePlane.cpp.
References doneSetZoomFactorX(), doneSetZoomFactorY(), and KDChart::AbstractCoordinatePlane::propertiesChanged().
void CartesianCoordinatePlane::setZoomFactorX | ( | double | factor | ) | [virtual] |
Reimplemented from KDChart::AbstractCoordinatePlane.
Definition at line 588 of file KDChartCartesianCoordinatePlane.cpp.
References doneSetZoomFactorX(), and KDChart::AbstractCoordinatePlane::propertiesChanged().
void CartesianCoordinatePlane::setZoomFactorY | ( | double | factor | ) | [virtual] |
Reimplemented from KDChart::AbstractCoordinatePlane.
Definition at line 595 of file KDChartCartesianCoordinatePlane.cpp.
References doneSetZoomFactorY(), and KDChart::AbstractCoordinatePlane::propertiesChanged().
AbstractCoordinatePlane * CartesianCoordinatePlane::sharedAxisMasterPlane | ( | QPainter * | p = 0 |
) | [virtual] |
reimpl
Reimplemented from KDChart::AbstractCoordinatePlane.
Definition at line 826 of file KDChartCartesianCoordinatePlane.cpp.
References KDChart::AbstractCartesianDiagram::axes(), KDChart::AbstractAxis::coordinatePlane(), KDChart::AbstractCoordinatePlane::diagram(), KDChart::CartesianAxis::isAbscissa(), KDChart::CartesianAxis::isOrdinate(), and translate().
QSize KDChart::AbstractCoordinatePlane::sizeHint | ( | ) | const [virtual, inherited] |
pure virtual in QLayoutItem
Definition at line 239 of file KDChartAbstractCoordinatePlane.cpp.
References KDChart::AbstractCoordinatePlane::maximumSize().
void KDChart::AbstractLayoutItem::sizeHintChanged | ( | ) | const [virtual, inherited] |
Report changed size hint: ask the parent widget to recalculate the layout.
Definition at line 84 of file KDChartLayoutItems.cpp.
References KDChart::AbstractLayoutItem::mParent.
Referenced by KDChart::TextLayoutItem::sizeHintAndRotatedCorners().
QSizePolicy KDChart::AbstractCoordinatePlane::sizePolicy | ( | ) | const [virtual, inherited] |
[reimplemented]
Reimplemented in KDChart::TernaryCoordinatePlane.
Definition at line 160 of file KDChartAbstractCoordinatePlane.cpp.
void CartesianCoordinatePlane::slotLayoutChanged | ( | AbstractDiagram * | ) | [protected, slot] |
Definition at line 149 of file KDChartCartesianCoordinatePlane.cpp.
References layoutDiagrams().
Referenced by addDiagram().
void AbstractCoordinatePlane::takeDiagram | ( | AbstractDiagram * | diagram | ) | [virtual, inherited] |
Removes the diagram from the plane, without deleting it.
The plane no longer owns the diagram, so it is the caller's responsibility to delete the diagram.
Definition at line 111 of file KDChartAbstractCoordinatePlane.cpp.
References d, KDChart::AbstractCoordinatePlane::layoutDiagrams(), KDChart::AbstractCoordinatePlane::layoutPlanes(), KDChart::AbstractCoordinatePlane::relayout(), KDChart::AbstractDiagram::setCoordinatePlane(), and KDChart::AbstractCoordinatePlane::update().
Referenced by KDChart::AbstractCoordinatePlane::replaceDiagram().
int AbstractArea::topOverlap | ( | bool | doNotRecalculate = false |
) | const [virtual, inherited] |
This is called at layout time by KDChart::AutoSpacerLayoutItem::sizeHint().
The method triggers AbstractArea::sizeHint() to find out the amount of overlap at the top edge of the area.
Definition at line 90 of file KDChartAbstractArea.cpp.
References d.
Referenced by KDChart::AutoSpacerLayoutItem::sizeHint().
const QPointF CartesianCoordinatePlane::translate | ( | const QPointF & | diagramPoint | ) | const [virtual] |
Translate the given point in value space coordinates to a position in pixel space.
diagramPoint | The point in value coordinates.
|
Implements KDChart::AbstractCoordinatePlane.
Definition at line 519 of file KDChartCartesianCoordinatePlane.cpp.
References d.
Referenced by KDChart::LeveyJenningsAxis::paintAsOrdinate(), and sharedAxisMasterPlane().
const QPointF CartesianCoordinatePlane::translateBack | ( | const QPointF & | screenPoint | ) | const [protected] |
Reimplemented in KDChart::LeveyJenningsCoordinatePlane.
Definition at line 528 of file KDChartCartesianCoordinatePlane.cpp.
References d.
Referenced by visibleDataRange().
void KDChart::AbstractCoordinatePlane::update | ( | ) | [slot, inherited] |
Calling update() on the plane triggers the global KDChart::Chart::update().
Definition at line 267 of file KDChartAbstractCoordinatePlane.cpp.
References KDChart::AbstractCoordinatePlane::needUpdate().
Referenced by KDChart::AbstractCoordinatePlane::addDiagram(), KDChart::PolarCoordinatePlane::adjustZoomAndRepaint(), layoutDiagrams(), KDChart::AbstractCoordinatePlane::replaceDiagram(), KDChart::PolarCoordinatePlane::resetGridAttributes(), resetGridAttributes(), KDChart::AbstractCoordinatePlane::setGlobalGridAttributes(), KDChart::PolarCoordinatePlane::setGridAttributes(), setGridAttributes(), and KDChart::AbstractCoordinatePlane::takeDiagram().
QPair< qreal, qreal > CartesianCoordinatePlane::verticalRange | ( | ) | const |
Definition at line 689 of file KDChartCartesianCoordinatePlane.cpp.
References d.
QRectF CartesianCoordinatePlane::visibleDataRange | ( | ) | const |
Returns the currently visible data range.
Might be greater than the range of the grid.
Definition at line 903 of file KDChartCartesianCoordinatePlane.cpp.
References drawingArea(), and translateBack().
QRectF CartesianCoordinatePlane::visibleDiagramArea | ( | ) | const |
Returns the visible part of the diagram area, i.e.
diagramArea().intersected( drawingArea() )
Definition at line 376 of file KDChartCartesianCoordinatePlane.cpp.
References diagramArea(), and drawingArea().
Referenced by KDChart::Measure::sizeOfArea().
bool CartesianCoordinatePlane::xAxisStartAtZero | ( | ) | const |
Definition at line 477 of file KDChartCartesianCoordinatePlane.cpp.
References d.
QPointF CartesianCoordinatePlane::zoomCenter | ( | ) | const [virtual] |
Reimplemented from KDChart::AbstractCoordinatePlane.
Definition at line 609 of file KDChartCartesianCoordinatePlane.cpp.
References d.
Referenced by handleFixedDataCoordinateSpaceRelation().
double CartesianCoordinatePlane::zoomFactorX | ( | ) | const [virtual] |
Reimplemented from KDChart::AbstractCoordinatePlane.
Definition at line 614 of file KDChartCartesianCoordinatePlane.cpp.
References d.
Referenced by handleFixedDataCoordinateSpaceRelation().
double CartesianCoordinatePlane::zoomFactorY | ( | ) | const [virtual] |
Reimplemented from KDChart::AbstractCoordinatePlane.
Definition at line 619 of file KDChartCartesianCoordinatePlane.cpp.
References d.
Referenced by handleFixedDataCoordinateSpaceRelation().
QWidget* KDChart::AbstractLayoutItem::mParent [protected, inherited] |
QLayout* KDChart::AbstractLayoutItem::mParentLayout [protected, inherited] |
Definition at line 91 of file KDChartLayoutItems.h.
Referenced by KDChart::AutoSpacerLayoutItem::paint().