KChart::AbstractLayoutItem

Search for usage in LXR

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

Protected Attributes

QWidgetmParent
 
QLayoutmParentLayout
 

Detailed Description

Base class for all layout items of KChart.

Definition at line 38 of file KChartLayoutItems.h.

Constructor & Destructor Documentation

◆ AbstractLayoutItem()

KChart::AbstractLayoutItem::AbstractLayoutItem ( Qt::Alignment itemAlignment = Qt::Alignment())
inline

Definition at line 41 of file KChartLayoutItems.h.

Member Function Documentation

◆ paint()

virtual void KChart::AbstractLayoutItem::paint ( QPainter * )
pure virtual

◆ paintAll()

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::TernaryAxis, and KChart::TextArea.

Definition at line 40 of file KChartLayoutItems.cpp.

◆ paintCtx()

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

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

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

Definition at line 45 of file KChartLayoutItems.cpp.

◆ parentLayout()

QLayout * KChart::AbstractLayoutItem::parentLayout ( )
inline

Definition at line 81 of file KChartLayoutItems.h.

◆ removeFromParentLayout()

void KChart::AbstractLayoutItem::removeFromParentLayout ( )
inline

Definition at line 85 of file KChartLayoutItems.h.

◆ setParentLayout()

void KChart::AbstractLayoutItem::setParentLayout ( QLayout * lay)
inline

Definition at line 77 of file KChartLayoutItems.h.

◆ setParentWidget()

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 35 of file KChartLayoutItems.cpp.

◆ sizeHintChanged()

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

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

Definition at line 51 of file KChartLayoutItems.cpp.

Member Data Documentation

◆ mParent

QWidget* KChart::AbstractLayoutItem::mParent
protected

Definition at line 95 of file KChartLayoutItems.h.

◆ mParentLayout

QLayout* KChart::AbstractLayoutItem::mParentLayout
protected

Definition at line 96 of file KChartLayoutItems.h.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 11:57:25 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.