KD Chart API Documentation 3.1
Loading...
Searching...
No Matches
KDChartAbstractAreaBase.h
Go to the documentation of this file.
1/****************************************************************************
2**
3** This file is part of the KD Chart library.
4**
5** SPDX-FileCopyrightText: 2001 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
6**
7** SPDX-License-Identifier: MIT
8**
9****************************************************************************/
10
11#ifndef KDCHARTABSTRACTAREABASE_H
12#define KDCHARTABSTRACTAREABASE_H
13
14#include <QPointF>
15#include <QRectF>
16#include <QSizeF>
17
19#include "KDChartGlobal.h"
20#include "KDChartLayoutItems.h"
22
23QT_BEGIN_NAMESPACE
24class QPainter;
25class QString;
26QT_END_NAMESPACE
27
28namespace KDChart {
29class TextAttributes;
30class BackgroundAttributes;
31class FrameAttributes;
32class PaintContext;
33
51class KDCHART_EXPORT AbstractAreaBase
52{
53 Q_DISABLE_COPY(AbstractAreaBase)
55
56protected:
58 virtual ~AbstractAreaBase();
59
60public:
64 bool compare(const AbstractAreaBase *other) const;
65
66 void alignToReferencePoint(const RelativePosition &position);
67
68 void setFrameAttributes(const FrameAttributes &a);
69 FrameAttributes frameAttributes() const;
70
71 void setBackgroundAttributes(const BackgroundAttributes &a);
72 BackgroundAttributes backgroundAttributes() const;
73
74 virtual void paintBackground(QPainter &painter, const QRect &rectangle);
75 virtual void paintFrame(QPainter &painter, const QRect &rectangle);
76
77 static void paintBackgroundAttributes(QPainter &painter, const QRect &rectangle,
78 const KDChart::BackgroundAttributes &attributes);
79 static void paintFrameAttributes(QPainter &painter, const QRect &rectangle,
80 const KDChart::FrameAttributes &attributes);
81
87 void getFrameLeadings(int &left, int &top, int &right, int &bottom) const;
88
89protected:
95 QRect innerRect() const;
96
102 virtual QRect areaGeometry() const = 0;
103
110 virtual void positionHasChanged();
111
112}; // End of class AbstractAreaBase
113}
114#endif // KDCHARTABSTRACTAREABASE_H
Contains KDChart macros.
#define KDCHART_DECLARE_PRIVATE_BASE_POLYMORPHIC(X)
Base class for AbstractArea and AbstractAreaWidget: An area in the chart with a background,...
virtual QRect areaGeometry() const =0
A set of attributes for frames around items.
Defines relative position information: reference area, position in this area (reference position),...

© 2001 Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
https://www.kdab.com/development-resources/qt-tools/kd-chart/
Generated on Wed May 1 2024 00:01:10 for KD Chart API Documentation by doxygen 1.9.8