KD Chart API Documentation 3.1
Loading...
Searching...
No Matches
KDChartRelativePosition.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 KDCHARTRELATIVEPOSITION_H
12#define KDCHARTRELATIVEPOSITION_H
13
14#include "KDChartGlobal.h"
15#include <QDebug>
16#include <QMetaType>
17#include <QPointF>
18#include <QSizeF>
19#include <Qt>
20
21namespace KDChart {
22
23class Position;
24class PositionPoints;
25class Measure;
26
45class KDCHART_EXPORT RelativePosition
46{
47public:
50
51 RelativePosition &operator=(const RelativePosition &other);
52
54
70 void setReferenceArea(QObject *area);
71 QObject *referenceArea() const;
72
86 void setReferencePoints(const PositionPoints &points);
87 const PositionPoints referencePoints() const;
88
100 void setReferencePosition(Position position);
101
112 void resetReferencePosition();
113 Position referencePosition() const;
114
126 void setAlignment(Qt::Alignment flags);
127 Qt::Alignment alignment() const;
128
141 void setHorizontalPadding(const Measure &padding);
142 Measure horizontalPadding() const;
143
156 void setVerticalPadding(const Measure &padding);
157 Measure verticalPadding() const;
158
159 void setRotation(qreal rot);
160 qreal rotation() const;
161
174 const QPointF referencePoint(qreal *polarDegrees = nullptr) const;
175
186 const QPointF calculatedPoint(const QSizeF &autoSize) const;
187
188 bool operator==(const RelativePosition &) const;
189 bool operator!=(const RelativePosition &other) const;
190
191private:
193};
194
195inline bool RelativePosition::operator!=(const RelativePosition &other) const
196{
197 return !operator==(other);
198}
199}
200
201#if !defined(QT_NO_DEBUG_STREAM)
202KDCHART_EXPORT QDebug operator<<(QDebug, const KDChart::RelativePosition &);
203#endif /* QT_NO_DEBUG_STREAM */
204
206
207QT_BEGIN_NAMESPACE
209QT_END_NAMESPACE
210
211Q_DECLARE_METATYPE(KDChart::RelativePosition)
212
213#endif // KDCHARTRELATIVEPOSITION_H
Contains KDChart macros.
#define KDCHART_DECLARE_SWAP_SPECIALISATION(X)
#define KDCHART_DECLARE_PRIVATE_BASE_VALUE(X)
QT_BEGIN_NAMESPACE Q_DECLARE_TYPEINFO(KDChart::RelativePosition, Q_MOVABLE_TYPE)
KDCHART_EXPORT QDebug operator<<(QDebug, const KDChart::RelativePosition &)
Measure is used to specify relative and absolute sizes in KDChart, e.g. font sizes.
Stores the absolute target points of a Position.
Defines a position, using compass terminology.
Defines relative position information: reference area, position in this area (reference position),...
bool operator==(const RelativePosition &) const
bool operator!=(const RelativePosition &other) const
bool operator==(const TickInfo &, const TickInfo &)
typedef Alignment

© 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