KChart

KChartGridAttributes.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 KCHARTGRIDATTRIBUTES_H
21 #define KCHARTGRIDATTRIBUTES_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 GridAttributes
37 {
38 public:
41  GridAttributes &operator= ( const GridAttributes& );
42 
43  ~GridAttributes();
44 
45  void setGridVisible( bool visible );
46  bool isGridVisible() const;
47 
54  void setLinesOnAnnotations( bool );
55  bool linesOnAnnotations() const;
56 
57 
76  void setGridStepWidth( qreal stepWidth = 0.0 );
77 
84  qreal gridStepWidth() const;
85 
86 
100  void setGridSubStepWidth( qreal subStepWidth = 0.0 );
101 
108  qreal gridSubStepWidth() const;
109 
127  void setGridGranularitySequence( KChartEnums::GranularitySequence sequence );
128 
135  KChartEnums::GranularitySequence gridGranularitySequence() const;
136 
147  void setAdjustBoundsToGrid( bool adjustLower, bool adjustUpper );
148  bool adjustLowerBoundToGrid() const;
149  bool adjustUpperBoundToGrid() const;
150 
151  void setGridPen( const QPen & pen );
152  QPen gridPen() const;
153 
154  void setSubGridVisible( bool visible );
155  bool isSubGridVisible() const;
156 
157  void setSubGridPen( const QPen & pen );
158  QPen subGridPen() const;
159 
160  void setOuterLinesVisible( bool visible );
161  bool isOuterLinesVisible() const;
162 
163  void setZeroLinePen( const QPen & pen );
164  QPen zeroLinePen() const;
165 
166  bool operator==( const GridAttributes& ) const;
167  inline bool operator!=( const GridAttributes& other ) const { return !operator==(other); }
168 
169 private:
170  KCHART_DECLARE_PRIVATE_BASE_VALUE( GridAttributes )
171 }; // End of class GridAttributes
172 
173 }
174 
175 #if !defined(QT_NO_DEBUG_STREAM)
176 KCHART_EXPORT QDebug operator<<(QDebug, const KChart::GridAttributes& );
177 #endif /* QT_NO_DEBUG_STREAM */
178 
179 KCHART_DECLARE_SWAP_SPECIALISATION( KChart::GridAttributes )
180 
181 QT_BEGIN_NAMESPACE
182 Q_DECLARE_TYPEINFO( KChart::GridAttributes, Q_MOVABLE_TYPE );
183 QT_END_NAMESPACE
184 
185 Q_DECLARE_METATYPE( KChart::GridAttributes )
186 
187 #endif // KCHARTGRIDATTRIBUTES_H
Contains KChart macros.
GranularitySequence
GranularitySequence specifies the values, that may be applied, to determine a step width within a giv...
Definition: KChartEnums.h:89
QDataStream & operator<<(QDataStream &out, const KDateTime::Spec &spec)
Definition of global enums.
A set of attributes controlling the appearance of grids.
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:01 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.