KD Chart API Documentation 3.1
Loading...
Searching...
No Matches
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
19QT_BEGIN_NAMESPACE
20class QPen;
21class QFont;
22class QTextDocument;
24
25namespace KDChart {
26
34class KDCHART_EXPORT TextAttributes
35{
36public:
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
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
211private:
213
214}; // End of class TextAttributes
215}
216
217#if !defined(QT_NO_DEBUG_STREAM)
218KDCHART_EXPORT QDebug operator<<(QDebug, const KDChart::TextAttributes &);
219#endif /* QT_NO_DEBUG_STREAM */
220
222
223QT_BEGIN_NAMESPACE
225QT_END_NAMESPACE
226Q_DECLARE_METATYPE(KDChart::TextAttributes)
227
228#endif // KDCHARTTEXTATTRIBUTES_H
Contains KDChart macros.
#define KDCHART_DECLARE_SWAP_SPECIALISATION(X)
#define KDCHART_DECLARE_PRIVATE_BASE_VALUE(X)
Declaring the class KDChart::Measure.
QT_BEGIN_NAMESPACE Q_DECLARE_TYPEINFO(KDChart::TextAttributes, Q_MOVABLE_TYPE)
KDCHART_EXPORT QDebug operator<<(QDebug, const KDChart::TextAttributes &)
Measure is used to specify relative and absolute sizes in KDChart, e.g. font sizes.
A set of text attributes.
bool operator!=(const TextAttributes &other) const
bool operator==(const TickInfo &, const TickInfo &)
T qobject_cast(QObject *object)

© 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