KChart

KChartValueTrackerAttributes.h
1/*
2 * SPDX-FileCopyrightText: 2001-2015 Klaralvdalens Datakonsult AB. All rights reserved.
3 *
4 * This file is part of the KD Chart library.
5 *
6 * SPDX-License-Identifier: GPL-2.0-or-later
7 */
8
9#ifndef KCHARTVALUETRACKERATTRIBUTES_H
10#define KCHARTVALUETRACKERATTRIBUTES_H
11
12#include <QDebug>
13#include <QMetaType>
14#include "KChartGlobal.h"
15
16namespace KChart {
17
18 /**
19 * \class ValueTrackerAttributes KChartValueTrackerAttributes.h KChartValueTrackerAttributes
20 * \brief Cell-specific attributes regarding value tracking
21 *
22 * ValueTrackerAttributes groups the properties regarding
23 * value tracking, and how it is displayed.
24 * Value tracking can be used to emphasize on one or several
25 * specific points in a line diagram.
26 */
27
28 class KCHART_EXPORT ValueTrackerAttributes
29 {
30 public:
34
36
37 /** Set the pen the value tracking lines and markers will be drawn with
38 * \param pen The pen the lines and markers will be drawn with
39 */
40 void setPen( const QPen& pen );
41
42 /**
43 * @return The pen the lines and markers are drawn with
44 */
45 QPen pen() const;
46
47 void setLinePen( const QPen &pen );
48 QPen linePen() const;
49
50 void setMarkerPen( const QPen &pen );
51 QPen markerPen() const;
52
53 void setMarkerBrush( const QBrush &brush );
54 QBrush markerBrush() const;
55
56 void setArrowBrush( const QBrush &brush );
57 QBrush arrowBrush() const;
58
59 /** Set the brush the area below the value tracking
60 * lines should be filled with. Default is a black brush
61 * with the style Qt::NoBrush.
62 * \param brush The brush the area should be filled with
63 */
64 void setAreaBrush( const QBrush& brush );
65
66 /**
67 * @return The brush the area below the value tracking lines is filled with
68 */
69 QBrush areaBrush() const;
70
71 /** Set the size of the markers. This includes both the arrows at
72 * the axes and the circle at the data point.
73 * \param size The size of the markers
74 */
75 void setMarkerSize( const QSizeF& size );
76
77 /**
78 * @return The size of the markers
79 */
80 QSizeF markerSize() const;
81
82 /**
83 * @return The orientations used to show the value tracking. Using only a
84 * vertical line, horizontal line or both (the default).
85 */
86 Qt::Orientations orientations() const;
87
88 /** Set the orientations used to show the value tracking.
89 * \param orientations The orientations of the value tracking lines.
90 */
91 void setOrientations( Qt::Orientations orientations );
92
93 /** Set whether value tracking should be enabled for a specific
94 * index or not
95 * \param enabled Whether value tracking should be enabled or not
96 */
97 void setEnabled( bool enabled );
98
99 /**
100 * @return Whether value tracking is enabled or not
101 */
102 bool isEnabled() const;
103
104 bool operator==( const ValueTrackerAttributes& ) const;
105 inline bool operator!=( const ValueTrackerAttributes& other ) const { return !operator==(other); }
106
107 private:
108 KCHART_DECLARE_PRIVATE_BASE_VALUE( ValueTrackerAttributes )
109 }; // End of class ValueTrackerAttributes
110
111}
112
113#if !defined(QT_NO_DEBUG_STREAM)
114KCHART_EXPORT QDebug operator<<(QDebug, const KChart::ValueTrackerAttributes& );
115#endif /* QT_NO_DEBUG_STREAM */
116
117KCHART_DECLARE_SWAP_SPECIALISATION( KChart::ValueTrackerAttributes )
118
119QT_BEGIN_NAMESPACE
120Q_DECLARE_TYPEINFO( KChart::ValueTrackerAttributes, Q_MOVABLE_TYPE );
121QT_END_NAMESPACE
122
123Q_DECLARE_METATYPE( KChart::ValueTrackerAttributes )
124
125#endif // KCHARTVALUETRACKERATTRIBUTES_H
Contains KChart macros.
Cell-specific attributes regarding value tracking.
typedef Orientations
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 6 2024 12:02:35 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.