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 KDCHARTMARKERATTRIBUTES_H 00024 #define KDCHARTMARKERATTRIBUTES_H 00025 00026 #include <QMetaType> 00027 #include "KDChartGlobal.h" 00028 00029 QT_BEGIN_NAMESPACE 00030 class QColor; 00031 class QSizeF; 00032 class QPen; 00033 class QPainterPath; 00034 class QDebug; 00035 template <typename T, typename K> class QMap; 00036 QT_END_NAMESPACE 00037 00038 namespace KDChart { 00039 00043 class KDCHART_EXPORT MarkerAttributes 00044 { 00045 public: 00046 MarkerAttributes(); 00047 MarkerAttributes( const MarkerAttributes& ); 00048 MarkerAttributes &operator= ( const MarkerAttributes& ); 00049 00050 ~MarkerAttributes(); 00051 00052 enum MarkerStyle { MarkerCircle = 0, 00053 MarkerSquare = 1, 00054 MarkerDiamond = 2, 00055 Marker1Pixel = 3, 00056 Marker4Pixels = 4, 00057 MarkerRing = 5, 00058 MarkerCross = 6, 00059 MarkerFastCross = 7, 00060 NoMarker = 8, 00061 PainterPathMarker = 9, 00062 StartCustomMarkers = 10 }; 00063 00064 void setVisible( bool visible ); 00065 bool isVisible() const; 00066 00067 typedef QMap<uint, uint> MarkerStylesMap; 00068 void setMarkerStylesMap( const MarkerStylesMap & map ); 00069 MarkerStylesMap markerStylesMap() const; 00070 00071 void setThreeD( bool value ); 00072 bool threeD() const; 00073 00083 void setMarkerStyle( uint style ); 00084 uint markerStyle() const; 00085 00093 void setMarkerSize( const QSizeF& size ); 00094 QSizeF markerSize() const; 00095 00096 void setMarkerColor( const QColor& color ); 00097 QColor markerColor() const; 00098 00099 void setCustomMarkerPath( const QPainterPath& path ); 00100 QPainterPath customMarkerPath() const; 00101 00102 void setPen( const QPen& pen ); 00103 QPen pen() const; 00104 00105 bool operator==( const MarkerAttributes& ) const; 00106 bool operator!=( const MarkerAttributes& ) const; 00107 00108 private: 00109 KDCHART_DECLARE_PRIVATE_BASE_VALUE( MarkerAttributes ) 00110 }; // End of class MarkerAttributes 00111 00112 inline bool MarkerAttributes::operator!=( const MarkerAttributes & other ) const { return !operator==( other ); } 00113 } 00114 00115 #ifndef QT_NO_DEBUG_STREAM 00116 KDCHART_EXPORT QDebug operator<<( QDebug, const KDChart::MarkerAttributes & ); 00117 #endif 00118 00119 KDCHART_DECLARE_SWAP_SPECIALISATION( KDChart::MarkerAttributes ) 00120 00121 QT_BEGIN_NAMESPACE 00122 Q_DECLARE_TYPEINFO( KDChart::MarkerAttributes, Q_MOVABLE_TYPE ); 00123 QT_END_NAMESPACE 00124 00125 Q_DECLARE_METATYPE( KDChart::MarkerAttributes ) 00126 00127 #endif // KDCHARTMARKERATTRIBUTES_H