KChart::AbstractLayoutItem

KChart::AbstractLayoutItem Class Referenceabstract

#include <KChartLayoutItems.h>

Inheritance diagram for KChart::AbstractLayoutItem:

Public Member Functions

 AbstractLayoutItem (Qt::Alignment itemAlignment=Qt::Alignment())
 
virtual void paint (QPainter *)=0
 
virtual void paintAll (QPainter &painter)
 
virtual void paintCtx (PaintContext *context)
 
QLayoutparentLayout ()
 
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)
 
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 QLayoutlayout ()
 
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 QSpacerItemspacerItem ()
 
virtual QWidgetwidget ()
 

Protected Attributes

QWidgetmParent
 
QLayoutmParentLayout
 

Detailed Description

Base class for all layout items of KChart.

Definition at line 49 of file KChartLayoutItems.h.

Member Function Documentation

void KChart::AbstractLayoutItem::paintAll ( QPainter painter)
virtual

Default impl: just call paint.

Derived classes like KChart::AbstractArea are providing additional action here.

Reimplemented in KChart::AbstractArea, KChart::TextArea, and KChart::TernaryAxis.

Definition at line 52 of file KChartLayoutItems.cpp.

void KChart::AbstractLayoutItem::paintCtx ( PaintContext context)
virtual

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

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

Definition at line 57 of file KChartLayoutItems.cpp.

void KChart::AbstractLayoutItem::setParentWidget ( QWidget widget)
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 47 of file KChartLayoutItems.cpp.

void KChart::AbstractLayoutItem::sizeHintChanged ( ) const
virtual

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

Definition at line 63 of file KChartLayoutItems.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sun Aug 9 2020 22:38:07 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.