KD Chart 2  [rev.2.7]
KDChartMarkerAttributes.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 KDCHARTMARKERATTRIBUTES_H
24 #define KDCHARTMARKERATTRIBUTES_H
25 
26 #include <QMetaType>
27 #include "KDChartGlobal.h"
28 
29 QT_BEGIN_NAMESPACE
30 class QColor;
31 class QSizeF;
32 class QPen;
33 class QPainterPath;
34 class QDebug;
35 template <typename T, typename K> class QMap;
36 QT_END_NAMESPACE
37 
38 namespace KDChart {
39 
43  class KDCHART_EXPORT MarkerAttributes
44  {
45  public:
48  MarkerAttributes &operator= ( const MarkerAttributes& );
49 
51 
52  enum MarkerStyle { MarkerCircle = 0,
53  MarkerSquare = 1,
54  MarkerDiamond = 2,
55  Marker1Pixel = 3,
56  Marker4Pixels = 4,
57  MarkerRing = 5,
58  MarkerCross = 6,
59  MarkerFastCross = 7,
60  NoMarker = 8,
61  PainterPathMarker = 9,
62  StartCustomMarkers = 10 };
63 
64  void setVisible( bool visible );
65  bool isVisible() const;
66 
68  void setMarkerStylesMap( const MarkerStylesMap & map );
69  MarkerStylesMap markerStylesMap() const;
70 
71  void setThreeD( bool value );
72  bool threeD() const;
73 
83  void setMarkerStyle( uint style );
84  uint markerStyle() const;
85 
93  void setMarkerSize( const QSizeF& size );
94  QSizeF markerSize() const;
95 
96  void setMarkerColor( const QColor& color );
97  QColor markerColor() const;
98 
99  void setCustomMarkerPath( const QPainterPath& path );
100  QPainterPath customMarkerPath() const;
101 
102  void setPen( const QPen& pen );
103  QPen pen() const;
104 
105  bool operator==( const MarkerAttributes& ) const;
106  bool operator!=( const MarkerAttributes& ) const;
107 
108  private:
110  }; // End of class MarkerAttributes
111 
112  inline bool MarkerAttributes::operator!=( const MarkerAttributes & other ) const { return !operator==( other ); }
113 }
114 
115 #ifndef QT_NO_DEBUG_STREAM
116 KDCHART_EXPORT QDebug operator<<( QDebug, const KDChart::MarkerAttributes & );
117 #endif
118 
120 
121 QT_BEGIN_NAMESPACE
123 QT_END_NAMESPACE
124 
125 Q_DECLARE_METATYPE( KDChart::MarkerAttributes )
126 
127 #endif // KDCHARTMARKERATTRIBUTES_H
bool operator==(const Span &s1, const Span &s2)
QT_BEGIN_NAMESPACE Q_DECLARE_TYPEINFO(KDChart::MarkerAttributes, Q_MOVABLE_TYPE)
#define KDCHART_DECLARE_PRIVATE_BASE_VALUE(X)
Definition: KDChartGlobal.h:71
A set of attributes controlling the appearance of data set markers.
bool operator!=(const MarkerAttributes &) const
#define KDCHART_DECLARE_SWAP_SPECIALISATION(X)
QDebug operator<<(QDebug stream, const DataDimension &r)
bool operator!=(const Span &s1, const Span &s2)

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/