KChart

KChartRulerAttributes.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 KCHARTRULERATTRIBUTES_H
21 #define KCHARTRULERATTRIBUTES_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 RulerAttributes
37 {
38 public:
41  RulerAttributes &operator= ( const RulerAttributes& );
42 
43  ~RulerAttributes();
44 
48  void setTickMarkPen( const QPen& pen );
49  QPen tickMarkPen() const;
50 
54  void setMajorTickMarkPen( const QPen& pen );
55  bool majorTickMarkPenIsSet() const;
56  QPen majorTickMarkPen() const;
57 
61  void setMinorTickMarkPen( const QPen& pen );
62  bool minorTickMarkPenIsSet() const;
63  QPen minorTickMarkPen() const;
64 
71  void setTickMarkPen( qreal value, const QPen& pen );
72  QPen tickMarkPen( qreal value ) const;
74  TickMarkerPensMap tickMarkPens() const;
75 
76  bool hasTickMarkPenAt( qreal value) const;
77 
81  void setTickMarkColor( const QColor& color );
82  QColor tickMarkColor() const;
83 
87  void setShowMinorTickMarks( bool show );
88  bool showMinorTickMarks() const;
89 
93  void setRulerLinePen(const QPen &pen);
96  QPen rulerLinePen() const;
97 
98  void setShowRulerLine( bool show );
99  bool showRulerLine() const;
100 
104  void setShowMajorTickMarks( bool show );
105  bool showMajorTickMarks() const;
106 
110  void setMajorTickMarkLength( int length );
111  int majorTickMarkLength() const;
112  bool majorTickMarkLengthIsSet() const;
113 
117  void setMinorTickMarkLength( int length );
118  int minorTickMarkLength() const;
119  bool minorTickMarkLengthIsSet() const;
120 
126  void setLabelMargin(int margin);
127  int labelMargin() const;
128 
133  void setShowFirstTick( bool show );
134  bool showFirstTick() const;
135 
136  bool operator==( const RulerAttributes& ) const;
137  inline bool operator!=( const RulerAttributes& other ) const { return !operator==(other); }
138 
139 private:
140  KCHART_DECLARE_PRIVATE_BASE_VALUE( RulerAttributes )
141 }; // End of class RulerAttributes
142 
143 }
144 
145 #if !defined(QT_NO_DEBUG_STREAM)
146 KCHART_EXPORT QDebug operator<<(QDebug, const KChart::RulerAttributes& );
147 #endif /* QT_NO_DEBUG_STREAM */
148 
149 KCHART_DECLARE_SWAP_SPECIALISATION( KChart::RulerAttributes )
150 
151 QT_BEGIN_NAMESPACE
152 Q_DECLARE_TYPEINFO( KChart::RulerAttributes, Q_MOVABLE_TYPE );
153 QT_END_NAMESPACE
154 
155 Q_DECLARE_METATYPE( KChart::RulerAttributes )
156 
157 #endif // KCHARTRULERATTRIBUTES_H
Contains KChart macros.
QDataStream & operator<<(QDataStream &out, const KDateTime::Spec &spec)
Definition of global enums.
Global namespace.
A set of attributes controlling the appearance of axis rulers.
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Wed Jan 20 2021 22:39:31 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.