KD Chart API Documentation  3.1
KDChartGridAttributes.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** This file is part of the KD Chart library.
4 **
5 ** SPDX-FileCopyrightText: 2001 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
6 **
7 ** SPDX-License-Identifier: MIT
8 **
9 ****************************************************************************/
10 
11 #ifndef KDCHARTGRIDATTRIBUTES_H
12 #define KDCHARTGRIDATTRIBUTES_H
13 
14 #include "KDChartEnums.h"
15 #include "KDChartGlobal.h"
16 #include <QMetaType>
17 
18 QT_BEGIN_NAMESPACE
19 class QPen;
20 QT_END_NAMESPACE
21 
22 namespace KDChart {
23 
27 class KDCHART_EXPORT GridAttributes
28 {
29 public:
32  GridAttributes &operator=(const GridAttributes &);
33 
34  ~GridAttributes();
35 
36  void setGridVisible(bool visible);
37  bool isGridVisible() const;
38 
45  void setLinesOnAnnotations(bool);
46  bool linesOnAnnotations() const;
47 
48  void setGridStepWidth(qreal stepWidth = 0.0);
49  qreal gridStepWidth() const;
50 
51  void setGridSubStepWidth(qreal subStepWidth = 0.0);
52  qreal gridSubStepWidth() const;
53 
65  void setGridGranularitySequence(KDChartEnums::GranularitySequence sequence);
66  KDChartEnums::GranularitySequence gridGranularitySequence() const;
67 
78  void setAdjustBoundsToGrid(bool adjustLower, bool adjustUpper);
79  bool adjustLowerBoundToGrid() const;
80  bool adjustUpperBoundToGrid() const;
81 
82  void setGridPen(const QPen &pen);
83  QPen gridPen() const;
84 
85  void setSubGridVisible(bool visible);
86  bool isSubGridVisible() const;
87 
88  void setSubGridPen(const QPen &pen);
89  QPen subGridPen() const;
90 
91  void setOuterLinesVisible(bool visible);
92  bool isOuterLinesVisible() const;
93 
94  void setZeroLinePen(const QPen &pen);
95  QPen zeroLinePen() const;
96 
97  bool operator==(const GridAttributes &) const;
98  inline bool operator!=(const GridAttributes &other) const
99  {
100  return !operator==(other);
101  }
102 
103 private:
105 }; // End of class GridAttributes
106 }
107 
108 #if !defined(QT_NO_DEBUG_STREAM)
109 KDCHART_EXPORT QDebug operator<<(QDebug, const KDChart::GridAttributes &);
110 #endif /* QT_NO_DEBUG_STREAM */
111 
113 
114 QT_BEGIN_NAMESPACE
116 QT_END_NAMESPACE
117 
118 Q_DECLARE_METATYPE(KDChart::GridAttributes)
119 
120 #endif // KDCHARTGRIDATTRIBUTES_H
Definition of global enums.
Contains KDChart macros.
#define KDCHART_DECLARE_SWAP_SPECIALISATION(X)
#define KDCHART_DECLARE_PRIVATE_BASE_VALUE(X)
Definition: KDChartGlobal.h:65
KDCHART_EXPORT QDebug operator<<(QDebug, const KDChart::GridAttributes &)
QT_BEGIN_NAMESPACE Q_DECLARE_TYPEINFO(KDChart::GridAttributes, Q_MOVABLE_TYPE)
A set of attributes controlling the appearance of grids.
bool operator!=(const GridAttributes &other) const
bool operator==(const TickInfo &, const TickInfo &)

© 2001 Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
https://www.kdab.com/development-resources/qt-tools/kd-chart/
Generated by doxygen 1.9.1