Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
85 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 ); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters