KD Chart 2
[rev.2.7]
|
An area in the chart with a background, a frame, etc. More...
#include <KDChartAbstractArea.h>
Signals | |
void | positionChanged (AbstractArea *) |
Public Member Functions | |
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(). More... | |
bool | compare (const AbstractAreaBase *other) const |
Returns true if both areas have the same settings. More... | |
FrameAttributes | frameAttributes () const |
void | getFrameLeadings (int &left, int &top, int &right, int &bottom) const |
virtual int | leftOverlap (bool doNotRecalculate=false) const |
This is called at layout time by KDChart::AutoSpacerLayoutItem::sizeHint(). More... | |
virtual void | paint (QPainter *)=0 |
void | paintAll (QPainter &painter) override |
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... | |
QLayout * | parentLayout () |
void | removeFromParentLayout () |
virtual int | rightOverlap (bool doNotRecalculate=false) const |
This is called at layout time by KDChart::AutoSpacerLayoutItem::sizeHint(). More... | |
void | setBackgroundAttributes (const BackgroundAttributes &a) |
void | setFrameAttributes (const FrameAttributes &a) |
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... | |
virtual void | sizeHintChanged () const |
Report changed size hint: ask the parent widget to recalculate the layout. More... | |
virtual int | topOverlap (bool doNotRecalculate=false) const |
This is called at layout time by KDChart::AutoSpacerLayoutItem::sizeHint(). More... | |
~AbstractArea () override | |
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 | |
AbstractArea () | |
QRect | areaGeometry () const override |
QRect | innerRect () const |
void | positionHasChanged () override |
Protected Attributes | |
QWidget * | mParent |
QLayout * | mParentLayout |
An area in the chart with a background, a frame, etc.
AbstractArea is the base class for all non-widget chart elements that have a set of background attributes and frame attributes, such as coordinate planes or axes.
Definition at line 47 of file KDChartAbstractArea.h.
|
override |
Definition at line 59 of file KDChartAbstractArea.cpp.
References d.
|
protected |
Definition at line 51 of file KDChartAbstractArea.cpp.
|
inherited |
Definition at line 81 of file KDChartAbstractAreaBase.cpp.
|
overrideprotectedvirtual |
Implements KDChart::AbstractAreaBase.
Definition at line 151 of file KDChartAbstractArea.cpp.
Referenced by KDChart::CartesianCoordinatePlane::drawingArea(), KDChart::TernaryCoordinatePlane::layoutDiagrams(), KDChart::PolarCoordinatePlane::layoutDiagrams(), KDChart::TernaryCoordinatePlane::paint(), KDChart::CartesianAxis::paint(), paintAll(), and KDChart::CartesianAxis::paintCtx().
|
inherited |
Definition at line 111 of file KDChartAbstractAreaBase.cpp.
References d.
Referenced by KDChart::AbstractAreaBase::compare(), and updateCommonBrush().
|
virtual |
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().
|
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().
Referenced by KDChart::Legend::compare().
|
inherited |
Definition at line 97 of file KDChartAbstractAreaBase.cpp.
References d.
Referenced by KDChart::Legend::clone(), KDChart::AbstractAreaBase::compare(), and updateCommonBrush().
|
inherited |
Definition at line 213 of file KDChartAbstractAreaBase.cpp.
References d.
Referenced by KDChart::AbstractAreaBase::innerRect(), and KDChart::AbstractAreaWidget::paintAll().
|
protectedinherited |
Definition at line 225 of file KDChartAbstractAreaBase.cpp.
References KDChart::AbstractAreaBase::areaGeometry(), and KDChart::AbstractAreaBase::getFrameLeadings().
Referenced by paintAll(), and KDChart::TextArea::paintAll().
|
virtual |
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().
|
pure virtualinherited |
Implemented in KDChart::AutoSpacerLayoutItem, KDChart::CartesianCoordinatePlane, KDChart::VerticalLineLayoutItem, KDChart::HorizontalLineLayoutItem, KDChart::LineWithMarkerLayoutItem, KDChart::LineLayoutItem, KDChart::MarkerLayoutItem, KDChart::TextBubbleLayoutItem, KDChart::PolarCoordinatePlane, KDChart::TextLayoutItem, KDChart::CartesianAxis, KDChart::TernaryAxis, and KDChart::TernaryCoordinatePlane.
Referenced by KDChart::Legend::paint(), KDChart::AbstractLayoutItem::paintAll(), paintAll(), and KDChart::AbstractLayoutItem::paintCtx().
|
overridevirtual |
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 areaGeometry(), d, KDChart::AbstractAreaBase::innerRect(), KDChart::AbstractLayoutItem::paint(), KDChart::AbstractAreaBase::paintBackground(), and KDChart::AbstractAreaBase::paintFrame().
Referenced by paintIntoRect().
|
virtualinherited |
Definition at line 189 of file KDChartAbstractAreaBase.cpp.
References d, and KDChart::AbstractAreaBase::paintBackgroundAttributes().
Referenced by paintAll(), KDChart::TextArea::paintAll(), and KDChart::AbstractAreaWidget::paintAll().
|
staticinherited |
Definition at line 118 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 findSharingAxisDiagrams(), and KDChart::AbstractAreaBase::paintBackground().
|
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::AbstractLayoutItem::paint(), and KDChart::PaintContext::painter().
|
virtualinherited |
Definition at line 205 of file KDChartAbstractAreaBase.cpp.
References d, and KDChart::AbstractAreaBase::paintFrameAttributes().
Referenced by paintAll(), KDChart::TextArea::paintAll(), and KDChart::AbstractAreaWidget::paintAll().
|
staticinherited |
Definition at line 168 of file KDChartAbstractAreaBase.cpp.
References KDChart::FrameAttributes::cornerRadius(), KDChart::FrameAttributes::isVisible(), KDChart::FrameAttributes::pen(), and KDChart::PrintingParameters::scalePen().
Referenced by findSharingAxisDiagrams(), and KDChart::AbstractAreaBase::paintFrame().
|
virtual |
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 paintAll().
|
inherited |
Definition at line 77 of file KDChartLayoutItems.h.
|
signal |
Referenced by positionHasChanged().
|
overrideprotectedvirtual |
Reimplemented from KDChart::AbstractAreaBase.
Definition at line 156 of file KDChartAbstractArea.cpp.
References positionChanged().
|
inherited |
Definition at line 81 of file KDChartLayoutItems.h.
Referenced by findSharingAxisDiagrams(), KDChart::Chart::takeCoordinatePlane(), and KDChart::Chart::takeHeaderFooter().
|
virtual |
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().
|
inherited |
Definition at line 102 of file KDChartAbstractAreaBase.cpp.
References d, and KDChart::AbstractAreaBase::positionHasChanged().
|
inherited |
Definition at line 88 of file KDChartAbstractAreaBase.cpp.
References d, and KDChart::AbstractAreaBase::positionHasChanged().
Referenced by KDChart::Legend::clone(), and KDChart::Legend::~Legend().
|
inherited |
Definition at line 73 of file KDChartLayoutItems.h.
Referenced by KDChart::Chart::addHeaderFooter(), findSharingAxisDiagrams(), and KDChart::Chart::takeHeaderFooter().
|
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(), KDChart::AbstractCartesianDiagram::takeAxis(), and updateToplevelLayout().
|
virtualinherited |
Report changed size hint: ask the parent widget to recalculate the layout.
Definition at line 81 of file KDChartLayoutItems.cpp.
References KDChart::AbstractLayoutItem::mParent.
Referenced by KDChart::TextLayoutItem::sizeHint().
|
virtual |
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().
|
protectedinherited |
|
protectedinherited |
Definition at line 92 of file KDChartLayoutItems.h.
Referenced by KDChart::AutoSpacerLayoutItem::paint().