QGIS/python/core/diagram/qgsdiagram.sip

60 lines
3.3 KiB
Plaintext
Raw Normal View History

class QgsDiagram
{
%TypeHeaderCode
#include <qgsdiagram.h>
%End
public:
virtual ~QgsDiagram();
/** Returns an instance that is equivalent to this one
* @note added in 2.1 */
virtual QgsDiagram* clone() const = 0;
Merge branch 'master' into threading-revival Some features are still disabled - will be fixed later Conflicts: python/core/composer/qgscomposition.sip python/core/diagram/qgsdiagram.sip python/core/diagram/qgshistogramdiagram.sip python/core/diagram/qgspiediagram.sip python/core/diagram/qgstextdiagram.sip python/core/qgsdiagramrendererv2.sip python/core/qgsfield.sip python/core/qgslabelsearchtree.sip python/core/qgsmaprenderer.sip python/core/qgsrenderchecker.sip python/core/symbology-ng/qgssymbollayerv2.sip python/gui/qgsmapcanvas.sip src/app/composer/qgscomposerlegendwidget.cpp src/app/qgisapp.cpp src/core/composer/qgsatlascomposition.cpp src/core/composer/qgscomposerattributetable.cpp src/core/composer/qgscomposermap.cpp src/core/composer/qgscomposition.cpp src/core/composer/qgscomposition.h src/core/diagram/qgsdiagram.h src/core/diagram/qgshistogramdiagram.cpp src/core/diagram/qgshistogramdiagram.h src/core/diagram/qgspiediagram.cpp src/core/diagram/qgspiediagram.h src/core/diagram/qgstextdiagram.cpp src/core/diagram/qgstextdiagram.h src/core/qgsdiagramrendererv2.cpp src/core/qgsdiagramrendererv2.h src/core/qgsmaprenderer.cpp src/core/qgsmaprenderer.h src/core/qgsnetworkaccessmanager.h src/core/qgspallabeling.cpp src/core/qgsrenderchecker.h src/core/qgsvectorlayer.cpp src/core/qgsvectorlayer.h src/core/qgsvectorlayerfeatureiterator.cpp src/core/qgsvectorlayerfeatureiterator.h src/core/raster/qgsrasterlayer.cpp src/core/symbology-ng/qgscategorizedsymbolrendererv2.cpp src/core/symbology-ng/qgsgraduatedsymbolrendererv2.cpp src/core/symbology-ng/qgsmarkersymbollayerv2.cpp src/core/symbology-ng/qgssinglesymbolrendererv2.cpp src/core/symbology-ng/qgssymbollayerv2.cpp src/core/symbology-ng/qgssymbollayerv2.h src/core/symbology-ng/qgssymbolv2.cpp src/gui/qgshighlight.cpp src/gui/qgsmapcanvas.cpp src/gui/qgsmapcanvas.h src/gui/qgsmapcanvasitem.cpp src/gui/qgsmaptoolidentify.cpp src/plugins/georeferencer/qgsgeorefplugingui.cpp src/providers/memory/qgsmemoryfeatureiterator.cpp src/providers/ogr/qgsogrfeatureiterator.cpp src/providers/ogr/qgsogrfeatureiterator.h src/providers/ogr/qgsogrprovider.cpp src/providers/oracle/qgsoraclefeatureiterator.cpp src/providers/oracle/qgsoracleprovider.cpp src/providers/postgres/qgspostgresconn.cpp src/providers/postgres/qgspostgresfeatureiterator.cpp src/providers/postgres/qgspostgresfeatureiterator.h src/providers/wfs/qgswfsfeatureiterator.cpp src/providers/wms/qgswmsprovider.cpp src/providers/wms/qgswmsprovider.h src/ui/qgsoptionsbase.ui tests/src/core/CMakeLists.txt tests/src/core/testqgscomposereffects.cpp tests/src/core/testqgscomposerhtml.cpp tests/src/core/testqgscomposerscalebar.cpp tests/src/core/testqgscomposershapes.cpp
2014-02-18 11:28:46 +07:00
2014-01-27 09:22:24 +01:00
void clearCache();
QgsExpression* getExpression( const QString& expression, const QgsFields* fields );
/** @deprecated `void renderDiagram( const QgsFeature& feature, QgsRenderContext& c, const QgsDiagramSettings& s, const QPointF& position )` should be used instead */
virtual void renderDiagram( const QgsAttributes& att, QgsRenderContext& c, const QgsDiagramSettings& s, const QPointF& position ) /Deprecated/;
/**Draws the diagram at the given position (in pixel coordinates)*/
virtual void renderDiagram( const QgsFeature& feature, QgsRenderContext& c, const QgsDiagramSettings& s, const QPointF& position ) = 0;
virtual QString diagramName() const = 0;
/**Returns the size in map units the diagram will use to render.*/
virtual QSizeF diagramSize( const QgsAttributes& attributes, const QgsRenderContext& c, const QgsDiagramSettings& s ) = 0;
2014-01-27 09:22:24 +01:00
/** @deprecated `QSizeF diagramSize( const QgsFeature& feature, const QgsRenderContext& c, const QgsDiagramSettings& s, const QgsDiagramInterpolationSettings& is )` should be used instead */
virtual QSizeF diagramSize( const QgsAttributes& attributes, const QgsRenderContext& c, const QgsDiagramSettings& s, const QgsDiagramInterpolationSettings& is ) /Deprecated/;
/**Returns the size in map units the diagram will use to render. Interpolate size*/
virtual QSizeF diagramSize( const QgsFeature& feature, const QgsRenderContext& c, const QgsDiagramSettings& s, const QgsDiagramInterpolationSettings& is ) = 0;
protected:
/** Changes the pen width to match the current settings and rendering context
* @param pen The pen to modify
* @param s The settings that specify the pen width
* @param c The rendering specifying the proper scale units for pixel conversion
*/
void setPenWidth( QPen& pen, const QgsDiagramSettings& s, const QgsRenderContext& c );
/** Calculates a size to match the current settings and rendering context
* @param size The size to convert
* @param s The settings that specify the size type
* @param c The rendering specifying the proper scale units for pixel conversion
*
* @return The converted size for rendering
*/
QSizeF sizePainterUnits( const QSizeF& size, const QgsDiagramSettings& s, const QgsRenderContext& c );
/** Calculates a length to match the current settings and rendering context
* @param l The length to convert
* @param s Unused
* @param c The rendering specifying the proper scale units for pixel conversion
*
* @return The converted length for rendering
*/
float sizePainterUnits( float l, const QgsDiagramSettings& s, const QgsRenderContext& c );
/** Calculates a size to match the current settings and rendering context
* @param s The settings that contain the font size and size type
* @param c The rendering specifying the proper scale units for pixel conversion
*
* @return The properly scaled font for rendering
*/
QFont scaledFont( const QgsDiagramSettings& s, const QgsRenderContext& c );
};