Skip to content

Commit

Permalink
add missing sip bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Jun 11, 2015
1 parent 78c60a2 commit ec0e971
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 2 deletions.
2 changes: 2 additions & 0 deletions python/core/core.sip
Expand Up @@ -115,6 +115,8 @@
%Include qgsvectorlayerundocommand.sip
%Include qgsvectorsimplifymethod.sip
%Include qgsfontutils.sip
%Include qgsdartmeasurement.sip
%Include qgsexpressionfieldbuffer.sip

%Include qgscachedfeatureiterator.sip
%Include qgscacheindex.sip
Expand Down
23 changes: 23 additions & 0 deletions python/core/qgsdartmeasurement.sip
@@ -0,0 +1,23 @@
class QgsDartMeasurement
{
%TypeHeaderCode
#include <qgsdartmeasurement.h>
%End
public:
enum Type
{
Text,
ImagePng,
Integer
};

QgsDartMeasurement();

QgsDartMeasurement( const QString& name, Type type, const QString& value );

const QString toString() const;

void send() const;

static const QString typeToString( QgsDartMeasurement::Type type );
};
58 changes: 58 additions & 0 deletions python/core/qgsexpressionfieldbuffer.sip
@@ -0,0 +1,58 @@
class QgsExpressionFieldBuffer
{
%TypeHeaderCode
#include <qgsexpressionfieldbuffer.h>
%End
public:
class ExpressionField
{
ExpressionField();
ExpressionField( QString exp, QgsField fld );
};

QgsExpressionFieldBuffer();

/**
* Add an expression to the buffer
*
* @param exp expression to add
* @param fld field to add
*/
void addExpression( const QString& exp, const QgsField& fld );

/**
* Remove an expression from the buffer
*
* @param index index of expression to remove
*/
void removeExpression( int index );

/**
* Changes the expression at a given index
*
* @param index The index of the expression to change
* @param exp The new expression to set
*
* @note added in 2.9
*/
void updateExpression( int index, const QString& exp );

/**
* Saves expressions to xml under the layer node
*/
void writeXml( QDomNode& layer_node, QDomDocument& document ) const;

/**
* Reads expressions from project file
*/
void readXml( const QDomNode& layer_node );

/**
* Adds fields with the expressions buffered in this object to a QgsFields object
*
* @param flds The fields to be updated
*/
void updateFields( QgsFields& flds );

const QList<QgsExpressionFieldBuffer::ExpressionField>& expressions() const;
};
2 changes: 1 addition & 1 deletion src/core/qgsdartmeasurement.h
Expand Up @@ -18,7 +18,7 @@

#include <QString>

class QgsDartMeasurement
class CORE_EXPORT QgsDartMeasurement
{
public:
enum Type
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsrenderchecker.h
Expand Up @@ -25,7 +25,7 @@
#include <qgsmaprenderer.h>
#include <qgslogger.h>
#include <qgsmapsettings.h>
#include "qgsdartmeasurement.h"
#include <qgsdartmeasurement.h>

class QImage;

Expand Down

0 comments on commit ec0e971

Please sign in to comment.