KD Chart API Documentation  3.1
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 
21 namespace KDChart {
22 
23 class Position;
24 class PositionPoints;
25 class Measure;
26 
45 class KDCHART_EXPORT RelativePosition
46 {
47 public:
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 
191 private:
193 };
194 
195 inline bool RelativePosition::operator!=(const RelativePosition &other) const
196 {
197  return !operator==(other);
198 }
199 }
200 
201 #if !defined(QT_NO_DEBUG_STREAM)
202 KDCHART_EXPORT QDebug operator<<(QDebug, const KDChart::RelativePosition &);
203 #endif /* QT_NO_DEBUG_STREAM */
204 
206 
207 QT_BEGIN_NAMESPACE
209 QT_END_NAMESPACE
210 
211 Q_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)
Definition: KDChartGlobal.h:65
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 &)
bool operator!=(const Span &s1, const Span &s2)

© 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