|
QGIS API Documentation
master-59fd5e0
|
00001 /*************************************************************************** 00002 qgspiediagram.h 00003 --------------------- 00004 begin : March 2011 00005 copyright : (C) 2011 by Marco Hugentobler 00006 email : marco dot hugentobler at sourcepole dot ch 00007 *************************************************************************** 00008 * * 00009 * This program is free software; you can redistribute it and/or modify * 00010 * it under the terms of the GNU General Public License as published by * 00011 * the Free Software Foundation; either version 2 of the License, or * 00012 * (at your option) any later version. * 00013 * * 00014 ***************************************************************************/ 00015 #ifndef QGSPIEDIAGRAM_H 00016 #define QGSPIEDIAGRAM_H 00017 00018 #define DIAGRAM_NAME_PIE "Pie" 00019 00020 #include "qgsdiagram.h" 00021 #include "qgsfeature.h" 00022 #include <QPen> 00023 #include <QBrush> 00024 00025 class QPainter; 00026 class QPointF; 00027 class QgsDiagramSettings; 00028 class QgsDiagramInterpolationSettings; 00029 00030 class QgsRenderContext; 00031 00032 class CORE_EXPORT QgsPieDiagram: public QgsDiagram 00033 { 00034 public: 00035 QgsPieDiagram(); 00036 ~QgsPieDiagram(); 00037 00038 void renderDiagram( const QgsAttributes& att, QgsRenderContext& c, const QgsDiagramSettings& s, const QPointF& position ); 00039 QSizeF diagramSize( const QgsAttributes& attributes, const QgsRenderContext& c, const QgsDiagramSettings& s ); 00040 QSizeF diagramSize( const QgsAttributes& attributes, const QgsRenderContext& c, const QgsDiagramSettings& s, const QgsDiagramInterpolationSettings& is ); 00041 QString diagramName() const { return DIAGRAM_NAME_PIE; } 00042 00043 private: 00044 QBrush mCategoryBrush; 00045 QPen mPen; 00046 00047 static int sCount; 00048 }; 00049 00050 #endif // QGSPIEDIAGRAM_H