KD Chart 2  [rev.2.5.1]
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
Public Types | Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes | List of all members
KDChart::CartesianCoordinatePlane Class Reference

Cartesian coordinate plane. More...

#include <KDChartCartesianCoordinatePlane.h>

Inheritance diagram for KDChart::CartesianCoordinatePlane:
Inheritance graph
[legend]
Collaboration diagram for KDChart::CartesianCoordinatePlane:
Collaboration graph
[legend]

Public Types

enum  AxesCalcMode {
  Linear,
  Logarithmic
}
 

Public Slots

void adjustHorizontalRangeToData ()
 Adjust horizontal range settings to the ranges covered by the model's data values. More...
 
void adjustRangesToData ()
 Adjust both, horizontal and vertical range settings to the ranges covered by the model's data values. More...
 
void adjustVerticalRangeToData ()
 Adjust vertical range settings to the ranges covered by the model's data values. More...
 
void layoutPlanes ()
 Calling layoutPlanes() on the plane triggers the global KDChart::Chart::slotLayoutPlanes() More...
 
void relayout ()
 Calling relayout() on the plane triggers the global KDChart::Chart::slotRelayout() More...
 
void setGridNeedsRecalculate ()
 Used by the chart to clear the cached grid data. More...
 
void update ()
 Calling update() on the plane triggers the global KDChart::Chart::update() More...
 

Signals

void boundariesChanged ()
 
void destroyedCoordinatePlane (AbstractCoordinatePlane *)
 Emitted when this coordinate plane is destroyed. More...
 
void geometryChanged (QRect, QRect)
 Emitted after the geometry of the Coordinate Plane has been changed. More...
 
void internal_geometryChanged (QRect, QRect)
 
void needLayoutPlanes ()
 Emitted when plane needs to trigger the Chart's layouting of the coord. More...
 
void needRelayout ()
 Emitted when plane needs to trigger the Chart's layouting. More...
 
void needUpdate ()
 Emitted when plane needs to update its drawings. More...
 
void positionChanged (AbstractArea *)
 
void propertiesChanged ()
 Emitted upon change of a property of the Coordinate Plane or any of its components. More...
 
void viewportCoordinateSystemChanged ()
 Emitted upon change of the view coordinate system. More...
 

Public Member Functions

void addDiagram (AbstractDiagram *diagram)
 Adds a diagram to this coordinate plane. More...
 
void alignToReferencePoint (const RelativePosition &position)
 
const bool autoAdjustGridToZoom () const
 Return the status of the built-in grid adjusting feature. More...
 
unsigned int autoAdjustHorizontalRangeToData () const
 Returns the maximal allowed percent of the horizontal space covered by the coordinate plane that may be empty. More...
 
unsigned int autoAdjustVerticalRangeToData () const
 Returns the maximal allowed percent of the vertical space covered by the coordinate plane that may be empty. More...
 
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(). More...
 
 CartesianCoordinatePlane (Chart *parent=0)
 
bool compare (const AbstractAreaBase *other) const
 Returns true if both areas have the same settings. More...
 
AbstractDiagramdiagram ()
 
QRectF diagramArea () const
 Returns the (physical) area occupied by the diagram. More...
 
AbstractDiagramList diagrams ()
 
ConstAbstractDiagramList diagrams () const
 
bool doesIsometricScaling () const
 
Qt::Orientations expandingDirections () const
 pure virtual in QLayoutItem More...
 
FrameAttributes frameAttributes () const
 
virtual QRect geometry () const
 pure virtual in QLayoutItem More...
 
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. More...
 
bool hasFixedDataCoordinateSpaceRelation () const
 
bool hasOwnGridAttributes (Qt::Orientation orientation) const
 
QPair< qreal, qreal > horizontalRange () const
 
bool isCornerSpacersEnabled () const
 
virtual bool isEmpty () const
 pure virtual in QLayoutItem More...
 
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. More...
 
virtual int leftOverlap (bool doNotRecalculate=false) const
 This is called at layout time by KDChart::AutoSpacerLayoutItem::sizeHint(). More...
 
QRectF logicalArea () const
 Returns the logical area, i.e., the rectangle defined by the very top left and very bottom right coordinate. More...
 
virtual QSize maximumSize () const
 pure virtual in QLayoutItem More...
 
virtual QSize minimumSize () const
 pure virtual in QLayoutItem More...
 
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 More...
 
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. More...
 
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. More...
 
virtual void paintFrame (QPainter &painter, const QRect &rectangle)
 
virtual void paintIntoRect (QPainter &painter, const QRect &rect)
 Draws the background and frame, then calls paint(). More...
 
Chartparent ()
 
const Chartparent () const
 
QLayout * parentLayout ()
 
AbstractCoordinatePlanereferenceCoordinatePlane () 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. More...
 
void removeFromParentLayout ()
 
virtual void replaceDiagram (AbstractDiagram *diagram, AbstractDiagram *oldDiagram=0)
 Replaces the old diagram, or appends the diagram, it there is none yet. More...
 
void resetGridAttributes (Qt::Orientation orientation)
 Reset the attributes to be used for grid lines drawn in horizontal direction (or in vertical direction, resp.). More...
 
virtual int rightOverlap (bool doNotRecalculate=false) const
 This is called at layout time by KDChart::AutoSpacerLayoutItem::sizeHint(). More...
 
void setAutoAdjustGridToZoom (bool autoAdjust)
 Disable / re-enable the built-in grid adjusting feature. More...
 
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. More...
 
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. More...
 
void setAxesCalcModes (AxesCalcMode mode)
 Specifies the calculation modes for all axes. More...
 
void setAxesCalcModeX (AxesCalcMode mode)
 Specifies the calculation mode for all Abscissa axes. More...
 
void setAxesCalcModeY (AxesCalcMode mode)
 Specifies the calculation mode for all Ordinate axes. More...
 
void setBackgroundAttributes (const BackgroundAttributes &a)
 
void setCornerSpacersEnabled (bool enable)
 Enables or disables the use of spacers in the plane corners. More...
 
void setFixedDataCoordinateSpaceRelation (bool fixed)
 Allows to specify a fixed data-space / coordinate-space relation. More...
 
void setFrameAttributes (const FrameAttributes &a)
 
void setGeometry (const QRect &r)
 reimplemented from AbstractCoordinatePlane More...
 
void setGlobalGridAttributes (const GridAttributes &)
 Set the grid attributes to be used by this coordinate plane. More...
 
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.). More...
 
void setHorizontalRange (const QPair< qreal, qreal > &range)
 Set the boundaries of the visible value space displayed in horizontal direction. More...
 
void setHorizontalRangeReversed (bool reverse)
 Sets whether the horizontal range should be reversed or not, i.e. More...
 
void setIsometricScaling (bool onOff)
 If onOff is true, enforce that X and Y distances are scaled by the same factor. More...
 
void setParent (Chart *parent)
 Called internally by KDChart::Chart. More...
 
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. More...
 
void setReferenceCoordinatePlane (AbstractCoordinatePlane *plane)
 Set another coordinate plane to be used as the reference plane for this one. More...
 
void setRubberBandZoomingEnabled (bool enable)
 Enables or disables zooming with a rubber band using the mouse. More...
 
void setVerticalRange (const QPair< qreal, qreal > &range)
 Set the boundaries of the visible value space displayed in vertical direction. More...
 
void setVerticalRangeReversed (bool reverse)
 Sets whether the vertical range should be reversed or not, i.e. More...
 
void setXAxisStartAtZero (bool fixedStart)
 Allows to fix the lower bound of X axis to zero when diagram is in first quadrant. More...
 
virtual void setZoomCenter (const QPointF &center)
 
virtual void setZoomFactors (qreal factorX, qreal factorY)
 
virtual void setZoomFactorX (qreal factor)
 
virtual void setZoomFactorY (qreal factor)
 
AbstractCoordinatePlanesharedAxisMasterPlane (QPainter *p=0)
 reimpl More...
 
virtual void sizeHintChanged () const
 Report changed size hint: ask the parent widget to recalculate the layout. More...
 
virtual void takeDiagram (AbstractDiagram *diagram)
 Removes the diagram from the plane, without deleting it. More...
 
virtual int topOverlap (bool doNotRecalculate=false) const
 This is called at layout time by KDChart::AutoSpacerLayoutItem::sizeHint(). More...
 
const QPointF translate (const QPointF &diagramPoint) const
 Translate the given point in value space coordinates to a position in pixel space. More...
 
const QPointF translateBack (const QPointF &screenPoint) const
 
QPair< qreal, qreal > verticalRange () const
 
QRectF visibleDataRange () const
 Returns the currently visible data range. More...
 
QRectF visibleDiagramArea () const
 Returns the visible part of the diagram area, i.e. More...
 
bool xAxisStartAtZero () const
 
virtual QPointF zoomCenter () const
 
virtual qreal zoomFactorX () const
 
virtual qreal 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 &center)
 
bool doneSetZoomFactorX (qreal factor)
 
bool doneSetZoomFactorY (qreal factor)
 
virtual QRectF drawingArea () const
 
virtual DataDimensionsList getDataDimensionsList () const
 
QRectF getRawDataBoundingRectFromDiagrams () const
 
void handleFixedDataCoordinateSpaceRelation (const QRectF &geometry)
 
bool hasHeightForWidth () const
 
int heightForWidth (int w) const
 
QRect innerRect () const
 
void layoutDiagrams ()
 Distribute the available space among the diagrams and axes. More...
 
void paintEvent (QPaintEvent *)
 
virtual void positionHasChanged ()
 
QSize sizeHint () const
 pure virtual in QLayoutItem More...
 

Protected Attributes

QWidgetmParent
 
QLayout * mParentLayout
 

Detailed Description

Cartesian coordinate plane.

Definition at line 39 of file KDChartCartesianCoordinatePlane.h.

Member Enumeration Documentation

Enumerator
Linear 
Logarithmic 

Definition at line 53 of file KDChartAbstractCoordinatePlane.h.

Constructor & Destructor Documentation

CartesianCoordinatePlane::CartesianCoordinatePlane ( Chart parent = 0)
explicit

Definition at line 70 of file KDChartCartesianCoordinatePlane.cpp.

CartesianCoordinatePlane::~CartesianCoordinatePlane ( )

Definition at line 76 of file KDChartCartesianCoordinatePlane.cpp.

Member Function Documentation

void CartesianCoordinatePlane::addDiagram ( AbstractDiagram diagram)
virtual
QRectF CartesianCoordinatePlane::adjustedToMaxEmptyInnerPercentage ( const QRectF &  r,
unsigned int  percentX,
unsigned int  percentY 
) const
protected
void CartesianCoordinatePlane::adjustHorizontalRangeToData ( )
slot

Adjust horizontal range settings to the ranges covered by the model's data values.

See Also
adjustRangesToData

Definition at line 654 of file KDChartCartesianCoordinatePlane.cpp.

References d, getRawDataBoundingRectFromDiagrams(), layoutDiagrams(), and KDChart::AbstractCoordinatePlane::propertiesChanged().

void CartesianCoordinatePlane::adjustRangesToData ( )
slot
void CartesianCoordinatePlane::adjustVerticalRangeToData ( )
slot

Adjust vertical range settings to the ranges covered by the model's data values.

See Also
adjustRangesToData

Definition at line 663 of file KDChartCartesianCoordinatePlane.cpp.

References d, getRawDataBoundingRectFromDiagrams(), layoutDiagrams(), and KDChart::AbstractCoordinatePlane::propertiesChanged().

void AbstractAreaBase::alignToReferencePoint ( const RelativePosition position)
inherited

Definition at line 81 of file KDChartAbstractAreaBase.cpp.

QRect AbstractArea::areaGeometry ( ) const
protectedvirtualinherited
const bool CartesianCoordinatePlane::autoAdjustGridToZoom ( ) const

Return the status of the built-in grid adjusting feature.

See Also
setAutoAdjustGridToZoom

Definition at line 770 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.

Returns
A percent value indicating how much of the horizontal space may be empty. If more than this is empty, automatic range adjusting is applied. A return value of 100 indicates that no such automatic adjusting is done at all.
See Also
setAutoAdjustHorizontalRangeToData, adjustRangesToData

Definition at line 696 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.

Returns
A percent value indicating how much of the vertical space may be empty. If more than this is empty, automatic range adjusting is applied. A return value of 100 indicates that no such automatic adjusting is done at all.
See Also
setAutoAdjustVerticalRangeToData, adjustRangesToData

Definition at line 701 of file KDChartCartesianCoordinatePlane.cpp.

References d.

CartesianCoordinatePlane::AxesCalcMode CartesianCoordinatePlane::axesCalcModeX ( ) const

Definition at line 569 of file KDChartCartesianCoordinatePlane.cpp.

References d.

Referenced by adjustedToMaxEmptyInnerPercentage(), and getDataDimensionsList().

CartesianCoordinatePlane::AxesCalcMode CartesianCoordinatePlane::axesCalcModeY ( ) const

Definition at line 564 of file KDChartCartesianCoordinatePlane.cpp.

References d.

Referenced by adjustedToMaxEmptyInnerPercentage(), and getDataDimensionsList().

BackgroundAttributes AbstractAreaBase::backgroundAttributes ( ) const
inherited

Definition at line 111 of file KDChartAbstractAreaBase.cpp.

References d.

Referenced by KDChart::AbstractAreaBase::compare(), and updateCommonBrush().

int AbstractArea::bottomOverlap ( bool  doNotRecalculate = false) const
virtualinherited

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.

Note
The default implementation is not using any caching, it might make sense to implement a more sophisticated solution for derived classes that have complex work to do in sizeHint(). All we have here is a primitive flag to be set by the caller if it is sure that no sizeHint() needs to be called.

Definition at line 98 of file KDChartAbstractArea.cpp.

References d.

Referenced by KDChart::AutoSpacerLayoutItem::sizeHint().

void KDChart::AbstractCoordinatePlane::boundariesChanged ( )
signalinherited
QRectF CartesianCoordinatePlane::calculateRawDataBoundingRect ( ) const
protectedvirtual
bool AbstractAreaBase::compare ( const AbstractAreaBase other) const
inherited

Returns true if both areas have the same settings.

Definition at line 71 of file KDChartAbstractAreaBase.cpp.

References KDChart::AbstractAreaBase::backgroundAttributes(), and KDChart::AbstractAreaBase::frameAttributes().

void KDChart::AbstractCoordinatePlane::destroyedCoordinatePlane ( AbstractCoordinatePlane )
signalinherited

Emitted when this coordinate plane is destroyed.

Referenced by KDChart::AbstractCoordinatePlane::~AbstractCoordinatePlane().

AbstractDiagram * AbstractCoordinatePlane::diagram ( )
inherited
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),

.

See Also
setFixedDataCoordinateSpaceRelation
drawingArea

Definition at line 350 of file KDChartCartesianCoordinatePlane.cpp.

References d, and logicalArea().

Referenced by visibleDiagramArea().

AbstractDiagramList AbstractCoordinatePlane::diagrams ( )
inherited
ConstAbstractDiagramList AbstractCoordinatePlane::diagrams ( ) const
inherited
Returns
The list of diagrams associated with this coordinate plane.

Definition at line 145 of file KDChartAbstractCoordinatePlane.cpp.

References d.

bool CartesianCoordinatePlane::doesIsometricScaling ( ) const

Definition at line 475 of file KDChartCartesianCoordinatePlane.cpp.

References d.

bool CartesianCoordinatePlane::doneSetZoomCenter ( const QPointF &  center)
protected

Definition at line 504 of file KDChartCartesianCoordinatePlane.cpp.

References d.

Referenced by handleFixedDataCoordinateSpaceRelation(), and setZoomCenter().

bool CartesianCoordinatePlane::doneSetZoomFactorX ( qreal  factor)
protected
bool CartesianCoordinatePlane::doneSetZoomFactorY ( qreal  factor)
protected
QRectF CartesianCoordinatePlane::drawingArea ( ) const
protectedvirtual
Qt::Orientations CartesianCoordinatePlane::expandingDirections ( ) const
virtual

pure virtual in QLayoutItem

Reimplemented from KDChart::AbstractCoordinatePlane.

Definition at line 890 of file KDChartCartesianCoordinatePlane.cpp.

References d.

FrameAttributes AbstractAreaBase::frameAttributes ( ) const
inherited
QRect KDChart::AbstractCoordinatePlane::geometry ( ) const
virtualinherited
void KDChart::AbstractCoordinatePlane::geometryChanged ( QRect  ,
QRect   
)
signalinherited

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
protectedvirtual
void AbstractAreaBase::getFrameLeadings ( int &  left,
int &  top,
int &  right,
int &  bottom 
) const
inherited
QRectF CartesianCoordinatePlane::getRawDataBoundingRectFromDiagrams ( ) const
protected
GridAttributes KDChart::AbstractCoordinatePlane::globalGridAttributes ( ) const
inherited
Returns
The grid attributes used by this coordinate plane.
See Also
setGlobalGridAttributes
CartesianCoordinatePlane::gridAttributes

Definition at line 163 of file KDChartAbstractCoordinatePlane.cpp.

References d.

Referenced by gridAttributes().

const GridAttributes CartesianCoordinatePlane::gridAttributes ( Qt::Orientation  orientation) const
Returns
The attributes used for grid lines drawn in horizontal direction (or in vertical direction, resp.).
Note
This function always returns a valid set of grid attributes: If no special grid attributes were set foe this orientation the global attributes are returned, as returned by AbstractCoordinatePlane::globalGridAttributes.
See Also
setGridAttributes
resetGridAttributes
AbstractCoordinatePlane::globalGridAttributes
hasOwnGridAttributes

Definition at line 726 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.

Note
Returned list will contain different numbers of DataDimension, depending on the kind of coordinate plane used. For CartesianCoordinatePlane two DataDimension are returned: the first representing grid lines in X direction (matching the Abscissa axes) and the second indicating vertical grid lines (or Ordinate axes, resp.).
Returns
The dimensions used for drawing the grid lines.
See Also
DataDimension

Definition at line 168 of file KDChartAbstractCoordinatePlane.cpp.

References d.

Referenced by layoutDiagrams(), and KDChart::PaintingHelpers::paintValueTracker().

void CartesianCoordinatePlane::handleFixedDataCoordinateSpaceRelation ( const QRectF &  geometry)
protected
bool CartesianCoordinatePlane::hasFixedDataCoordinateSpaceRelation ( ) const

Definition at line 392 of file KDChartCartesianCoordinatePlane.cpp.

References d.

Referenced by KDChart::TextAttributes::calculatedFont().

bool CartesianCoordinatePlane::hasHeightForWidth ( ) const
protected

Definition at line 896 of file KDChartCartesianCoordinatePlane.cpp.

References d.

bool CartesianCoordinatePlane::hasOwnGridAttributes ( Qt::Orientation  orientation) const
Returns
Returns whether the grid attributes have been set for the respective direction via setGridAttributes( orientation ).

If false, the grid will use the global attributes set by AbstractCoordinatePlane::globalGridAttributes (or the default attributes, resp.)

See Also
setGridAttributes
resetGridAttributes
AbstractCoordinatePlane::globalGridAttributes

Definition at line 749 of file KDChartCartesianCoordinatePlane.cpp.

References d.

Referenced by gridAttributes().

int CartesianCoordinatePlane::heightForWidth ( int  w) const
protected

Definition at line 901 of file KDChartCartesianCoordinatePlane.cpp.

References logicalArea().

Referenced by setGeometry(), and sizeHint().

QPair< qreal, qreal > CartesianCoordinatePlane::horizontalRange ( ) const
Returns
The largest and smallest visible horizontal value space value. If this is not explicitly set,or if both values are the same, the plane will use the union of the dataBoundaries of all associated diagrams.
See Also
KDChart::AbstractDiagram::dataBoundaries

Definition at line 631 of file KDChartCartesianCoordinatePlane.cpp.

References visibleDataRange().

QRect AbstractAreaBase::innerRect ( ) const
protectedinherited
void KDChart::AbstractCoordinatePlane::internal_geometryChanged ( QRect  ,
QRect   
)
signalinherited
bool KDChart::AbstractCoordinatePlane::isCornerSpacersEnabled ( ) const
inherited
Returns
Whether this plane should have spacers in the corners formed by the presence of axes.

Definition at line 295 of file KDChartAbstractCoordinatePlane.cpp.

References d.

bool KDChart::AbstractCoordinatePlane::isEmpty ( ) const
virtualinherited

pure virtual in QLayoutItem

Definition at line 204 of file KDChartAbstractCoordinatePlane.cpp.

bool CartesianCoordinatePlane::isHorizontalRangeReversed ( ) const
Returns
Whether the horizontal range is reversed or not

Definition at line 832 of file KDChartCartesianCoordinatePlane.cpp.

References d.

Referenced by KDChart::PaintingHelpers::paintValueTracker().

bool KDChart::AbstractCoordinatePlane::isRubberBandZoomingEnabled ( ) const
inherited
Returns
Whether zooming with a rubber band using the mouse is enabled.

Definition at line 282 of file KDChartAbstractCoordinatePlane.cpp.

References d.

bool CartesianCoordinatePlane::isVerticalRangeReversed ( ) const
Returns
Whether the vertical range is reversed or not

Definition at line 847 of file KDChartCartesianCoordinatePlane.cpp.

References d.

Referenced by KDChart::PaintingHelpers::paintValueTracker().

const bool KDChart::AbstractCoordinatePlane::isVisiblePoint ( const QPointF &  point) const
inherited

Tests, if a point is visible on the coordinate plane.

Note
Before calling this function the point must have been translated into coordinate plane space.

Definition at line 426 of file KDChartAbstractCoordinatePlane.cpp.

References d.

void CartesianCoordinatePlane::layoutDiagrams ( )
protectedvirtual
void KDChart::AbstractCoordinatePlane::layoutPlanes ( )
slotinherited
int AbstractArea::leftOverlap ( bool  doNotRecalculate = false) const
virtualinherited

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.

Note
The default implementation is not using any caching, it might make sense to implement a more sophisticated solution for derived classes that have complex work to do in sizeHint(). All we have here is a primitive flag to be set by the caller if it is sure that no sizeHint() needs to be called.

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 329 of file KDChartCartesianCoordinatePlane.cpp.

References d, KDChart::DataDimension::distance(), KDChart::DataDimension::end, and KDChart::DataDimension::start.

Referenced by diagramArea(), heightForWidth(), layoutDiagrams(), setZoomCenter(), setZoomFactors(), setZoomFactorX(), and setZoomFactorY().

QSize KDChart::AbstractCoordinatePlane::maximumSize ( ) const
virtualinherited

pure virtual in QLayoutItem

Definition at line 216 of file KDChartAbstractCoordinatePlane.cpp.

QSize KDChart::AbstractCoordinatePlane::minimumSize ( ) const
virtualinherited

pure virtual in QLayoutItem

Definition at line 223 of file KDChartAbstractCoordinatePlane.cpp.

void KDChart::AbstractCoordinatePlane::mouseDoubleClickEvent ( QMouseEvent *  event)
virtualinherited

Definition at line 340 of file KDChartAbstractCoordinatePlane.cpp.

References d.

Referenced by KDChart::Chart::mouseDoubleClickEvent().

void KDChart::AbstractCoordinatePlane::mouseMoveEvent ( QMouseEvent *  event)
virtualinherited

Definition at line 407 of file KDChartAbstractCoordinatePlane.cpp.

References d.

Referenced by KDChart::Chart::mouseMoveEvent().

void KDChart::AbstractCoordinatePlane::mousePressEvent ( QMouseEvent *  event)
virtualinherited
void KDChart::AbstractCoordinatePlane::mouseReleaseEvent ( QMouseEvent *  event)
virtualinherited

Definition at line 354 of file KDChartAbstractCoordinatePlane.cpp.

References d.

Referenced by KDChart::Chart::mouseReleaseEvent().

void KDChart::AbstractCoordinatePlane::needLayoutPlanes ( )
signalinherited

Emitted when plane needs to trigger the Chart's layouting of the coord.

planes.

void KDChart::AbstractCoordinatePlane::needRelayout ( )
signalinherited

Emitted when plane needs to trigger the Chart's layouting.

void KDChart::AbstractCoordinatePlane::needUpdate ( )
signalinherited

Emitted when plane needs to update its drawings.

void CartesianCoordinatePlane::paint ( QPainter *  painter)
virtual
void AbstractArea::paintAll ( QPainter &  painter)
virtualinherited

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 
)
virtualinherited
void AbstractAreaBase::paintBackgroundAttributes ( QPainter &  painter,
const QRect &  rectangle,
const KDChart::BackgroundAttributes attributes 
)
staticinherited
void KDChart::AbstractLayoutItem::paintCtx ( PaintContext context)
virtualinherited

Default impl: Paint the complete item using its layouted position and size.

Reimplemented in KDChart::CartesianAxis, KDChart::LeveyJenningsAxis, and KDChart::TernaryAxis.

Definition at line 72 of file KDChartLayoutItems.cpp.

References KDChart::PaintContext::painter().

void KDChart::CartesianCoordinatePlane::paintEvent ( QPaintEvent *  )
protected
void AbstractAreaBase::paintFrame ( QPainter &  painter,
const QRect &  rectangle 
)
virtualinherited
void AbstractAreaBase::paintFrameAttributes ( QPainter &  painter,
const QRect &  rectangle,
const KDChart::FrameAttributes attributes 
)
staticinherited
void AbstractArea::paintIntoRect ( QPainter &  painter,
const QRect &  rect 
)
virtualinherited

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().

KDChart::Chart * KDChart::AbstractCoordinatePlane::parent ( )
inherited
const KDChart::Chart * KDChart::AbstractCoordinatePlane::parent ( ) const
inherited

Definition at line 193 of file KDChartAbstractCoordinatePlane.cpp.

References d.

QLayout* KDChart::AbstractLayoutItem::parentLayout ( )
inherited

Definition at line 78 of file KDChartLayoutItems.h.

void KDChart::AbstractArea::positionChanged ( AbstractArea )
signalinherited
void AbstractArea::positionHasChanged ( )
protectedvirtualinherited

Reimplemented from KDChart::AbstractAreaBase.

Definition at line 156 of file KDChartAbstractArea.cpp.

References KDChart::AbstractArea::positionChanged().

void KDChart::AbstractCoordinatePlane::propertiesChanged ( )
signalinherited
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.

Returns
The reference coordinate plane associated with this one.

Definition at line 183 of file KDChartAbstractCoordinatePlane.cpp.

References d.

void KDChart::AbstractCoordinatePlane::relayout ( )
slotinherited

Calling relayout() on the plane triggers the global KDChart::Chart::slotRelayout()

Definition at line 259 of file KDChartAbstractCoordinatePlane.cpp.

Referenced by KDChart::AbstractCoordinatePlane::addDiagram(), and KDChart::AbstractCoordinatePlane::takeDiagram().

void KDChart::AbstractLayoutItem::removeFromParentLayout ( )
inherited
void AbstractCoordinatePlane::replaceDiagram ( AbstractDiagram diagram,
AbstractDiagram oldDiagram = 0 
)
virtualinherited

Replaces the old diagram, or appends the diagram, it there is none yet.

Parameters
diagramThe diagram to be used instead of the old diagram. This parameter must not be zero, or the method will do nothing.
oldDiagramThe 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.
Note
If you want to re-use the old diagram, call takeDiagram and addDiagram, instead of using replaceDiagram.
See Also
addDiagram, takeDiagram

Definition at line 93 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.

See Also
setGridAttributes, gridAttributes
setAutoAdjustGridToZoom
AbstractCoordinatePlane::globalGridAttributes
hasOwnGridAttributes

Definition at line 719 of file KDChartCartesianCoordinatePlane.cpp.

References KDChart::AbstractCoordinatePlane::update().

int AbstractArea::rightOverlap ( bool  doNotRecalculate = false) const
virtualinherited

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.

Note
The default implementation is not using any caching, it might make sense to implement a more sophisticated solution for derived classes that have complex work to do in sizeHint(). All we have here is a primitive flag to be set by the caller if it is sure that no sizeHint() needs to be called.

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.

See Also
autoAdjustGridToZoom, setGridAttributes

Definition at line 758 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.

Parameters
percentEmptyThe maximal percentage of horizontal space that may be empty.
See Also
horizontalRangeAutomaticallyAdjusted
autoAdjustHorizontalRangeToData, adjustRangesToData
setHorizontalRange, setVerticalRange
setAutoAdjustVerticalRangeToData

Definition at line 672 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.

Parameters
percentEmptyThe maximal percentage of horizontal space that may be empty.
See Also
verticalRangeAutomaticallyAdjusted
autoAdjustVerticalRangeToData, adjustRangesToData
setHorizontalRange, setVerticalRange
setAutoAdjustHorizontalRangeToData

Definition at line 684 of file KDChartCartesianCoordinatePlane.cpp.

References d, layoutDiagrams(), and KDChart::AbstractCoordinatePlane::propertiesChanged().

void CartesianCoordinatePlane::setAxesCalcModes ( AxesCalcMode  mode)
void CartesianCoordinatePlane::setAxesCalcModeX ( AxesCalcMode  mode)

Specifies the calculation mode for all Abscissa axes.

Definition at line 597 of file KDChartCartesianCoordinatePlane.cpp.

References d, KDChart::AbstractCoordinatePlane::propertiesChanged(), and KDChart::AbstractCoordinatePlane::viewportCoordinateSystemChanged().

void CartesianCoordinatePlane::setAxesCalcModeY ( AxesCalcMode  mode)
void AbstractAreaBase::setBackgroundAttributes ( const BackgroundAttributes a)
inherited
void KDChart::AbstractCoordinatePlane::setCornerSpacersEnabled ( bool  enable)
inherited

Enables or disables the use of spacers in the plane corners.

Definition at line 287 of file KDChartAbstractCoordinatePlane.cpp.

References d.

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 385 of file KDChartCartesianCoordinatePlane.cpp.

References d, drawingArea(), and handleFixedDataCoordinateSpaceRelation().

void AbstractAreaBase::setFrameAttributes ( const FrameAttributes a)
inherited
void CartesianCoordinatePlane::setGeometry ( const QRect &  r)
virtual
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 );
See Also
globalGridAttributes
CartesianCoordinatePlane::setGridAttributes

Definition at line 157 of file KDChartAbstractCoordinatePlane.cpp.

References d.

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 );
Note
setGridAttributes overwrites the global attributes that were set by AbstractCoordinatePlane::setGlobalGridAttributes. To re-activate these global attributes you can call resetGridAttributes.
See Also
resetGridAttributes, gridAttributes
setAutoAdjustGridToZoom
AbstractCoordinatePlane::setGlobalGridAttributes
hasOwnGridAttributes

Definition at line 706 of file KDChartCartesianCoordinatePlane.cpp.

References d, KDChart::AbstractCoordinatePlane::propertiesChanged(), and KDChart::AbstractCoordinatePlane::update().

void KDChart::AbstractCoordinatePlane::setGridNeedsRecalculate ( )
slotinherited

Used by the chart to clear the cached grid data.

Definition at line 173 of file KDChartAbstractCoordinatePlane.cpp.

References d.

Referenced by setAxesCalcModeY().

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.

Note
By default the visible data range often is larger than the range calculated from the data model (or set by setHoriz.|Vert.Range(), resp.). This is due to the built-in grid calculation feature: The visible start/end values get adjusted so that they match a main-grid line. You can turn this feature off for any of the four bounds by calling GridAttributes::setAdjustBoundsToGrid() for either the global grid-attributes or for the horizontal/vertical attrs separately.
If you use user defined vertical ranges together with logarithmic scale, only positive values are supported. If you set it to negative values, the result is undefined.
Parameters
rangea pair of values representing the smalles and the largest horizontal value space coordinate displayed.
See Also
setAutoAdjustHorizontalRangeToData, setVerticalRange
GridAttributes::setAdjustBoundsToGrid()

Definition at line 606 of file KDChartCartesianCoordinatePlane.cpp.

References KDChart::AbstractCoordinatePlane::boundariesChanged(), 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.

Parameters
reverseWhether the horizontal range should be reversed or not

Definition at line 822 of file KDChartCartesianCoordinatePlane.cpp.

References d, layoutDiagrams(), and KDChart::AbstractCoordinatePlane::propertiesChanged().

void CartesianCoordinatePlane::setIsometricScaling ( bool  onOff)

If onOff is true, enforce that X and Y distances are scaled by the same factor.

This makes the plane's height a function of its width, and hasHeightForWidth() will return true.

Definition at line 466 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 188 of file KDChartAbstractCoordinatePlane.cpp.

References d.

Referenced by KDChart::Chart::insertCoordinatePlane(), and KDChart::Chart::takeCoordinatePlane().

void KDChart::AbstractLayoutItem::setParentLayout ( QLayout *  lay)
inherited
void KDChart::AbstractLayoutItem::setParentWidget ( QWidget widget)
virtualinherited

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 59 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.

Parameters
planeThe coordinate plane to be used the reference plane for this one.
See Also
referenceCoordinatePlane

Definition at line 178 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 271 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.

Note
By default the visible data range often is larger than the range calculated from the data model (or set by setHoriz.|Vert.Range(), resp.). This is due to the built-in grid calculation feature: The visible start/end values get adjusted so that they match a main-grid line. You can turn this feature off for any of the four bounds by calling GridAttributes::setAdjustBoundsToGrid() for either the global grid-attributes or for the horizontal/vertical attrs separately.
If you use user defined vertical ranges together with logarithmic scale, only positive values are supported. If you set it to negative values, the result is undefined.
Parameters
rangea pair of values representing the smalles and the largest vertical value space coordinate displayed.
See Also
setAutoAdjustVerticalRangeToData, setHorizontalRange
GridAttributes::setAdjustBoundsToGrid()

Definition at line 618 of file KDChartCartesianCoordinatePlane.cpp.

References KDChart::AbstractCoordinatePlane::boundariesChanged(), 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.

Parameters
reverseWhether the vertical range should be reversed or not

Definition at line 837 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 397 of file KDChartCartesianCoordinatePlane.cpp.

References d.

void CartesianCoordinatePlane::setZoomCenter ( const QPointF &  center)
virtual
void CartesianCoordinatePlane::setZoomFactors ( qreal  factorX,
qreal  factorY 
)
virtual
void CartesianCoordinatePlane::setZoomFactorX ( qreal  factor)
virtual
void CartesianCoordinatePlane::setZoomFactorY ( qreal  factor)
virtual
AbstractCoordinatePlane * CartesianCoordinatePlane::sharedAxisMasterPlane ( QPainter *  p = 0)
virtual
QSize CartesianCoordinatePlane::sizeHint ( ) const
protectedvirtual
void KDChart::AbstractLayoutItem::sizeHintChanged ( ) const
virtualinherited

Report changed size hint: ask the parent widget to recalculate the layout.

Definition at line 81 of file KDChartLayoutItems.cpp.

void CartesianCoordinatePlane::slotLayoutChanged ( AbstractDiagram )
protectedslot

Definition at line 151 of file KDChartCartesianCoordinatePlane.cpp.

References layoutDiagrams().

Referenced by addDiagram(), and setAxesCalcModes().

void AbstractCoordinatePlane::takeDiagram ( AbstractDiagram diagram)
virtualinherited

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.

See Also
addDiagram, replaceDiagram

Definition at line 114 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
virtualinherited

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.

Note
The default implementation is not using any caching, it might make sense to implement a more sophisticated solution for derived classes that have complex work to do in sizeHint(). All we have here is a primitive flag to be set by the caller if it is sure that no sizeHint() needs to be called.

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.

Parameters
diagramPointThe point in value coordinates.
Returns
The translated point.

Implements KDChart::AbstractCoordinatePlane.

Definition at line 452 of file KDChartCartesianCoordinatePlane.cpp.

References d.

Referenced by KDChart::LeveyJenningsAxis::paintAsOrdinate(), and sharedAxisMasterPlane().

const QPointF CartesianCoordinatePlane::translateBack ( const QPointF &  screenPoint) const
void KDChart::AbstractCoordinatePlane::update ( )
slotinherited
QPair< qreal, qreal > CartesianCoordinatePlane::verticalRange ( ) const
Returns
The largest and smallest visible horizontal value space value. If this is not explicitly set, or if both values are the same, the plane will use the union of the dataBoundaries of all associated diagrams.
See Also
KDChart::AbstractDiagram::dataBoundaries

Definition at line 637 of file KDChartCartesianCoordinatePlane.cpp.

References visibleDataRange().

void KDChart::AbstractCoordinatePlane::viewportCoordinateSystemChanged ( )
signalinherited

Emitted upon change of the view coordinate system.

Referenced by setAxesCalcModes(), setAxesCalcModeX(), and setAxesCalcModeY().

QRectF CartesianCoordinatePlane::visibleDataRange ( ) const

Returns the currently visible data range.

Might be greater than the range of the grid.

Definition at line 852 of file KDChartCartesianCoordinatePlane.cpp.

References drawingArea(), and translateBack().

Referenced by KDChart::Plotter::calcMergeRadius(), horizontalRange(), and verticalRange().

QRectF CartesianCoordinatePlane::visibleDiagramArea ( ) const

Returns the visible part of the diagram area, i.e.

diagramArea().intersected( drawingArea() )
See Also
diagramArea

Definition at line 359 of file KDChartCartesianCoordinatePlane.cpp.

References diagramArea(), and drawingArea().

Referenced by KDChart::Measure::sizeOfArea().

bool CartesianCoordinatePlane::xAxisStartAtZero ( ) const

Definition at line 405 of file KDChartCartesianCoordinatePlane.cpp.

References d.

QPointF CartesianCoordinatePlane::zoomCenter ( ) const
virtual
qreal CartesianCoordinatePlane::zoomFactorX ( ) const
virtual
See Also
setZoomFactorX, setZoomCenter

Reimplemented from KDChart::AbstractCoordinatePlane.

Definition at line 553 of file KDChartCartesianCoordinatePlane.cpp.

References d.

Referenced by handleFixedDataCoordinateSpaceRelation().

qreal CartesianCoordinatePlane::zoomFactorY ( ) const
virtual
See Also
setZoomFactorY, setZoomCenter

Reimplemented from KDChart::AbstractCoordinatePlane.

Definition at line 558 of file KDChartCartesianCoordinatePlane.cpp.

References d.

Referenced by handleFixedDataCoordinateSpaceRelation().

Member Data Documentation

QWidget* KDChart::AbstractLayoutItem::mParent
protectedinherited

Definition at line 92 of file KDChartLayoutItems.h.

Referenced by KDChart::AbstractLayoutItem::setParentWidget().

QLayout* KDChart::AbstractLayoutItem::mParentLayout
protectedinherited

Definition at line 93 of file KDChartLayoutItems.h.


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

Klarälvdalens Datakonsult AB (KDAB)
Qt-related services and products
http://www.kdab.com/
http://www.kdab.com/products/kd-chart/