KD Chart 2  [rev.2.7]
KDChartRulerAttributes.h
Go to the documentation of this file.
1 /****************************************************************************
2 ** Copyright (C) 2001-2020 Klaralvdalens Datakonsult AB. All rights reserved.
3 **
4 ** This file is part of the KD Chart library.
5 **
6 ** Licensees holding valid commercial KD Chart licenses may use this file in
7 ** accordance with the KD Chart Commercial License Agreement provided with
8 ** the Software.
9 **
10 **
11 ** This file may be distributed and/or modified under the terms of the
12 ** GNU General Public License version 2 and version 3 as published by the
13 ** Free Software Foundation and appearing in the file LICENSE.GPL.txt included.
14 **
15 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
17 **
18 ** Contact info@kdab.com if any conditions of this licensing are not
19 ** clear to you.
20 **
21 **********************************************************************/
22 
23 #ifndef KDCHARTRULERATTRIBUTES_H
24 #define KDCHARTRULERATTRIBUTES_H
25 
26 #include <QMetaType>
27 #include "KDChartGlobal.h"
28 #include "KDChartEnums.h"
29 
30 QT_BEGIN_NAMESPACE
31 class QPen;
32 QT_END_NAMESPACE
33 
34 namespace KDChart {
35 
39 class KDCHART_EXPORT RulerAttributes
40 {
41 public:
44  RulerAttributes &operator= ( const RulerAttributes& );
45 
46  ~RulerAttributes();
47 
51  void setTickMarkPen( const QPen& pen );
52  QPen tickMarkPen() const;
53 
57  void setMajorTickMarkPen( const QPen& pen );
58  bool majorTickMarkPenIsSet() const;
59  QPen majorTickMarkPen() const;
60 
64  void setMinorTickMarkPen( const QPen& pen );
65  bool minorTickMarkPenIsSet() const;
66  QPen minorTickMarkPen() const;
67 
74  void setTickMarkPen( qreal value, const QPen& pen );
75  QPen tickMarkPen( qreal value ) const;
77  TickMarkerPensMap tickMarkPens() const;
78 
79  bool hasTickMarkPenAt( qreal value) const;
80 
84  void setTickMarkColor( const QColor& color );
85  QColor tickMarkColor() const;
86 
90  void setShowMinorTickMarks( bool show );
91  bool showMinorTickMarks() const;
92 
93  void setShowRulerLine( bool show );
94  bool showRulerLine() const;
95 
99  void setShowMajorTickMarks( bool show );
100  bool showMajorTickMarks() const;
101 
105  void setMajorTickMarkLength( int length );
106  int majorTickMarkLength() const;
107  bool majorTickMarkLengthIsSet() const;
108 
112  void setMinorTickMarkLength( int length );
113  int minorTickMarkLength() const;
114  bool minorTickMarkLengthIsSet() const;
115 
121  void setLabelMargin(int margin);
122  int labelMargin() const;
123 
128  void setShowFirstTick( bool show );
129  bool showFirstTick() const;
130 
131  bool operator==( const RulerAttributes& ) const;
132  inline bool operator!=( const RulerAttributes& other ) const { return !operator==(other); }
133 
134 private:
136 }; // End of class RulerAttributes
137 
138 }
139 
140 #if !defined(QT_NO_DEBUG_STREAM)
141 KDCHART_EXPORT QDebug operator<<(QDebug, const KDChart::RulerAttributes& );
142 #endif /* QT_NO_DEBUG_STREAM */
143 
145 
146 QT_BEGIN_NAMESPACE
148 QT_END_NAMESPACE
149 
150 Q_DECLARE_METATYPE( KDChart::RulerAttributes )
151 
152 #endif // KDCHARTRULERATTRIBUTES_H
QT_BEGIN_NAMESPACE Q_DECLARE_TYPEINFO(KDChart::RulerAttributes, Q_MOVABLE_TYPE)
bool operator==(const Span &s1, const Span &s2)
QMap< qreal, QPen > TickMarkerPensMap
Definition of global enums.
bool operator!=(const RulerAttributes &other) const
A set of attributes controlling the appearance of axis rulers.
#define KDCHART_DECLARE_PRIVATE_BASE_VALUE(X)
Definition: KDChartGlobal.h:71
#define KDCHART_DECLARE_SWAP_SPECIALISATION(X)
QDebug operator<<(QDebug stream, const DataDimension &r)

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/