An area in the chart with a background, a frame, etc. More...
#include <KDChartAbstractAreaWidget.h>
Signals | |
void | positionChanged (AbstractAreaWidget *) |
Public Member Functions | |
AbstractAreaWidget (QWidget *parent=0) | |
void | alignToReferencePoint (const RelativePosition &position) |
BackgroundAttributes | backgroundAttributes () const |
bool | compare (const AbstractAreaBase *other) const |
Returns true if both areas have the same settings. | |
virtual void | forceRebuild () |
Call this to trigger an unconditional re-building of the widget's internals. | |
FrameAttributes | frameAttributes () const |
void | getFrameLeadings (int &left, int &top, int &right, int &bottom) const |
virtual void | needSizeHint () |
Call this to trigger an conditional re-building of the widget's internals. | |
virtual void | paint (QPainter *painter)=0 |
Overwrite this to paint the inner contents of your widget. | |
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 | paintEvent (QPaintEvent *event) |
Draws the background and frame, then calls paint(). | |
virtual void | paintFrame (QPainter &painter, const QRect &rectangle) |
virtual void | paintIntoRect (QPainter &painter, const QRect &rect) |
Draws the background and frame, then calls paint(). | |
virtual void | resizeLayout (const QSize &) |
void | setBackgroundAttributes (const BackgroundAttributes &a) |
void | setFrameAttributes (const FrameAttributes &a) |
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 | |
virtual QRect | areaGeometry () const |
QRect | innerRect () const |
virtual void | positionHasChanged () |
virtual | ~AbstractAreaWidget () |
An area in the chart with a background, a frame, etc.
AbstractAreaWidget is the base for all widget classes that have a set of background attributes and frame attributes, such as KDChart::Chart and KDChart::Legend.
Definition at line 44 of file KDChartAbstractAreaWidget.h.
AbstractAreaWidget::AbstractAreaWidget | ( | QWidget * | parent = 0 |
) | [explicit] |
Definition at line 66 of file KDChartAbstractAreaWidget.cpp.
AbstractAreaWidget::~AbstractAreaWidget | ( | ) | [protected, virtual] |
Definition at line 73 of file KDChartAbstractAreaWidget.cpp.
void AbstractAreaBase::alignToReferencePoint | ( | const RelativePosition & | position | ) | [inherited] |
Definition at line 88 of file KDChartAbstractAreaBase.cpp.
QRect AbstractAreaWidget::areaGeometry | ( | ) | const [protected, virtual] |
Implements KDChart::AbstractAreaBase.
Definition at line 183 of file KDChartAbstractAreaWidget.cpp.
BackgroundAttributes AbstractAreaBase::backgroundAttributes | ( | ) | const [inherited] |
Definition at line 118 of file KDChartAbstractAreaBase.cpp.
References d.
Referenced by KDChart::AbstractAreaBase::compare(), and updateCommonBrush().
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 AbstractAreaWidget::forceRebuild | ( | ) | [virtual] |
Call this to trigger an unconditional re-building of the widget's internals.
Reimplemented in KDChart::Legend.
Definition at line 137 of file KDChartAbstractAreaWidget.cpp.
FrameAttributes AbstractAreaBase::frameAttributes | ( | ) | const [inherited] |
Definition at line 104 of file KDChartAbstractAreaBase.cpp.
References d.
Referenced by KDChart::Legend::clone(), KDChart::AbstractAreaBase::compare(), and updateCommonBrush().
void AbstractAreaBase::getFrameLeadings | ( | int & | left, | |
int & | top, | |||
int & | right, | |||
int & | bottom | |||
) | const [inherited] |
Definition at line 210 of file KDChartAbstractAreaBase.cpp.
References d.
Referenced by KDChart::AbstractAreaBase::innerRect(), and paintAll().
QRect AbstractAreaBase::innerRect | ( | ) | const [protected, inherited] |
Definition at line 226 of file KDChartAbstractAreaBase.cpp.
References KDChart::AbstractAreaBase::areaGeometry(), and KDChart::AbstractAreaBase::getFrameLeadings().
Referenced by KDChart::TextArea::paintAll(), and KDChart::AbstractArea::paintAll().
void AbstractAreaWidget::needSizeHint | ( | ) | [virtual] |
Call this to trigger an conditional re-building of the widget's internals.
e.g. AbstractAreaWidget call this, before calling layout()->setGeometry()
Reimplemented in KDChart::Legend.
Definition at line 83 of file KDChartAbstractAreaWidget.cpp.
virtual void KDChart::AbstractAreaWidget::paint | ( | QPainter * | painter | ) | [pure virtual] |
Overwrite this to paint the inner contents of your widget.
Implemented in KDChart::Legend.
Referenced by paintAll().
void AbstractAreaWidget::paintAll | ( | QPainter & | painter | ) |
Call paintAll, if you want the background and the frame to be drawn before the normal paint() is invoked automatically.
Definition at line 142 of file KDChartAbstractAreaWidget.cpp.
References KDChart::AbstractAreaBase::getFrameLeadings(), paint(), KDChart::AbstractAreaBase::paintBackground(), and KDChart::AbstractAreaBase::paintFrame().
Referenced by paintEvent(), and paintIntoRect().
void AbstractAreaBase::paintBackground | ( | QPainter & | painter, | |
const QRect & | rectangle | |||
) | [virtual, inherited] |
Definition at line 194 of file KDChartAbstractAreaBase.cpp.
References d, and KDChart::AbstractAreaBase::paintBackgroundAttributes().
Referenced by KDChart::TextArea::paintAll(), paintAll(), and KDChart::AbstractArea::paintAll().
void AbstractAreaBase::paintBackgroundAttributes | ( | QPainter & | painter, | |
const QRect & | rectangle, | |||
const KDChart::BackgroundAttributes & | attributes | |||
) | [static, inherited] |
Definition at line 125 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 KDChart::AbstractAreaBase::paintBackground().
void AbstractAreaWidget::paintEvent | ( | QPaintEvent * | event | ) | [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 paint() instead.
Definition at line 96 of file KDChartAbstractAreaWidget.cpp.
References d, and paintAll().
void AbstractAreaBase::paintFrame | ( | QPainter & | painter, | |
const QRect & | rectangle | |||
) | [virtual, inherited] |
Definition at line 202 of file KDChartAbstractAreaBase.cpp.
References d, and KDChart::AbstractAreaBase::paintFrameAttributes().
Referenced by KDChart::TextArea::paintAll(), paintAll(), and KDChart::AbstractArea::paintAll().
void AbstractAreaBase::paintFrameAttributes | ( | QPainter & | painter, | |
const QRect & | rectangle, | |||
const KDChart::FrameAttributes & | attributes | |||
) | [static, inherited] |
Definition at line 175 of file KDChartAbstractAreaBase.cpp.
References KDChart::FrameAttributes::isVisible(), KDChart::FrameAttributes::pen(), and KDChart::PrintingParameters::scalePen().
Referenced by KDChart::AbstractAreaBase::paintFrame().
void AbstractAreaWidget::paintIntoRect | ( | QPainter & | painter, | |
const QRect & | rect | |||
) | [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 paint() instead.
Definition at line 106 of file KDChartAbstractAreaWidget.cpp.
References d, and paintAll().
Referenced by KDChart::Chart::paint().
void KDChart::AbstractAreaWidget::positionChanged | ( | AbstractAreaWidget * | ) | [signal] |
Referenced by positionHasChanged().
void AbstractAreaWidget::positionHasChanged | ( | ) | [protected, virtual] |
Reimplemented from KDChart::AbstractAreaBase.
Definition at line 188 of file KDChartAbstractAreaWidget.cpp.
References positionChanged().
void AbstractAreaWidget::resizeLayout | ( | const QSize & | size | ) | [virtual] |
Reimplemented in KDChart::Legend.
Definition at line 90 of file KDChartAbstractAreaWidget.cpp.
void AbstractAreaBase::setBackgroundAttributes | ( | const BackgroundAttributes & | a | ) | [inherited] |
Definition at line 109 of file KDChartAbstractAreaBase.cpp.
References d, and KDChart::AbstractAreaBase::positionHasChanged().
void AbstractAreaBase::setFrameAttributes | ( | const FrameAttributes & | a | ) | [inherited] |
Definition at line 95 of file KDChartAbstractAreaBase.cpp.
References d, and KDChart::AbstractAreaBase::positionHasChanged().
Referenced by KDChart::Legend::clone().