sip update

This commit is contained in:
Juergen E. Fischer 2013-06-23 16:00:16 +02:00
parent b53e80b84a
commit 3854086d47
54 changed files with 600 additions and 265 deletions

View File

@ -51,5 +51,3 @@ class QgsGraphAnalyzer
*/ */
static QgsGraph* shortestTree( const QgsGraph* source, int startVertexIdx, int criterionNum ); static QgsGraph* shortestTree( const QgsGraph* source, int startVertexIdx, int criterionNum );
}; };

View File

@ -44,6 +44,9 @@ public:
bool sortAscending() const; bool sortAscending() const;
void setSortAscending( bool ascending ); void setSortAscending( bool ascending );
bool filterFeatures() const;
void setFilterFeatures( bool doFilter );
QString featureFilter() const; QString featureFilter() const;
void setFeatureFilter( const QString& expression ); void setFeatureFilter( const QString& expression );

View File

@ -5,8 +5,6 @@ class QgsComposerItem: QObject, QGraphicsRectItem
{ {
%TypeHeaderCode %TypeHeaderCode
#include <qgscomposeritem.h> #include <qgscomposeritem.h>
//#include <qgscomposerarrow.h>
//#include <qgscomposeritemgroup.h>
#include <qgscomposerlabel.h> #include <qgscomposerlabel.h>
#include <qgscomposerlegend.h> #include <qgscomposerlegend.h>
#include <qgscomposermap.h> #include <qgscomposermap.h>
@ -16,7 +14,6 @@ class QgsComposerItem: QObject, QGraphicsRectItem
#include <qgscomposershape.h> #include <qgscomposershape.h>
#include <qgscomposertable.h> #include <qgscomposertable.h>
#include <qgscomposerattributetable.h> #include <qgscomposerattributetable.h>
//#include <qgscomposertexttable.h>
%End %End
%ConvertToSubClassCode %ConvertToSubClassCode
@ -231,6 +228,55 @@ class QgsComposerItem: QObject, QGraphicsRectItem
*/ */
void setFrameEnabled( bool drawFrame ); 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*/ /**Composite operations for item groups do nothing per default*/
virtual void addItem( QgsComposerItem* item ); virtual void addItem( QgsComposerItem* item );
virtual void removeItems(); 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*/ /**Returns the font ascent in Millimeters (considers upscaling and downscaling with FONT_WORKAROUND_SCALE*/
double fontAscentMillimeters( const QFont& font ) const; 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*/ /**Calculates font to from point size to pixel size*/
double pixelFontSize( double pointSize ) const; double pixelFontSize( double pointSize ) const;
@ -305,30 +354,6 @@ class QgsComposerItem: QObject, QGraphicsRectItem
@note there is not setter since one can't manually set the id*/ @note there is not setter since one can't manually set the id*/
QString uuid() const; 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: public slots:
virtual void setRotation( double r ); virtual void setRotation( double r );
void repaint(); void repaint();
@ -401,6 +426,14 @@ class QgsComposerItem: QObject, QGraphicsRectItem
@param y in/out: y cooreinate before / after the rotation*/ @param y in/out: y cooreinate before / after the rotation*/
void rotate( double angle, double& x, double& y ) const; 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: signals:
/**Is emitted on rotation change to notify north arrow pictures*/ /**Is emitted on rotation change to notify north arrow pictures*/
void rotationChanged( double newRotation ); void rotationChanged( double newRotation );

View File

@ -52,13 +52,18 @@ class QgsComposerMergeCommand : QgsComposerItemCommand
ComposerMapAnnotationDistance, ComposerMapAnnotationDistance,
//composer legend //composer legend
ComposerLegendText, ComposerLegendText,
LegendColumnCount,
LegendSplitLayer,
LegendEqualColumnWidth,
LegendSymbolWidth, LegendSymbolWidth,
LegendSymbolHeight, LegendSymbolHeight,
LegendTitleSpaceBottom,
LegendGroupSpace, LegendGroupSpace,
LegendLayerSpace, LegendLayerSpace,
LegendSymbolSpace, LegendSymbolSpace,
LegendIconSymbolSpace, LegendIconSymbolSpace,
LegendBoxSpace, LegendBoxSpace,
LegendColumnSpace,
//composer picture //composer picture
ComposerPictureRotation, ComposerPictureRotation,
// composer scalebar // composer scalebar

View File

@ -22,6 +22,9 @@ class QgsComposerLabel : QgsComposerItem
QString text(); QString text();
void setText( const 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) /**Returns the text as it appears on screen (with replaced data field)
@note this function was added in version 1.2*/ @note this function was added in version 1.2*/
QString displayText() const; QString displayText() const;

View File

@ -31,18 +31,29 @@ class QgsComposerLegend : QgsComposerItem
void setTitle( const QString& t ); void setTitle( const QString& t );
QString title() const; QString title() const;
/* /** Returns reference to modifiable style */
QgsComposerLegendStyle & rstyle( QgsComposerLegendStyle::Style s );
/** Returns style */
QgsComposerLegendStyle style( QgsComposerLegendStyle::Style s ) const; QgsComposerLegendStyle style( QgsComposerLegendStyle::Style s ) const;
void setStyle( QgsComposerLegendStyle::Style s, const QgsComposerLegendStyle style ); void setStyle( QgsComposerLegendStyle::Style s, const QgsComposerLegendStyle style );
QFont styleFont( QgsComposerLegendStyle::Style s ) const; QFont styleFont( QgsComposerLegendStyle::Style s ) const;
/** Set style font */
void setStyleFont( QgsComposerLegendStyle::Style s, const QFont& f ); void setStyleFont( QgsComposerLegendStyle::Style s, const QFont& f );
/** Set style margin*/
void setStyleMargin( QgsComposerLegendStyle::Style s, double margin ); void setStyleMargin( QgsComposerLegendStyle::Style s, double margin );
void setStyleMargin( QgsComposerLegendStyle::Style s, QgsComposerLegendStyle::Side side, double margin ); void setStyleMargin( QgsComposerLegendStyle::Style s, QgsComposerLegendStyle::Side side, double margin );
*/
double boxSpace() const; double boxSpace() const;
void setBoxSpace( double s ); void setBoxSpace( double s );
double columnSpace() const;
void setColumnSpace( double s );
QColor fontColor() const;
void setFontColor( const QColor& c );
double symbolWidth() const; double symbolWidth() const;
void setSymbolWidth( double w ); void setSymbolWidth( double w );
@ -52,6 +63,15 @@ class QgsComposerLegend : QgsComposerItem
void setWrapChar( const QString& t ); void setWrapChar( const QString& t );
QString wrapChar() const; 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 ); void setComposerMap( const QgsComposerMap* map );
const QgsComposerMap* composerMap() const; const QgsComposerMap* composerMap() const;

View File

@ -15,7 +15,8 @@ class QgsComposerLegendItem : QStandardItem
GroupItem = QStandardItem::UserType, GroupItem = QStandardItem::UserType,
LayerItem, LayerItem,
SymbologyV2Item, SymbologyV2Item,
RasterSymbolItem RasterSymbolItem,
StyleItem
}; };
virtual void writeXML( QDomElement& elem, QDomDocument& doc ) const = 0; virtual void writeXML( QDomElement& elem, QDomDocument& doc ) const = 0;
@ -27,6 +28,13 @@ class QgsComposerLegendItem : QStandardItem
virtual ItemType itemType() const = 0; virtual ItemType itemType() const = 0;
virtual QStandardItem* clone() 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: protected:
void writeXMLChildren( QDomElement& elem, QDomDocument& doc ) const; void writeXMLChildren( QDomElement& elem, QDomDocument& doc ) const;
}; };
@ -99,6 +107,11 @@ class QgsComposerLayerItem : QgsComposerLegendItem
void setLayerID( const QString& id ); void setLayerID( const QString& id );
QString layerID() const; QString layerID() const;
void setShowFeatureCount( bool show );
bool showFeatureCount() const;
void setDefaultStyle();
}; };
class QgsComposerGroupItem : QgsComposerLegendItem class QgsComposerGroupItem : QgsComposerLegendItem

View File

@ -53,6 +53,9 @@ class QgsComposerScaleBar: QgsComposerItem
QFont font() const; QFont font() const;
QColor fontColor() const;
void setFontColor( const QColor& c );
void setFont( const QFont& font ); void setFont( const QFont& font );
QPen pen() const; QPen pen() const;

View File

@ -46,4 +46,11 @@ class QgsComposerShape: QgsComposerItem
public slots: public slots:
/**Sets item rotation and resizes item bounds such that the shape always has the same size*/ /**Sets item rotation and resizes item bounds such that the shape always has the same size*/
virtual void setRotation( double r ); 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 );
}; };

View File

@ -114,15 +114,10 @@ class QgsComposition : QGraphicsScene
**/ **/
const QgsComposerItem* getComposerItemById( QString theId ) const; const QgsComposerItem* getComposerItemById( QString theId ) const;
/**Returns a composer item given its unique identifier. /**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 @note added in 2.0
@param theId - A QString representing the UUID of the item to retrieve. @param theUuid A QString representing the UUID of the item to
@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.
**/ **/
//const QgsComposerItem* getComposerItemByUuid( QString theUuid, bool inAllComposers = false ) const;
const QgsComposerItem* getComposerItemByUuid( QString theUuid ) const; const QgsComposerItem* getComposerItemByUuid( QString theUuid ) const;
int printResolution() const; int printResolution() const;
@ -131,6 +126,13 @@ class QgsComposition : QGraphicsScene
bool printAsRaster() const; bool printAsRaster() const;
void setPrintAsRaster( bool enabled ); 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; double selectionTolerance() const;
void setSelectionTolerance( double tol ); 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 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 addUndoCommands insert AddItem commands if true (e.g. for copy/paste)
@param pos item position. Optional, take position from xml if 0 @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 @note not available in python bindings
*/ */
/* /*
void addItemsFromXML( const QDomElement& elem, const QDomDocument& doc, QMap< QgsComposerMap*, int >* mapsToRestore = 0, 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*/ /**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*/ /**Snaps a scene coordinate point to grid*/
QPointF snapPointToGrid( const QPointF& scenePoint ) const; 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 /**Allocates new item command and saves initial state in it
@param item target item @param item target item
@param commandText descriptive command text @param commandText descriptive command text
@ -222,7 +253,8 @@ class QgsComposition : QGraphicsScene
void addMultiFrame( QgsComposerMultiFrame* multiFrame ); void addMultiFrame( QgsComposerMultiFrame* multiFrame );
/**Removes multi frame (but does not delete it)*/ /**Removes multi frame (but does not delete it)*/
void removeMultiFrame( QgsComposerMultiFrame* multiFrame ); 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 ); void addComposerArrow( QgsComposerArrow* arrow );
/**Adds label to the graphics scene and advices composer to create a widget for it (through signal)*/ /**Adds label to the graphics scene and advices composer to create a widget for it (through signal)*/
void addComposerLabel( QgsComposerLabel* label ); void addComposerLabel( QgsComposerLabel* label );

View File

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

View File

@ -13,7 +13,6 @@ class QgsDataDefined
/** /**
* Construct a new data defined object * Construct a new data defined object
* *
* @param parent The parent QWidget
* @param active Whether the current data defined is active * @param active Whether the current data defined is active
* @param useexpr Whether to use expression instead of field * @param useexpr Whether to use expression instead of field
* @param expr Expression string * @param expr Expression string
@ -35,7 +34,9 @@ class QgsDataDefined
QString expressionString() const; QString expressionString() const;
void setExpressionString( const QString& expr ); void setExpressionString( const QString& expr );
//QMap<QString, QVariant> expressionParams() const; //QMap<QString, QVariant> expressionParams() const;
//void setExpressionParams( QMap<QString, QVariant> params ); //void setExpressionParams( QMap<QString, QVariant> params );
void insertExpressionParam( QString key, QVariant param ); void insertExpressionParam( QString key, QVariant param );

View File

@ -8,9 +8,10 @@ class QgsFeatureRequest
public: public:
enum Flag enum Flag
{ {
NoGeometry = 0x01, //!< Do not fetch geometry NoFlags = 0,
SubsetOfAttributes = 0x02, //!< Fetch only a subset of attributes (setSubsetOfAttributes sets this flag) NoGeometry = 1,
ExactIntersect = 0x04 //!< Use exact geometry intersection (slower) instead of bounding boxes SubsetOfAttributes = 2,
ExactIntersect = 4
}; };
typedef QFlags<QgsFeatureRequest::Flag> Flags; typedef QFlags<QgsFeatureRequest::Flag> Flags;

View File

@ -108,6 +108,8 @@ public:
*/ */
void setComment( const QString & comment ); void setComment( const QString & comment );
/**Formats string for display*/
QString displayString( const QVariant& v ) const;
}; // class QgsField }; // class QgsField
@ -117,7 +119,6 @@ class QgsFields
%TypeHeaderCode %TypeHeaderCode
#include <qgsfield.h> #include <qgsfield.h>
%End %End
public: public:
enum FieldOrigin { OriginUnknown, OriginProvider, OriginJoin, OriginEdit }; enum FieldOrigin { OriginUnknown, OriginProvider, OriginJoin, OriginEdit };

View File

@ -82,10 +82,10 @@ class QgsGeometry
/** /**
* Returns the size of the WKB in asWkb(). * Returns the size of the WKB in asWkb().
*/ */
size_t wkbSize(); size_t wkbSize() const;
/** Returns type of wkb (point / linestring / polygon etc.) */ /** Returns type of wkb (point / linestring / polygon etc.) */
QGis::WkbType wkbType(); QGis::WkbType wkbType() const;
/** Returns type of the vector */ /** Returns type of the vector */
QGis::GeometryType type(); 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 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 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(); QgsRectangle boundingBox();
/** Test for intersection with a rectangle (uses GEOS) */ /** 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) */ /** 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) */ /** 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) /** Test for if geometry is contained in an other (uses GEOS)
* @note added in 1.5 */ * @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) /** Test for if geometry is disjoint of an other (uses GEOS)
* @note added in 1.5 */ * @note added in 1.5 */
bool disjoint( QgsGeometry* geometry ); bool disjoint( const QgsGeometry* geometry ) const;
/** Test for if geometry equals an other (uses GEOS) /** Test for if geometry equals an other (uses GEOS)
* @note added in 1.5 */ * @note added in 1.5 */
bool equals( QgsGeometry* geometry ); bool equals( const QgsGeometry* geometry ) const;
/** Test for if geometry touch an other (uses GEOS) /** Test for if geometry touch an other (uses GEOS)
* @note added in 1.5 */ * @note added in 1.5 */
bool touches( QgsGeometry* geometry ); bool touches( const QgsGeometry* geometry ) const;
/** Test for if geometry overlaps an other (uses GEOS) /** Test for if geometry overlaps an other (uses GEOS)
* @note added in 1.5 */ * @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) /** Test for if geometry is within an other (uses GEOS)
* @note added in 1.5 */ * @note added in 1.5 */
bool within( QgsGeometry* geometry ); bool within( const QgsGeometry* geometry ) const;
/** Test for if geometry crosses an other (uses GEOS) /** Test for if geometry crosses an other (uses GEOS)
* @note added in 1.5 */ * @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 /** Returns a buffer region around this geometry having the given width and with a specified number
of segments used to approximate curves */ of segments used to approximate curves */
@ -326,45 +326,44 @@ class QgsGeometry
/** Exports the geometry to mWkt /** Exports the geometry to mWkt
* @return true in case of success and false else * @return true in case of success and false else
*/ */
QString exportToWkt(); QString exportToWkt() const;
/** Exports the geometry to mGeoJSON /** Exports the geometry to mGeoJSON
* @return true in case of success and false else * @return true in case of success and false else
* @note added in 1.8 * @note added in 1.8
* @note python binding added in 1.9 * @note python binding added in 1.9
*/ */
QString exportToGeoJSON(); QString exportToGeoJSON() const;
/* Accessor functions for getting geometry data */ /* Accessor functions for getting geometry data */
/** return contents of the geometry as a point /** return contents of the geometry as a point
if wkbType is WKBPoint, otherwise returns [0,0] */ if wkbType is WKBPoint, otherwise returns [0,0] */
QgsPoint asPoint(); QgsPoint asPoint() const;
/** return contents of the geometry as a polyline /** return contents of the geometry as a polyline
if wkbType is WKBLineString, otherwise an empty list */ if wkbType is WKBLineString, otherwise an empty list */
QgsPolyline asPolyline(); QgsPolyline asPolyline() const;
/** return contents of the geometry as a polygon /** return contents of the geometry as a polygon
if wkbType is WKBPolygon, otherwise an empty list */ if wkbType is WKBPolygon, otherwise an empty list */
QgsPolygon asPolygon(); QgsPolygon asPolygon() const;
/** return contents of the geometry as a multi point /** return contents of the geometry as a multi point
if wkbType is WKBMultiPoint, otherwise an empty list */ if wkbType is WKBMultiPoint, otherwise an empty list */
QgsMultiPoint asMultiPoint(); QgsMultiPoint asMultiPoint() const;
/** return contents of the geometry as a multi linestring /** return contents of the geometry as a multi linestring
if wkbType is WKBMultiLineString, otherwise an empty list */ if wkbType is WKBMultiLineString, otherwise an empty list */
QgsMultiPolyline asMultiPolyline(); QgsMultiPolyline asMultiPolyline() const;
/** return contents of the geometry as a multi polygon /** return contents of the geometry as a multi polygon
if wkbType is WKBMultiPolygon, otherwise an empty list */ if wkbType is WKBMultiPolygon, otherwise an empty list */
QgsMultiPolygon asMultiPolygon(); QgsMultiPolygon asMultiPolygon() const;
/** return contents of the geometry as a list of geometries /** return contents of the geometry as a list of geometries
@note added in version 1.1 */ @note added in version 1.1 */
// TODO: destruction of created geometries?? QList<QgsGeometry*> asGeometryCollection() const /Factory/;
QList<QgsGeometry*> asGeometryCollection() /Factory/;
/** delete a ring in polygon or multipolygon. /** delete a ring in polygon or multipolygon.
Ring 0 is outer ring and can't be deleted. Ring 0 is outer ring and can't be deleted.

View File

@ -1,5 +1,23 @@
//typedef QMap<int, QgsField> QgsFieldMap; //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 class QgsGmlSchema: QObject
{ {
@ -9,6 +27,7 @@ class QgsGmlSchema: QObject
public: public:
QgsGmlSchema(); QgsGmlSchema();
~QgsGmlSchema(); ~QgsGmlSchema();
/** Get fields info from XSD */ /** Get fields info from XSD */
@ -22,7 +41,9 @@ class QgsGmlSchema: QObject
QStringList typeNames() const; QStringList typeNames() const;
/** Get fields for type/class name parsed from GML or XSD */
QList<QgsField> fields( const QString & typeName ); QList<QgsField> fields( const QString & typeName );
/** Get list of geometry attributes for type/class name */
QStringList geometryAttributes( const QString & typeName ); QStringList geometryAttributes( const QString & typeName );
}; };

View File

@ -70,7 +70,7 @@ class QgsLabel
void setFields( const QgsFields & fields ); void setFields( const QgsFields & fields );
//! Available vector fields //! Available vector fields
const QgsFields & fields(); QgsFields & fields();
/** Pointer to default attributes. /** Pointer to default attributes.
* @note this replaces the to-be-deprecated layerAttributes method. * @note this replaces the to-be-deprecated layerAttributes method.

View File

@ -87,6 +87,12 @@ class QgsMapLayer : QObject
void setKeywordList( const QString& kwdList ); void setKeywordList( const QString& kwdList );
const QString& keywordList() const; 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 */ /* Layer attribution information */
void setAttribution( const QString& attrib ); void setAttribution( const QString& attrib );
const QString& attribution() const; const QString& attribution() const;
@ -101,6 +107,11 @@ class QgsMapLayer : QObject
void setMetadataUrlFormat( const QString& metaUrlFormat ); void setMetadataUrlFormat( const QString& metaUrlFormat );
const QString& metadataUrlFormat() const; 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 /**Synchronises with changes in the datasource
@note added in version 1.6*/ @note added in version 1.6*/
virtual void reload(); virtual void reload();
@ -172,8 +183,8 @@ class QgsMapLayer : QObject
/** stores state in Dom node /** stores state in Dom node
@param layer_node is Dom node corresponding to ``projectlayers'' tag @param layerElement is a Dom element corresponding to ``maplayer'' tag
@param document is Dom document @param document is a the dom document being written
@note @note
The Dom node corresponds to a Dom document project file XML element to be The Dom node corresponds to a Dom document project file XML element to be
@ -198,11 +209,6 @@ class QgsMapLayer : QObject
* @note Added in v1.4 */ * @note Added in v1.4 */
void removeCustomProperty( const QString& key ); 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 * If an operation returns 0 (e.g. draw()), this function
@ -220,6 +226,12 @@ class QgsMapLayer : QObject
*/ */
virtual QString lastError(); 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 /** Returns layer's spatial reference system
@note This was introduced in QGIS 1.4 @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/ ); 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 /** Save the properties of this layer as the default style
* (either as a .qml file on disk or as a * (either as a .qml file on disk or as a
* record in the users style table in their personal qgis.db) * 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 **/ * @note This method was added in QGIS 1.4 **/
void setCacheImage( QImage * thepImage /Transfer/ ); void setCacheImage( QImage * thepImage /Transfer/ );
/* Returns the current blending mode for a layer /**
@note added in version 1.9*/ * @brief Is called when the cache image is being deleted. Overwrite and use to clean up.
const QPainter::CompositionMode blendMode() const; * @note added in 2.0
/* Sets the blending mode for a layer */
@note added in version 1.9*/ virtual void onCacheImageDelete();
void setBlendMode( const QPainter::CompositionMode blendMode );
public slots: public slots:
/** Event handler for when a coordinate transform fails due to bad vertex error */ /** Event handler for when a coordinate transform fails due to bad vertex error */
virtual void invalidTransformInput(); virtual void invalidTransformInput();
/** Accessor and mutator for the minimum scale member */ /** Accessor and mutator for the minimum scale denominator member */
void setMinimumScale( float theMinScale ); void setMinimumScale( float theMinScale );
float minimumScale(); float minimumScale();
/** Accessor and mutator for the maximum scale member */ /** Accessor and mutator for the maximum scale denominator member */
void setMaximumScale( float theMaxScale ); void setMaximumScale( float theMaxScale );
float maximumScale(); float maximumScale();
@ -419,5 +448,8 @@ class QgsMapLayer : QObject
/** debugging member - invoked when a connect() is made to this object */ /** debugging member - invoked when a connect() is made to this object */
void connectNotify( const char * signal ); void connectNotify( const char * signal );
/** Add error message */
void appendError( const QgsErrorMessage & theMessage );
/** Set error message */
void setError( const QgsError & theError );
}; };

View File

@ -22,7 +22,7 @@ class QgsMapLayerRegistry : QObject
//! Retrieve a pointer to a loaded layer by id //! Retrieve a pointer to a loaded layer by id
QgsMapLayer *mapLayer( QString theLayerId ); QgsMapLayer *mapLayer( QString theLayerId );
//! Retrieve all layers using their name //! Retrieve a pointer to a loaded layer by name
QList<QgsMapLayer *> mapLayersByName( QString layerName ); QList<QgsMapLayer *> mapLayersByName( QString layerName );
//! Retrieve the mapLayers collection (mainly intended for use by projection) //! Retrieve the mapLayers collection (mainly intended for use by projection)

View File

@ -9,14 +9,13 @@ class QgsOgcUtils
public: public:
/** static method that creates geometry from GML /** static method that creates geometry from GML
@param XML representation of the geometry. GML elements are expected to be @param xmlString xml representation of the geometry. GML elements are expected to be
in default namespace (<Point>...</Point>) or in "gml" namespace (<gml:Point>...</gml:Point>) in default namespace (\verbatim {<Point>...</Point> \endverbatim) or in
@note added in 1.9 "gml" namespace (\verbatim <gml:Point>...</gml:Point> \endverbatim)
*/ */
static QgsGeometry* geometryFromGML( const QString& xmlString ) /Factory/; static QgsGeometry* geometryFromGML( const QString& xmlString ) /Factory/;
/** static method that creates geometry from GML /** static method that creates geometry from GML
@note added in 1.9
*/ */
static QgsGeometry* geometryFromGML( const QDomNode& geometryNode ) /Factory/; static QgsGeometry* geometryFromGML( const QDomNode& geometryNode ) /Factory/;
@ -50,8 +49,10 @@ public:
/** Parse XML with OGC filter into QGIS expression */ /** Parse XML with OGC filter into QGIS expression */
static QgsExpression* expressionFromOgcFilter( const QDomElement& element ) /Factory/; 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) /** Creates OGC filter XML element. Supports minimum standard filter
@return valid <Filter> QDomElement on success, otherwise null QDomElement * 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/ ); static QDomElement expressionToOgcFilter( const QgsExpression& exp, QDomDocument& doc, QString* errorMessage /Out/ );

View File

@ -48,7 +48,7 @@ class QgsSnapper
enum SnappingMode enum SnappingMode
{ {
/**Only one snapping result is retured*/ /**Only one snapping result is returned*/
SnapWithOneResult, SnapWithOneResult,
/**Several snapping results which have the same position are returned. /**Several snapping results which have the same position are returned.
This is useful for topological editing*/ This is useful for topological editing*/

View File

@ -233,7 +233,7 @@ class QgsVectorLayer : QgsMapLayer
/** Joins another vector layer to this layer /** Joins another vector layer to this layer
@param joinInfo join object containing join layer id, target and source field @param joinInfo join object containing join layer id, target and source field
@note added in 1.7 */ @note added in 1.7 */
void addJoin( QgsVectorJoinInfo joinInfo ); void addJoin( const QgsVectorJoinInfo& joinInfo );
/** Removes a vector layer join /** Removes a vector layer join
@note added in 1.7 */ @note added in 1.7 */
@ -812,11 +812,21 @@ class QgsVectorLayer : QgsMapLayer
**/ **/
bool fieldEditable( int idx ); bool fieldEditable( int idx );
/**label widget on top
* @note added in 1.9
**/
bool labelOnTop( int idx );
/**set edit widget editable /**set edit widget editable
* @note added in 1.9 * @note added in 1.9
**/ **/
void setFieldEditable( int idx, bool editable ); 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 /**Adds a new overlay to this class. QgsVectorLayer takes ownership of the object
@note this method was added in version 1.1 @note this method was added in version 1.1
*/ */

View File

@ -1,8 +1,11 @@
/** /**
There are two possibilities how to use this class: 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(...) 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 class QgsVectorLayerImport
{ {

View File

@ -16,9 +16,11 @@ class QgsRasterPipe
UnknownRole = 0, UnknownRole = 0,
ProviderRole = 1, ProviderRole = 1,
RendererRole = 2, RendererRole = 2,
ResamplerRole = 3, BrightnessRole = 3,
ProjectorRole = 4, ResamplerRole = 4,
NullerRole = 5, ProjectorRole = 5,
NullerRole = 6,
HueSaturationRole = 7
}; };
QgsRasterPipe(); QgsRasterPipe();

View File

@ -14,12 +14,12 @@ class QgsRendererCategoryV2
~QgsRendererCategoryV2(); ~QgsRendererCategoryV2();
QVariant value() const; QVariant value() const;
QgsSymbolV2* symbol(); QgsSymbolV2* symbol() const;
QString label() const; QString label() const;
void setValue( const QVariant &value ); void setValue( const QVariant &value );
void setSymbol( QgsSymbolV2* s /Transfer/ ); void setSymbol( QgsSymbolV2* s /Transfer/ );
void setLabel( QString label ); void setLabel( const QString &label );
// debugging // debugging
QString dump(); QString dump();
@ -60,6 +60,8 @@ class QgsCategorizedSymbolRendererV2 : QgsFeatureRendererV2
virtual int capabilities(); virtual int capabilities();
virtual QgsSymbolV2List symbols(); virtual QgsSymbolV2List symbols();
//! @note added in 2.0
void updateSymbols( QgsSymbolV2 * sym );
const QgsCategoryList& categories(); const QgsCategoryList& categories();
@ -74,6 +76,12 @@ class QgsCategorizedSymbolRendererV2 : QgsFeatureRendererV2
bool deleteCategory( int catIndex ); bool deleteCategory( int catIndex );
void deleteAllCategories(); 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; QString classAttribute() const;
void setClassAttribute( QString attr ); void setClassAttribute( QString attr );

View File

@ -32,6 +32,8 @@ class QgsSimpleFillSymbolLayerV2 : QgsFillSymbolLayerV2
void toSld( QDomDocument &doc, QDomElement &element, QgsStringMap props ) const; void toSld( QDomDocument &doc, QDomElement &element, QgsStringMap props ) const;
QString ogrFeatureStyle( double mmScaleFactor, double mapUnitScaleFactor ) const;
Qt::BrushStyle brushStyle() const; Qt::BrushStyle brushStyle() const;
void setBrushStyle( Qt::BrushStyle style ); void setBrushStyle( Qt::BrushStyle style );
@ -127,6 +129,8 @@ class QgsSVGFillSymbolLayer: QgsImageFillSymbolLayer
void setOutputUnit( QgsSymbolV2::OutputUnit unit ); void setOutputUnit( QgsSymbolV2::OutputUnit unit );
QgsSymbolV2::OutputUnit outputUnit() const; QgsSymbolV2::OutputUnit outputUnit() const;
protected:
void applyDataDefinedSettings( const QgsSymbolV2RenderContext& context );
}; };
class QgsLinePatternFillSymbolLayer: QgsImageFillSymbolLayer class QgsLinePatternFillSymbolLayer: QgsImageFillSymbolLayer
@ -153,6 +157,8 @@ class QgsLinePatternFillSymbolLayer: QgsImageFillSymbolLayer
void toSld( QDomDocument &doc, QDomElement &element, QgsStringMap props ) const; void toSld( QDomDocument &doc, QDomElement &element, QgsStringMap props ) const;
QString ogrFeatureStyleWidth( double widthScaleFactor ) const;
//getters and setters //getters and setters
void setLineAngle( double a ); void setLineAngle( double a );
double lineAngle() const; double lineAngle() const;
@ -232,6 +238,9 @@ class QgsPointPatternFillSymbolLayer : QgsImageFillSymbolLayer
void setOutputUnit( QgsSymbolV2::OutputUnit unit ); void setOutputUnit( QgsSymbolV2::OutputUnit unit );
QgsSymbolV2::OutputUnit outputUnit() const; QgsSymbolV2::OutputUnit outputUnit() const;
protected:
void applyDataDefinedSettings( const QgsSymbolV2RenderContext& context );
}; };
class QgsCentroidFillSymbolLayerV2 : QgsFillSymbolLayerV2 class QgsCentroidFillSymbolLayerV2 : QgsFillSymbolLayerV2
@ -269,4 +278,7 @@ class QgsCentroidFillSymbolLayerV2 : QgsFillSymbolLayerV2
QgsSymbolV2* subSymbol(); QgsSymbolV2* subSymbol();
bool setSubSymbol( QgsSymbolV2* symbol /Transfer/ ); bool setSubSymbol( QgsSymbolV2* symbol /Transfer/ );
void setOutputUnit( QgsSymbolV2::OutputUnit unit );
QgsSymbolV2::OutputUnit outputUnit() const;
}; };

View File

@ -72,6 +72,13 @@ class QgsGraduatedSymbolRendererV2 : QgsFeatureRendererV2
void addClass( QgsSymbolV2* symbol ); void addClass( QgsSymbolV2* symbol );
void deleteClass( int idx ); 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 enum Mode
{ {

View File

@ -167,4 +167,6 @@ class QgsFeatureRendererV2
static unsigned char* _getPoint( QPointF& pt, QgsRenderContext& context, unsigned char* wkb ); 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* _getLineString( QPolygonF& pts, QgsRenderContext& context, unsigned char* wkb );
static unsigned char* _getPolygon( QPolygonF& pts, QList<QPolygonF>& holes, 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 );
}; };

View File

@ -77,6 +77,8 @@ class QgsSymbolLayerV2
virtual void toSld( QDomDocument &doc, QDomElement &element, QgsStringMap props ) const; virtual void toSld( QDomDocument &doc, QDomElement &element, QgsStringMap props ) const;
virtual QString ogrFeatureStyle( double mmScaleFactor, double mapUnitScaleFactor ) const;
virtual QgsStringMap properties() const = 0; virtual QgsStringMap properties() const = 0;
virtual void drawPreviewIcon( QgsSymbolV2RenderContext& context, QSize size ) = 0; virtual void drawPreviewIcon( QgsSymbolV2RenderContext& context, QSize size ) = 0;
@ -157,6 +159,8 @@ class QgsMarkerSymbolLayerV2 : QgsSymbolLayerV2
protected: protected:
QgsMarkerSymbolLayerV2( bool locked = false ); QgsMarkerSymbolLayerV2( bool locked = false );
void markerOffset( QgsSymbolV2RenderContext& context, double& offsetX, double& offsetY );
static QPointF _rotatedOffset( const QPointF& offset, double angle );
}; };
class QgsLineSymbolLayerV2 : QgsSymbolLayerV2 class QgsLineSymbolLayerV2 : QgsSymbolLayerV2

View File

@ -129,6 +129,16 @@ class QgsSymbolLayerV2Utils
static void labelTextToSld( QDomDocument &doc, QDomElement &element, QString label, static void labelTextToSld( QDomDocument &doc, QDomElement &element, QString label,
QFont font, QColor color = QColor(), double size = -1 ); 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 void createRotationElement( QDomDocument &doc, QDomElement &element, QString rotationFunc );
static bool rotationFromSldElement( QDomElement &element, QString &rotationFunc ); static bool rotationFromSldElement( QDomElement &element, QString &rotationFunc );

View File

@ -16,8 +16,10 @@ class QgsVectorColorRampV2
public: public:
virtual ~QgsVectorColorRampV2(); virtual ~QgsVectorColorRampV2();
// Number of defined colors
virtual int count() const = 0; virtual int count() const = 0;
// Relative value (0,1) of color at index
virtual double value( int index ) const = 0; virtual double value( int index ) const = 0;
virtual QColor color( double value ) const = 0; virtual QColor color( double value ) const = 0;
@ -62,15 +64,18 @@ class QgsVectorGradientColorRampV2 : QgsVectorColorRampV2
QColor color1() const; QColor color1() const;
QColor color2() const; QColor color2() const;
void setColor1( QColor color ); void setColor1( QColor color );
void setColor2( QColor color ); void setColor2( QColor color );
bool isDiscrete() const; bool isDiscrete() const;
void setDiscrete( bool discrete ); void setDiscrete( bool discrete );
void convertToDiscrete( bool discrete );
void setStops( const QgsGradientStopsList& stops ); void setStops( const QgsGradientStopsList& stops );
const QgsGradientStopsList& stops() const; const QgsGradientStopsList& stops() const;
QgsStringMap info() const;
void setInfo( const QgsStringMap& info );
}; };
class QgsVectorRandomColorRampV2 : QgsVectorColorRampV2 class QgsVectorRandomColorRampV2 : QgsVectorColorRampV2
@ -166,6 +171,7 @@ class QgsCptCityColorRampV2
virtual QgsVectorColorRampV2* clone() const /Factory/; virtual QgsVectorColorRampV2* clone() const /Factory/;
void copy( const QgsCptCityColorRampV2* other ); void copy( const QgsCptCityColorRampV2* other );
QgsVectorGradientColorRampV2* cloneGradientRamp() const /Factory/;
virtual QgsStringMap properties() const; virtual QgsStringMap properties() const;

View File

@ -60,4 +60,10 @@ class QgsVectorFieldSymbolLayer : QgsMarkerSymbolLayerV2
AngleOrientation angleOrientation() const; AngleOrientation angleOrientation() const;
void setAngleUnits( AngleUnits units ); void setAngleUnits( AngleUnits units );
AngleUnits angleUnits() const; AngleUnits angleUnits() const;
void setOutputUnit( QgsSymbolV2::OutputUnit unit );
QgsSymbolV2::OutputUnit outputUnit() const;
void setDistanceUnit( QgsSymbolV2::OutputUnit unit );
QgsSymbolV2::OutputUnit distanceUnit() const;
}; };

View File

@ -8,27 +8,82 @@ class QgsAttributeTableView : QTableView
QgsAttributeTableView( QWidget* parent = 0 ); QgsAttributeTableView( QWidget* parent = 0 );
virtual ~QgsAttributeTableView(); virtual ~QgsAttributeTableView();
virtual void setModel( QgsAttributeTableFilterModel* filterModel );
/** /**
* Autocreates the models * Autocreates the models
* @param layerCache The {@link QgsVectorLayerCache} to use ( as backend ) * @param layerCache The @link QgsVectorLayerCache @endlink to use ( as backend )
* @param canvas The {@link QgsMapCanvas} to use ( for the currently visible features filter ) * @param canvas The @link QgsMapCanvas @endlink to use ( for the currently visible features filter )
* *
* @deprecated * @deprecated
*/ */
void setCanvasAndLayerCache( QgsMapCanvas *canvas, QgsVectorLayerCache *layerCache ); void setCanvasAndLayerCache( QgsMapCanvas *canvas, QgsVectorLayerCache *layerCache );
protected: 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 * Saves geometry to the settings on close
* @param event not used * @param event not used
*/ */
void closeEvent( QCloseEvent *event ); void closeEvent( QCloseEvent *event );
void contextMenuEvent( QContextMenuEvent* );
signals: 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 willShowContextMenu( QMenu* menu, QModelIndex atIndex );
void finished(); 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 );
}; };

View File

@ -484,6 +484,7 @@ class QgisInterface : QObject
virtual QDialog* getFeatureForm( QgsVectorLayer *l, QgsFeature &f ) = 0; 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 /** Return vector layers in edit mode
* @param modified whether to return only layers that have been modified * @param modified whether to return only layers that have been modified
* @returns list of layers in legend order, or empty list * @returns list of layers in legend order, or empty list

View File

@ -8,11 +8,34 @@ class QgsAttributeEditor : QObject
public: public:
QgsAttributeEditor( QObject *parent ); 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 retrieveValue( QWidget *widget, QgsVectorLayer *vl, int idx, QVariant &value );
static bool setValue( QWidget *widget, QgsVectorLayer *vl, int idx, const QVariant &value ); static bool setValue( QWidget *widget, QgsVectorLayer *vl, int idx, const QVariant &value );
public slots: public slots:
void selectFileName(); void selectFileName();
void selectDate(); 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 );
}; };

View File

@ -60,6 +60,12 @@ class QgsComposerView: QGraphicsView
void setPaintingEnabled( bool enabled ); void setPaintingEnabled( bool enabled );
bool paintingEnabled() const; bool paintingEnabled() const;
/**Update rulers with current scene rect*/
void updateRulers();
void setHorizontalRuler( QgsComposerRuler* r );
void setVerticalRuler( QgsComposerRuler* r );
protected: protected:
void mousePressEvent( QMouseEvent* ); void mousePressEvent( QMouseEvent* );
void mouseReleaseEvent( QMouseEvent* ); void mouseReleaseEvent( QMouseEvent* );
@ -75,6 +81,8 @@ class QgsComposerView: QGraphicsView
void hideEvent( QHideEvent* e ); void hideEvent( QHideEvent* e );
void showEvent( QShowEvent* e ); void showEvent( QShowEvent* e );
void resizeEvent( QResizeEvent* event );
void scrollContentsBy( int dx, int dy );
signals: signals:
/**Is emitted when selected item changed. If 0, no item is selected*/ /**Is emitted when selected item changed. If 0, no item is selected*/
void selectedItemChanged( QgsComposerItem* selected ); void selectedItemChanged( QgsComposerItem* selected );

View File

@ -24,8 +24,10 @@ class QgsExpressionBuilderDialog : QDialog
protected: protected:
/** /**
* Handle closing of the window * Is called when the dialog get accepted or rejected
* @param event unused * Used to save geometry
*
* @param r result value (unused)
*/ */
void closeEvent( QCloseEvent * event ); virtual void done( int r );
}; };

View File

@ -10,6 +10,10 @@ class QgsFilterLineEdit : QLineEdit
public: public:
QgsFilterLineEdit( QWidget* parent = 0 ); QgsFilterLineEdit( QWidget* parent = 0 );
signals:
void cleared();
protected: protected:
void resizeEvent( QResizeEvent * ); void resizeEvent( QResizeEvent * );
void changeEvent( QEvent * );
}; };

View File

@ -17,7 +17,8 @@ class QgsManageConnectionsDialog : QDialog
PostGIS, PostGIS,
WFS, WFS,
MSSQL, MSSQL,
WCS WCS,
Oracle,
}; };
// constructor // constructor

View File

@ -6,22 +6,22 @@ class QgsMapToolIdentify : QgsMapTool
%End %End
public: public:
enum IdentifyMode enum IdentifyMode
{ {
DefaultQgsSetting = -1, DefaultQgsSetting = -1,
ActiveLayer, ActiveLayer,
TopDownStopAtFirst, TopDownStopAtFirst,
TopDownAll, TopDownAll
}; };
enum LayerType enum LayerType
{ {
AllLayers = -1, AllLayers = -1,
VectorLayer, VectorLayer,
RasterLayer, RasterLayer
}; };
struct IdentifyResult struct IdentifyResult
{ {
IdentifyResult(); IdentifyResult();
@ -38,11 +38,14 @@ class QgsMapToolIdentify : QgsMapTool
QgsFeature mFeature; QgsFeature mFeature;
QMap< QString, QString > mAttributes; QMap< QString, QString > mAttributes;
QMap< QString, QString > mDerivedAttributes; QMap< QString, QString > mDerivedAttributes;
QMap< QString, QVariant > mParams;
}; };
//! constructor //! constructor
QgsMapToolIdentify( QgsMapCanvas * canvas ); QgsMapToolIdentify( QgsMapCanvas * canvas );
virtual ~QgsMapToolIdentify();
//! Overridden mouse move event //! Overridden mouse move event
virtual void canvasMoveEvent( QMouseEvent * e ); virtual void canvasMoveEvent( QMouseEvent * e );
@ -56,8 +59,6 @@ class QgsMapToolIdentify : QgsMapTool
virtual void deactivate(); virtual void deactivate();
//QgsMapLayer::LayerType LayerType;
/** Performs the identification. /** Performs the identification.
@param x x coordinates of mouseEvent @param x x coordinates of mouseEvent
@param y y coordinates of mouseEvent @param y y coordinates of mouseEvent
@ -76,14 +77,11 @@ class QgsMapToolIdentify : QgsMapTool
@return a list of IdentifyResult*/ @return a list of IdentifyResult*/
QList<QgsMapToolIdentify::IdentifyResult> identify(int x, int y, IdentifyMode mode, LayerType layerType = AllLayers); QList<QgsMapToolIdentify::IdentifyResult> identify(int x, int y, IdentifyMode mode, LayerType layerType = AllLayers);
public slots:
void formatChanged( QgsRasterLayer *layer );
signals: signals:
void identifyProgress( int, int ); void identifyProgress( int, int );
void identifyMessage( QString ); void identifyMessage( QString );
void changedRasterResults( QList<QgsMapToolIdentify::IdentifyResult>& );
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();
}; };

View File

@ -4,6 +4,7 @@ class QgsSublayersDialog : QDialog
#include <qgssublayersdialog.h> #include <qgssublayersdialog.h>
%End %End
public: public:
enum ProviderType enum ProviderType
{ {
Ogr, Ogr,
@ -15,6 +16,8 @@ class QgsSublayersDialog : QDialog
~QgsSublayersDialog(); ~QgsSublayersDialog();
void populateLayerTable( QStringList theList, QString delim = ":" ); 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(); QStringList selectionNames();
QList<int> selectionIndexes(); QList<int> selectionIndexes();

View File

@ -11,6 +11,9 @@ class QgsRasterMinMaxWidget: QWidget
void setBands( const QList<int> & theBands ); void setBands( const QList<int> & theBands );
// Load programmaticaly with current values
void load();
signals: signals:
void load( int theBandNo, double theMin, double theMax, int origin ); void load( int theBandNo, double theMin, double theMax, int origin );
}; };

View File

@ -5,6 +5,12 @@ class QgsSingleBandPseudoColorRendererWidget : QgsRasterRendererWidget
%End %End
public: public:
enum Mode
{
Continuous = 1, // Using breaks from color palette
EqualInterval = 2
};
QgsSingleBandPseudoColorRendererWidget( QgsRasterLayer* layer, const QgsRectangle &extent = QgsRectangle() ); QgsSingleBandPseudoColorRendererWidget( QgsRasterLayer* layer, const QgsRectangle &extent = QgsRectangle() );
~QgsSingleBandPseudoColorRendererWidget(); ~QgsSingleBandPseudoColorRendererWidget();

View File

@ -10,6 +10,8 @@ class QgsCptCityColorRampV2Dialog : QDialog
QString selectedName() const; QString selectedName() const;
bool saveAsGradientRamp() const;
public slots: public slots:
void populateVariants(); void populateVariants();
@ -19,7 +21,7 @@ class QgsCptCityColorRampV2Dialog : QDialog
void on_pbtnLicenseDetails_pressed(); void on_pbtnLicenseDetails_pressed();
void on_cboVariantName_currentIndexChanged( int index ); void on_cboVariantName_currentIndexChanged( int index );
void onFinished(); void onFinished();
void on_buttonBox_helpRequested();
/* void refresh(); */ /* void refresh(); */
protected: protected:

View File

@ -39,7 +39,10 @@ class QgsSimpleLineSymbolLayerV2Widget : QgsSymbolLayerV2Widget
void offsetChanged(); void offsetChanged();
void on_mCustomCheckBox_stateChanged( int state ); void on_mCustomCheckBox_stateChanged( int state );
void on_mChangePatternButton_clicked(); 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: protected:
//creates a new icon for the 'change pattern' button //creates a new icon for the 'change pattern' button
@ -70,6 +73,11 @@ class QgsSimpleMarkerSymbolLayerV2Widget : QgsSymbolLayerV2Widget
void setSize(); void setSize();
void setAngle(); void setAngle();
void setOffset(); 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 borderWidthChanged();
void borderStyleChanged(); void borderStyleChanged();
void offsetChanged(); 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 setRotate();
void setOffset(); void setOffset();
void setPlacement(); 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 setOffset();
void on_mFileToolButton_clicked(); void on_mFileToolButton_clicked();
void on_mFileLineEdit_textEdited( const QString& text ); void on_mFileLineEdit_textEdited( const QString& text );
void on_mFileLineEdit_editingFinished();
void on_mChangeColorButton_colorChanged( const QColor& color ); void on_mChangeColorButton_colorChanged( const QColor& color );
void on_mChangeBorderColorButton_colorChanged( const QColor& color ); void on_mChangeBorderColorButton_colorChanged( const QColor& color );
void on_mBorderWidthSpinBox_valueChanged( double d ); 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: protected:
@ -182,6 +201,7 @@ class QgsLineDecorationSymbolLayerV2Widget : QgsSymbolLayerV2Widget
public slots: public slots:
void colorChanged( const QColor& color ); void colorChanged( const QColor& color );
void penWidthChanged(); void penWidthChanged();
void on_mWidthUnitComboBox_currentIndexChanged( int index );
}; };
////////// //////////
@ -200,6 +220,10 @@ class QgsSVGFillSymbolLayerWidget : QgsSymbolLayerV2Widget
// from base class // from base class
virtual void setSymbolLayer( QgsSymbolLayerV2* layer ); virtual void setSymbolLayer( QgsSymbolLayerV2* layer );
virtual QgsSymbolLayerV2* symbolLayer(); virtual QgsSymbolLayerV2* symbolLayer();
protected:
void insertIcons();
void updateParamGui();
}; };
////////// //////////
@ -257,6 +281,8 @@ class QgsFontMarkerSymbolLayerV2Widget : QgsSymbolLayerV2Widget
void setAngle( double angle ); void setAngle( double angle );
void setCharacter( const QChar& chr ); void setCharacter( const QChar& chr );
void setOffset(); void setOffset();
void on_mSizeUnitComboBox_currentIndexChanged( int index );
void on_mOffsetUnitComboBox_currentIndexChanged( int index );
}; };
////////// //////////

View File

@ -49,59 +49,11 @@ class ANALYSIS_EXPORT QgsOverlayAnalyzer
const QString& shapefileName, bool onlySelectedFeatures = false, const QString& shapefileName, bool onlySelectedFeatures = false,
QProgressDialog* p = 0 ); 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: private:
void combineFieldLists( QgsFields& fieldListA, const QgsFields& fieldListB ); void combineFieldLists( QgsFields& fieldListA, const QgsFields& fieldListB );
void intersectFeature( QgsFeature& f, QgsVectorFileWriter* vfw, QgsVectorLayer* dp, QgsSpatialIndex* index ); void intersectFeature( QgsFeature& f, QgsVectorFileWriter* vfw, QgsVectorLayer* dp, QgsSpatialIndex* index );
void combineAttributeMaps( QgsAttributes& attributesA, const QgsAttributes& attributesB ); void combineAttributeMaps( QgsAttributes& attributesA, const QgsAttributes& attributesB );
}; };
#endif //QGSVECTORANALYZER #endif //QGSVECTORANALYZER

View File

@ -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*/ /**Paints the legend and calculates its size. If painter is 0, only size is calculated*/
QSizeF paintAndDetermineSize( QPainter* painter ); QSizeF paintAndDetermineSize( QPainter* painter );
/**Sets item box to the whole content*/ /**Sets item box to the whole content*/
void adjustBoxSize(); void adjustBoxSize();

View File

@ -282,7 +282,9 @@ class CORE_EXPORT QgsComposition: public QGraphicsScene
QGraphicsLineItem* addSnapLine(); QGraphicsLineItem* addSnapLine();
/**Remove custom snap line (and delete the object)*/ /**Remove custom snap line (and delete the object)*/
void removeSnapLine( QGraphicsLineItem* line ); 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 ); QGraphicsLineItem* nearestSnapLine( bool horizontal, double x, double y, double tolerance, QList< QPair< QgsComposerItem*, QgsComposerItem::ItemPositionMode > >& snappedItems );
/**Hides / shows custom snap lines*/ /**Hides / shows custom snap lines*/
void setSnapLinesVisible( bool visible ); void setSnapLinesVisible( bool visible );

View File

@ -56,7 +56,9 @@ class CORE_EXPORT QgsDataDefined
QString expressionString() const { return mExpressionString; } QString expressionString() const { return mExpressionString; }
void setExpressionString( const QString& expr ) { mExpressionString = expr; } void setExpressionString( const QString& expr ) { mExpressionString = expr; }
// @note not available in python bindings
QMap<QString, QVariant> expressionParams() const { return mExpressionParams; } QMap<QString, QVariant> expressionParams() const { return mExpressionParams; }
// @note not available in python bindings
void setExpressionParams( QMap<QString, QVariant> params ) { mExpressionParams = params; } void setExpressionParams( QMap<QString, QVariant> params ) { mExpressionParams = params; }
void insertExpressionParam( QString key, QVariant param ); void insertExpressionParam( QString key, QVariant param );
@ -69,6 +71,7 @@ class CORE_EXPORT QgsDataDefined
QString field() const { return mField; } QString field() const { return mField; }
void setField( const QString& field ) { mField = field; } void setField( const QString& field ) { mField = field; }
// @note not available in python bindings
QMap< QString, QString > toMap(); QMap< QString, QString > toMap();
private: private:

View File

@ -91,9 +91,6 @@ class CORE_EXPORT QgsGmlSchema: public QObject
/** Get list of dot separated paths to feature classes parsed from GML or XSD */ /** Get list of dot separated paths to feature classes parsed from GML or XSD */
QStringList typeNames() const; 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 */ /** Get fields for type/class name parsed from GML or XSD */
QList<QgsField> fields( const QString & typeName ); QList<QgsField> fields( const QString & typeName );

View File

@ -221,13 +221,6 @@ class CORE_EXPORT QgsMapLayer : public QObject
* @note Added in v1.4 */ * @note Added in v1.4 */
void removeCustomProperty( const QString& key ); 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 * 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. * @brief Is called when the cache image is being deleted. Overwrite and use to clean up.
* @note added in 2.0 * @note added in 2.0
*/ */
virtual void onCacheImageDelete() {}; virtual void onCacheImageDelete() {}
public slots: public slots:

View File

@ -35,7 +35,6 @@ class CORE_EXPORT QgsRendererCategoryV2
//! copy constructor //! copy constructor
QgsRendererCategoryV2( const QgsRendererCategoryV2& cat ); QgsRendererCategoryV2( const QgsRendererCategoryV2& cat );
~QgsRendererCategoryV2(); ~QgsRendererCategoryV2();
QgsRendererCategoryV2& operator=( const QgsRendererCategoryV2& cat ); QgsRendererCategoryV2& operator=( const QgsRendererCategoryV2& cat );