KD Chart 2  [rev.2.7]
KDChartDataValueAttributes.h
Go to the documentation of this file.
1 /****************************************************************************
2 ** Copyright (C) 2001-2020 Klaralvdalens Datakonsult AB. All rights reserved.
3 **
4 ** This file is part of the KD Chart library.
5 **
6 ** Licensees holding valid commercial KD Chart licenses may use this file in
7 ** accordance with the KD Chart Commercial License Agreement provided with
8 ** the Software.
9 **
10 **
11 ** This file may be distributed and/or modified under the terms of the
12 ** GNU General Public License version 2 and version 3 as published by the
13 ** Free Software Foundation and appearing in the file LICENSE.GPL.txt included.
14 **
15 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
17 **
18 ** Contact info@kdab.com if any conditions of this licensing are not
19 ** clear to you.
20 **
21 **********************************************************************/
22 
23 #ifndef KDCHARTDATAVALUEATTRIBUTES_H
24 #define KDCHARTDATAVALUEATTRIBUTES_H
25 
26 #include <Qt>
27 #include <QMetaType>
28 #include "KDChartGlobal.h"
29 #include "KDChartEnums.h"
31 
39 namespace KDChart {
40 
41  class TextAttributes;
42  class BackgroundAttributes;
43  class FrameAttributes;
44  class MarkerAttributes;
45 
55 class KDCHART_EXPORT DataValueAttributes
56 {
57 public:
60  DataValueAttributes &operator= ( const DataValueAttributes& );
61  bool operator==( const DataValueAttributes& ) const;
62  inline bool operator!=( const DataValueAttributes& other ) const { return !operator==(other); }
63 
65 
66  static const DataValueAttributes& defaultAttributes();
67  static const QVariant& defaultAttributesAsVariant();
68 
72  void setVisible( bool visible );
73 
77  bool isVisible() const;
78 
84  void setTextAttributes( const TextAttributes &a );
85 
89  TextAttributes textAttributes() const;
90 
97  bool mirrorNegativeValueTextRotation() const;
98 
102  void setMirrorNegativeValueTextRotation( bool enable );
103 
109  void setFrameAttributes( const FrameAttributes &a );
110 
116  FrameAttributes frameAttributes() const;
117 
123  void setBackgroundAttributes( const BackgroundAttributes &a );
124 
130  BackgroundAttributes backgroundAttributes() const;
131 
138  void setMarkerAttributes( const MarkerAttributes &a );
139 
145  MarkerAttributes markerAttributes() const;
146 
156  void setUsePercentage( bool enable );
157 
162  bool usePercentage() const;
163 
169  void setDecimalDigits( int digits );
170 
174  int decimalDigits() const;
175 
180  void setPrefix( const QString prefix );
181 
186  QString prefix() const;
187 
192  void setSuffix( const QString suffix );
193 
198  QString suffix() const;
199 
205  void setDataLabel( const QString label );
206 
211  QString dataLabel() const;
212 
216  bool showRepetitiveDataLabels() const;
217 
223  void setShowRepetitiveDataLabels( bool showRepetitiveDataLabels );
224 
228  bool showOverlappingDataLabels() const;
229 
235  void setShowOverlappingDataLabels( bool showOverlappingDataLabels );
236 
244  void setPowerOfTenDivisor( int powerOfTenDivisor );
245  int powerOfTenDivisor() const;
257  void setShowInfinite( bool infinite );
258  bool showInfinite() const;
275  void setNegativePosition( const RelativePosition& relPosition );
276 
281  const RelativePosition negativePosition() const;
282 
295  void setPositivePosition( const RelativePosition& relPosition );
296 
301  const RelativePosition positivePosition() const;
302 
303  const RelativePosition position( bool positive ) const
304  {
305  return positive ? positivePosition() : negativePosition();
306  }
307 
308 private:
310 
311 }; // End of class DataValueAttributes
312 
313 }
314 
315 #if !defined(QT_NO_DEBUG_STREAM)
316 KDCHART_EXPORT QDebug operator<<(QDebug, const KDChart::DataValueAttributes& );
317 #endif /* QT_NO_DEBUG_STREAM */
318 
320 
321 QT_BEGIN_NAMESPACE
323 QT_END_NAMESPACE
324 
325 Q_DECLARE_METATYPE( KDChart::DataValueAttributes )
326 
327 #endif // KDCHARTDATAVALUEATTRIBUTES_H
bool operator==(const Span &s1, const Span &s2)
Diagram attributes dealing with data value labels.
Definition of global enums.
A set of attributes for frames around items.
#define KDCHART_DECLARE_PRIVATE_BASE_VALUE(X)
Definition: KDChartGlobal.h:71
const RelativePosition position(bool positive) const
QT_BEGIN_NAMESPACE Q_DECLARE_TYPEINFO(KDChart::DataValueAttributes, Q_MOVABLE_TYPE)
A set of attributes controlling the appearance of data set markers.
bool operator!=(const DataValueAttributes &other) const
#define KDCHART_DECLARE_SWAP_SPECIALISATION(X)
Defines relative position information: reference area, position in this area (reference position)...
QDebug operator<<(QDebug stream, const DataDimension &r)
A set of text attributes.
Set of attributes usable for background pixmaps.

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/