KD Chart 2
[rev.2.5]
|
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 KDCHARTGRIDATTRIBUTES_H 00024 #define KDCHARTGRIDATTRIBUTES_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 GridAttributes 00040 { 00041 public: 00042 GridAttributes(); 00043 GridAttributes( const GridAttributes& ); 00044 GridAttributes &operator= ( const GridAttributes& ); 00045 00046 ~GridAttributes(); 00047 00048 void setGridVisible( bool visible ); 00049 bool isGridVisible() const; 00050 00051 00052 void setGridStepWidth( qreal stepWidth=0.0 ); 00053 qreal gridStepWidth() const; 00054 00055 void setGridSubStepWidth( qreal subStepWidth=0.0 ); 00056 qreal gridSubStepWidth() const; 00057 00069 void setGridGranularitySequence( KDChartEnums::GranularitySequence sequence ); 00070 KDChartEnums::GranularitySequence gridGranularitySequence() const; 00071 00082 void setAdjustBoundsToGrid( bool adjustLower, bool adjustUpper ); 00083 bool adjustLowerBoundToGrid() const; 00084 bool adjustUpperBoundToGrid() const; 00085 00086 00087 void setGridPen( const QPen & pen ); 00088 QPen gridPen() const; 00089 00090 00091 void setSubGridVisible( bool visible ); 00092 bool isSubGridVisible() const; 00093 00094 void setSubGridPen( const QPen & pen ); 00095 QPen subGridPen() const; 00096 00097 00098 void setOuterLinesVisible( bool visible ); 00099 bool isOuterLinesVisible() const; 00100 00101 00102 void setZeroLinePen( const QPen & pen ); 00103 QPen zeroLinePen() const; 00104 00105 bool operator==( const GridAttributes& ) const; 00106 inline bool operator!=( const GridAttributes& other ) const { return !operator==(other); } 00107 00108 private: 00109 KDCHART_DECLARE_PRIVATE_BASE_VALUE( GridAttributes ) 00110 }; // End of class GridAttributes 00111 00112 } 00113 00114 #if !defined(QT_NO_DEBUG_STREAM) 00115 KDCHART_EXPORT QDebug operator<<(QDebug, const KDChart::GridAttributes& ); 00116 #endif /* QT_NO_DEBUG_STREAM */ 00117 00118 KDCHART_DECLARE_SWAP_SPECIALISATION( KDChart::GridAttributes ) 00119 00120 QT_BEGIN_NAMESPACE 00121 Q_DECLARE_TYPEINFO( KDChart::GridAttributes, Q_MOVABLE_TYPE ); 00122 QT_END_NAMESPACE 00123 00124 Q_DECLARE_METATYPE( KDChart::GridAttributes ) 00125 00126 #endif // KDCHARTGRIDATTRIBUTES_H