83 changes: 83 additions & 0 deletions images/themes/default/mIconDataDefineExpression.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
62 changes: 62 additions & 0 deletions images/themes/default/mIconDataDefineExpressionError.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
83 changes: 83 additions & 0 deletions images/themes/default/mIconDataDefineExpressionOn.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
85 changes: 85 additions & 0 deletions images/themes/default/mIconDataDefineOn.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions images/themes/default/mIconExpression.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions images/themes/default/mIconExpressionEditorOpen.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 40 additions & 0 deletions images/themes/default/mIconLabelQuadrantCenter.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
104 changes: 104 additions & 0 deletions images/themes/default/mIconLabelQuadrantOffset.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
86 changes: 86 additions & 0 deletions images/themes/default/propertyicons/datadefined.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
54 changes: 54 additions & 0 deletions images/themes/default/propertyicons/labelbackground.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
80 changes: 80 additions & 0 deletions images/themes/default/propertyicons/labelbuffer.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions images/themes/default/propertyicons/labelformatting.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
49 changes: 49 additions & 0 deletions images/themes/default/propertyicons/labelshadow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions images/themes/default/propertyicons/labeltext.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
116 changes: 116 additions & 0 deletions images/themes/default/propertyicons/render.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions python/core/core.sip
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
%Include qgscoordinatetransform.sip
%Include qgscredentials.sip
%Include qgscrscache.sip
%Include qgsdatadefined.sip
%Include qgsdataitem.sip
%Include qgsdataprovider.sip
%Include qgsdatasourceuri.sip
Expand Down
53 changes: 53 additions & 0 deletions python/core/qgsdatadefined.sip
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/** \ingroup core
* \class QgsDataDefined
* A container class for data source field mapping or expression.
* @note added in QGIS 1.9
*/

class QgsDataDefined
{
%TypeHeaderCode
#include <qgsdatadefined.h>
%End
public:
/**
* Construct a new data defined object
*
* @param parent The parent QWidget
* @param active Whether the current data defined is active
* @param useexpr Whether to use expression instead of field
* @param expr Expression string
* @param field Field name string
*/
QgsDataDefined( bool active = false,
bool useexpr = false,
const QString& expr = QString(),
const QString& field = QString() );

~QgsDataDefined();

bool isActive() const;
void setActive( bool active );

bool useExpression() const;
void setUseExpression( bool use );

QString expressionString() const;
void setExpressionString( const QString& expr );

//QMap<QString, QVariant> expressionParams() const;
//void setExpressionParams( QMap<QString, QVariant> params );
void insertExpressionParam( QString key, QVariant param );

bool prepareExpression( QgsVectorLayer* layer );
bool expressionIsPrepared() const;

QgsExpression* expression();
QStringList referencedColumns( QgsVectorLayer* layer );

QString field() const;
void setField( const QString& field );

//QMap< QString, QString > toMap();

};
9 changes: 8 additions & 1 deletion python/core/qgsmaprenderer.sip
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class QgsLabelPosition
#include <qgsmaprenderer.h>
%End
public:
QgsLabelPosition( int id, double r, const QVector< QgsPoint >& corners, const QgsRectangle& rect, double w, double h, const QString& layer, const QString& labeltext, bool upside_down, bool diagram = false, bool pinned = false );
QgsLabelPosition( int id, double r, const QVector< QgsPoint >& corners, const QgsRectangle& rect, double w, double h, const QString& layer, const QString& labeltext, const QFont& labelfont, bool upside_down, bool diagram = false, bool pinned = false );
QgsLabelPosition();
int featureId;
double rotation;
Expand All @@ -16,6 +16,7 @@ class QgsLabelPosition
double height;
QString layerID;
QString labelText;
QFont labelFont;
bool upsideDown;
bool isDiagram;
bool isPinned;
Expand All @@ -38,6 +39,12 @@ class QgsLabelingEngineInterface
virtual void init( QgsMapRenderer* mp ) = 0;
//! called to find out whether the layer is used for labeling
virtual bool willUseLayer( QgsVectorLayer* layer ) = 0;
//! clears all PAL layer settings for registered layers
//! @note: this method was added in version 1.9
virtual void clearActiveLayers() = 0;
//! clears data defined objects from PAL layer settings for a registered layer
//! @note: this method was added in version 1.9
virtual void clearActiveLayer( QgsVectorLayer* layer ) = 0;
//! called when starting rendering of a layer
//! @note: this method was added in version 1.6
virtual int prepareLayer( QgsVectorLayer* layer, QSet<int>& attrIndices, QgsRenderContext& ctx ) = 0;
Expand Down
Loading