KD Chart API Documentation  3.1
KDChartDataValueAttributes.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 KDCHARTDATAVALUEATTRIBUTES_H
12 #define KDCHARTDATAVALUEATTRIBUTES_H
13 
14 #include "KDChartEnums.h"
15 #include "KDChartGlobal.h"
17 #include <QMetaType>
18 #include <Qt>
19 
26 namespace KDChart {
27 
28 class TextAttributes;
29 class BackgroundAttributes;
30 class FrameAttributes;
31 class MarkerAttributes;
32 
42 class KDCHART_EXPORT DataValueAttributes
43 {
44 public:
47  DataValueAttributes &operator=(const DataValueAttributes &);
48  bool operator==(const DataValueAttributes &) const;
49  inline bool operator!=(const DataValueAttributes &other) const
50  {
51  return !operator==(other);
52  }
53 
55 
56  static const DataValueAttributes &defaultAttributes();
57  static const QVariant &defaultAttributesAsVariant();
58 
62  void setVisible(bool visible);
63 
67  bool isVisible() const;
68 
74  void setTextAttributes(const TextAttributes &a);
75 
79  TextAttributes textAttributes() const;
80 
87  bool mirrorNegativeValueTextRotation() const;
88 
92  void setMirrorNegativeValueTextRotation(bool enable);
93 
99  void setFrameAttributes(const FrameAttributes &a);
100 
106  FrameAttributes frameAttributes() const;
107 
113  void setBackgroundAttributes(const BackgroundAttributes &a);
114 
120  BackgroundAttributes backgroundAttributes() const;
121 
128  void setMarkerAttributes(const MarkerAttributes &a);
129 
135  MarkerAttributes markerAttributes() const;
136 
146  void setUsePercentage(bool enable);
147 
152  bool usePercentage() const;
153 
159  void setDecimalDigits(int digits);
160 
164  int decimalDigits() const;
165 
170  void setPrefix(const QString &prefix);
171 
176  QString prefix() const;
177 
182  void setSuffix(const QString &suffix);
183 
188  QString suffix() const;
189 
195  void setDataLabel(const QString &label);
196 
201  QString dataLabel() const;
202 
206  bool showRepetitiveDataLabels() const;
207 
213  void setShowRepetitiveDataLabels(bool showRepetitiveDataLabels);
214 
218  bool showOverlappingDataLabels() const;
219 
225  void setShowOverlappingDataLabels(bool showOverlappingDataLabels);
226 
234  void setPowerOfTenDivisor(int powerOfTenDivisor);
235  int powerOfTenDivisor() const;
246  void setShowInfinite(bool infinite);
247  bool showInfinite() const;
264  void setNegativePosition(const RelativePosition &relPosition);
265 
270  const RelativePosition negativePosition() const;
271 
284  void setPositivePosition(const RelativePosition &relPosition);
285 
290  const RelativePosition positivePosition() const;
291 
292  const RelativePosition position(bool positive) const
293  {
294  return positive ? positivePosition() : negativePosition();
295  }
296 
297 private:
299 
300 }; // End of class DataValueAttributes
301 }
302 
303 #if !defined(QT_NO_DEBUG_STREAM)
304 KDCHART_EXPORT QDebug operator<<(QDebug, const KDChart::DataValueAttributes &);
305 #endif /* QT_NO_DEBUG_STREAM */
306 
308 
309 QT_BEGIN_NAMESPACE
311 QT_END_NAMESPACE
312 
313 Q_DECLARE_METATYPE(KDChart::DataValueAttributes)
314 
315 #endif // KDCHARTDATAVALUEATTRIBUTES_H
QT_BEGIN_NAMESPACE Q_DECLARE_TYPEINFO(KDChart::DataValueAttributes, Q_MOVABLE_TYPE)
KDCHART_EXPORT QDebug operator<<(QDebug, const KDChart::DataValueAttributes &)
Definition of global enums.
Contains KDChart macros.
#define KDCHART_DECLARE_SWAP_SPECIALISATION(X)
#define KDCHART_DECLARE_PRIVATE_BASE_VALUE(X)
Definition: KDChartGlobal.h:65
Diagram attributes dealing with data value labels.
bool operator!=(const DataValueAttributes &other) const
const RelativePosition position(bool positive) const
A set of attributes for frames around items.
A set of attributes controlling the appearance of data set markers.
Defines relative position information: reference area, position in this area (reference position),...
A set of text attributes.
bool operator==(const TickInfo &, const TickInfo &)

© 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