KD Chart 2
[rev.2.7]
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
src
KDChart
KDChartAbstractAxis.h
Go to the documentation of this file.
1
/****************************************************************************
2
** Copyright (C) 2001-2020 Klaralvdalens Datakonsult AB. All rights reserved.
3
**
4
** This file is part of the KD Chart library.
5
**
6
** Licensees holding valid commercial KD Chart licenses may use this file in
7
** accordance with the KD Chart Commercial License Agreement provided with
8
** the Software.
9
**
10
**
11
** This file may be distributed and/or modified under the terms of the
12
** GNU General Public License version 2 and version 3 as published by the
13
** Free Software Foundation and appearing in the file LICENSE.GPL.txt included.
14
**
15
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
17
**
18
** Contact info@kdab.com if any conditions of this licensing are not
19
** clear to you.
20
**
21
**********************************************************************/
22
23
#ifndef KDCHARTABSTRACTAXIS_H
24
#define KDCHARTABSTRACTAXIS_H
25
26
// #include <QObject>
27
// #include <QRectF>
28
// #include <QWidget>
29
30
#include "kdchart_export.h"
31
#include "
KDChartGlobal.h
"
32
#include "
KDChartAbstractArea.h
"
33
#include "
KDChartTextAttributes.h
"
34
#include "
KDChartRulerAttributes.h
"
35
36
QT_BEGIN_NAMESPACE
37
class
QPainter;
38
class
QSizeF;
39
QT_END_NAMESPACE
40
41
42
namespace
KDChart
{
43
44
class
Area;
45
class
AbstractCoordinatePlane;
46
class
PaintContext;
47
class
AbstractDiagram;
48
57
class
KDCHART_EXPORT
AbstractAxis
:
public
AbstractArea
58
{
59
Q_OBJECT
60
61
Q_DISABLE_COPY(
AbstractAxis
)
62
KDCHART_DECLARE_PRIVATE_DERIVED_PARENT
(
AbstractAxis
,
AbstractDiagram
* )
63
64
public
:
65
explicit
AbstractAxis
(
AbstractDiagram
* diagram = 0 );
66
~
AbstractAxis
()
override
;
67
68
// FIXME implement when code os ready for it:
69
// virtual Area* clone() const = 0;
70
71
// FIXME (Mirko) readd when needed
72
// void copyRelevantDetailsFrom( const KDChartAxis* axis );
73
74
/* virtual void paint( PaintContext* ) const = 0;
75
virtual QSize sizeHint() const = 0;*/
76
//virtual void paintEvent( QPaintEvent* event) = 0;
77
100
virtual
const
QString customizedLabel(
const
QString& label )
const
;
101
105
bool
compare(
const
AbstractAxis
* other )
const
;
106
117
void
createObserver(
AbstractDiagram
* diagram );
118
129
void
deleteObserver(
AbstractDiagram
* diagram );
130
const
AbstractDiagram
* diagram()
const
;
131
bool
observedBy(
AbstractDiagram
* diagram )
const
;
132
146
virtual
void
connectSignals();
147
159
void
setTextAttributes(
const
TextAttributes
&a );
160
166
TextAttributes
textAttributes()
const
;
167
176
void
setRulerAttributes(
const
RulerAttributes
&a );
177
183
RulerAttributes
rulerAttributes()
const
;
184
201
void
setLabels(
const
QStringList& list );
202
208
QStringList labels()
const
;
209
221
void
setShortLabels(
const
QStringList& list );
222
231
QStringList shortLabels()
const
;
232
233
void
setGeometry(
const
QRect& rect )
override
= 0;
234
QRect geometry()
const override
= 0;
235
241
const
AbstractCoordinatePlane
* coordinatePlane()
const
;
242
243
protected
Q_SLOTS:
245
virtual
void
delayedInit();
246
247
public
Q_SLOTS:
248
void
update();
249
250
Q_SIGNALS:
251
void
coordinateSystemChanged();
252
};
253
}
254
255
#endif // KDCHARTABSTRACTAXIS_H
KDChart::AbstractCoordinatePlane
Base class common for all coordinate planes, CartesianCoordinatePlane, PolarCoordinatePlane, TernaryCoordinatePlane.
Definition:
KDChartAbstractCoordinatePlane.h:44
KDChart::AbstractArea
An area in the chart with a background, a frame, etc.
Definition:
KDChartAbstractArea.h:47
KDChart::RulerAttributes
A set of attributes controlling the appearance of axis rulers.
Definition:
KDChartRulerAttributes.h:39
KDChart
Definition:
KDChartAbstractCartesianDiagram.h:30
KDChart::AbstractAxis
The base class for axes.
Definition:
KDChartAbstractAxis.h:57
KDChart::AbstractDiagram
AbstractDiagram defines the interface for diagram classes.
Definition:
KDChartAbstractDiagram.h:50
KDChartGlobal.h
KDChartRulerAttributes.h
KDChartTextAttributes.h
KDChartAbstractArea.h
KDChart::TextAttributes
A set of text attributes.
Definition:
KDChartTextAttributes.h:46
KDCHART_DECLARE_PRIVATE_DERIVED_PARENT
#define KDCHART_DECLARE_PRIVATE_DERIVED_PARENT(X, ParentType)
Definition:
KDChartGlobal.h:58
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/