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 
16 QT_BEGIN_NAMESPACE
17 class QPen;
18 QT_END_NAMESPACE
19 
20 namespace KChart {
21 
22 /**
23  * @brief A set of attributes controlling the appearance of grids
24  */
25 class KCHART_EXPORT LeveyJenningsGridAttributes
26 {
27 public:
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 
59 private:
60  KCHART_DECLARE_PRIVATE_BASE_VALUE( LeveyJenningsGridAttributes )
61 }; // End of class GridAttributes
62 
63 }
64 
65 KCHART_DECLARE_SWAP_SPECIALISATION( KChart::LeveyJenningsGridAttributes )
66 
67 QT_BEGIN_NAMESPACE
68 Q_DECLARE_TYPEINFO( KChart::LeveyJenningsGridAttributes, Q_MOVABLE_TYPE );
69 QT_END_NAMESPACE
70 
71 Q_DECLARE_METATYPE( KChart::LeveyJenningsGridAttributes )
72 
73 #endif // KCHARTLEVEYJENNINGSGRIDATTRIBUTES_H
PartitionTable::TableType type
Contains KChart macros.
A set of attributes controlling the appearance of grids.
Definition of global enums.
Global namespace.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Jan 27 2022 22:33:23 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.