17 changes: 16 additions & 1 deletion python/core/qgscrscache.sip
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
class QgsCoordinateTransformCache
{
public:
static QgsCoordinateTransformCache* instance();
~QgsCoordinateTransformCache();
/**Returns coordinate transformation. Cache keeps ownership
@param srcAuthId auth id string of source crs
@param destAuthId auth id string of dest crs*/
const QgsCoordinateTransform* transform( const QString& srcAuthId, const QString& destAuthId );
/**Removes transformations where a changed crs is involved from the cache*/
void invalidateCrs( const QString& crsAuthId );
};

class QgsCRSCache
{
%TypeHeaderCode
Expand All @@ -9,7 +22,9 @@ class QgsCRSCache
~QgsCRSCache();
/**Returns the CRS for authid, e.g. 'EPSG:4326' (or an invalid CRS in case of error)*/
const QgsCoordinateReferenceSystem& crsByAuthId( const QString& authid );
const QgsCoordinateReferenceSystem& crsByEpsgId( long epgs );
const QgsCoordinateReferenceSystem& crsByEpsgId( long epsg );

void updateCRSCache( const QString &authid );

protected:
QgsCRSCache();
Expand Down
3 changes: 2 additions & 1 deletion python/core/qgsdatadefined.sip
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ class QgsDataDefined
/**
* 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
Expand All @@ -35,7 +34,9 @@ class QgsDataDefined
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 );

Expand Down
7 changes: 4 additions & 3 deletions python/core/qgsfeaturerequest.sip
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ class QgsFeatureRequest
public:
enum Flag
{
NoGeometry = 0x01, //!< Do not fetch geometry
SubsetOfAttributes = 0x02, //!< Fetch only a subset of attributes (setSubsetOfAttributes sets this flag)
ExactIntersect = 0x04 //!< Use exact geometry intersection (slower) instead of bounding boxes
NoFlags = 0,
NoGeometry = 1,
SubsetOfAttributes = 2,
ExactIntersect = 4
};
typedef QFlags<QgsFeatureRequest::Flag> Flags;

Expand Down
47 changes: 24 additions & 23 deletions python/core/qgsfield.sip
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ public:
*/
void setComment( const QString & comment );

/**Formats string for display*/
QString displayString( const QVariant& v ) const;
}; // class QgsField


Expand All @@ -117,39 +119,38 @@ class QgsFields
%TypeHeaderCode
#include <qgsfield.h>
%End
public:

public:

enum FieldOrigin { OriginUnknown, OriginProvider, OriginJoin, OriginEdit };
enum FieldOrigin { OriginUnknown, OriginProvider, OriginJoin, OriginEdit };

void clear();
void append( const QgsField& field, FieldOrigin origin = OriginProvider, int originIndex = -1 );
void remove( int fieldIdx );
void clear();
void append( const QgsField& field, FieldOrigin origin = OriginProvider, int originIndex = -1 );
void remove( int fieldIdx );

bool isEmpty() const;
// __len__ annotation since sip 4.10.3
//int count() const /__len__/;
int count() const;
int __len__() const;
bool isEmpty() const;
// __len__ annotation since sip 4.10.3
//int count() const /__len__/;
int count() const;
int __len__() const;
%MethodCode
sipRes = sipCpp->count();
%End
int size() const;
//const QgsField& operator[](int i) const;
//QgsField& operator[](int i);
const QgsField& at(int i) const;
QList<QgsField> toList() const;
int size() const;
//const QgsField& operator[](int i) const;
//QgsField& operator[](int i);
const QgsField& at(int i) const;
QList<QgsField> toList() const;

const QgsField& field( int fieldIdx ) const;
const QgsField& field( const QString& name ) const;
FieldOrigin fieldOrigin( int fieldIdx ) const;
int fieldOriginIndex( int fieldIdx ) const;
const QgsField& field( int fieldIdx ) const;
const QgsField& field( const QString& name ) const;
FieldOrigin fieldOrigin( int fieldIdx ) const;
int fieldOriginIndex( int fieldIdx ) const;

int indexFromName( const QString& name ) const;
void extend( const QgsFields& other );
int indexFromName( const QString& name ) const;
void extend( const QgsFields& other );


QgsField& operator[](int i) /Factory/;
QgsField& operator[](int i) /Factory/;
%MethodCode
SIP_SSIZE_T idx = sipConvertFromSequenceIndex(a0, sipCpp->count());
if (idx < 0)
Expand Down
45 changes: 22 additions & 23 deletions python/core/qgsgeometry.sip
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ class QgsGeometry
/**
* Returns the size of the WKB in asWkb().
*/
size_t wkbSize();
size_t wkbSize() const;

/** Returns type of wkb (point / linestring / polygon etc.) */
QGis::WkbType wkbType();
QGis::WkbType wkbType() const;

/** Returns type of the vector */
QGis::GeometryType type();
Expand Down Expand Up @@ -124,7 +124,7 @@ class QgsGeometry
Returns the vertex closest to the given point, the corresponding vertex index, squared distance snap point / target point
and the indices of the vertices before/after. The vertices before/after are -1 if not present
*/
QgsPoint closestVertex( const QgsPoint& point, int& atVertex /Out/, int& beforeVertex /Out/, int& afterVertex /Out/, double& sqrDist /Out/ );
QgsPoint closestVertex( const QgsPoint& point, int& atVertex /Out/, int& beforeVertex /Out/, int& afterVertex /Out/, double& sqrDist /Out/ ) const;


/**
Expand Down Expand Up @@ -253,41 +253,41 @@ class QgsGeometry
QgsRectangle boundingBox();

/** Test for intersection with a rectangle (uses GEOS) */
bool intersects( const QgsRectangle& r );
bool intersects( const QgsRectangle& r ) const;

/** Test for intersection with a geometry (uses GEOS) */
bool intersects( QgsGeometry* geometry );
bool intersects( const QgsGeometry* geometry ) const;

/** Test for containment of a point (uses GEOS) */
bool contains( QgsPoint* p );
bool contains( const QgsPoint* p ) const;

/** Test for if geometry is contained in an other (uses GEOS)
* @note added in 1.5 */
bool contains( QgsGeometry* geometry );
bool contains( const QgsGeometry* geometry ) const;

/** Test for if geometry is disjoint of an other (uses GEOS)
* @note added in 1.5 */
bool disjoint( QgsGeometry* geometry );
bool disjoint( const QgsGeometry* geometry ) const;

/** Test for if geometry equals an other (uses GEOS)
* @note added in 1.5 */
bool equals( QgsGeometry* geometry );
bool equals( const QgsGeometry* geometry ) const;

/** Test for if geometry touch an other (uses GEOS)
* @note added in 1.5 */
bool touches( QgsGeometry* geometry );
bool touches( const QgsGeometry* geometry ) const;

/** Test for if geometry overlaps an other (uses GEOS)
* @note added in 1.5 */
bool overlaps( QgsGeometry* geometry );
bool overlaps( const QgsGeometry* geometry ) const;

/** Test for if geometry is within an other (uses GEOS)
* @note added in 1.5 */
bool within( QgsGeometry* geometry );
bool within( const QgsGeometry* geometry ) const;

/** Test for if geometry crosses an other (uses GEOS)
* @note added in 1.5 */
bool crosses( QgsGeometry* geometry );
bool crosses( const QgsGeometry* geometry ) const;

/** Returns a buffer region around this geometry having the given width and with a specified number
of segments used to approximate curves */
Expand Down Expand Up @@ -326,45 +326,44 @@ class QgsGeometry
/** Exports the geometry to mWkt
* @return true in case of success and false else
*/
QString exportToWkt();
QString exportToWkt() const;

/** Exports the geometry to mGeoJSON
* @return true in case of success and false else
* @note added in 1.8
* @note python binding added in 1.9
*/
QString exportToGeoJSON();
QString exportToGeoJSON() const;

/* Accessor functions for getting geometry data */

/** return contents of the geometry as a point
if wkbType is WKBPoint, otherwise returns [0,0] */
QgsPoint asPoint();
QgsPoint asPoint() const;

/** return contents of the geometry as a polyline
if wkbType is WKBLineString, otherwise an empty list */
QgsPolyline asPolyline();
QgsPolyline asPolyline() const;

/** return contents of the geometry as a polygon
if wkbType is WKBPolygon, otherwise an empty list */
QgsPolygon asPolygon();
QgsPolygon asPolygon() const;

/** return contents of the geometry as a multi point
if wkbType is WKBMultiPoint, otherwise an empty list */
QgsMultiPoint asMultiPoint();
QgsMultiPoint asMultiPoint() const;

/** return contents of the geometry as a multi linestring
if wkbType is WKBMultiLineString, otherwise an empty list */
QgsMultiPolyline asMultiPolyline();
QgsMultiPolyline asMultiPolyline() const;

/** return contents of the geometry as a multi polygon
if wkbType is WKBMultiPolygon, otherwise an empty list */
QgsMultiPolygon asMultiPolygon();
QgsMultiPolygon asMultiPolygon() const;

/** return contents of the geometry as a list of geometries
@note added in version 1.1 */
// TODO: destruction of created geometries??
QList<QgsGeometry*> asGeometryCollection() /Factory/;
QList<QgsGeometry*> asGeometryCollection() const /Factory/;

/** delete a ring in polygon or multipolygon.
Ring 0 is outer ring and can't be deleted.
Expand Down
21 changes: 21 additions & 0 deletions python/core/qgsgmlschema.sip
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
//typedef QMap<int, QgsField> QgsFieldMap;

/* Description of feature class in GML */
class QgsGmlFeatureClass
{
public:
QgsGmlFeatureClass( );
QgsGmlFeatureClass( QString name, QString path );

~QgsGmlFeatureClass();

QList<QgsField> & fields();

int fieldIndex( const QString & name );

QString path() const;

QStringList & geometryAttributes();
};

class QgsGmlSchema: QObject
{

Expand All @@ -9,6 +27,7 @@ class QgsGmlSchema: QObject

public:
QgsGmlSchema();

~QgsGmlSchema();

/** Get fields info from XSD */
Expand All @@ -22,7 +41,9 @@ class QgsGmlSchema: QObject

QStringList typeNames() const;

/** Get fields for type/class name parsed from GML or XSD */
QList<QgsField> fields( const QString & typeName );

/** Get list of geometry attributes for type/class name */
QStringList geometryAttributes( const QString & typeName );
};
2 changes: 1 addition & 1 deletion python/core/qgslabel.sip
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class QgsLabel
void setFields( const QgsFields & fields );

//! Available vector fields
const QgsFields & fields();
QgsFields & fields();

/** Pointer to default attributes.
* @note this replaces the to-be-deprecated layerAttributes method.
Expand Down
66 changes: 49 additions & 17 deletions python/core/qgsmaplayer.sip
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@ class QgsMapLayer : QObject
void setKeywordList( const QString& kwdList );
const QString& keywordList() const;

/* Layer dataUrl information */
void setDataUrl( const QString& dataUrl );
const QString& dataUrl() const;
void setDataUrlFormat( const QString& dataUrlFormat );
const QString& dataUrlFormat() const;

/* Layer attribution information */
void setAttribution( const QString& attrib );
const QString& attribution() const;
Expand All @@ -101,6 +107,11 @@ class QgsMapLayer : QObject
void setMetadataUrlFormat( const QString& metaUrlFormat );
const QString& metadataUrlFormat() const;

/* Set the blending mode used for rendering a layer */
void setBlendMode( const QPainter::CompositionMode blendMode );
/* Returns the current blending mode for a layer */
QPainter::CompositionMode blendMode() const;

/**Synchronises with changes in the datasource
@note added in version 1.6*/
virtual void reload();
Expand Down Expand Up @@ -172,8 +183,8 @@ class QgsMapLayer : QObject


/** stores state in Dom node
@param layer_node is Dom node corresponding to ``projectlayers'' tag
@param document is Dom document
@param layerElement is a Dom element corresponding to ``maplayer'' tag
@param document is a the dom document being written
@note

The Dom node corresponds to a Dom document project file XML element to be
Expand All @@ -186,7 +197,7 @@ class QgsMapLayer : QObject

@returns true if successful
*/
bool writeLayerXML( QDomElement& layerElement, QDomDocument & document );
bool writeLayerXML( QDomElement& layerElement, QDomDocument& document );

/** Set a custom property for layer. Properties are stored in a map and saved in project file.
* @note Added in v1.4 */
Expand All @@ -198,11 +209,6 @@ class QgsMapLayer : QObject
* @note Added in v1.4 */
void removeCustomProperty( const QString& key );

/** Accessor for transparency level. */
// unsigned int getTransparency();

/** Mutator for transparency level. Should be between 0 and 255 */
// virtual void setTransparency( unsigned int );

/**
* If an operation returns 0 (e.g. draw()), this function
Expand All @@ -220,6 +226,12 @@ class QgsMapLayer : QObject
*/
virtual QString lastError();

/** Get current status error. This error describes some principal problem
* for which layer cannot work and thus is not valid. It is not last error
* after accessing data by draw() etc.
*/
virtual QgsError error() const;

/** Returns layer's spatial reference system
@note This was introduced in QGIS 1.4
*/
Expand Down Expand Up @@ -268,6 +280,24 @@ class QgsMapLayer : QObject

virtual bool loadNamedStyleFromDb( const QString db, const QString theURI, QString &qml /Out/ );

//TODO edit infos
/**
* Export the properties of this layer as named style in a QDomDocument
* @param doc the target QDomDocument
* @param errorMsg this QString will be initialized on error
* during the execution of writeSymbology
*/
virtual void exportNamedStyle( QDomDocument &doc, QString &errorMsg );


/**
* Export the properties of this layer as SLD style in a QDomDocument
* @param doc the target QDomDocument
* @param errorMsg this QString will be initialized on error
* during the execution of writeSymbology
*/
virtual void exportSldStyle( QDomDocument &doc, QString &errorMsg );

/** Save the properties of this layer as the default style
* (either as a .qml file on disk or as a
* record in the users style table in their personal qgis.db)
Expand Down Expand Up @@ -323,23 +353,22 @@ class QgsMapLayer : QObject
* @note This method was added in QGIS 1.4 **/
void setCacheImage( QImage * thepImage /Transfer/ );

/* Returns the current blending mode for a layer
@note added in version 1.9*/
const QPainter::CompositionMode blendMode() const;
/* Sets the blending mode for a layer
@note added in version 1.9*/
void setBlendMode( const QPainter::CompositionMode blendMode );
/**
* @brief Is called when the cache image is being deleted. Overwrite and use to clean up.
* @note added in 2.0
*/
virtual void onCacheImageDelete();

public slots:

/** Event handler for when a coordinate transform fails due to bad vertex error */
virtual void invalidTransformInput();

/** Accessor and mutator for the minimum scale member */
/** Accessor and mutator for the minimum scale denominator member */
void setMinimumScale( float theMinScale );
float minimumScale();

/** Accessor and mutator for the maximum scale member */
/** Accessor and mutator for the maximum scale denominator member */
void setMaximumScale( float theMaxScale );
float maximumScale();

Expand Down Expand Up @@ -419,5 +448,8 @@ class QgsMapLayer : QObject
/** debugging member - invoked when a connect() is made to this object */
void connectNotify( const char * signal );

/** Add error message */
void appendError( const QgsErrorMessage & theMessage );
/** Set error message */
void setError( const QgsError & theError );
};

12 changes: 6 additions & 6 deletions python/core/qgsmaplayerregistry.sip
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class QgsMapLayerRegistry : QObject
//! Retrieve a pointer to a loaded layer by id
QgsMapLayer *mapLayer( QString theLayerId );

//! Retrieve all layers using their name
//! Retrieve a pointer to a loaded layer by name
QList<QgsMapLayer *> mapLayersByName( QString layerName );

//! Retrieve the mapLayers collection (mainly intended for use by projection)
Expand All @@ -35,10 +35,10 @@ class QgsMapLayerRegistry : QObject
* The layersAdded() and layersWasAdded() signals will be emitted in any case.
* The legendLayersAdded() signal only if addToLegend is true.
*
* @param theMapLayers A list of layer which should be added to the registry
* @param addToLegend If true (by default), the layers will be added to the
* legend and to the main canvas. If you have a private
* layer, you can set this parameter to false to hide it.
* @param theMapLayers A list of layer which should be added to the registry
* @param addToLegend If true (by default), the layers will be added to the
* legend and to the main canvas. If you have a private
* layer, you can set this parameter to false to hide it.
*
* @return QList<QgsMapLayer *> - a list of the map layers that were added
* successfully. If a layer is invalid, or already exists in the registry,
Expand Down Expand Up @@ -86,7 +86,7 @@ class QgsMapLayerRegistry : QObject
*
* @note As a side-effect QgsProject is made dirty.
*/
void removeMapLayers(QStringList theLayerIds );
void removeMapLayers( QStringList theLayerIds );

/**
* @brief
Expand Down
97 changes: 49 additions & 48 deletions python/core/qgsogcutils.sip
Original file line number Diff line number Diff line change
Expand Up @@ -6,54 +6,55 @@ class QgsOgcUtils
#include <qgsogcutils.h>
%End

public:

/** static method that creates geometry from GML
@param XML representation of the geometry. GML elements are expected to be
in default namespace (<Point>...</Point>) or in "gml" namespace (<gml:Point>...</gml:Point>)
@note added in 1.9
*/
static QgsGeometry* geometryFromGML( const QString& xmlString ) /Factory/;

/** static method that creates geometry from GML
@note added in 1.9
*/
static QgsGeometry* geometryFromGML( const QDomNode& geometryNode ) /Factory/;

/** read rectangle from GML2 Box */
static QgsRectangle rectangleFromGMLBox( const QDomNode& boxNode );

/** read rectangle from GML3 Envelope */
static QgsRectangle rectangleFromGMLEnvelope( const QDomNode& envelopeNode );

/** Exports the geometry to GML2
@return QDomElement
*/
static QDomElement geometryToGML( QgsGeometry* geometry, QDomDocument& doc );

/** Exports the geometry to GML2 or GML3
@return QDomElement
*/
static QDomElement geometryToGML( QgsGeometry* geometry, QDomDocument& doc, QString Format );

/** Exports the rectangle to GML2 Box
@return QDomElement
*/
static QDomElement rectangleToGMLBox( QgsRectangle* box, QDomDocument& doc );

/** Exports the rectangle to GML2 Envelope
@return QDomElement
*/
static QDomElement rectangleToGMLEnvelope( QgsRectangle* env, QDomDocument& doc );


/** Parse XML with OGC filter into QGIS expression */
static QgsExpression* expressionFromOgcFilter( const QDomElement& element ) /Factory/;

/** Creates OGC filter XML element. Supports minimum standard filter according to the OGC filter specs (=,!=,<,>,<=,>=,AND,OR,NOT)
@return valid <Filter> QDomElement on success, otherwise null QDomElement
*/
static QDomElement expressionToOgcFilter( const QgsExpression& exp, QDomDocument& doc, QString* errorMessage /Out/ );
public:

/** static method that creates geometry from GML
@param xmlString xml representation of the geometry. GML elements are expected to be
in default namespace (\verbatim {<Point>...</Point> \endverbatim) or in
"gml" namespace (\verbatim <gml:Point>...</gml:Point> \endverbatim)
*/
static QgsGeometry* geometryFromGML( const QString& xmlString ) /Factory/;

/** static method that creates geometry from GML
*/
static QgsGeometry* geometryFromGML( const QDomNode& geometryNode ) /Factory/;

/** read rectangle from GML2 Box */
static QgsRectangle rectangleFromGMLBox( const QDomNode& boxNode );

/** read rectangle from GML3 Envelope */
static QgsRectangle rectangleFromGMLEnvelope( const QDomNode& envelopeNode );

/** Exports the geometry to GML2
@return QDomElement
*/
static QDomElement geometryToGML( QgsGeometry* geometry, QDomDocument& doc );

/** Exports the geometry to GML2 or GML3
@return QDomElement
*/
static QDomElement geometryToGML( QgsGeometry* geometry, QDomDocument& doc, QString Format );

/** Exports the rectangle to GML2 Box
@return QDomElement
*/
static QDomElement rectangleToGMLBox( QgsRectangle* box, QDomDocument& doc );

/** Exports the rectangle to GML2 Envelope
@return QDomElement
*/
static QDomElement rectangleToGMLEnvelope( QgsRectangle* env, QDomDocument& doc );


/** Parse XML with OGC filter into QGIS expression */
static QgsExpression* expressionFromOgcFilter( const QDomElement& element ) /Factory/;

/** Creates OGC filter XML element. Supports minimum standard filter
* according to the OGC filter specs (=,!=,<,>,<=,>=,AND,OR,NOT)
* @return valid \verbatim <Filter> \endverbatim QDomElement on success,
* otherwise null QDomElement
*/
static QDomElement expressionToOgcFilter( const QgsExpression& exp, QDomDocument& doc, QString* errorMessage /Out/ );

};

2 changes: 1 addition & 1 deletion python/core/qgssnapper.sip
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class QgsSnapper

enum SnappingMode
{
/**Only one snapping result is retured*/
/**Only one snapping result is returned*/
SnapWithOneResult,
/**Several snapping results which have the same position are returned.
This is useful for topological editing*/
Expand Down
12 changes: 11 additions & 1 deletion python/core/qgsvectorlayer.sip
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ class QgsVectorLayer : QgsMapLayer
/** Joins another vector layer to this layer
@param joinInfo join object containing join layer id, target and source field
@note added in 1.7 */
void addJoin( QgsVectorJoinInfo joinInfo );
void addJoin( const QgsVectorJoinInfo& joinInfo );

/** Removes a vector layer join
@note added in 1.7 */
Expand Down Expand Up @@ -812,11 +812,21 @@ class QgsVectorLayer : QgsMapLayer
**/
bool fieldEditable( int idx );

/**label widget on top
* @note added in 1.9
**/
bool labelOnTop( int idx );

/**set edit widget editable
* @note added in 1.9
**/
void setFieldEditable( int idx, bool editable );

/**label widget on top
* @note added in 1.9
**/
void setLabelOnTop( int idx, bool onTop );

/**Adds a new overlay to this class. QgsVectorLayer takes ownership of the object
@note this method was added in version 1.1
*/
Expand Down
5 changes: 4 additions & 1 deletion python/core/qgsvectorlayerimport.sip
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@

/**
There are two possibilities how to use this class:
1. static call to QgsVectorLayerImport::importLayer(...) which saves the whole vector layer
1. static call to QgsVectorFileWriter::writeAsShapefile(...) which saves the whole vector layer
2. create an instance of the class and issue calls to addFeature(...)

Currently supports only writing to shapefiles, but shouldn't be a problem to add capability
to support other OGR-writable formats.
*/
class QgsVectorLayerImport
{
Expand Down
8 changes: 5 additions & 3 deletions python/core/raster/qgsrasterpipe.sip
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ class QgsRasterPipe
UnknownRole = 0,
ProviderRole = 1,
RendererRole = 2,
ResamplerRole = 3,
ProjectorRole = 4,
NullerRole = 5,
BrightnessRole = 3,
ResamplerRole = 4,
ProjectorRole = 5,
NullerRole = 6,
HueSaturationRole = 7
};

QgsRasterPipe();
Expand Down
12 changes: 10 additions & 2 deletions python/core/symbology-ng/qgscategorizedsymbolrendererv2.sip
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ class QgsRendererCategoryV2
~QgsRendererCategoryV2();

QVariant value() const;
QgsSymbolV2* symbol();
QgsSymbolV2* symbol() const;
QString label() const;

void setValue( const QVariant &value );
void setSymbol( QgsSymbolV2* s /Transfer/ );
void setLabel( QString label );
void setLabel( const QString &label );

// debugging
QString dump();
Expand Down Expand Up @@ -60,6 +60,8 @@ class QgsCategorizedSymbolRendererV2 : QgsFeatureRendererV2
virtual int capabilities();

virtual QgsSymbolV2List symbols();
//! @note added in 2.0
void updateSymbols( QgsSymbolV2 * sym );

const QgsCategoryList& categories();

Expand All @@ -74,6 +76,12 @@ class QgsCategorizedSymbolRendererV2 : QgsFeatureRendererV2
bool deleteCategory( int catIndex );
void deleteAllCategories();

//! Moves the category at index position from to index position to.
void moveCategory( int from, int to );

void sortByValue( Qt::SortOrder order = Qt::AscendingOrder );
void sortByLabel( Qt::SortOrder order = Qt::AscendingOrder );

QString classAttribute() const;
void setClassAttribute( QString attr );

Expand Down
12 changes: 12 additions & 0 deletions python/core/symbology-ng/qgsfillsymbollayerv2.sip
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ class QgsSimpleFillSymbolLayerV2 : QgsFillSymbolLayerV2

void toSld( QDomDocument &doc, QDomElement &element, QgsStringMap props ) const;

QString ogrFeatureStyle( double mmScaleFactor, double mapUnitScaleFactor ) const;

Qt::BrushStyle brushStyle() const;
void setBrushStyle( Qt::BrushStyle style );

Expand Down Expand Up @@ -127,6 +129,8 @@ class QgsSVGFillSymbolLayer: QgsImageFillSymbolLayer
void setOutputUnit( QgsSymbolV2::OutputUnit unit );
QgsSymbolV2::OutputUnit outputUnit() const;

protected:
void applyDataDefinedSettings( const QgsSymbolV2RenderContext& context );
};

class QgsLinePatternFillSymbolLayer: QgsImageFillSymbolLayer
Expand All @@ -153,6 +157,8 @@ class QgsLinePatternFillSymbolLayer: QgsImageFillSymbolLayer

void toSld( QDomDocument &doc, QDomElement &element, QgsStringMap props ) const;

QString ogrFeatureStyleWidth( double widthScaleFactor ) const;

//getters and setters
void setLineAngle( double a );
double lineAngle() const;
Expand Down Expand Up @@ -232,6 +238,9 @@ class QgsPointPatternFillSymbolLayer : QgsImageFillSymbolLayer

void setOutputUnit( QgsSymbolV2::OutputUnit unit );
QgsSymbolV2::OutputUnit outputUnit() const;

protected:
void applyDataDefinedSettings( const QgsSymbolV2RenderContext& context );
};

class QgsCentroidFillSymbolLayerV2 : QgsFillSymbolLayerV2
Expand Down Expand Up @@ -269,4 +278,7 @@ class QgsCentroidFillSymbolLayerV2 : QgsFillSymbolLayerV2

QgsSymbolV2* subSymbol();
bool setSubSymbol( QgsSymbolV2* symbol /Transfer/ );

void setOutputUnit( QgsSymbolV2::OutputUnit unit );
QgsSymbolV2::OutputUnit outputUnit() const;
};
7 changes: 7 additions & 0 deletions python/core/symbology-ng/qgsgraduatedsymbolrendererv2.sip
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,13 @@ class QgsGraduatedSymbolRendererV2 : QgsFeatureRendererV2

void addClass( QgsSymbolV2* symbol );
void deleteClass( int idx );
void deleteAllClasses();

//! Moves the category at index position from to index position to.
void moveClass( int from, int to );

void sortByValue( Qt::SortOrder order = Qt::AscendingOrder );
void sortByLabel( Qt::SortOrder order = Qt::AscendingOrder );

enum Mode
{
Expand Down
2 changes: 2 additions & 0 deletions python/core/symbology-ng/qgsrendererv2.sip
Original file line number Diff line number Diff line change
Expand Up @@ -167,4 +167,6 @@ class QgsFeatureRendererV2
static unsigned char* _getPoint( QPointF& pt, QgsRenderContext& context, unsigned char* wkb );
static unsigned char* _getLineString( QPolygonF& pts, QgsRenderContext& context, unsigned char* wkb );
static unsigned char* _getPolygon( QPolygonF& pts, QList<QPolygonF>& holes, QgsRenderContext& context, unsigned char* wkb );

void setScaleMethodToSymbol( QgsSymbolV2* symbol, int scaleMethod );
};
4 changes: 4 additions & 0 deletions python/core/symbology-ng/qgssymbollayerv2.sip
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ class QgsSymbolLayerV2

virtual void toSld( QDomDocument &doc, QDomElement &element, QgsStringMap props ) const;

virtual QString ogrFeatureStyle( double mmScaleFactor, double mapUnitScaleFactor ) const;

virtual QgsStringMap properties() const = 0;

virtual void drawPreviewIcon( QgsSymbolV2RenderContext& context, QSize size ) = 0;
Expand Down Expand Up @@ -157,6 +159,8 @@ class QgsMarkerSymbolLayerV2 : QgsSymbolLayerV2

protected:
QgsMarkerSymbolLayerV2( bool locked = false );
void markerOffset( QgsSymbolV2RenderContext& context, double& offsetX, double& offsetY );
static QPointF _rotatedOffset( const QPointF& offset, double angle );
};

class QgsLineSymbolLayerV2 : QgsSymbolLayerV2
Expand Down
10 changes: 10 additions & 0 deletions python/core/symbology-ng/qgssymbollayerv2utils.sip
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,16 @@ class QgsSymbolLayerV2Utils
static void labelTextToSld( QDomDocument &doc, QDomElement &element, QString label,
QFont font, QColor color = QColor(), double size = -1 );

/**Create ogr feature style string for pen */
static QString ogrFeatureStylePen( double width, double mmScaleFactor, double mapUnitsScaleFactor, const QColor& c,
Qt::PenJoinStyle joinStyle = Qt::MiterJoin,
Qt::PenCapStyle capStyle = Qt::FlatCap,
double offset = 0.0,
const QVector<qreal>* dashPattern = 0 );
/**Create ogr feature style string for brush
@param fillColr fill color*/
static QString ogrFeatureStyleBrush( const QColor& fillColr );

static void createRotationElement( QDomDocument &doc, QDomElement &element, QString rotationFunc );
static bool rotationFromSldElement( QDomElement &element, QString &rotationFunc );

Expand Down
8 changes: 7 additions & 1 deletion python/core/symbology-ng/qgsvectorcolorrampv2.sip
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ class QgsVectorColorRampV2
public:
virtual ~QgsVectorColorRampV2();

// Number of defined colors
virtual int count() const = 0;

// Relative value (0,1) of color at index
virtual double value( int index ) const = 0;

virtual QColor color( double value ) const = 0;
Expand Down Expand Up @@ -62,15 +64,18 @@ class QgsVectorGradientColorRampV2 : QgsVectorColorRampV2

QColor color1() const;
QColor color2() const;

void setColor1( QColor color );
void setColor2( QColor color );

bool isDiscrete() const;
void setDiscrete( bool discrete );
void convertToDiscrete( bool discrete );

void setStops( const QgsGradientStopsList& stops );
const QgsGradientStopsList& stops() const;

QgsStringMap info() const;
void setInfo( const QgsStringMap& info );
};

class QgsVectorRandomColorRampV2 : QgsVectorColorRampV2
Expand Down Expand Up @@ -166,6 +171,7 @@ class QgsCptCityColorRampV2

virtual QgsVectorColorRampV2* clone() const /Factory/;
void copy( const QgsCptCityColorRampV2* other );
QgsVectorGradientColorRampV2* cloneGradientRamp() const /Factory/;

virtual QgsStringMap properties() const;

Expand Down
6 changes: 6 additions & 0 deletions python/core/symbology-ng/qgsvectorfieldsymbollayer.sip
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,10 @@ class QgsVectorFieldSymbolLayer : QgsMarkerSymbolLayerV2
AngleOrientation angleOrientation() const;
void setAngleUnits( AngleUnits units );
AngleUnits angleUnits() const;

void setOutputUnit( QgsSymbolV2::OutputUnit unit );
QgsSymbolV2::OutputUnit outputUnit() const;

void setDistanceUnit( QgsSymbolV2::OutputUnit unit );
QgsSymbolV2::OutputUnit distanceUnit() const;
};
65 changes: 60 additions & 5 deletions python/gui/attributetable/qgsattributetableview.sip
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,82 @@ class QgsAttributeTableView : QTableView
QgsAttributeTableView( QWidget* parent = 0 );
virtual ~QgsAttributeTableView();

virtual void setModel( QgsAttributeTableFilterModel* filterModel );

/**
* Autocreates the models
* @param layerCache The {@link QgsVectorLayerCache} to use ( as backend )
* @param canvas The {@link QgsMapCanvas} to use ( for the currently visible features filter )
* @param layerCache The @link QgsVectorLayerCache @endlink to use ( as backend )
* @param canvas The @link QgsMapCanvas @endlink to use ( for the currently visible features filter )
*
* @deprecated
*/
void setCanvasAndLayerCache( QgsMapCanvas *canvas, QgsVectorLayerCache *layerCache );

protected:
/**
* Called for mouse press events on a table cell.
* Disables selection change for these events.
*
* @param event The mouse event
*/
void mousePressEvent( QMouseEvent *event );

/**
* Called for mouse release events on a table cell.
* Disables selection change for these events.
*
* @param event The mouse event
*/
void mouseReleaseEvent( QMouseEvent *event );

/**
* Called for mouse move events on a table cell.
* Disables selection change for these events.
*
* @param event The mouse event
*/
void mouseMoveEvent( QMouseEvent *event );

/**
* Called for key press events
* Disables selection change by only pressing an arrow key
*
* @param event The mouse event
*/
void keyPressEvent( QKeyEvent *event );

/**
* @brief
* Is called when the context menu will be shown. Emits a @link willShowContextMenu @endlink signal,
* so the menu can be populated by other parts of the application.
*
* @param event The associated event object.
*/
void contextMenuEvent( QContextMenuEvent* event );

/**
* Saves geometry to the settings on close
* @param event not used
*/
void closeEvent( QCloseEvent *event );

void contextMenuEvent( QContextMenuEvent* );

signals:
/**
* @brief
* Is emitted, in order to provide a hook to add aditional menu entries to the context menu.
*
* @param menu If additional QMenuItems are added, they will show up in the context menu.
* @param atIndex The QModelIndex, to which the context menu belongs. Relative to the source model.
* In most cases, this will be a @link QgsAttributeTableFilterModel @endlink
*/
void willShowContextMenu( QMenu* menu, QModelIndex atIndex );

void finished();
// void progress( int i, bool &cancel );

public slots:
void repaintRequested( QModelIndexList indexes );
void repaintRequested();
virtual void selectAll();
virtual void selectRow( int row );
virtual void _q_selectRow( int row );
};
3 changes: 2 additions & 1 deletion python/gui/qgisinterface.sip
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,8 @@ class QgisInterface : QObject

virtual QDialog* getFeatureForm( QgsVectorLayer *l, QgsFeature &f ) = 0;

virtual void preloadForm(QString uifile) = 0;
virtual void preloadForm( QString uifile ) = 0;

/** Return vector layers in edit mode
* @param modified whether to return only layers that have been modified
* @returns list of layers in legend order, or empty list
Expand Down
25 changes: 24 additions & 1 deletion python/gui/qgsattributeeditor.sip
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,34 @@ class QgsAttributeEditor : QObject

public:
QgsAttributeEditor( QObject *parent );
static QWidget *createAttributeEditor( QWidget *parent, QWidget *editor, QgsVectorLayer *vl, int idx, const QVariant &value );
static QWidget *createAttributeEditor( QWidget *parent, QWidget *editor, QgsVectorLayer *vl, int idx, const QVariant &value ) /Factory/;
static bool retrieveValue( QWidget *widget, QgsVectorLayer *vl, int idx, QVariant &value );
static bool setValue( QWidget *widget, QgsVectorLayer *vl, int idx, const QVariant &value );

public slots:
void selectFileName();
void selectDate();
void loadUrl( const QString & );
void loadPixmap( const QString & );
void updateUrl();
void openUrl();
void updateColor();
};

class QgsStringRelay : QObject
{
%TypeHeaderCode
#include "qgsattributeeditor.h"
%End
public:
QgsStringRelay( QObject* parent = 0 );

void appendProxy( QWidget* proxy );

public slots:
void changeText();
void changeText( QString str );

signals:
void textChanged( QString );
};
8 changes: 8 additions & 0 deletions python/gui/qgscomposerview.sip
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ class QgsComposerView: QGraphicsView
void setPaintingEnabled( bool enabled );
bool paintingEnabled() const;

/**Update rulers with current scene rect*/
void updateRulers();

void setHorizontalRuler( QgsComposerRuler* r );
void setVerticalRuler( QgsComposerRuler* r );

protected:
void mousePressEvent( QMouseEvent* );
void mouseReleaseEvent( QMouseEvent* );
Expand All @@ -75,6 +81,8 @@ class QgsComposerView: QGraphicsView
void hideEvent( QHideEvent* e );
void showEvent( QShowEvent* e );

void resizeEvent( QResizeEvent* event );
void scrollContentsBy( int dx, int dy );
signals:
/**Is emitted when selected item changed. If 0, no item is selected*/
void selectedItemChanged( QgsComposerItem* selected );
Expand Down
8 changes: 5 additions & 3 deletions python/gui/qgsexpressionbuilderdialog.sip
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ class QgsExpressionBuilderDialog : QDialog

protected:
/**
* Handle closing of the window
* @param event unused
* Is called when the dialog get accepted or rejected
* Used to save geometry
*
* @param r result value (unused)
*/
void closeEvent( QCloseEvent * event );
virtual void done( int r );
};
4 changes: 4 additions & 0 deletions python/gui/qgsfilterlineedit.sip
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ class QgsFilterLineEdit : QLineEdit
public:
QgsFilterLineEdit( QWidget* parent = 0 );

signals:
void cleared();

protected:
void resizeEvent( QResizeEvent * );
void changeEvent( QEvent * );
};
3 changes: 2 additions & 1 deletion python/gui/qgsmanageconnectionsdialog.sip
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ class QgsManageConnectionsDialog : QDialog
PostGIS,
WFS,
MSSQL,
WCS
WCS,
Oracle,
};

// constructor
Expand Down
2 changes: 1 addition & 1 deletion python/gui/qgsmaptool.sip
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class QgsMapTool : QObject

//! Mouse wheel event for overriding. Default implementation does nothing.
//! Added in version 2.0
virtual void wheelEvent( QWheelEvent * e );
virtual void wheelEvent( QWheelEvent* e );

//! Key event for overriding. Default implementation does nothing.
virtual void keyPressEvent( QKeyEvent* e );
Expand Down
38 changes: 18 additions & 20 deletions python/gui/qgsmaptoolidentify.sip
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@ class QgsMapToolIdentify : QgsMapTool
%End

public:

enum IdentifyMode
{
DefaultQgsSetting=-1,
ActiveLayer,
TopDownStopAtFirst,
TopDownAll,
DefaultQgsSetting = -1,
ActiveLayer,
TopDownStopAtFirst,
TopDownAll
};

enum LayerType
{
AllLayers=-1,
VectorLayer,
RasterLayer,
AllLayers = -1,
VectorLayer,
RasterLayer
};


struct IdentifyResult
{
Expand All @@ -32,16 +32,19 @@ class QgsMapToolIdentify : QgsMapTool

IdentifyResult( QgsMapLayer * layer, QString label, QgsFields fields, QgsFeature feature, QMap< QString, QString > derivedAttributes );

QgsMapLayer* mLayer;
QgsMapLayer* mLayer;
QString mLabel;
QgsFields mFields;
QgsFeature mFeature;
QMap< QString, QString > mAttributes;
QMap< QString, QString > mDerivedAttributes;
QMap< QString, QVariant > mParams;
};

//! constructor
QgsMapToolIdentify( QgsMapCanvas* canvas );
//! constructor
QgsMapToolIdentify( QgsMapCanvas * canvas );

virtual ~QgsMapToolIdentify();

//! Overridden mouse move event
virtual void canvasMoveEvent( QMouseEvent * e );
Expand All @@ -56,8 +59,6 @@ class QgsMapToolIdentify : QgsMapTool

virtual void deactivate();

//QgsMapLayer::LayerType LayerType;

/** Performs the identification.
@param x x coordinates of mouseEvent
@param y y coordinates of mouseEvent
Expand All @@ -76,14 +77,11 @@ class QgsMapToolIdentify : QgsMapTool
@return a list of IdentifyResult*/
QList<QgsMapToolIdentify::IdentifyResult> identify(int x, int y, IdentifyMode mode, LayerType layerType = AllLayers);

public slots:
void formatChanged( QgsRasterLayer *layer );

signals:
void identifyProgress( int, int );
void identifyMessage( QString );

private:
//! Private helper
virtual void convertMeasurement( QgsDistanceArea &calc, double &measure, QGis::UnitType &u, bool isArea );

/** Transforms the measurements of derived attributes in the desired units*/
virtual QGis::UnitType displayUnits();
void changedRasterResults( QList<QgsMapToolIdentify::IdentifyResult>& );
};
3 changes: 3 additions & 0 deletions python/gui/qgssublayersdialog.sip
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ class QgsSublayersDialog : QDialog
#include <qgssublayersdialog.h>
%End
public:

enum ProviderType
{
Ogr,
Expand All @@ -15,6 +16,8 @@ class QgsSublayersDialog : QDialog
~QgsSublayersDialog();

void populateLayerTable( QStringList theList, QString delim = ":" );
// Returns list of selected layers, if there are more layers with the same name,
// geometry type is appended separated by semicolon, example: <layer>:<geometryType>
QStringList selectionNames();
QList<int> selectionIndexes();

Expand Down
3 changes: 3 additions & 0 deletions python/gui/raster/qgsrasterminmaxwidget.sip
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ class QgsRasterMinMaxWidget: QWidget

void setBands( const QList<int> & theBands );

// Load programmaticaly with current values
void load();

signals:
void load( int theBandNo, double theMin, double theMax, int origin );
};
6 changes: 6 additions & 0 deletions python/gui/raster/qgssinglebandpseudocolorrendererwidget.sip
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ class QgsSingleBandPseudoColorRendererWidget : QgsRasterRendererWidget
%End

public:
enum Mode
{
Continuous = 1, // Using breaks from color palette
EqualInterval = 2
};

QgsSingleBandPseudoColorRendererWidget( QgsRasterLayer* layer, const QgsRectangle &extent = QgsRectangle() );
~QgsSingleBandPseudoColorRendererWidget();

Expand Down
4 changes: 3 additions & 1 deletion python/gui/symbology-ng/qgscptcitycolorrampv2dialog.sip
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ class QgsCptCityColorRampV2Dialog : QDialog

QString selectedName() const;

bool saveAsGradientRamp() const;

public slots:
void populateVariants();

Expand All @@ -19,7 +21,7 @@ class QgsCptCityColorRampV2Dialog : QDialog
void on_pbtnLicenseDetails_pressed();
void on_cboVariantName_currentIndexChanged( int index );
void onFinished();

void on_buttonBox_helpRequested();
/* void refresh(); */

protected:
Expand Down
28 changes: 27 additions & 1 deletion python/gui/symbology-ng/qgssymbollayerv2widget.sip
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ class QgsSimpleLineSymbolLayerV2Widget : QgsSymbolLayerV2Widget
void offsetChanged();
void on_mCustomCheckBox_stateChanged( int state );
void on_mChangePatternButton_clicked();

void on_mPenWidthUnitComboBox_currentIndexChanged( int index );
void on_mOffsetUnitComboBox_currentIndexChanged( int index );
void on_mDashPatternUnitComboBox_currentIndexChanged( int index );
void on_mDataDefinedPropertiesButton_clicked();

protected:
//creates a new icon for the 'change pattern' button
Expand Down Expand Up @@ -70,6 +73,11 @@ class QgsSimpleMarkerSymbolLayerV2Widget : QgsSymbolLayerV2Widget
void setSize();
void setAngle();
void setOffset();
void on_mSizeUnitComboBox_currentIndexChanged( int index );
void on_mOffsetUnitComboBox_currentIndexChanged( int index );
void on_mOutlineWidthUnitComboBox_currentIndexChanged( int index );
void on_mDataDefinedPropertiesButton_clicked();
void on_mOutlineWidthSpinBox_valueChanged( double d );
};

///////////
Expand All @@ -96,6 +104,9 @@ class QgsSimpleFillSymbolLayerV2Widget : QgsSymbolLayerV2Widget
void borderWidthChanged();
void borderStyleChanged();
void offsetChanged();
void on_mBorderWidthUnitComboBox_currentIndexChanged( int index );
void on_mOffsetUnitComboBox_currentIndexChanged( int index );
void on_mDataDefinedPropertiesButton_clicked();
};


Expand All @@ -121,6 +132,9 @@ class QgsMarkerLineSymbolLayerV2Widget : QgsSymbolLayerV2Widget
void setRotate();
void setOffset();
void setPlacement();
void on_mIntervalUnitComboBox_currentIndexChanged( int index );
void on_mOffsetUnitComboBox_currentIndexChanged( int index );
void on_mDataDefinedPropertiesButton_clicked();

};

Expand Down Expand Up @@ -150,9 +164,14 @@ class QgsSvgMarkerSymbolLayerV2Widget : QgsSymbolLayerV2Widget
void setOffset();
void on_mFileToolButton_clicked();
void on_mFileLineEdit_textEdited( const QString& text );
void on_mFileLineEdit_editingFinished();
void on_mChangeColorButton_colorChanged( const QColor& color );
void on_mChangeBorderColorButton_colorChanged( const QColor& color );
void on_mBorderWidthSpinBox_valueChanged( double d );
void on_mSizeUnitComboBox_currentIndexChanged( int index );
void on_mBorderWidthUnitComboBox_currentIndexChanged( int index );
void on_mOffsetUnitComboBox_currentIndexChanged( int index );
void on_mDataDefinedPropertiesButton_clicked();

protected:

Expand Down Expand Up @@ -182,6 +201,7 @@ class QgsLineDecorationSymbolLayerV2Widget : QgsSymbolLayerV2Widget
public slots:
void colorChanged( const QColor& color );
void penWidthChanged();
void on_mWidthUnitComboBox_currentIndexChanged( int index );
};

//////////
Expand All @@ -200,6 +220,10 @@ class QgsSVGFillSymbolLayerWidget : QgsSymbolLayerV2Widget
// from base class
virtual void setSymbolLayer( QgsSymbolLayerV2* layer );
virtual QgsSymbolLayerV2* symbolLayer();

protected:
void insertIcons();
void updateParamGui();
};

//////////
Expand Down Expand Up @@ -257,6 +281,8 @@ class QgsFontMarkerSymbolLayerV2Widget : QgsSymbolLayerV2Widget
void setAngle( double angle );
void setCharacter( const QChar& chr );
void setOffset();
void on_mSizeUnitComboBox_currentIndexChanged( int index );
void on_mOffsetUnitComboBox_currentIndexChanged( int index );
};

//////////
Expand Down
50 changes: 1 addition & 49 deletions src/analysis/vector/qgsoverlayanalyzer.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,59 +49,11 @@ class ANALYSIS_EXPORT QgsOverlayAnalyzer
const QString& shapefileName, bool onlySelectedFeatures = false,
QProgressDialog* p = 0 );

#if 0
/**Perform a union of two input vector layers and write output to a new shape file
@param layerA input vector layer
@param layerB input vector layer
@param shapefileName path to the output shp
@param onlySelectedFeatures if true, only selected features are considered, else all the features
@param p progress dialog (or 0 if no progress dialog is to be shown)
@note: added in version 1.4*/
bool combine( QgsVectorLayer* layerA, QgsVectorLayer* layerB,
const QString& shapefileName, bool onlySelectedFeatures = false,
QProgressDialog* p = 0 );

/**Clip a vector layer based on the boundary of another vector layer and
write output to a new shape file
@param layerA input vector layer
@param layerB input vector layer
@param shapefileName path to the output shp
@param onlySelectedFeatures if true, only selected features are considered, else all the features
@param p progress dialog (or 0 if no progress dialog is to be shown)
@note: added in version 1.4*/
bool clip( QgsVectorLayer* layerA, QgsVectorLayer* layerB,
const QString& shapefileName, bool onlySelectedFeatures = false,
QProgressDialog* p = 0 );

/**Difference a vector layer based on the geometries of another vector layer
and write the output to a new shape file
@param layerA input vector layer
@param layerB input vector layer
@param shapefileName path to the output shp
@param onlySelectedFeatures if true, only selected features are considered, else all the features
@param p progress dialog (or 0 if no progress dialog is to be shown)
@note: added in version 1.4*/
bool difference( QgsVectorLayer* layerA, QgsVectorLayer* layerB,
const QString& shapefileName, bool onlySelectedFeatures = false,
QProgressDialog* p = 0 );

/**Intersect two vector layers and write the geometries of each layer that
do not intersect with the other layer to a new shape file (Symmetrical difference)
@param layerA input vector layer
@param layerB input vector layer
@param shapefileName path to the output shp
@param onlySelectedFeatures if true, only selected features are considered, else all the features
@param p progress dialog (or 0 if no progress dialog is to be shown)
@note: added in version 1.4*/
bool symDifference( QgsVectorLayer* layerA, QgsVectorLayer* layerB,
const QString& shapefileName, bool onlySelectedFeatures = false,
QProgressDialog* p = 0 );
#endif

private:

void combineFieldLists( QgsFields& fieldListA, const QgsFields& fieldListB );
void intersectFeature( QgsFeature& f, QgsVectorFileWriter* vfw, QgsVectorLayer* dp, QgsSpatialIndex* index );
void combineAttributeMaps( QgsAttributes& attributesA, const QgsAttributes& attributesB );
};

#endif //QGSVECTORANALYZER
1 change: 0 additions & 1 deletion src/core/composer/qgscomposerlegend.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ class CORE_EXPORT QgsComposerLegend : public QgsComposerItem
/**Paints the legend and calculates its size. If painter is 0, only size is calculated*/
QSizeF paintAndDetermineSize( QPainter* painter );


/**Sets item box to the whole content*/
void adjustBoxSize();

Expand Down
4 changes: 2 additions & 2 deletions src/core/composer/qgscomposerlegenditem.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class CORE_EXPORT QgsComposerSymbolV2Item: public QgsComposerLegendItem
QgsSymbolV2* mSymbolV2;
};

class CORE_EXPORT QgsComposerRasterSymbolItem: public QgsComposerLegendItem
class CORE_EXPORT QgsComposerRasterSymbolItem : public QgsComposerLegendItem
{
public:
QgsComposerRasterSymbolItem();
Expand All @@ -119,7 +119,7 @@ class CORE_EXPORT QgsComposerRasterSymbolItem: public QgsComposerLegendItem
QColor mColor;
};

class CORE_EXPORT QgsComposerLayerItem: public QgsComposerLegendItem
class CORE_EXPORT QgsComposerLayerItem : public QgsComposerLegendItem
{
public:
QgsComposerLayerItem();
Expand Down
6 changes: 4 additions & 2 deletions src/core/composer/qgscomposition.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class QgsComposer;
* them in a list in ascending z-Order. This list can be changed to lower/raise items one position
* or to bring them to front/back.
* */
class CORE_EXPORT QgsComposition: public QGraphicsScene
class CORE_EXPORT QgsComposition : public QGraphicsScene
{
Q_OBJECT
public:
Expand Down Expand Up @@ -282,7 +282,9 @@ class CORE_EXPORT QgsComposition: public QGraphicsScene
QGraphicsLineItem* addSnapLine();
/**Remove custom snap line (and delete the object)*/
void removeSnapLine( QGraphicsLineItem* line );
/**Get nearest snap line*/
/**Get nearest snap line
* @note not availabel in python bindings
*/
QGraphicsLineItem* nearestSnapLine( bool horizontal, double x, double y, double tolerance, QList< QPair< QgsComposerItem*, QgsComposerItem::ItemPositionMode > >& snappedItems );
/**Hides / shows custom snap lines*/
void setSnapLinesVisible( bool visible );
Expand Down
3 changes: 3 additions & 0 deletions src/core/qgsdatadefined.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ class CORE_EXPORT QgsDataDefined
QString expressionString() const { return mExpressionString; }
void setExpressionString( const QString& expr ) { mExpressionString = expr; }

// @note not available in python bindings
QMap<QString, QVariant> expressionParams() const { return mExpressionParams; }
// @note not available in python bindings
void setExpressionParams( QMap<QString, QVariant> params ) { mExpressionParams = params; }
void insertExpressionParam( QString key, QVariant param );

Expand All @@ -69,6 +71,7 @@ class CORE_EXPORT QgsDataDefined
QString field() const { return mField; }
void setField( const QString& field ) { mField = field; }

// @note not available in python bindings
QMap< QString, QString > toMap();

private:
Expand Down
3 changes: 0 additions & 3 deletions src/core/qgsgmlschema.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,6 @@ class CORE_EXPORT QgsGmlSchema: public QObject
/** Get list of dot separated paths to feature classes parsed from GML or XSD */
QStringList typeNames() const;

/** Get map of fields parsed from XSD by parseXSD */
//QMap<int, QgsField> fields();

/** Get fields for type/class name parsed from GML or XSD */
QList<QgsField> fields( const QString & typeName );

Expand Down
9 changes: 1 addition & 8 deletions src/core/qgsmaplayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -221,13 +221,6 @@ class CORE_EXPORT QgsMapLayer : public QObject
* @note Added in v1.4 */
void removeCustomProperty( const QString& key );

#if 0
/** Accessor for transparency level. */
unsigned int getTransparency();

/** Mutator for transparency level. Should be between 0 and 255 */
virtual void setTransparency( unsigned int );
#endif

/**
* If an operation returns 0 (e.g. draw()), this function
Expand Down Expand Up @@ -378,7 +371,7 @@ class CORE_EXPORT QgsMapLayer : public QObject
* @brief Is called when the cache image is being deleted. Overwrite and use to clean up.
* @note added in 2.0
*/
virtual void onCacheImageDelete() {};
virtual void onCacheImageDelete() {}

public slots:

Expand Down
1 change: 0 additions & 1 deletion src/core/symbology-ng/qgscategorizedsymbolrendererv2.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ class CORE_EXPORT QgsRendererCategoryV2
//! copy constructor
QgsRendererCategoryV2( const QgsRendererCategoryV2& cat );


~QgsRendererCategoryV2();

QgsRendererCategoryV2& operator=( const QgsRendererCategoryV2& cat );
Expand Down