KD Chart 2  [rev.2.5]
KDChartRulerAttributes.h
Go to the documentation of this file.
00001 /****************************************************************************
00002 ** Copyright (C) 2001-2012 Klaralvdalens Datakonsult AB.  All rights reserved.
00003 **
00004 ** This file is part of the KD Chart library.
00005 **
00006 ** Licensees holding valid commercial KD Chart licenses may use this file in
00007 ** accordance with the KD Chart Commercial License Agreement provided with
00008 ** the Software.
00009 **
00010 **
00011 ** This file may be distributed and/or modified under the terms of the
00012 ** GNU General Public License version 2 and version 3 as published by the
00013 ** Free Software Foundation and appearing in the file LICENSE.GPL.txt included.
00014 **
00015 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00016 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00017 **
00018 ** Contact info@kdab.com if any conditions of this licensing are not
00019 ** clear to you.
00020 **
00021 **********************************************************************/
00022 
00023 #ifndef KDCHARTRULERATTRIBUTES_H
00024 #define KDCHARTRULERATTRIBUTES_H
00025 
00026 #include <QMetaType>
00027 #include "KDChartGlobal.h"
00028 #include "KDChartEnums.h"
00029 
00030 QT_BEGIN_NAMESPACE
00031 class QPen;
00032 QT_END_NAMESPACE
00033 
00034 namespace KDChart {
00035 
00039 class KDCHART_EXPORT RulerAttributes
00040 {
00041 public:
00042         RulerAttributes();
00043         RulerAttributes( const RulerAttributes& );
00044         RulerAttributes &operator= ( const RulerAttributes& );
00045 
00046     ~RulerAttributes();
00047 
00051     void setTickMarkPen( const QPen& pen );
00052     QPen tickMarkPen() const;
00053 
00057     void setMajorTickMarkPen( const QPen& pen );
00058     bool majorTickMarkPenIsSet() const;
00059     QPen majorTickMarkPen() const;
00060 
00064     void setMinorTickMarkPen( const QPen& pen );
00065     bool minorTickMarkPenIsSet() const;
00066     QPen minorTickMarkPen() const;
00067 
00074     void setTickMarkPen( qreal value, const QPen& pen );
00075     QPen tickMarkPen( qreal value ) const;
00076     typedef QMap<qreal, QPen> TickMarkerPensMap;
00077     TickMarkerPensMap tickMarkPens() const;
00078 
00079     bool hasTickMarkPenAt( qreal value) const;
00080 
00084     void setTickMarkColor( const QColor& color );
00085     QColor tickMarkColor() const;
00086 
00090     void setShowMinorTickMarks( bool show );
00091     bool showMinorTickMarks() const;
00092 
00093     void setShowRulerLine( bool show );
00094     bool showRulerLine() const;
00095 
00099     void setShowMajorTickMarks( bool show );
00100     bool showMajorTickMarks() const;
00101 
00105     void setMajorTickMarkLength( int length );
00106     int majorTickMarkLength() const;
00107     bool majorTickMarkLengthIsSet() const;
00108 
00112     void setMinorTickMarkLength( int length );
00113     int minorTickMarkLength() const;
00114     bool minorTickMarkLengthIsSet() const;
00115 
00121     void setLabelMargin(int margin);
00122     int labelMargin() const;
00123 
00127     void setShowZeroLabel(bool show);
00128     bool showZeroLabel() const;
00129 
00130     bool operator==( const RulerAttributes& ) const;
00131     inline bool operator!=( const RulerAttributes& other ) const { return !operator==(other); }
00132 
00133 private:
00134     KDCHART_DECLARE_PRIVATE_BASE_VALUE( RulerAttributes )
00135 }; // End of class RulerAttributes
00136 
00137 }
00138 
00139 #if !defined(QT_NO_DEBUG_STREAM)
00140 KDCHART_EXPORT QDebug operator<<(QDebug, const KDChart::RulerAttributes& );
00141 #endif /* QT_NO_DEBUG_STREAM */
00142 
00143 KDCHART_DECLARE_SWAP_SPECIALISATION( KDChart::RulerAttributes )
00144 
00145 QT_BEGIN_NAMESPACE
00146 Q_DECLARE_TYPEINFO( KDChart::RulerAttributes, Q_MOVABLE_TYPE );
00147 QT_END_NAMESPACE
00148 
00149 Q_DECLARE_METATYPE( KDChart::RulerAttributes )
00150 
00151 #endif // KDCHARTRULERATTRIBUTES_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Defines

Klarälvdalens Datakonsult AB (KDAB)
Qt-related services and products
http://www.kdab.com/
http://www.kdab.com/products/kd-chart/