KD Chart API Documentation  3.1
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 
23 QT_BEGIN_NAMESPACE
24 class QPainter;
25 class QString;
26 QT_END_NAMESPACE
27 
28 namespace KDChart {
29 class TextAttributes;
30 class BackgroundAttributes;
31 class FrameAttributes;
32 class PaintContext;
33 
51 class KDCHART_EXPORT AbstractAreaBase
52 {
53  Q_DISABLE_COPY(AbstractAreaBase)
55 
56 protected:
58  virtual ~AbstractAreaBase();
59 
60 public:
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 
89 protected:
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)
Definition: KDChartGlobal.h:87
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 by doxygen 1.9.1