KD Chart API Documentation
3.1
src
KDChart
KDChartTextAttributes.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 KDCHARTTEXTATTRIBUTES_H
12
#define KDCHARTTEXTATTRIBUTES_H
13
14
#include "
KDChartGlobal.h
"
15
#include "
KDChartMeasure.h
"
16
#include <QDebug>
17
#include <QMetaType>
18
19
QT_BEGIN_NAMESPACE
20
class
QPen;
21
class
QFont;
22
class
QTextDocument;
23
QT_END_NAMESPACE
24
25
namespace
KDChart
{
26
34
class
KDCHART_EXPORT
TextAttributes
35
{
36
public
:
37
TextAttributes
();
38
TextAttributes
(
const
TextAttributes
&);
39
TextAttributes
&operator=(
const
TextAttributes
&);
40
bool
operator==
(
const
TextAttributes
&)
const
;
41
inline
bool
operator!=
(
const
TextAttributes
&other)
const
42
{
43
return
!
operator==
(other);
44
}
45
46
~
TextAttributes
();
47
52
void
setVisible(
bool
visible);
53
57
bool
isVisible()
const
;
58
69
void
setFont(
const
QFont &font);
70
74
QFont font()
const
;
75
81
void
setFontSize(
const
Measure
&measure);
82
86
Measure
fontSize()
const
;
87
93
void
setMinimalFontSize(
const
Measure
&measure);
94
98
Measure
minimalFontSize()
const
;
99
107
qreal calculatedFontSize(
const
QSizeF &referenceSize,
108
KDChartEnums::MeasureOrientation
autoReferenceOrientation)
const
;
109
117
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) && defined(Q_COMPILER_MANGLES_RETURN_TYPE)
118
const
qreal calculatedFontSize(
119
#
else
120
qreal calculatedFontSize(
121
#endif
122
const
QObject *autoReferenceArea,
123
KDChartEnums::MeasureOrientation
autoReferenceOrientation)
const
;
124
132
const
QFont calculatedFont(
133
const
QObject *autoReferenceArea,
134
KDChartEnums::MeasureOrientation
autoReferenceOrientation)
const
;
135
139
bool
hasAbsoluteFontSize()
const
;
140
146
void
setAutoRotate(
bool
autoRotate);
147
152
bool
autoRotate()
const
;
153
159
void
setAutoShrink(
bool
autoShrink);
160
165
bool
autoShrink()
const
;
166
178
void
setRotation(
int
rotation);
179
void
resetRotation();
180
bool
hasRotation()
const
;
181
185
int
rotation()
const
;
186
191
void
setPen(
const
QPen &pen);
192
196
QPen pen()
const
;
197
202
QTextDocument *textDocument()
const
;
203
207
void
setTextDocument(QTextDocument *layout);
208
209
// FIXME KDChartEnums::TextLayoutPolicy?
210
211
private
:
212
KDCHART_DECLARE_PRIVATE_BASE_VALUE
(
TextAttributes
)
213
214
};
// End of class TextAttributes
215
}
216
217
#if !defined(QT_NO_DEBUG_STREAM)
218
KDCHART_EXPORT QDebug
operator<<
(QDebug,
const
KDChart::TextAttributes
&);
219
#endif
/* QT_NO_DEBUG_STREAM */
220
221
KDCHART_DECLARE_SWAP_SPECIALISATION
(
KDChart::TextAttributes
)
222
223
QT_BEGIN_NAMESPACE
224
Q_DECLARE_TYPEINFO
(
KDChart::TextAttributes
, Q_MOVABLE_TYPE);
225
QT_END_NAMESPACE
226
Q_DECLARE_METATYPE(
KDChart::TextAttributes
)
227
228
#endif
// KDCHARTTEXTATTRIBUTES_H
KDChartGlobal.h
Contains KDChart macros.
KDCHART_DECLARE_SWAP_SPECIALISATION
#define KDCHART_DECLARE_SWAP_SPECIALISATION(X)
Definition:
KDChartGlobal.h:192
KDCHART_DECLARE_PRIVATE_BASE_VALUE
#define KDCHART_DECLARE_PRIVATE_BASE_VALUE(X)
Definition:
KDChartGlobal.h:65
KDChartMeasure.h
Declaring the class KDChart::Measure.
Q_DECLARE_TYPEINFO
QT_BEGIN_NAMESPACE Q_DECLARE_TYPEINFO(KDChart::TextAttributes, Q_MOVABLE_TYPE)
operator<<
KDCHART_EXPORT QDebug operator<<(QDebug, const KDChart::TextAttributes &)
Definition:
KDChartTextAttributes.cpp:250
KDChartEnums::MeasureOrientation
MeasureOrientation
Definition:
KDChartEnums.h:286
KDChart::Measure
Measure is used to specify relative and absolute sizes in KDChart, e.g. font sizes.
Definition:
KDChartMeasure.h:40
KDChart::TextAttributes
A set of text attributes.
Definition:
KDChartTextAttributes.h:35
KDChart::TextAttributes::operator!=
bool operator!=(const TextAttributes &other) const
Definition:
KDChartTextAttributes.h:41
KDChart
Definition:
CartesianCoordinateTransformation.h:23
KDChart::operator==
bool operator==(const TickInfo &, const TickInfo &)
Definition:
KDChartTernaryGrid.cpp:36
© 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