diff --git a/python/analysis/network/qgsgraphanalyzer.sip b/python/analysis/network/qgsgraphanalyzer.sip index e5163b9c6e3c..8e5f3e5f35b9 100644 --- a/python/analysis/network/qgsgraphanalyzer.sip +++ b/python/analysis/network/qgsgraphanalyzer.sip @@ -51,5 +51,3 @@ class QgsGraphAnalyzer */ static QgsGraph* shortestTree( const QgsGraph* source, int startVertexIdx, int criterionNum ); }; - - diff --git a/python/core/composer/qgsatlascomposition.sip b/python/core/composer/qgsatlascomposition.sip index 48bd8afbe49d..92d84bf2ca94 100644 --- a/python/core/composer/qgsatlascomposition.sip +++ b/python/core/composer/qgsatlascomposition.sip @@ -44,6 +44,9 @@ public: bool sortAscending() const; void setSortAscending( bool ascending ); + bool filterFeatures() const; + void setFilterFeatures( bool doFilter ); + QString featureFilter() const; void setFeatureFilter( const QString& expression ); @@ -69,7 +72,7 @@ public: QgsComposition* composition(); - signals: + signals: /** emitted when one of the parameters changes */ void parameterChanged(); }; diff --git a/python/core/composer/qgscomposeritem.sip b/python/core/composer/qgscomposeritem.sip index 67d2f25677b5..dc919b2f1de0 100644 --- a/python/core/composer/qgscomposeritem.sip +++ b/python/core/composer/qgscomposeritem.sip @@ -5,8 +5,6 @@ class QgsComposerItem: QObject, QGraphicsRectItem { %TypeHeaderCode #include -//#include -//#include #include #include #include @@ -16,7 +14,6 @@ class QgsComposerItem: QObject, QGraphicsRectItem #include #include #include -//#include %End %ConvertToSubClassCode @@ -231,6 +228,55 @@ class QgsComposerItem: QObject, QGraphicsRectItem */ void setFrameEnabled( bool drawFrame ); + + /** Whether this item has a Background or not. + * @returns true if there is a Background around this item, otherwise false. + * @note introduced since 2.0 + * @see hasBackground + */ + bool hasBackground() const; + + /** Set whether this item has a Background drawn around it or not. + * @param drawBackground draw Background + * @returns nothing + * @note introduced in 2.0 + * @see hasBackground + */ + void setBackgroundEnabled( bool drawBackground ); + + /** Gets the background color for this item + * @returns background color + * @note introduced in 2.0 + */ + QColor backgroundColor() const; + + /** Sets the background color for this item + * @param backgroundColor new background color + * @returns nothing + * @note introduced in 2.0 + */ + void setBackgroundColor( const QColor& backgroundColor ); + + /** Returns the item's composition blending mode */ + QPainter::CompositionMode blendMode() const; + + /** Sets the item's composition blending mode*/ + void setBlendMode( QPainter::CompositionMode blendMode ); + + /** Returns the item's transparency */ + int transparency() const; + /** Sets the item's transparency */ + void setTransparency( int transparency ); + + /** Returns true if effects (eg blend modes) are enabled for the item + * @note introduced in 2.0 + */ + bool effectsEnabled() const; + /** Sets whether effects (eg blend modes) are enabled for the item + * @note introduced in 2.0 + */ + void setEffectsEnabled( bool effectsEnabled ); + /**Composite operations for item groups do nothing per default*/ virtual void addItem( QgsComposerItem* item ); virtual void removeItems(); @@ -269,6 +315,9 @@ class QgsComposerItem: QObject, QGraphicsRectItem /**Returns the font ascent in Millimeters (considers upscaling and downscaling with FONT_WORKAROUND_SCALE*/ double fontAscentMillimeters( const QFont& font ) const; + /**Returns the font ascent in Millimeters (considers upscaling and downscaling with FONT_WORKAROUND_SCALE*/ + double fontDescentMillimeters( const QFont& font ) const; + /**Calculates font to from point size to pixel size*/ double pixelFontSize( double pointSize ) const; @@ -304,30 +353,6 @@ class QgsComposerItem: QObject, QGraphicsRectItem @note this method was added in version 2.0 @note there is not setter since one can't manually set the id*/ QString uuid() const; - - /** Gets the background color for this item - * @note introduced in 2.0 - */ - const QColor backgroundColor() const; - - /** Sets the background color for this item - * @note introduced in 2.0 - */ - void setBackgroundColor( const QColor& backgroundColor ); - - /* Returns the current blending mode for the composer item - @note added in version 1.9*/ - const QPainter::CompositionMode blendMode() const; - /* Sets the composer item's blending mode - @note added in version 1.9*/ - void setBlendMode( const QPainter::CompositionMode blendMode ); - - /** Returns the composer item's transparency - @note added in version 1.9*/ - const int transparency() const; - /** Sets the composer item's transparency - @note added in version 1.9*/ - void setTransparency( const int transparency ); public slots: virtual void setRotation( double r ); @@ -401,6 +426,14 @@ class QgsComposerItem: QObject, QGraphicsRectItem @param y in/out: y cooreinate before / after the rotation*/ void rotate( double angle, double& x, double& y ) const; + /**Return horizontal align snap item. Creates a new graphics line if 0*/ + QGraphicsLineItem* hAlignSnapItem(); + void deleteHAlignSnapItem(); + /**Return vertical align snap item. Creates a new graphics line if 0*/ + QGraphicsLineItem* vAlignSnapItem(); + void deleteVAlignSnapItem(); + void deleteAlignItems(); + signals: /**Is emitted on rotation change to notify north arrow pictures*/ void rotationChanged( double newRotation ); diff --git a/python/core/composer/qgscomposeritemcommand.sip b/python/core/composer/qgscomposeritemcommand.sip index 30cf77efad1e..da49e851143d 100644 --- a/python/core/composer/qgscomposeritemcommand.sip +++ b/python/core/composer/qgscomposeritemcommand.sip @@ -52,13 +52,18 @@ class QgsComposerMergeCommand : QgsComposerItemCommand ComposerMapAnnotationDistance, //composer legend ComposerLegendText, + LegendColumnCount, + LegendSplitLayer, + LegendEqualColumnWidth, LegendSymbolWidth, LegendSymbolHeight, + LegendTitleSpaceBottom, LegendGroupSpace, LegendLayerSpace, LegendSymbolSpace, LegendIconSymbolSpace, LegendBoxSpace, + LegendColumnSpace, //composer picture ComposerPictureRotation, // composer scalebar diff --git a/python/core/composer/qgscomposerlabel.sip b/python/core/composer/qgscomposerlabel.sip index 225c3c32a444..50fb35b31c5d 100644 --- a/python/core/composer/qgscomposerlabel.sip +++ b/python/core/composer/qgscomposerlabel.sip @@ -22,6 +22,9 @@ class QgsComposerLabel : QgsComposerItem QString text(); void setText( const QString& text ); + int htmlState(); + void setHtmlState( int state ); + /**Returns the text as it appears on screen (with replaced data field) @note this function was added in version 1.2*/ QString displayText() const; diff --git a/python/core/composer/qgscomposerlegend.sip b/python/core/composer/qgscomposerlegend.sip index bc1e35b63b3d..97c743091835 100644 --- a/python/core/composer/qgscomposerlegend.sip +++ b/python/core/composer/qgscomposerlegend.sip @@ -31,18 +31,29 @@ class QgsComposerLegend : QgsComposerItem void setTitle( const QString& t ); QString title() const; - /* - QgsComposerLegendStyle style(QgsComposerLegendStyle::Style s) const; - void setStyle(QgsComposerLegendStyle::Style s, const QgsComposerLegendStyle style); + /** Returns reference to modifiable style */ + QgsComposerLegendStyle & rstyle( QgsComposerLegendStyle::Style s ); + /** Returns style */ + QgsComposerLegendStyle style( QgsComposerLegendStyle::Style s ) const; + void setStyle( QgsComposerLegendStyle::Style s, const QgsComposerLegendStyle style ); + QFont styleFont( QgsComposerLegendStyle::Style s ) const; + /** Set style font */ void setStyleFont( QgsComposerLegendStyle::Style s, const QFont& f ); + + /** Set style margin*/ void setStyleMargin( QgsComposerLegendStyle::Style s, double margin ); void setStyleMargin( QgsComposerLegendStyle::Style s, QgsComposerLegendStyle::Side side, double margin ); - */ double boxSpace() const; void setBoxSpace( double s ); + double columnSpace() const; + void setColumnSpace( double s ); + + QColor fontColor() const; + void setFontColor( const QColor& c ); + double symbolWidth() const; void setSymbolWidth( double w ); @@ -52,6 +63,15 @@ class QgsComposerLegend : QgsComposerItem void setWrapChar( const QString& t ); QString wrapChar() const; + int columnCount() const; + void setColumnCount( int c ); + + int splitLayer() const; + void setSplitLayer( bool s ); + + int equalColumnWidth() const; + void setEqualColumnWidth( bool s ); + void setComposerMap( const QgsComposerMap* map ); const QgsComposerMap* composerMap() const; diff --git a/python/core/composer/qgscomposerlegenditem.sip b/python/core/composer/qgscomposerlegenditem.sip index 62ee768b85b5..eff9c227ab20 100644 --- a/python/core/composer/qgscomposerlegenditem.sip +++ b/python/core/composer/qgscomposerlegenditem.sip @@ -15,7 +15,8 @@ class QgsComposerLegendItem : QStandardItem GroupItem = QStandardItem::UserType, LayerItem, SymbologyV2Item, - RasterSymbolItem + RasterSymbolItem, + StyleItem }; virtual void writeXML( QDomElement& elem, QDomDocument& doc ) const = 0; @@ -27,6 +28,13 @@ class QgsComposerLegendItem : QStandardItem virtual ItemType itemType() const = 0; virtual QStandardItem* clone() const = 0; + QgsComposerLegendStyle::Style style() const; + void setStyle( QgsComposerLegendStyle::Style style ); + + // Get text defined by user + virtual QString userText() const; + // Set text defined by user + virtual void setUserText( const QString & text ); protected: void writeXMLChildren( QDomElement& elem, QDomDocument& doc ) const; }; @@ -99,6 +107,11 @@ class QgsComposerLayerItem : QgsComposerLegendItem void setLayerID( const QString& id ); QString layerID() const; + + void setShowFeatureCount( bool show ); + bool showFeatureCount() const; + + void setDefaultStyle(); }; class QgsComposerGroupItem : QgsComposerLegendItem diff --git a/python/core/composer/qgscomposerscalebar.sip b/python/core/composer/qgscomposerscalebar.sip index c3278fdb800a..b3f396b0f4a9 100644 --- a/python/core/composer/qgscomposerscalebar.sip +++ b/python/core/composer/qgscomposerscalebar.sip @@ -53,6 +53,9 @@ class QgsComposerScaleBar: QgsComposerItem QFont font() const; + QColor fontColor() const; + void setFontColor( const QColor& c ); + void setFont( const QFont& font ); QPen pen() const; diff --git a/python/core/composer/qgscomposershape.sip b/python/core/composer/qgscomposershape.sip index c532fa50f419..7b1d0dab92fb 100644 --- a/python/core/composer/qgscomposershape.sip +++ b/python/core/composer/qgscomposershape.sip @@ -46,4 +46,11 @@ class QgsComposerShape: QgsComposerItem public slots: /**Sets item rotation and resizes item bounds such that the shape always has the same size*/ virtual void setRotation( double r ); + + + protected: + /* reimplement drawFrame, since it's not a rect, but a custom shape */ + virtual void drawFrame( QPainter* p ); + /* reimplement drawBackground, since it's not a rect, but a custom shape */ + virtual void drawBackground( QPainter* p ); }; diff --git a/python/core/composer/qgscomposition.sip b/python/core/composer/qgscomposition.sip index 2f8ae44b37ff..6ca8e4635895 100644 --- a/python/core/composer/qgscomposition.sip +++ b/python/core/composer/qgscomposition.sip @@ -106,7 +106,7 @@ class QgsComposition : QGraphicsScene const QgsComposerHtml* getComposerHtmlByItem( QgsComposerItem *item ) const; /**Returns a composer item given its text identifier. - Ids are not necessarely unique, but this function returns only one element. + Ids are not necessarely unique, but this function returns only one element. @note added in 2.0 @param theId - A QString representing the identifier of the item to retrieve. @@ -114,15 +114,10 @@ class QgsComposition : QGraphicsScene **/ const QgsComposerItem* getComposerItemById( QString theId ) const; - /**Returns a composer item given its unique identifier. - Warning : ids are not necessarely unique, but this function returns only one element. @note added in 2.0 - @param theId - A QString representing the UUID of the item to retrieve. - @param inAllComposers - Whether the search should be done in all composers of the project - @return QgsComposerItem pointer or 0 pointer if no such item exists. + @param theUuid A QString representing the UUID of the item to **/ - //const QgsComposerItem* getComposerItemByUuid( QString theUuid, bool inAllComposers = false ) const; const QgsComposerItem* getComposerItemByUuid( QString theUuid ) const; int printResolution() const; @@ -131,6 +126,13 @@ class QgsComposition : QGraphicsScene bool printAsRaster() const; void setPrintAsRaster( bool enabled ); + /**Returns true if a composition should use advanced effects such as blend modes + @note added in 1.9*/ + bool useAdvancedEffects() const; + /**Used to enable or disable advanced effects such as blend modes in a composition + @note: added in version 1.9*/ + void setUseAdvancedEffects( bool effectsEnabled ); + double selectionTolerance() const; void setSelectionTolerance( double tol ); @@ -167,11 +169,12 @@ class QgsComposition : QGraphicsScene @param mapsToRestore for reading from project file: set preview move 'rectangle' to all maps and save the preview states to show composer maps on demand @param addUndoCommands insert AddItem commands if true (e.g. for copy/paste) @param pos item position. Optional, take position from xml if 0 + @param pasteInPlace whether the position should be kept but mapped to the page origin. (the page is the page under to the mouse cursor) @note not available in python bindings */ /* void addItemsFromXML( const QDomElement& elem, const QDomDocument& doc, QMap< QgsComposerMap*, int >* mapsToRestore = 0, - bool addUndoCommands = false, QPointF* pos = 0 ); + bool addUndoCommands = false, QPointF* pos = 0, bool pasteInPlace = false ); */ /**Adds item to z list. Usually called from constructor of QgsComposerItem*/ @@ -204,6 +207,34 @@ class QgsComposition : QGraphicsScene /**Snaps a scene coordinate point to grid*/ QPointF snapPointToGrid( const QPointF& scenePoint ) const; + /**Snaps item position to align with other items (left / middle / right or top / middle / bottom + @param item current item + @param alignX x-coordinate of align or -1 if not aligned to x + @param alignY y-coordinate of align or -1 if not aligned to y + @param dx item shift in x direction + @param dy item shift in y direction + @return new upper left point after the align*/ + QPointF alignItem( const QgsComposerItem* item, double& alignX, double& alignY, double dx = 0, double dy = 0 ); + + /**Snaps position to align with the boundaries of other items + @param pos position to snap + @param excludeItem item to exclude + @param alignX snapped x coordinate or -1 if not snapped + @param alignY snapped y coordinate or -1 if not snapped + @return snapped position or original position if no snap*/ + QPointF alignPos( const QPointF& pos, const QgsComposerItem* excludeItem, double& alignX, double& alignY ); + + /**Add a custom snap line (can be horizontal or vertical)*/ + QGraphicsLineItem* addSnapLine(); + /**Remove custom snap line (and delete the object)*/ + void removeSnapLine( QGraphicsLineItem* 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 ); + /**Allocates new item command and saves initial state in it @param item target item @param commandText descriptive command text @@ -222,7 +253,8 @@ class QgsComposition : QGraphicsScene void addMultiFrame( QgsComposerMultiFrame* multiFrame ); /**Removes multi frame (but does not delete it)*/ void removeMultiFrame( QgsComposerMultiFrame* multiFrame ); - /**Adds an arrow item to the graphics scene and advices composer to create a widget for it (through signal)*/ + /**Adds an arrow item to the graphics scene and advices composer to create a widget for it (through signal) + @note not available in python bindings*/ void addComposerArrow( QgsComposerArrow* arrow ); /**Adds label to the graphics scene and advices composer to create a widget for it (through signal)*/ void addComposerLabel( QgsComposerLabel* label ); diff --git a/python/core/qgscrscache.sip b/python/core/qgscrscache.sip index aa8c720e7919..d214c300f551 100644 --- a/python/core/qgscrscache.sip +++ b/python/core/qgscrscache.sip @@ -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 @@ -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(); diff --git a/python/core/qgsdatadefined.sip b/python/core/qgsdatadefined.sip index d1d7a25adccc..7a939270fa09 100644 --- a/python/core/qgsdatadefined.sip +++ b/python/core/qgsdatadefined.sip @@ -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 @@ -35,7 +34,9 @@ class QgsDataDefined QString expressionString() const; void setExpressionString( const QString& expr ); + //QMap expressionParams() const; + //void setExpressionParams( QMap params ); void insertExpressionParam( QString key, QVariant param ); diff --git a/python/core/qgsfeaturerequest.sip b/python/core/qgsfeaturerequest.sip index 65cab6a76811..91dfdf06ac87 100644 --- a/python/core/qgsfeaturerequest.sip +++ b/python/core/qgsfeaturerequest.sip @@ -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 Flags; diff --git a/python/core/qgsfield.sip b/python/core/qgsfield.sip index b5921b449e9c..35867600c769 100644 --- a/python/core/qgsfield.sip +++ b/python/core/qgsfield.sip @@ -108,6 +108,8 @@ public: */ void setComment( const QString & comment ); + /**Formats string for display*/ + QString displayString( const QVariant& v ) const; }; // class QgsField @@ -117,39 +119,38 @@ class QgsFields %TypeHeaderCode #include %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 toList() const; + int size() const; + //const QgsField& operator[](int i) const; + //QgsField& operator[](int i); + const QgsField& at(int i) const; + QList 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) diff --git a/python/core/qgsgeometry.sip b/python/core/qgsgeometry.sip index c6c962c345c0..a31df456735f 100644 --- a/python/core/qgsgeometry.sip +++ b/python/core/qgsgeometry.sip @@ -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(); @@ -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; /** @@ -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 */ @@ -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 asGeometryCollection() /Factory/; + QList asGeometryCollection() const /Factory/; /** delete a ring in polygon or multipolygon. Ring 0 is outer ring and can't be deleted. diff --git a/python/core/qgsgmlschema.sip b/python/core/qgsgmlschema.sip index ec1c00cfbc12..65c6a9c41339 100644 --- a/python/core/qgsgmlschema.sip +++ b/python/core/qgsgmlschema.sip @@ -1,5 +1,23 @@ //typedef QMap QgsFieldMap; +/* Description of feature class in GML */ +class QgsGmlFeatureClass +{ + public: + QgsGmlFeatureClass( ); + QgsGmlFeatureClass( QString name, QString path ); + + ~QgsGmlFeatureClass(); + + QList & fields(); + + int fieldIndex( const QString & name ); + + QString path() const; + + QStringList & geometryAttributes(); +}; + class QgsGmlSchema: QObject { @@ -9,6 +27,7 @@ class QgsGmlSchema: QObject public: QgsGmlSchema(); + ~QgsGmlSchema(); /** Get fields info from XSD */ @@ -22,7 +41,9 @@ class QgsGmlSchema: QObject QStringList typeNames() const; + /** Get fields for type/class name parsed from GML or XSD */ QList fields( const QString & typeName ); + /** Get list of geometry attributes for type/class name */ QStringList geometryAttributes( const QString & typeName ); }; diff --git a/python/core/qgslabel.sip b/python/core/qgslabel.sip index 5ac83f615e3b..f2a87061652c 100644 --- a/python/core/qgslabel.sip +++ b/python/core/qgslabel.sip @@ -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. diff --git a/python/core/qgsmaplayer.sip b/python/core/qgsmaplayer.sip index dcff4b1de168..c5ea0696184f 100644 --- a/python/core/qgsmaplayer.sip +++ b/python/core/qgsmaplayer.sip @@ -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; @@ -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(); @@ -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 @@ -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 */ @@ -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 @@ -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 */ @@ -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) @@ -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(); @@ -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 ); }; - diff --git a/python/core/qgsmaplayerregistry.sip b/python/core/qgsmaplayerregistry.sip index ad058f9ede41..d79bdfc51dcb 100644 --- a/python/core/qgsmaplayerregistry.sip +++ b/python/core/qgsmaplayerregistry.sip @@ -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 mapLayersByName( QString layerName ); //! Retrieve the mapLayers collection (mainly intended for use by projection) @@ -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 - a list of the map layers that were added * successfully. If a layer is invalid, or already exists in the registry, @@ -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 diff --git a/python/core/qgsogcutils.sip b/python/core/qgsogcutils.sip index a10d26abad33..5faa536e6916 100644 --- a/python/core/qgsogcutils.sip +++ b/python/core/qgsogcutils.sip @@ -6,54 +6,55 @@ class QgsOgcUtils #include %End -public: - - /** static method that creates geometry from GML - @param XML representation of the geometry. GML elements are expected to be - in default namespace (...) or in "gml" namespace (...) - @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 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 {... \endverbatim) or in + "gml" namespace (\verbatim ... \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 \endverbatim QDomElement on success, + * otherwise null QDomElement + */ + static QDomElement expressionToOgcFilter( const QgsExpression& exp, QDomDocument& doc, QString* errorMessage /Out/ ); }; diff --git a/python/core/qgssnapper.sip b/python/core/qgssnapper.sip index cb9ee1e77141..5a8a7fd33d18 100644 --- a/python/core/qgssnapper.sip +++ b/python/core/qgssnapper.sip @@ -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*/ diff --git a/python/core/qgsvectorlayer.sip b/python/core/qgsvectorlayer.sip index 0e099884fcdf..b039c24e4ccb 100644 --- a/python/core/qgsvectorlayer.sip +++ b/python/core/qgsvectorlayer.sip @@ -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 */ @@ -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 */ diff --git a/python/core/qgsvectorlayerimport.sip b/python/core/qgsvectorlayerimport.sip index 1576dd8e8abb..6e654b625c65 100644 --- a/python/core/qgsvectorlayerimport.sip +++ b/python/core/qgsvectorlayerimport.sip @@ -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 { diff --git a/python/core/raster/qgsrasterpipe.sip b/python/core/raster/qgsrasterpipe.sip index d40749c9eb65..c29462c32535 100644 --- a/python/core/raster/qgsrasterpipe.sip +++ b/python/core/raster/qgsrasterpipe.sip @@ -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(); diff --git a/python/core/symbology-ng/qgscategorizedsymbolrendererv2.sip b/python/core/symbology-ng/qgscategorizedsymbolrendererv2.sip index a327fbd90485..7e2420461d12 100644 --- a/python/core/symbology-ng/qgscategorizedsymbolrendererv2.sip +++ b/python/core/symbology-ng/qgscategorizedsymbolrendererv2.sip @@ -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(); @@ -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(); @@ -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 ); diff --git a/python/core/symbology-ng/qgsfillsymbollayerv2.sip b/python/core/symbology-ng/qgsfillsymbollayerv2.sip index 4fc8b011f4a6..cec2de9f148f 100644 --- a/python/core/symbology-ng/qgsfillsymbollayerv2.sip +++ b/python/core/symbology-ng/qgsfillsymbollayerv2.sip @@ -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 ); @@ -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 @@ -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; @@ -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 @@ -269,4 +278,7 @@ class QgsCentroidFillSymbolLayerV2 : QgsFillSymbolLayerV2 QgsSymbolV2* subSymbol(); bool setSubSymbol( QgsSymbolV2* symbol /Transfer/ ); + + void setOutputUnit( QgsSymbolV2::OutputUnit unit ); + QgsSymbolV2::OutputUnit outputUnit() const; }; diff --git a/python/core/symbology-ng/qgsgraduatedsymbolrendererv2.sip b/python/core/symbology-ng/qgsgraduatedsymbolrendererv2.sip index 52d68520608d..7d9a87eecb6b 100644 --- a/python/core/symbology-ng/qgsgraduatedsymbolrendererv2.sip +++ b/python/core/symbology-ng/qgsgraduatedsymbolrendererv2.sip @@ -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 { diff --git a/python/core/symbology-ng/qgsrendererv2.sip b/python/core/symbology-ng/qgsrendererv2.sip index df9448e36dd2..e07059ba8950 100644 --- a/python/core/symbology-ng/qgsrendererv2.sip +++ b/python/core/symbology-ng/qgsrendererv2.sip @@ -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& holes, QgsRenderContext& context, unsigned char* wkb ); + + void setScaleMethodToSymbol( QgsSymbolV2* symbol, int scaleMethod ); }; diff --git a/python/core/symbology-ng/qgssymbollayerv2.sip b/python/core/symbology-ng/qgssymbollayerv2.sip index d1b49d9e6681..3fc85fac75db 100644 --- a/python/core/symbology-ng/qgssymbollayerv2.sip +++ b/python/core/symbology-ng/qgssymbollayerv2.sip @@ -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; @@ -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 diff --git a/python/core/symbology-ng/qgssymbollayerv2utils.sip b/python/core/symbology-ng/qgssymbollayerv2utils.sip index a06d7da564e5..f861f9adf711 100644 --- a/python/core/symbology-ng/qgssymbollayerv2utils.sip +++ b/python/core/symbology-ng/qgssymbollayerv2utils.sip @@ -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* 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 ); diff --git a/python/core/symbology-ng/qgsvectorcolorrampv2.sip b/python/core/symbology-ng/qgsvectorcolorrampv2.sip index cdcfa8e01d6f..f6697fbcae52 100644 --- a/python/core/symbology-ng/qgsvectorcolorrampv2.sip +++ b/python/core/symbology-ng/qgsvectorcolorrampv2.sip @@ -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; @@ -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 @@ -166,6 +171,7 @@ class QgsCptCityColorRampV2 virtual QgsVectorColorRampV2* clone() const /Factory/; void copy( const QgsCptCityColorRampV2* other ); + QgsVectorGradientColorRampV2* cloneGradientRamp() const /Factory/; virtual QgsStringMap properties() const; diff --git a/python/core/symbology-ng/qgsvectorfieldsymbollayer.sip b/python/core/symbology-ng/qgsvectorfieldsymbollayer.sip index d2d2424f69e6..433523cd2620 100644 --- a/python/core/symbology-ng/qgsvectorfieldsymbollayer.sip +++ b/python/core/symbology-ng/qgsvectorfieldsymbollayer.sip @@ -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; }; diff --git a/python/gui/attributetable/qgsattributetableview.sip b/python/gui/attributetable/qgsattributetableview.sip index f43b3e16d500..2f221925f16e 100644 --- a/python/gui/attributetable/qgsattributetableview.sip +++ b/python/gui/attributetable/qgsattributetableview.sip @@ -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 ); }; diff --git a/python/gui/qgisinterface.sip b/python/gui/qgisinterface.sip index 4da487537f33..6659c69bad95 100644 --- a/python/gui/qgisinterface.sip +++ b/python/gui/qgisinterface.sip @@ -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 diff --git a/python/gui/qgsattributeeditor.sip b/python/gui/qgsattributeeditor.sip index 006ba423419a..8ff81295c83a 100644 --- a/python/gui/qgsattributeeditor.sip +++ b/python/gui/qgsattributeeditor.sip @@ -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 ); }; diff --git a/python/gui/qgscomposerview.sip b/python/gui/qgscomposerview.sip index bd8444da0851..92d15cb9141a 100644 --- a/python/gui/qgscomposerview.sip +++ b/python/gui/qgscomposerview.sip @@ -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* ); @@ -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 ); diff --git a/python/gui/qgsexpressionbuilderdialog.sip b/python/gui/qgsexpressionbuilderdialog.sip index 1dcbbbcd7dbb..87100ab11e49 100644 --- a/python/gui/qgsexpressionbuilderdialog.sip +++ b/python/gui/qgsexpressionbuilderdialog.sip @@ -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 ); }; diff --git a/python/gui/qgsfilterlineedit.sip b/python/gui/qgsfilterlineedit.sip index f6bd905f65b1..2a965f6b271d 100644 --- a/python/gui/qgsfilterlineedit.sip +++ b/python/gui/qgsfilterlineedit.sip @@ -10,6 +10,10 @@ class QgsFilterLineEdit : QLineEdit public: QgsFilterLineEdit( QWidget* parent = 0 ); + signals: + void cleared(); + protected: void resizeEvent( QResizeEvent * ); + void changeEvent( QEvent * ); }; diff --git a/python/gui/qgsmanageconnectionsdialog.sip b/python/gui/qgsmanageconnectionsdialog.sip index 52b205a792c2..2836afecee73 100644 --- a/python/gui/qgsmanageconnectionsdialog.sip +++ b/python/gui/qgsmanageconnectionsdialog.sip @@ -17,7 +17,8 @@ class QgsManageConnectionsDialog : QDialog PostGIS, WFS, MSSQL, - WCS + WCS, + Oracle, }; // constructor diff --git a/python/gui/qgsmaptool.sip b/python/gui/qgsmaptool.sip index 47b658267ed8..f1130b9466d5 100644 --- a/python/gui/qgsmaptool.sip +++ b/python/gui/qgsmaptool.sip @@ -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 ); diff --git a/python/gui/qgsmaptoolidentify.sip b/python/gui/qgsmaptoolidentify.sip index a0e9602cb190..27f25fa3fbea 100644 --- a/python/gui/qgsmaptoolidentify.sip +++ b/python/gui/qgsmaptoolidentify.sip @@ -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 { @@ -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 ); @@ -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 @@ -76,14 +77,11 @@ class QgsMapToolIdentify : QgsMapTool @return a list of IdentifyResult*/ QList 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& ); }; diff --git a/python/gui/qgssublayersdialog.sip b/python/gui/qgssublayersdialog.sip index 93a2a4a4f683..03bd4bae4679 100644 --- a/python/gui/qgssublayersdialog.sip +++ b/python/gui/qgssublayersdialog.sip @@ -4,6 +4,7 @@ class QgsSublayersDialog : QDialog #include %End public: + enum ProviderType { Ogr, @@ -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: : QStringList selectionNames(); QList selectionIndexes(); diff --git a/python/gui/raster/qgsrasterminmaxwidget.sip b/python/gui/raster/qgsrasterminmaxwidget.sip index a6fcb823f379..9ad1c8502177 100644 --- a/python/gui/raster/qgsrasterminmaxwidget.sip +++ b/python/gui/raster/qgsrasterminmaxwidget.sip @@ -11,6 +11,9 @@ class QgsRasterMinMaxWidget: QWidget void setBands( const QList & theBands ); + // Load programmaticaly with current values + void load(); + signals: void load( int theBandNo, double theMin, double theMax, int origin ); }; diff --git a/python/gui/raster/qgssinglebandpseudocolorrendererwidget.sip b/python/gui/raster/qgssinglebandpseudocolorrendererwidget.sip index 19143f52b927..99c25331582f 100644 --- a/python/gui/raster/qgssinglebandpseudocolorrendererwidget.sip +++ b/python/gui/raster/qgssinglebandpseudocolorrendererwidget.sip @@ -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(); diff --git a/python/gui/symbology-ng/qgscptcitycolorrampv2dialog.sip b/python/gui/symbology-ng/qgscptcitycolorrampv2dialog.sip index 44195316eef1..f53225402054 100644 --- a/python/gui/symbology-ng/qgscptcitycolorrampv2dialog.sip +++ b/python/gui/symbology-ng/qgscptcitycolorrampv2dialog.sip @@ -10,6 +10,8 @@ class QgsCptCityColorRampV2Dialog : QDialog QString selectedName() const; + bool saveAsGradientRamp() const; + public slots: void populateVariants(); @@ -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: diff --git a/python/gui/symbology-ng/qgssymbollayerv2widget.sip b/python/gui/symbology-ng/qgssymbollayerv2widget.sip index 7379b4e1fb0d..d71150e037d3 100644 --- a/python/gui/symbology-ng/qgssymbollayerv2widget.sip +++ b/python/gui/symbology-ng/qgssymbollayerv2widget.sip @@ -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 @@ -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 ); }; /////////// @@ -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(); }; @@ -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(); }; @@ -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: @@ -182,6 +201,7 @@ class QgsLineDecorationSymbolLayerV2Widget : QgsSymbolLayerV2Widget public slots: void colorChanged( const QColor& color ); void penWidthChanged(); + void on_mWidthUnitComboBox_currentIndexChanged( int index ); }; ////////// @@ -200,6 +220,10 @@ class QgsSVGFillSymbolLayerWidget : QgsSymbolLayerV2Widget // from base class virtual void setSymbolLayer( QgsSymbolLayerV2* layer ); virtual QgsSymbolLayerV2* symbolLayer(); + + protected: + void insertIcons(); + void updateParamGui(); }; ////////// @@ -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 ); }; ////////// diff --git a/src/analysis/vector/qgsoverlayanalyzer.h b/src/analysis/vector/qgsoverlayanalyzer.h index e742d29fb065..52dd435d1c4b 100644 --- a/src/analysis/vector/qgsoverlayanalyzer.h +++ b/src/analysis/vector/qgsoverlayanalyzer.h @@ -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 diff --git a/src/core/composer/qgscomposerlegend.h b/src/core/composer/qgscomposerlegend.h index 9d48800e2f3a..fb488d8dfb4b 100644 --- a/src/core/composer/qgscomposerlegend.h +++ b/src/core/composer/qgscomposerlegend.h @@ -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(); diff --git a/src/core/composer/qgscomposerlegenditem.h b/src/core/composer/qgscomposerlegenditem.h index 2b29db782e11..d31370beaafb 100644 --- a/src/core/composer/qgscomposerlegenditem.h +++ b/src/core/composer/qgscomposerlegenditem.h @@ -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(); @@ -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(); diff --git a/src/core/composer/qgscomposition.h b/src/core/composer/qgscomposition.h index 282fc471c151..c061324ed5d7 100644 --- a/src/core/composer/qgscomposition.h +++ b/src/core/composer/qgscomposition.h @@ -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: @@ -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 ); diff --git a/src/core/qgsdatadefined.h b/src/core/qgsdatadefined.h index c75317033efc..015c5501956b 100644 --- a/src/core/qgsdatadefined.h +++ b/src/core/qgsdatadefined.h @@ -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 expressionParams() const { return mExpressionParams; } + // @note not available in python bindings void setExpressionParams( QMap params ) { mExpressionParams = params; } void insertExpressionParam( QString key, QVariant param ); @@ -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: diff --git a/src/core/qgsgmlschema.h b/src/core/qgsgmlschema.h index d3415c81f1a5..5427df64c808 100644 --- a/src/core/qgsgmlschema.h +++ b/src/core/qgsgmlschema.h @@ -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 fields(); - /** Get fields for type/class name parsed from GML or XSD */ QList fields( const QString & typeName ); diff --git a/src/core/qgsmaplayer.h b/src/core/qgsmaplayer.h index 0718a7962dc4..8b476618c493 100644 --- a/src/core/qgsmaplayer.h +++ b/src/core/qgsmaplayer.h @@ -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 @@ -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: diff --git a/src/core/symbology-ng/qgscategorizedsymbolrendererv2.h b/src/core/symbology-ng/qgscategorizedsymbolrendererv2.h index 6035034f49b4..67b14b70a726 100644 --- a/src/core/symbology-ng/qgscategorizedsymbolrendererv2.h +++ b/src/core/symbology-ng/qgscategorizedsymbolrendererv2.h @@ -35,7 +35,6 @@ class CORE_EXPORT QgsRendererCategoryV2 //! copy constructor QgsRendererCategoryV2( const QgsRendererCategoryV2& cat ); - ~QgsRendererCategoryV2(); QgsRendererCategoryV2& operator=( const QgsRendererCategoryV2& cat );