|
QGIS API Documentation
master-59fd5e0
|
00001 /*************************************************************************** 00002 qgshistogramdiagram.h 00003 --------------------- 00004 begin : August 2012 00005 copyright : (C) 2012 by Matthias Kuhn 00006 email : matthias dot kuhn at gmx 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 00016 #ifndef QGSHISTOGRAMDIAGRAM_H 00017 #define QGSHISTOGRAMDIAGRAM_H 00018 00019 #define DIAGRAM_NAME_HISTOGRAM "Histogram" 00020 00021 #include "qgsdiagram.h" 00022 #include "qgsfeature.h" 00023 #include <QPen> 00024 #include <QBrush> 00025 00026 class QPainter; 00027 class QPointF; 00028 class QgsDiagramSettings; 00029 class QgsDiagramInterpolationSettings; 00030 00031 class QgsRenderContext; 00032 00033 00034 class CORE_EXPORT QgsHistogramDiagram: public QgsDiagram 00035 { 00036 public: 00037 QgsHistogramDiagram(); 00038 ~QgsHistogramDiagram(); 00039 00040 void renderDiagram( const QgsAttributes& att, QgsRenderContext& c, const QgsDiagramSettings& s, const QPointF& position ); 00041 QSizeF diagramSize( const QgsAttributes& attributes, const QgsRenderContext& c, const QgsDiagramSettings& s ); 00042 QSizeF diagramSize( const QgsAttributes& attributes, const QgsRenderContext& c, const QgsDiagramSettings& s, const QgsDiagramInterpolationSettings& is ); 00043 QString diagramName() const { return DIAGRAM_NAME_HISTOGRAM; } 00044 00045 private: 00046 QBrush mCategoryBrush; 00047 QPen mPen; 00048 double mScaleFactor; 00049 }; 00050 00051 00052 #endif // QGSHISTOGRAMDIAGRAM_H