Public Types | Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes

KDChart::AbstractCoordinatePlane Class Reference

Base class common for all coordinate planes, CartesianCoordinatePlane, PolarCoordinatePlane, TernaryCoordinatePlane. More...

#include <KDChartAbstractCoordinatePlane.h>

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

List of all members.

Public Types

enum  AxesCalcMode {
  Linear,
  Logarithmic
}

Public Slots

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

virtual void addDiagram (AbstractDiagram *diagram)
 Adds a diagram to this coordinate plane.
void alignToReferencePoint (const RelativePosition &position)
BackgroundAttributes backgroundAttributes () const
virtual int bottomOverlap (bool doNotRecalculate=false) const
 This is called at layout time by KDChart:AutoSpacerLayoutItem::sizeHint().
bool compare (const AbstractAreaBase *other) const
 Returns true if both areas have the same settings.
AbstractDiagramdiagram ()
AbstractDiagramList diagrams ()
ConstAbstractDiagramList diagrams () 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
DataDimensionsList gridDimensionsList ()
 Returns the dimensions used for drawing the grid lines.
virtual bool isEmpty () const
 pure virtual in QLayoutItem
bool isRubberBandZoomingEnabled () const
const bool isVisiblePoint (const QPointF &point) const
 Tests, if a point is visible on the coordinate plane.
virtual void layoutDiagrams ()=0
 Distribute the available space among the diagrams and axes.
virtual int leftOverlap (bool doNotRecalculate=false) const
 This is called at layout time by KDChart::AutoSpacerLayoutItem::sizeHint().
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 *)=0
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().
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.
void removeFromParentLayout ()
virtual void replaceDiagram (AbstractDiagram *diagram, AbstractDiagram *oldDiagram=0)
 Replaces the old diagram, or appends the diagram, it there is none yet.
virtual int rightOverlap (bool doNotRecalculate=false) const
 This is called at layout time by KDChart::AutoSpacerLayoutItem::sizeHint().
void setBackgroundAttributes (const BackgroundAttributes &a)
void setFrameAttributes (const FrameAttributes &a)
virtual void setGeometry (const QRect &r)
 pure virtual in QLayoutItem
void setGlobalGridAttributes (const GridAttributes &)
 Set the grid attributes to be used by this coordinate plane.
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.
virtual void setZoomCenter (const QPointF &center)
 Set the point (in value coordinates) to be used as the center point in zoom operations.
virtual void setZoomFactors (double factorX, double factorY)
 Sets both zoom factors in one go.
virtual void setZoomFactorX (double factor)
 Sets the zoom factor in horizontal direction, that is applied to all coordinate transformations.
virtual void setZoomFactorY (double factor)
 Sets the zoom factor in vertical direction, that is applied to all coordinate transformations.
virtual AbstractCoordinatePlanesharedAxisMasterPlane (QPainter *p=0)
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().
virtual const QPointF translate (const QPointF &diagramPoint) const =0
 Translate the given point in value space coordinates to a position in pixel space.
virtual QPointF zoomCenter () const
virtual double zoomFactorX () const
virtual double zoomFactorY () const
virtual ~AbstractCoordinatePlane ()

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 Member Functions

 AbstractCoordinatePlane (Chart *parent=0)
virtual QRect areaGeometry () const =0
virtual QRect areaGeometry () const
virtual DataDimensionsList getDataDimensionsList () const =0
QRect innerRect () const
virtual void positionHasChanged ()
virtual void positionHasChanged ()

Protected Attributes

QWidgetmParent
QLayout * mParentLayout

Detailed Description

Base class common for all coordinate planes, CartesianCoordinatePlane, PolarCoordinatePlane, TernaryCoordinatePlane.

Definition at line 44 of file KDChartAbstractCoordinatePlane.h.


Member Enumeration Documentation

Enumerator:
Linear 
Logarithmic 

Definition at line 54 of file KDChartAbstractCoordinatePlane.h.


Constructor & Destructor Documentation

AbstractCoordinatePlane::AbstractCoordinatePlane ( KDChart::Chart parent = 0  )  [explicit, protected]

Definition at line 52 of file KDChartAbstractCoordinatePlane.cpp.

References d.

AbstractCoordinatePlane::~AbstractCoordinatePlane (  )  [virtual]

Definition at line 59 of file KDChartAbstractCoordinatePlane.cpp.

References destroyedCoordinatePlane().


Member Function Documentation

void AbstractCoordinatePlane::addDiagram ( AbstractDiagram diagram  )  [virtual]
void AbstractAreaBase::alignToReferencePoint ( const RelativePosition position  )  [inherited]

Definition at line 88 of file KDChartAbstractAreaBase.cpp.

QRect AbstractArea::areaGeometry (  )  const [protected, virtual, inherited]
virtual QRect KDChart::AbstractAreaBase::areaGeometry (  )  const [protected, pure virtual, inherited]
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.

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

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]

Emitted when this coordinate plane is destroyed.

Referenced by ~AbstractCoordinatePlane().

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

Definition at line 141 of file KDChartAbstractCoordinatePlane.cpp.

References d.

Qt::Orientations KDChart::AbstractCoordinatePlane::expandingDirections (  )  const [virtual]

pure virtual in QLayoutItem

Definition at line 221 of file KDChartAbstractCoordinatePlane.cpp.

FrameAttributes AbstractAreaBase::frameAttributes (  )  const [inherited]
QRect KDChart::AbstractCoordinatePlane::geometry (  )  const [virtual]
void KDChart::AbstractCoordinatePlane::geometryChanged ( QRect  ,
QRect   
) [signal]

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.

virtual DataDimensionsList KDChart::AbstractCoordinatePlane::getDataDimensionsList (  )  const [protected, pure virtual]
void AbstractAreaBase::getFrameLeadings ( int &  left,
int &  top,
int &  right,
int &  bottom 
) const [inherited]
GridAttributes KDChart::AbstractCoordinatePlane::globalGridAttributes (  )  const
Returns:
The grid attributes used by this coordinate plane.
See also:
setGlobalGridAttributes
CartesianCoordinatePlane::gridAttributes

Definition at line 170 of file KDChartAbstractCoordinatePlane.cpp.

References d.

Referenced by KDChart::PolarCoordinatePlane::gridAttributes(), and KDChart::CartesianCoordinatePlane::gridAttributes().

KDChart::DataDimensionsList KDChart::AbstractCoordinatePlane::gridDimensionsList (  ) 

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 175 of file KDChartAbstractCoordinatePlane.cpp.

References d.

Referenced by KDChart::CartesianCoordinatePlane::layoutDiagrams().

QRect AbstractAreaBase::innerRect (  )  const [protected, inherited]
void KDChart::AbstractCoordinatePlane::internal_geometryChanged ( QRect  ,
QRect   
) [signal]

Referenced by setGeometry().

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

Definition at line 295 of file KDChartAbstractCoordinatePlane.cpp.

References d.

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

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 423 of file KDChartAbstractCoordinatePlane.cpp.

References d.

virtual void KDChart::AbstractCoordinatePlane::layoutDiagrams (  )  [pure virtual]

Distribute the available space among the diagrams and axes.

Implemented in KDChart::CartesianCoordinatePlane, KDChart::PolarCoordinatePlane, and KDChart::TernaryCoordinatePlane.

Referenced by addDiagram(), replaceDiagram(), and takeDiagram().

void KDChart::AbstractCoordinatePlane::layoutPlanes (  )  [slot]

Calling layoutPlanes() on the plane triggers the global KDChart::Chart::slotLayoutPlanes().

Definition at line 278 of file KDChartAbstractCoordinatePlane.cpp.

References needLayoutPlanes().

Referenced by addDiagram(), KDChart::CartesianAxis::layoutPlanes(), KDChart::AbstractCartesianDiagram::layoutPlanes(), replaceDiagram(), and 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.

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

QSize KDChart::AbstractCoordinatePlane::maximumSize (  )  const [virtual]

pure virtual in QLayoutItem

Definition at line 226 of file KDChartAbstractCoordinatePlane.cpp.

Referenced by sizeHint().

QSize KDChart::AbstractCoordinatePlane::minimumSize (  )  const [virtual]

pure virtual in QLayoutItem

Definition at line 233 of file KDChartAbstractCoordinatePlane.cpp.

QSize KDChart::AbstractCoordinatePlane::minimumSizeHint (  )  const [virtual]

[reimplemented]

Reimplemented in KDChart::TernaryCoordinatePlane.

Definition at line 153 of file KDChartAbstractCoordinatePlane.cpp.

void KDChart::AbstractCoordinatePlane::mouseDoubleClickEvent ( QMouseEvent *  event  )  [virtual]

Definition at line 340 of file KDChartAbstractCoordinatePlane.cpp.

References d, and mousePressEvent().

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

void KDChart::AbstractCoordinatePlane::mouseMoveEvent ( QMouseEvent *  event  )  [virtual]

Definition at line 404 of file KDChartAbstractCoordinatePlane.cpp.

References d, and geometry().

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

void KDChart::AbstractCoordinatePlane::mousePressEvent ( QMouseEvent *  event  )  [virtual]
void KDChart::AbstractCoordinatePlane::mouseReleaseEvent ( QMouseEvent *  event  )  [virtual]
void KDChart::AbstractCoordinatePlane::needLayoutPlanes (  )  [signal]

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

planes.

Referenced by layoutPlanes().

void KDChart::AbstractCoordinatePlane::needRelayout (  )  [signal]

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

Referenced by relayout().

void KDChart::AbstractCoordinatePlane::needUpdate (  )  [signal]

Emitted when plane needs to update its drawings.

Referenced by update().

virtual void KDChart::AbstractLayoutItem::paint ( QPainter *   )  [pure virtual, inherited]
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]
void AbstractAreaBase::paintBackgroundAttributes ( QPainter &  painter,
const QRect &  rectangle,
const KDChart::BackgroundAttributes attributes 
) [static, inherited]
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 AbstractAreaBase::paintFrame ( QPainter &  painter,
const QRect &  rectangle 
) [virtual, inherited]
void AbstractAreaBase::paintFrameAttributes ( QPainter &  painter,
const QRect &  rectangle,
const KDChart::FrameAttributes attributes 
) [static, inherited]
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().

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

Definition at line 203 of file KDChartAbstractCoordinatePlane.cpp.

References d.

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

Definition at line 76 of file KDChartLayoutItems.h.

void KDChart::AbstractArea::positionChanged ( AbstractArea  )  [signal, inherited]
void AbstractArea::positionHasChanged (  )  [protected, virtual, inherited]

Definition at line 152 of file KDChartAbstractArea.cpp.

References KDChart::AbstractArea::positionChanged().

void AbstractAreaBase::positionHasChanged (  )  [protected, virtual, inherited]
void KDChart::AbstractCoordinatePlane::propertiesChanged (  )  [signal]
AbstractCoordinatePlane * KDChart::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.

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 193 of file KDChartAbstractCoordinatePlane.cpp.

References d.

void KDChart::AbstractCoordinatePlane::relayout (  )  [slot]

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

Definition at line 272 of file KDChartAbstractCoordinatePlane.cpp.

References needRelayout().

Referenced by addDiagram().

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]

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

Parameters:
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.
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 90 of file KDChartAbstractCoordinatePlane.cpp.

References addDiagram(), d, layoutDiagrams(), layoutPlanes(), takeDiagram(), and update().

Referenced by KDChart::Widget::setType().

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.

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 AbstractAreaBase::setBackgroundAttributes ( const BackgroundAttributes a  )  [inherited]
void AbstractAreaBase::setFrameAttributes ( const FrameAttributes a  )  [inherited]
void KDChart::AbstractCoordinatePlane::setGeometry ( const QRect &  r  )  [virtual]

pure virtual in QLayoutItem

Note:
Do not call this function directly, unless you know exactly what you are doing. Geometry management is done by KD Chart's internal layouting measures.

Reimplemented in KDChart::CartesianCoordinatePlane.

Definition at line 245 of file KDChartAbstractCoordinatePlane.cpp.

References d, and internal_geometryChanged().

void KDChart::AbstractCoordinatePlane::setGlobalGridAttributes ( const GridAttributes a  ) 

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 164 of file KDChartAbstractCoordinatePlane.cpp.

References d, and update().

void KDChart::AbstractCoordinatePlane::setGridNeedsRecalculate (  )  [slot]

Used by the chart to clear the cached grid data.

Definition at line 183 of file KDChartAbstractCoordinatePlane.cpp.

References d.

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

void KDChart::AbstractCoordinatePlane::setParent ( KDChart::Chart parent  ) 

Called internally by KDChart::Chart.

Definition at line 198 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  ) 

Set another coordinate plane to be used as the reference plane for this one.

Parameters:
plane The coordinate plane to be used the reference plane for this one.
See also:
referenceCoordinatePlane

Definition at line 188 of file KDChartAbstractCoordinatePlane.cpp.

References d.

void KDChart::AbstractCoordinatePlane::setRubberBandZoomingEnabled ( bool  enable  ) 

Enables or disables zooming with a rubber band using the mouse.

Definition at line 284 of file KDChartAbstractCoordinatePlane.cpp.

References d.

virtual void KDChart::AbstractCoordinatePlane::setZoomCenter ( const QPointF &  center  )  [virtual]

Set the point (in value coordinates) to be used as the center point in zoom operations.

Parameters:
center The point to use.

Reimplemented in KDChart::CartesianCoordinatePlane, and KDChart::PolarCoordinatePlane.

Definition at line 185 of file KDChartAbstractCoordinatePlane.h.

Referenced by mousePressEvent(), and mouseReleaseEvent().

virtual void KDChart::AbstractCoordinatePlane::setZoomFactors ( double  factorX,
double  factorY 
) [virtual]

Sets both zoom factors in one go.

See also:
setZoomFactorX,setZoomFactorY

Reimplemented in KDChart::CartesianCoordinatePlane, and KDChart::PolarCoordinatePlane.

Definition at line 158 of file KDChartAbstractCoordinatePlane.h.

virtual void KDChart::AbstractCoordinatePlane::setZoomFactorX ( double  factor  )  [virtual]

Sets the zoom factor in horizontal direction, that is applied to all coordinate transformations.

Parameters:
factor The new zoom factor

Reimplemented in KDChart::CartesianCoordinatePlane, and KDChart::PolarCoordinatePlane.

Definition at line 165 of file KDChartAbstractCoordinatePlane.h.

Referenced by mousePressEvent(), and mouseReleaseEvent().

virtual void KDChart::AbstractCoordinatePlane::setZoomFactorY ( double  factor  )  [virtual]

Sets the zoom factor in vertical direction, that is applied to all coordinate transformations.

Parameters:
factor The new zoom factor

Reimplemented in KDChart::CartesianCoordinatePlane, and KDChart::PolarCoordinatePlane.

Definition at line 172 of file KDChartAbstractCoordinatePlane.h.

Referenced by mousePressEvent(), and mouseReleaseEvent().

AbstractCoordinatePlane * KDChart::AbstractCoordinatePlane::sharedAxisMasterPlane ( QPainter *  p = 0  )  [virtual]
QSize KDChart::AbstractCoordinatePlane::sizeHint (  )  const [virtual]

pure virtual in QLayoutItem

Definition at line 238 of file KDChartAbstractCoordinatePlane.cpp.

References 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]

[reimplemented]

Reimplemented in KDChart::TernaryCoordinatePlane.

Definition at line 159 of file KDChartAbstractCoordinatePlane.cpp.

void AbstractCoordinatePlane::takeDiagram ( AbstractDiagram diagram  )  [virtual]

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 111 of file KDChartAbstractCoordinatePlane.cpp.

References d, layoutDiagrams(), layoutPlanes(), KDChart::AbstractDiagram::setCoordinatePlane(), and update().

Referenced by 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.

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

virtual const QPointF KDChart::AbstractCoordinatePlane::translate ( const QPointF &  diagramPoint  )  const [pure virtual]
void KDChart::AbstractCoordinatePlane::update (  )  [slot]
virtual QPointF KDChart::AbstractCoordinatePlane::zoomCenter (  )  const [virtual]
Returns:
The center point (in value coordinates) of the coordinate plane, that is used for zoom operations.

Reimplemented in KDChart::CartesianCoordinatePlane, and KDChart::PolarCoordinatePlane.

Definition at line 178 of file KDChartAbstractCoordinatePlane.h.

Referenced by mouseReleaseEvent().

virtual double KDChart::AbstractCoordinatePlane::zoomFactorX (  )  const [virtual]
Returns:
The zoom factor in horizontal direction, that is applied to all coordinate transformations.

Reimplemented in KDChart::CartesianCoordinatePlane, and KDChart::PolarCoordinatePlane.

Definition at line 146 of file KDChartAbstractCoordinatePlane.h.

Referenced by mouseReleaseEvent(), KDChart::PolarDiagram::paint(), KDChart::LineDiagram::resize(), and KDChart::BarDiagram::resize().

virtual double KDChart::AbstractCoordinatePlane::zoomFactorY (  )  const [virtual]
Returns:
The zoom factor in vertical direction, that is applied to all coordinate transformations.

Reimplemented in KDChart::CartesianCoordinatePlane, and KDChart::PolarCoordinatePlane.

Definition at line 152 of file KDChartAbstractCoordinatePlane.h.

Referenced by mouseReleaseEvent(), KDChart::PolarDiagram::paint(), KDChart::LineDiagram::resize(), and KDChart::BarDiagram::resize().


Member Data Documentation

QLayout* KDChart::AbstractLayoutItem::mParentLayout [protected, inherited]

Definition at line 91 of file KDChartLayoutItems.h.

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


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