KChart

KChartLeveyJenningsGridAttributes.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 KCHARTLEVEYJENNINGSGRIDATTRIBUTES_H
21 #define KCHARTLEVEYJENNINGSGRIDATTRIBUTES_H
22 
23 #include <QMetaType>
24 #include "KChartGlobal.h"
25 #include "KChartEnums.h"
26 
27 QT_BEGIN_NAMESPACE
28 class QPen;
29 QT_END_NAMESPACE
30 
31 namespace KChart {
32 
36 class KCHART_EXPORT LeveyJenningsGridAttributes
37 {
38 public:
42 
44 
45  enum GridType
46  {
47  Expected,
48  Calculated
49  };
50 
51  enum Range
52  {
53  NormalRange,
54  CriticalRange,
55  OutOfRange
56  };
57 
58  void setGridVisible( GridType type, bool visible );
59  bool isGridVisible( GridType type ) const;
60 
61  void setGridPen( GridType type, const QPen& pen );
62  QPen gridPen( GridType type ) const;
63 
64  void setRangeBrush( Range range, const QBrush& brush );
65  QBrush rangeBrush( Range range ) const;
66 
67  bool operator==( const LeveyJenningsGridAttributes& ) const;
68  inline bool operator!=( const LeveyJenningsGridAttributes& other ) const { return !operator==(other); }
69 
70 private:
71  KCHART_DECLARE_PRIVATE_BASE_VALUE( LeveyJenningsGridAttributes )
72 }; // End of class GridAttributes
73 
74 }
75 
76 KCHART_DECLARE_SWAP_SPECIALISATION( KChart::LeveyJenningsGridAttributes )
77 
78 QT_BEGIN_NAMESPACE
79 Q_DECLARE_TYPEINFO( KChart::LeveyJenningsGridAttributes, Q_MOVABLE_TYPE );
80 QT_END_NAMESPACE
81 
82 Q_DECLARE_METATYPE( KChart::LeveyJenningsGridAttributes )
83 
84 #endif // KCHARTLEVEYJENNINGSGRIDATTRIBUTES_H
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-2021 The KDE developers.
Generated on Thu Jan 14 2021 22:38:05 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.