KD Chart 2 [rev.2.4]

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 class QPen;
00031 
00032 namespace KDChart {
00033 
00037 class KDCHART_EXPORT RulerAttributes
00038 {
00039 public:
00040         RulerAttributes();
00041         RulerAttributes( const RulerAttributes& );
00042         RulerAttributes &operator= ( const RulerAttributes& );
00043 
00044     ~RulerAttributes();
00045     
00049     void setTickMarkPen( const QPen& pen );
00050     QPen tickMarkPen() const;
00051 
00055     void setMajorTickMarkPen( const QPen& pen );
00056     bool majorTickMarkPenIsSet() const;
00057     QPen majorTickMarkPen() const;
00058 
00062     void setMinorTickMarkPen( const QPen& pen );
00063     bool minorTickMarkPenIsSet() const;
00064     QPen minorTickMarkPen() const;
00065 
00072     void setTickMarkPen( qreal value, const QPen& pen );
00073     QPen tickMarkPen( qreal value ) const;
00074     typedef QMap<qreal, QPen> TickMarkerPensMap;
00075     TickMarkerPensMap tickMarkPens() const;
00076     
00077     bool hasTickMarkPenAt( qreal value) const;
00078 
00082     void setTickMarkColor( const QColor& color );
00083     QColor tickMarkColor() const;
00084 
00088     void setShowMinorTickMarks( bool show );
00089     bool showMinorTickMarks() const;
00090 
00091     void setShowRulerLine( bool show );
00092     bool showRulerLine() const;
00093 
00097     void setShowMajorTickMarks( bool show );
00098     bool showMajorTickMarks() const;
00099     
00105     void setLabelMargin(int margin);
00106     int labelMargin() const;
00107 
00108     bool operator==( const RulerAttributes& ) const;
00109     inline bool operator!=( const RulerAttributes& other ) const { return !operator==(other); }
00110 
00111 private:
00112     KDCHART_DECLARE_PRIVATE_BASE_VALUE( RulerAttributes )
00113 }; // End of class RulerAttributes
00114 
00115 }
00116 
00117 #if !defined(QT_NO_DEBUG_STREAM)
00118 KDCHART_EXPORT QDebug operator<<(QDebug, const KDChart::RulerAttributes& );
00119 #endif /* QT_NO_DEBUG_STREAM */
00120 
00121 KDCHART_DECLARE_SWAP_SPECIALISATION( KDChart::RulerAttributes )
00122 Q_DECLARE_METATYPE( KDChart::RulerAttributes )
00123 Q_DECLARE_TYPEINFO( KDChart::RulerAttributes, Q_MOVABLE_TYPE );
00124 
00125 
00126 #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/