KChart

KChartMarkerAttributes.h
1 /*
2  * Copyright (C) 2001-2015 Klaralvdalens Datakonsult AB. All rights reserved.
3  *
4  * This file is part of the KD Chart library.
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License as
8  * published by the Free Software Foundation; either version 2 of
9  * the License, or (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program. If not, see <https://www.gnu.org/licenses/>.
18  */
19 
20 #ifndef KCHARTMARKERATTRIBUTES_H
21 #define KCHARTMARKERATTRIBUTES_H
22 
23 #include <QMetaType>
24 #include "KChartGlobal.h"
25 
26 QT_BEGIN_NAMESPACE
27 class QColor;
28 class QSizeF;
29 class QPen;
30 class QPainterPath;
31 class QDebug;
32 template <typename T, typename K> class QMap;
33 QT_END_NAMESPACE
34 
35 namespace KChart {
36 
40  class KCHART_EXPORT MarkerAttributes
41  {
42  public:
45  MarkerAttributes &operator= ( const MarkerAttributes& );
46 
48 
49  enum MarkerStyle { NoMarker = 0,
50  MarkerCircle = 1,
51  MarkerSquare = 2,
52  MarkerDiamond = 3,
53  Marker1Pixel = 4,
54  Marker4Pixels = 5,
55  MarkerRing = 6,
56  MarkerCross = 7,
57  MarkerFastCross = 8,
58  MarkerArrowDown = 9,
59  MarkerArrowUp = 10,
60  MarkerArrowRight = 11,
61  MarkerArrowLeft = 12,
62  MarkerBowTie = 13,
63  MarkerHourGlass = 14,
64  MarkerStar = 15,
65  MarkerX = 16,
66  MarkerAsterisk = 17,
67  MarkerHorizontalBar = 18,
68  MarkerVerticalBar = 19,
69  PainterPathMarker = 255,
70  StartCustomMarkers = 256 };
71 
74  AbsoluteSize = 0,
77  AbsoluteSizeScaled = 1,
79  RelativeToDiagramWidthHeightMin = 2 };
80 
81  void setVisible( bool visible );
82  bool isVisible() const;
83 
85  void setMarkerStylesMap( const MarkerStylesMap & map );
86  MarkerStylesMap markerStylesMap() const;
87 
88  void setThreeD( bool value );
89  bool threeD() const;
90 
100  void setMarkerStyle( uint style );
101  uint markerStyle() const;
102 
110  void setMarkerSize( const QSizeF& size );
111  QSizeF markerSize() const;
112 
124  void setMarkerSizeMode( MarkerSizeMode mode );
125  MarkerSizeMode markerSizeMode() const;
126 
127  void setMarkerColor( const QColor& color );
128  QColor markerColor() const;
129 
130  void setCustomMarkerPath( const QPainterPath& path );
131  QPainterPath customMarkerPath() const;
132 
133  void setPen( const QPen& pen );
134  QPen pen() const;
135 
136  bool operator==( const MarkerAttributes& ) const;
137  bool operator!=( const MarkerAttributes& ) const;
138 
139  private:
140  KCHART_DECLARE_PRIVATE_BASE_VALUE( MarkerAttributes )
141  }; // End of class MarkerAttributes
142 
143  inline bool MarkerAttributes::operator!=( const MarkerAttributes & other ) const { return !operator==( other ); }
144 }
145 
146 #ifndef QT_NO_DEBUG_STREAM
147 KCHART_EXPORT QDebug operator<<( QDebug, const KChart::MarkerAttributes & );
148 #endif
149 
150 KCHART_DECLARE_SWAP_SPECIALISATION( KChart::MarkerAttributes )
151 
152 QT_BEGIN_NAMESPACE
153 Q_DECLARE_TYPEINFO( KChart::MarkerAttributes, Q_MOVABLE_TYPE );
154 QT_END_NAMESPACE
155 
156 Q_DECLARE_METATYPE( KChart::MarkerAttributes )
157 
158 #endif // KCHARTMARKERATTRIBUTES_H
A set of attributes controlling the appearance of data set markers.
Contains KChart macros.
QDataStream & operator<<(QDataStream &out, const KDateTime::Spec &spec)
Global namespace.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Nov 30 2020 22:37:02 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.