KD Chart API Documentation 3.1
Loading...
Searching...
No Matches
KDChartAbstractAxis.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 KDCHARTABSTRACTAXIS_H
12#define KDCHARTABSTRACTAXIS_H
13
14// #include <QObject>
15// #include <QRectF>
16// #include <QWidget>
17
18#include "KDChartAbstractArea.h"
19#include "KDChartGlobal.h"
22#include "kdchart_export.h"
23
24QT_BEGIN_NAMESPACE
25class QPainter;
26class QSizeF;
27QT_END_NAMESPACE
28
29namespace KDChart {
30
31class Area;
32class AbstractCoordinatePlane;
33class PaintContext;
34class AbstractDiagram;
35
44class KDCHART_EXPORT AbstractAxis : public AbstractArea
45{
46 Q_OBJECT
47
48 Q_DISABLE_COPY(AbstractAxis)
50
51public:
52 explicit AbstractAxis(AbstractDiagram *diagram = nullptr);
53 ~AbstractAxis() override;
54
55 // FIXME implement when code os ready for it:
56 // virtual Area* clone() const = 0;
57
58 // FIXME (Mirko) re-add when needed
59 // void copyRelevantDetailsFrom( const KDChartAxis* axis );
60
61 /* virtual void paint( PaintContext* ) const = 0;
62 virtual QSize sizeHint() const = 0;*/
63 // virtual void paintEvent( QPaintEvent* event) = 0;
64
87 virtual const QString customizedLabel(const QString &label) const;
88
92 bool compare(const AbstractAxis *other) const;
93
104 void createObserver(AbstractDiagram *diagram);
105
116 void deleteObserver(AbstractDiagram *diagram);
117 const AbstractDiagram *diagram() const;
118 bool observedBy(AbstractDiagram *diagram) const;
119
133 virtual void connectSignals();
134
146 void setTextAttributes(const TextAttributes &a);
147
153 TextAttributes textAttributes() const;
154
163 void setRulerAttributes(const RulerAttributes &a);
164
170 RulerAttributes rulerAttributes() const;
171
188 void setLabels(const QStringList &list);
189
195 QStringList labels() const;
196
208 void setShortLabels(const QStringList &list);
209
218 QStringList shortLabels() const;
219
220 void setGeometry(const QRect &rect) override = 0;
221 QRect geometry() const override = 0;
222
228 const AbstractCoordinatePlane *coordinatePlane() const;
229
230protected Q_SLOTS:
232 virtual void delayedInit();
233
234public Q_SLOTS:
235 void update();
236
237Q_SIGNALS:
239};
240}
241
242#endif // KDCHARTABSTRACTAXIS_H
Contains KDChart macros.
#define KDCHART_DECLARE_PRIVATE_DERIVED_PARENT(X, ParentType)
An area in the chart with a background, a frame, etc.
QRect geometry() const override=0
void setGeometry(const QRect &rect) override=0
Base class common for all coordinate planes, CartesianCoordinatePlane, PolarCoordinatePlane,...
AbstractDiagram defines the interface for diagram classes.
A set of attributes controlling the appearance of axis rulers.
A set of text attributes.

© 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