QGIS/python/core/symbology-ng/qgs25drenderer.sip
Martin Dobias 8ffd91ea90 Propagate path resolver through renderers, annotations, diagrams
This is necessary in order to be able to correctly translate between absolute and relative paths
deeper in the code - e.g. paths to SVG files used in marker or fill symbols.

Until now, relative paths were translated to absolute paths on the fly.
This is now changed - paths to files should be always absolute within QGIS objects - and paths
only get turned into relative when saving projects. When loading a project, relative paths
are translated to absolute paths immediately.

This should lower the overall confusion about relative/absolute paths within QGIS, and also
allow having different base directories for relative paths (e.g. QML or QPT files may use relative paths
to their directory - rather than to the project directory)
2017-05-13 18:02:19 +08:00

107 lines
3.0 KiB
Plaintext

/***************************************************************************
qgs25drenderer.sip - Qgs25DRenderer
---------------------
begin : 14.1.2016
copyright : (C) 2016 by Matthias Kuhn
email : matthias@opengis.ch
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
class Qgs25DRenderer : QgsFeatureRenderer
{
%TypeHeaderCode
#include "qgs25drenderer.h"
%End
public:
Qgs25DRenderer();
/**
* Create a new 2.5D renderer from XML
*
* @param element XML information
*/
static QgsFeatureRenderer* create( QDomElement& element, const QgsPathResolver &pathResolver ) /Factory/;
QDomElement save( QDomDocument& doc, const QgsPathResolver &pathResolver );
void startRender( QgsRenderContext &context, const QgsFields &fields );
void stopRender( QgsRenderContext &context );
QSet<QString> usedAttributes( const QgsRenderContext& context ) const;
QgsFeatureRenderer* clone() const /Factory/;
virtual QgsSymbol *symbolForFeature( QgsFeature &feature, QgsRenderContext &context );
virtual QgsSymbolList symbols( QgsRenderContext &context );
/**
* Get the roof color
*/
QColor roofColor() const;
/**
* Set the roof color
*/
void setRoofColor( const QColor &roofColor );
/**
* Get the wall color
*/
QColor wallColor() const;
/**
* Set the wall color
*/
void setWallColor( const QColor &wallColor );
/**
* Set wall shading enabled
*/
void setWallShadingEnabled( bool enabled );
/**
* Get wall shading enabled
*/
bool wallShadingEnabled() const;
/**
* Get the shadow's color
*/
QColor shadowColor() const;
/**
* Set the shadow's color
*/
void setShadowColor( const QColor &shadowColor );
/**
* Get the shadow's spread distance in map units
*/
double shadowSpread() const;
/**
* Set the shadow's spread distance in map units
*/
void setShadowSpread( double shadowSpread );
/**
* Try to convert from an existing renderer. If it is not of the same type
* we assume that the internals are not compatible and create a new default
* 2.5D renderer.
*/
static Qgs25DRenderer* convertFromRenderer( QgsFeatureRenderer* renderer ) /Factory/;
/**
* Is the shadow enabled
*/
bool shadowEnabled() const;
/**
* Enable or disable the shadow
*/
void setShadowEnabled( bool value );
};