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 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 KDCHARTRADARDIAGRAM_H 00024 #define KDCHARTRADARDIAGRAM_H 00025 00026 00027 #include "KDChartPosition.h" 00028 #include "KDChartPolarDiagram.h" 00029 #include "KDChartRadarCoordinatePlane.h" 00030 00031 QT_BEGIN_NAMESPACE 00032 class QPolygonF; 00033 QT_END_NAMESPACE 00034 00035 namespace KDChart { 00036 00040 class KDCHART_EXPORT RadarDiagram : public AbstractPolarDiagram 00041 { 00042 Q_OBJECT 00043 00044 Q_DISABLE_COPY( RadarDiagram ) 00045 KDCHART_DECLARE_DERIVED_DIAGRAM( RadarDiagram, RadarCoordinatePlane ) 00046 00047 public: 00048 explicit RadarDiagram( 00049 QWidget* parent = 0, RadarCoordinatePlane* plane = 0 ); 00050 virtual ~RadarDiagram(); 00051 00052 virtual void paint ( PaintContext* paintContext, 00053 bool calculateListAndReturnScale, 00054 qreal& newZoomX, qreal& newZoomY ); 00056 virtual void resize ( const QSizeF& area ); 00057 00059 virtual qreal valueTotals () const; 00061 virtual qreal numberOfValuesPerDataset() const; 00063 virtual qreal numberOfGridRings() const; 00064 00068 void setReverseData( bool val ); 00069 bool reverseData(); 00070 00071 virtual RadarDiagram * clone() const; 00072 00077 void setCloseDatasets( bool closeDatasets ); 00078 bool closeDatasets() const; 00079 00087 qreal fillAlpha() const; 00088 void setFillAlpha(qreal alphaF); 00089 00090 protected: 00092 virtual const QPair<QPointF, QPointF> calculateDataBoundaries() const; 00093 void paintEvent ( QPaintEvent* ); 00094 void resizeEvent ( QResizeEvent* ); 00095 virtual void paint ( PaintContext* paintContext ); 00096 00097 }; // End of class RadarDiagram 00098 00099 } 00100 00101 #endif // KDCHARTRADARDIAGRAM_H