KChart

KChartLeveyJenningsGridAttributes.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 KCHARTLEVEYJENNINGSGRIDATTRIBUTES_H
10#define KCHARTLEVEYJENNINGSGRIDATTRIBUTES_H
11
12#include <QMetaType>
13#include "KChartGlobal.h"
14#include "KChartEnums.h"
15
16QT_BEGIN_NAMESPACE
17class QPen;
18QT_END_NAMESPACE
19
20namespace KChart {
21
22/**
23 * @brief A set of attributes controlling the appearance of grids
24 */
25class KCHART_EXPORT LeveyJenningsGridAttributes
26{
27public:
31
33
34 enum GridType
35 {
36 Expected,
37 Calculated
38 };
39
40 enum Range
41 {
42 NormalRange,
43 CriticalRange,
44 OutOfRange
45 };
46
47 void setGridVisible( GridType type, bool visible );
48 bool isGridVisible( GridType type ) const;
49
50 void setGridPen( GridType type, const QPen& pen );
51 QPen gridPen( GridType type ) const;
52
53 void setRangeBrush( Range range, const QBrush& brush );
54 QBrush rangeBrush( Range range ) const;
55
56 bool operator==( const LeveyJenningsGridAttributes& ) const;
57 inline bool operator!=( const LeveyJenningsGridAttributes& other ) const { return !operator==(other); }
58
59private:
60 KCHART_DECLARE_PRIVATE_BASE_VALUE( LeveyJenningsGridAttributes )
61}; // End of class GridAttributes
62
63}
64
65KCHART_DECLARE_SWAP_SPECIALISATION( KChart::LeveyJenningsGridAttributes )
66
67QT_BEGIN_NAMESPACE
68Q_DECLARE_TYPEINFO( KChart::LeveyJenningsGridAttributes, Q_MOVABLE_TYPE );
69QT_END_NAMESPACE
70
71Q_DECLARE_METATYPE( KChart::LeveyJenningsGridAttributes )
72
73#endif // KCHARTLEVEYJENNINGSGRIDATTRIBUTES_H
Definition of global enums.
Contains KChart macros.
A set of attributes controlling the appearance of grids.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 11 2024 12:18:26 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.