KD Chart API Documentation 3.1
|
#include <KDChartLayoutItems.h>
Public Member Functions | |
AbstractLayoutItem (Qt::Alignment itemAlignment={}) | |
virtual void | paint (QPainter *)=0 |
virtual void | paintAll (QPainter &painter) |
virtual void | paintCtx (PaintContext *context) |
QLayout * | parentLayout () |
void | removeFromParentLayout () |
void | setParentLayout (QLayout *lay) |
virtual void | setParentWidget (QWidget *widget) |
virtual void | sizeHintChanged () const |
Public Member Functions inherited from QLayoutItem | |
QLayoutItem (Qt::Alignment alignment) | |
virtual | ~QLayoutItem () |
Qt::Alignment | alignment () const const |
virtual QSizePolicy::ControlTypes | controlTypes () const const |
virtual Qt::Orientations | expandingDirections () const const=0 |
virtual QRect | geometry () const const=0 |
virtual bool | hasHeightForWidth () const const |
virtual int | heightForWidth (int) const const |
virtual void | invalidate () |
virtual bool | isEmpty () const const=0 |
virtual QLayout * | layout () |
virtual QSize | maximumSize () const const=0 |
virtual int | minimumHeightForWidth (int w) const const |
virtual QSize | minimumSize () const const=0 |
void | setAlignment (Qt::Alignment alignment) |
virtual void | setGeometry (const QRect &r)=0 |
virtual QSize | sizeHint () const const=0 |
virtual QSpacerItem * | spacerItem () |
virtual QWidget * | widget () |
Protected Attributes | |
QWidget * | mParent = nullptr |
QLayout * | mParentLayout = nullptr |
Base class for all layout items of KD Chart
Definition at line 39 of file KDChartLayoutItems.h.
|
inline |
Definition at line 42 of file KDChartLayoutItems.h.
|
pure virtual |
Implemented in KDChart::CartesianAxis, KDChart::CartesianCoordinatePlane, KDChart::TextLayoutItem, KDChart::MarkerLayoutItem, KDChart::LineLayoutItem, KDChart::LineWithMarkerLayoutItem, KDChart::HorizontalLineLayoutItem, KDChart::VerticalLineLayoutItem, KDChart::AutoSpacerLayoutItem, KDChart::PolarCoordinatePlane, KDChart::TernaryAxis, KDChart::TernaryCoordinatePlane, and KDChart::TextBubbleLayoutItem.
Referenced by KDChart::BarDiagram::paint(), KDChart::LineDiagram::paint(), and KDChart::AbstractArea::paintAll().
|
virtual |
Default impl: just call paint.
Derived classes like KDChart::AbstractArea are providing additional action here.
Reimplemented in KDChart::TernaryAxis, KDChart::AbstractArea, and KDChart::TextArea.
Definition at line 51 of file KDChartLayoutItems.cpp.
|
virtual |
Default impl: Paint the complete item using its layouted position and size.
Reimplemented in KDChart::CartesianAxis, KDChart::LeveyJenningsAxis, and KDChart::TernaryAxis.
Definition at line 59 of file KDChartLayoutItems.cpp.
References KDChart::PaintContext::painter().
|
inline |
Definition at line 65 of file KDChartLayoutItems.h.
|
inline |
Definition at line 69 of file KDChartLayoutItems.h.
Referenced by KDChart::Chart::takeCoordinatePlane(), and KDChart::Chart::takeHeaderFooter().
|
inline |
Definition at line 61 of file KDChartLayoutItems.h.
Referenced by KDChart::Chart::takeHeaderFooter().
|
virtual |
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 46 of file KDChartLayoutItems.cpp.
References mParent, and QLayoutItem::widget().
Referenced by KDChart::HeaderFooter::setParent(), and KDChart::AbstractCartesianDiagram::takeAxis().
|
virtual |
Report changed size hint: ask the parent widget to recalculate the layout.
Definition at line 68 of file KDChartLayoutItems.cpp.
References QEvent::LayoutRequest, and QCoreApplication::postEvent().
|
protected |
Definition at line 80 of file KDChartLayoutItems.h.
Referenced by setParentWidget().
|
protected |
Definition at line 81 of file KDChartLayoutItems.h.