mirror of
https://github.com/qgis/QGIS.git
synced 2025-12-15 00:07:25 -05:00
sip sync
This commit is contained in:
parent
c94b9f361a
commit
9ceb5ceab6
@ -17,7 +17,7 @@ class QgsGeometryAnalyzer
|
||||
@param tolerance (level of simplification)
|
||||
@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 simplify( QgsVectorLayer* layer, const QString& shapefileName, double tolerance,
|
||||
bool onlySelectedFeatures = false, QProgressDialog* p = 0 );
|
||||
|
||||
@ -27,7 +27,7 @@ class QgsGeometryAnalyzer
|
||||
@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 centroids( QgsVectorLayer* layer, const QString& shapefileName,
|
||||
bool onlySelectedFeatures = false, QProgressDialog* p = 0 );
|
||||
|
||||
@ -36,7 +36,7 @@ class QgsGeometryAnalyzer
|
||||
@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 extent( QgsVectorLayer* layer, const QString& shapefileName, bool onlySelectedFeatures = false, QProgressDialog* p = 0 );
|
||||
|
||||
/**Create buffers for a vector layer and write it to a new shape file
|
||||
@ -47,7 +47,7 @@ class QgsGeometryAnalyzer
|
||||
@param dissolve if true, merge all the buffers to a big multipolygon
|
||||
@param bufferDistanceField index of the attribute field that contains the buffer distance (or -1 if all features have the same buffer distance)
|
||||
@param p progress dialog (or 0 if no progress dialog is to be shown)
|
||||
@note: added in version 1.3*/
|
||||
*/
|
||||
bool buffer( QgsVectorLayer* layer, const QString& shapefileName, double bufferDistance,
|
||||
bool onlySelectedFeatures = false, bool dissolve = false, int bufferDistanceField = -1, QProgressDialog* p = 0 );
|
||||
|
||||
@ -58,7 +58,7 @@ class QgsGeometryAnalyzer
|
||||
@param uniqueIdField index of the attribute field that contains the unique convex hull id (or -1 if
|
||||
all features have the same buffer distance)
|
||||
@param p progress dialog (or 0 if no progress dialog is to be shown)
|
||||
@note: added in version 1.4*/
|
||||
*/
|
||||
bool convexHull( QgsVectorLayer* layer, const QString& shapefileName, bool onlySelectedFeatures = false,
|
||||
int uniqueIdField = -1, QProgressDialog* p = 0 );
|
||||
|
||||
@ -69,7 +69,7 @@ class QgsGeometryAnalyzer
|
||||
@param uniqueIdField index of the attribute field that contains the unique id to dissolve on (or -1 if
|
||||
all features should be dissolved together)
|
||||
@param p progress dialog (or 0 if no progress dialog is to be shown)
|
||||
@note: added in version 1.4*/
|
||||
*/
|
||||
bool dissolve( QgsVectorLayer* layer, const QString& shapefileName, bool onlySelectedFeatures = false,
|
||||
int uniqueIdField = -1, QProgressDialog* p = 0 );
|
||||
|
||||
|
||||
@ -17,7 +17,7 @@ class QgsOverlayAnalyzer
|
||||
@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 intersection( QgsVectorLayer* layerA, QgsVectorLayer* layerB,
|
||||
const QString& shapefileName, bool onlySelectedFeatures = false,
|
||||
QProgressDialog* p = 0 );
|
||||
|
||||
@ -26,9 +26,7 @@ class QgsComposerArrow: QgsComposerItem
|
||||
|
||||
~QgsComposerArrow();
|
||||
|
||||
/**Return composer item type.
|
||||
* @note added in QGIS 1.7
|
||||
*/
|
||||
/** Return composer item type. */
|
||||
virtual int type() const;
|
||||
|
||||
/** \brief Reimplementation of QCanvasItem::paint - draw on canvas */
|
||||
|
||||
@ -99,7 +99,7 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
|
||||
ComposerLabel,
|
||||
ComposerLegend,
|
||||
ComposerMap,
|
||||
ComposerPaper, // QgsPaperItem
|
||||
ComposerPaper, // QgsPaperItem
|
||||
ComposerPicture,
|
||||
ComposerScaleBar,
|
||||
ComposerShape,
|
||||
@ -137,6 +137,8 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
|
||||
LowerRight
|
||||
};
|
||||
|
||||
//note - must sync with QgsMapCanvas::WheelAction.
|
||||
//TODO - QGIS 3.0 move QgsMapCanvas::WheelAction from GUI->CORE and remove this enum
|
||||
/** Modes for zooming item content
|
||||
*/
|
||||
enum ZoomMode
|
||||
@ -161,7 +163,7 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
|
||||
QgsComposerItem( qreal x, qreal y, qreal width, qreal height, QgsComposition* composition /TransferThis/, bool manageZValue = true );
|
||||
virtual ~QgsComposerItem();
|
||||
|
||||
/** return correct graphics item type. Added in v1.7 */
|
||||
/** return correct graphics item type. */
|
||||
virtual int type() const;
|
||||
|
||||
/**Returns whether this item has been removed from the composition. Items removed
|
||||
@ -239,7 +241,7 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
|
||||
void updatePagePos( double newPageWidth, double newPageHeight );
|
||||
|
||||
/**Moves the item to a new position (in canvas coordinates)*/
|
||||
void setItemPosition( double x, double y, ItemPositionMode itemPoint = UpperLeft );
|
||||
void setItemPosition( double x, double y, ItemPositionMode itemPoint = UpperLeft, int page = -1 );
|
||||
|
||||
/**Sets item position and width / height in one go
|
||||
@param x item position x
|
||||
@ -248,13 +250,12 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
|
||||
@param height item height
|
||||
@param itemPoint item position mode
|
||||
@param posIncludesFrame set to true if the position and size arguments include the item's frame border
|
||||
|
||||
@note: this method was added in version 1.6*/
|
||||
void setItemPosition( double x, double y, double width, double height, ItemPositionMode itemPoint = UpperLeft, bool posIncludesFrame = false );
|
||||
@param page if page > 0, y is interpreted as relative to the origin of the specified page, if page <= 0, y is in absolute canvas coordinates
|
||||
*/
|
||||
void setItemPosition( double x, double y, double width, double height, ItemPositionMode itemPoint = UpperLeft, bool posIncludesFrame = false, int page = -1 );
|
||||
|
||||
/**Returns item's last used position mode.
|
||||
@note: This property has no effect on actual's item position, which is always the top-left corner.
|
||||
@note: this method was added in version 2.0*/
|
||||
@note: This property has no effect on actual's item position, which is always the top-left corner. */
|
||||
ItemPositionMode lastUsedPositionMode();
|
||||
|
||||
/**Sets this items bound in scene coordinates such that 1 item size units
|
||||
@ -269,7 +270,6 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
|
||||
|
||||
/**Whether this item has a frame or not.
|
||||
* @returns true if there is a frame around this item, otherwise false.
|
||||
* @note introduced since 1.8
|
||||
* @see setFrameEnabled
|
||||
* @see frameOutlineWidth
|
||||
* @see frameJoinStyle
|
||||
@ -279,7 +279,6 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
|
||||
|
||||
/**Set whether this item has a frame drawn around it or not.
|
||||
* @param drawFrame draw frame
|
||||
* @note introduced in 1.8
|
||||
* @see hasFrame
|
||||
* @see setFrameOutlineWidth
|
||||
* @see setFrameJoinStyle
|
||||
@ -368,7 +367,6 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
|
||||
|
||||
/**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 setBackgroundEnabled
|
||||
* @see backgroundColor
|
||||
*/
|
||||
@ -377,7 +375,6 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
|
||||
/**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
|
||||
* @see setBackgroundColor
|
||||
*/
|
||||
@ -385,7 +382,6 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
|
||||
|
||||
/**Gets the background color for this item
|
||||
* @returns background color
|
||||
* @note introduced in 2.0
|
||||
* @see setBackgroundColor
|
||||
* @see hasBackground
|
||||
*/
|
||||
@ -394,7 +390,6 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
|
||||
/**Sets the background color for this item
|
||||
* @param backgroundColor new background color
|
||||
* @returns nothing
|
||||
* @note introduced in 2.0
|
||||
* @see backgroundColor
|
||||
* @see setBackgroundEnabled
|
||||
*/
|
||||
@ -426,7 +421,6 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
|
||||
|
||||
/**Returns whether effects (eg blend modes) are enabled for the item
|
||||
* @returns true if effects are enabled
|
||||
* @note introduced in 2.0
|
||||
* @see setEffectsEnabled
|
||||
* @see transparency
|
||||
* @see blendMode
|
||||
@ -435,7 +429,6 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
|
||||
|
||||
/**Sets whether effects (eg blend modes) are enabled for the item
|
||||
* @param effectsEnabled set to true to enable effects
|
||||
* @note introduced in 2.0
|
||||
* @see effectsEnabled
|
||||
* @see setTransparency
|
||||
* @see setBlendMode
|
||||
@ -485,7 +478,6 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
|
||||
double textWidthMillimeters( const QFont& font, const QString& text ) const /Deprecated/;
|
||||
|
||||
/**Returns the font height of a character in millimeters
|
||||
* @note this method was added in version 1.7
|
||||
* @deprecated use QgsComposerUtils::fontHeightCharacterMM instead
|
||||
*/
|
||||
double fontHeightCharacterMM( const QFont& font, const QChar& c ) const /Deprecated/;
|
||||
@ -519,14 +511,12 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
|
||||
|
||||
/**Locks / unlocks the item position for mouse drags
|
||||
* @param lock set to true to prevent item movement and resizing via the mouse
|
||||
* @note this method was added in version 1.2
|
||||
* @see positionLock
|
||||
*/
|
||||
void setPositionLock( const bool lock );
|
||||
|
||||
/**Returns whether position lock for mouse drags is enabled
|
||||
* returns true if item is locked for mouse movement and resizing
|
||||
* @note this method was added in version 1.2
|
||||
* @see setPositionLock
|
||||
*/
|
||||
bool positionLock() const;
|
||||
@ -552,21 +542,18 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
|
||||
|
||||
/**Get item's id (which is not necessarly unique)
|
||||
* @returns item id
|
||||
* @note this method was added in version 1.7
|
||||
* @see setId
|
||||
*/
|
||||
QString id() const;
|
||||
|
||||
/**Set item's id (which is not necessarly unique)
|
||||
* @param id new id for item
|
||||
* @note this method was added in version 1.7
|
||||
* @see id
|
||||
*/
|
||||
void setId( const QString& id );
|
||||
|
||||
/**Get item identification name
|
||||
* @returns unique item identification string
|
||||
* @note this method was added in version 2.0
|
||||
* @note there is not setter since one can't manually set the id
|
||||
* @see id
|
||||
* @see setId
|
||||
@ -662,7 +649,6 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
|
||||
*/
|
||||
virtual void refreshDataDefinedProperty( const QgsComposerObject::DataDefinedProperty property = QgsComposerObject::AllProperties );
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
//event handlers
|
||||
@ -683,7 +669,9 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
|
||||
/**Draw background*/
|
||||
virtual void drawBackground( QPainter* p );
|
||||
|
||||
/**Draws arrowhead*/
|
||||
/**Draws arrowhead
|
||||
* @deprecated use QgsComposerUtils::drawArrowHead instead
|
||||
*/
|
||||
void drawArrowHead( QPainter* p, double x, double y, double angle, double arrowHeadWidth ) const;
|
||||
|
||||
/**Returns angle of the line from p1 to p2 (clockwise, starting at N)*/
|
||||
@ -694,14 +682,13 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
|
||||
double rectHandlerBorderTolerance() const;
|
||||
|
||||
/**Returns the size of the lock symbol depending on the composer zoom level and the item size
|
||||
* @note: this function was introduced in version 1.2
|
||||
* @deprecated will be removed in QGIS 3.0
|
||||
*/
|
||||
double lockSymbolSize() const /Deprecated/;
|
||||
|
||||
/**Returns the zoom factor of the graphics view.
|
||||
@return the factor or -1 in case of error (e.g. graphic view does not exist)
|
||||
@note: this function was introduced in version 1.2*/
|
||||
*/
|
||||
double horizontalViewScaleFactor() const;
|
||||
|
||||
//some utility functions
|
||||
@ -732,16 +719,16 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
|
||||
|
||||
/**Calculates corner point after rotation and scaling
|
||||
* @deprecated will be removed in QGIS 3.0
|
||||
*/
|
||||
*/
|
||||
bool cornerPointOnRotatedAndScaledRect( double& x, double& y, double width, double height ) const /Deprecated/;
|
||||
|
||||
/**Calculates corner point after rotation and scaling
|
||||
/**Calculates width / height of the bounding box of a rotated rectangle
|
||||
* @deprecated will be removed in QGIS 3.0
|
||||
*/
|
||||
void sizeChangedByRotation( double& width, double& height, double rotation ) /Deprecated/;
|
||||
|
||||
/**Calculates width / height of the bounding box of a rotated rectangle
|
||||
* @deprecated will be removed in QGIS 3.0
|
||||
* @deprecated will be removed in QGIS 3.0
|
||||
*/
|
||||
void sizeChangedByRotation( double& width, double& height ) /Deprecated/;
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ class QgsComposerLabel : QgsComposerItem
|
||||
QgsComposerLabel( QgsComposition *composition /TransferThis/);
|
||||
~QgsComposerLabel();
|
||||
|
||||
/** return correct graphics item type. Added in v1.7 */
|
||||
/** return correct graphics item type. */
|
||||
virtual int type() const;
|
||||
|
||||
/** \brief Reimplementation of QCanvasItem::paint*/
|
||||
@ -25,8 +25,7 @@ class QgsComposerLabel : QgsComposerItem
|
||||
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*/
|
||||
/**Returns the text as it appears on screen (with replaced data field) */
|
||||
QString displayText() const;
|
||||
|
||||
/** Sets the current feature, the current layer and a list of local variable substitutions for evaluating expressions */
|
||||
@ -101,11 +100,9 @@ class QgsComposerLabel : QgsComposerItem
|
||||
*/
|
||||
void setMarginY( const double margin );
|
||||
|
||||
/**Sets text color
|
||||
@note: this function was added in version 1.4*/
|
||||
/**Sets text color */
|
||||
void setFontColor( const QColor& c );
|
||||
/**Get font color
|
||||
@note: this function was added in version 1.4*/
|
||||
/**Get font color */
|
||||
QColor fontColor() const;
|
||||
|
||||
/** stores state in Dom element
|
||||
@ -137,11 +134,5 @@ class QgsComposerLabel : QgsComposerItem
|
||||
virtual void setFrameOutlineWidth( const double outlineWidth );
|
||||
|
||||
public slots:
|
||||
/* Sets rotation for the label
|
||||
* @deprecated Use setItemRotation( double rotation ) instead
|
||||
*/
|
||||
virtual void setRotation( double r );
|
||||
|
||||
/* Sets rotation for the label */
|
||||
virtual void setItemRotation( double r );
|
||||
void refreshExpressionContext();
|
||||
};
|
||||
|
||||
@ -27,6 +27,8 @@ class QgsComposerMap : QgsComposerItem
|
||||
Rectangle // Display only rectangle
|
||||
};
|
||||
|
||||
//grid enums are moved to QgsComposerMapGrid
|
||||
//TODO - remove for QGIS 3.0
|
||||
enum GridStyle
|
||||
{
|
||||
Solid, //solid lines
|
||||
@ -177,7 +179,9 @@ class QgsComposerMap : QgsComposerItem
|
||||
*/
|
||||
void setNewAtlasFeatureExtent( const QgsRectangle& extent );
|
||||
|
||||
/**Called when atlas preview is toggled, to force map item to update its extent and redraw*/
|
||||
/**Called when atlas preview is toggled, to force map item to update its extent and redraw
|
||||
* @deprecated no longer required
|
||||
*/
|
||||
void toggleAtlasPreview();
|
||||
|
||||
/**Returns a pointer to the current map extent, which is either the original user specified
|
||||
@ -186,23 +190,20 @@ class QgsComposerMap : QgsComposerItem
|
||||
* @returns pointer to current map extent
|
||||
* @see visibleExtentPolygon
|
||||
*/
|
||||
// QgsRectangle* currentMapExtent();
|
||||
const QgsRectangle* currentMapExtent() const;
|
||||
|
||||
PreviewMode previewMode() const;
|
||||
void setPreviewMode( PreviewMode m );
|
||||
|
||||
/**Getter for flag that determines if the stored layer set should be used or the current layer set of the qgis mapcanvas
|
||||
@note this function was added in version 1.2*/
|
||||
/**Getter for flag that determines if the stored layer set should be used or the current layer set of the qgis mapcanvas */
|
||||
bool keepLayerSet() const;
|
||||
/**Setter for flag that determines if the stored layer set should be used or the current layer set of the qgis mapcanvas
|
||||
@note this function was added in version 1.2*/
|
||||
/**Setter for flag that determines if the stored layer set should be used or the current layer set of the qgis mapcanvas */
|
||||
void setKeepLayerSet( bool enabled );
|
||||
|
||||
/**Getter for stored layer set that is used if mKeepLayerSet is true
|
||||
@note this function was added in version 1.2*/
|
||||
/**Getter for stored layer set that is used if mKeepLayerSet is true */
|
||||
QStringList layerSet() const;
|
||||
/**Setter for stored layer set that is used if mKeepLayerSet is true
|
||||
@note this function was added in version 1.2*/
|
||||
/**Setter for stored layer set that is used if mKeepLayerSet is true */
|
||||
void setLayerSet( const QStringList& layerSet );
|
||||
/**Stores the current layer set of the qgis mapcanvas in mLayerSet*/
|
||||
void storeCurrentLayerSet();
|
||||
@ -237,7 +238,6 @@ class QgsComposerMap : QgsComposerItem
|
||||
bool readXML( const QDomElement& itemElem, const QDomDocument& doc );
|
||||
|
||||
/**Enables a coordinate grid that is shown on top of this composermap.
|
||||
* @note this function was added in version 1.4
|
||||
* @deprecated use grid()->setEnabled() or grids() instead
|
||||
*/
|
||||
void setGridEnabled( bool enabled ) /Deprecated/;
|
||||
@ -248,7 +248,6 @@ class QgsComposerMap : QgsComposerItem
|
||||
bool gridEnabled() const /Deprecated/;
|
||||
|
||||
/**Sets coordinate grid style to solid or cross
|
||||
* @note this function was added in version 1.4
|
||||
* @deprecated use grid()->setStyle() or grids() instead
|
||||
*/
|
||||
void setGridStyle( GridStyle style ) /Deprecated/;
|
||||
@ -259,7 +258,6 @@ class QgsComposerMap : QgsComposerItem
|
||||
GridStyle gridStyle() const /Deprecated/;
|
||||
|
||||
/**Sets coordinate interval in x-direction for composergrid.
|
||||
* @note this function was added in version 1.4
|
||||
* @deprecated use grid()->setIntervalX() or grids() instead
|
||||
*/
|
||||
void setGridIntervalX( double interval ) /Deprecated/;
|
||||
@ -270,7 +268,6 @@ class QgsComposerMap : QgsComposerItem
|
||||
double gridIntervalX() const /Deprecated/;
|
||||
|
||||
/**Sets coordinate interval in y-direction for composergrid.
|
||||
* @note this function was added in version 1.4
|
||||
* @deprecated use grid()->setIntervalY() or grids() instead
|
||||
*/
|
||||
void setGridIntervalY( double interval ) /Deprecated/;
|
||||
@ -281,7 +278,6 @@ class QgsComposerMap : QgsComposerItem
|
||||
double gridIntervalY() const /Deprecated/;
|
||||
|
||||
/**Sets x-coordinate offset for composer grid
|
||||
* @note this function was added in version 1.4
|
||||
* @deprecated use grid()->setOffsetX() or grids() instead
|
||||
*/
|
||||
void setGridOffsetX( double offset ) /Deprecated/;
|
||||
@ -292,7 +288,6 @@ class QgsComposerMap : QgsComposerItem
|
||||
double gridOffsetX() const /Deprecated/;
|
||||
|
||||
/**Sets y-coordinate offset for composer grid
|
||||
* @note this function was added in version 1.4
|
||||
* @deprecated use grid()->setOffsetY() or grids() instead
|
||||
*/
|
||||
void setGridOffsetY( double offset ) /Deprecated/;
|
||||
@ -303,7 +298,6 @@ class QgsComposerMap : QgsComposerItem
|
||||
double gridOffsetY() const /Deprecated/;
|
||||
|
||||
/**Sets the pen to draw composer grid
|
||||
* @note this function was added in version 1.4
|
||||
* @deprecated use grid()->setPenWidth(), grid()->setPenColor() or grids() instead
|
||||
*/
|
||||
void setGridPen( const QPen& p ) /Deprecated/;
|
||||
@ -314,19 +308,16 @@ class QgsComposerMap : QgsComposerItem
|
||||
QPen gridPen() const /Deprecated/;
|
||||
|
||||
/**Sets width of grid pen
|
||||
* @note this function was added in version 1.4
|
||||
* @deprecated use grid()->setPenWidth() or grids() instead
|
||||
*/
|
||||
void setGridPenWidth( double w ) /Deprecated/;
|
||||
|
||||
/**Sets the color of the grid pen
|
||||
* @note this function was added in version 1.4
|
||||
* @deprecated use grid()->setPenColor() or grids() instead
|
||||
*/
|
||||
void setGridPenColor( const QColor& c ) /Deprecated/;
|
||||
|
||||
/**Sets font for grid annotations
|
||||
* @note this function was added in version 1.4
|
||||
* @deprecated use grid()->setAnnotationFont() or grids() instead
|
||||
*/
|
||||
void setGridAnnotationFont( const QFont& f ) /Deprecated/;
|
||||
@ -337,19 +328,16 @@ class QgsComposerMap : QgsComposerItem
|
||||
QFont gridAnnotationFont() const /Deprecated/;
|
||||
|
||||
/**Sets font color for grid annotations
|
||||
* @note this function was added in version 2.0
|
||||
* @deprecated use grid()->setAnnotationFontColor() or grids() instead
|
||||
*/
|
||||
void setAnnotationFontColor( const QColor& c ) /Deprecated/;
|
||||
|
||||
/**Get font color for grid annotations
|
||||
* @note: this function was added in version 2.0
|
||||
* @deprecated use grid()->annotationFontColor() or grids() instead
|
||||
*/
|
||||
QColor annotationFontColor() const /Deprecated/;
|
||||
|
||||
/**Sets coordinate precision for grid annotations
|
||||
* @note this function was added in version 1.4
|
||||
* @deprecated use grid()->setAnnotationPrecision or grids() instead
|
||||
*/
|
||||
void setGridAnnotationPrecision( int p ) /Deprecated/;
|
||||
@ -360,7 +348,6 @@ class QgsComposerMap : QgsComposerItem
|
||||
int gridAnnotationPrecision() const /Deprecated/;
|
||||
|
||||
/**Sets flag if grid annotation should be shown
|
||||
* @note this function was added in version 1.4
|
||||
* @deprecated use grid()->setAnnotationEnabled() or grids() instead
|
||||
*/
|
||||
void setShowGridAnnotation( bool show ) /Deprecated/;
|
||||
@ -381,7 +368,6 @@ class QgsComposerMap : QgsComposerItem
|
||||
GridAnnotationPosition gridAnnotationPosition( QgsComposerMap::Border border ) const /Deprecated/;
|
||||
|
||||
/**Sets distance between map frame and annotations
|
||||
* @note this function was added in version 1.4
|
||||
* @deprecated use grid()->setAnnotationFrameDistance() or grids() instead
|
||||
*/
|
||||
void setAnnotationFrameDistance( double d ) /Deprecated/;
|
||||
@ -412,7 +398,6 @@ class QgsComposerMap : QgsComposerItem
|
||||
GridAnnotationFormat gridAnnotationFormat() const /Deprecated/;
|
||||
|
||||
/**Set grid frame style (NoGridFrame or Zebra)
|
||||
* @note: this function was added in version 1.9
|
||||
* @deprecated use grid()->setFrameStyle() or grids() instead
|
||||
*/
|
||||
void setGridFrameStyle( GridFrameStyle style ) /Deprecated/;
|
||||
@ -423,7 +408,6 @@ class QgsComposerMap : QgsComposerItem
|
||||
GridFrameStyle gridFrameStyle() const /Deprecated/;
|
||||
|
||||
/**Set grid frame width
|
||||
* @note: this function was added in version 1.9
|
||||
* @deprecated use grid()->setFrameWidth() or grids() instead
|
||||
*/
|
||||
void setGridFrameWidth( double w ) /Deprecated/;
|
||||
@ -481,7 +465,6 @@ class QgsComposerMap : QgsComposerItem
|
||||
QColor gridFrameFillColor2() const /Deprecated/;
|
||||
|
||||
/**Sets length of the cross segments (if grid style is cross)
|
||||
* @note this function was added in version 1.4
|
||||
* @deprecated use grid()->setCrossLength() or grids() instead
|
||||
*/
|
||||
void setCrossLength( double l ) /Deprecated/;
|
||||
@ -541,13 +524,8 @@ class QgsComposerMap : QgsComposerItem
|
||||
*/
|
||||
QgsComposerMapOverview* overview();
|
||||
|
||||
/**In case of annotations, the bounding rectangle can be larger than the map item rectangle
|
||||
@note this function was added in version 1.4*/
|
||||
|
||||
/**In case of annotations, the bounding rectangle can be larger than the map item rectangle */
|
||||
QRectF boundingRect() const;
|
||||
/**Updates the bounding rect of this item. Call this function before doing any changes related to annotation out of the map rectangle
|
||||
@note this function was added in version 1.4*/
|
||||
void updateBoundingRect();
|
||||
|
||||
/* reimplement setFrameOutlineWidth, so that updateBoundingRect() is called after setting the frame width */
|
||||
virtual void setFrameOutlineWidth( const double outlineWidth );
|
||||
@ -588,13 +566,11 @@ class QgsComposerMap : QgsComposerItem
|
||||
double mapUnitsToMM() const;
|
||||
|
||||
/**Sets overview frame map. -1 disables the overview frame
|
||||
* @note: this function was added in version 1.9
|
||||
* @deprecated use overview()->setFrameMap() or overviews() instead
|
||||
*/
|
||||
void setOverviewFrameMap( int mapId ) /Deprecated/;
|
||||
|
||||
/**Returns id of overview frame (or -1 if no overfiew frame)
|
||||
* @note: this function was added in version 1.9
|
||||
* @deprecated use overview()->frameMapId() or overviews() instead
|
||||
*/
|
||||
int overviewFrameMapId() const /Deprecated/;
|
||||
@ -774,6 +750,10 @@ class QgsComposerMap : QgsComposerItem
|
||||
/**Call updateCachedImage if item is in render mode*/
|
||||
void renderModeUpdateCachedImage();
|
||||
|
||||
/**Updates the bounding rect of this item. Call this function before doing any changes related to annotation out of the map rectangle */
|
||||
void updateBoundingRect();
|
||||
|
||||
/**@deprecated use QgsComposerMapOverview::overviewExtentChanged instead*/
|
||||
void overviewExtentChanged();
|
||||
|
||||
virtual void refreshDataDefinedProperty( const QgsComposerObject::DataDefinedProperty property = QgsComposerObject::AllProperties );
|
||||
|
||||
@ -173,7 +173,6 @@ class QgsComposerMultiFrame: QgsComposerObject
|
||||
|
||||
/**Returns the number of frames associated with this multiframe.
|
||||
* @returns number of child frames
|
||||
* @note added in QGIS 2.0, replaces nFrames
|
||||
**/
|
||||
int frameCount() const;
|
||||
|
||||
|
||||
@ -10,7 +10,6 @@ class QgsComposerScaleBar: QgsComposerItem
|
||||
|
||||
public:
|
||||
|
||||
/**Added in version 1.8*/
|
||||
enum Alignment
|
||||
{
|
||||
Left,
|
||||
@ -18,7 +17,6 @@ class QgsComposerScaleBar: QgsComposerItem
|
||||
Right
|
||||
};
|
||||
|
||||
/**Added in version 1.9*/
|
||||
enum ScaleBarUnits
|
||||
{
|
||||
MapUnits,
|
||||
@ -30,7 +28,7 @@ class QgsComposerScaleBar: QgsComposerItem
|
||||
QgsComposerScaleBar( QgsComposition* composition /TransferThis/ );
|
||||
~QgsComposerScaleBar();
|
||||
|
||||
/** return correct graphics item type. Added in v1.7 */
|
||||
/** return correct graphics item type. */
|
||||
virtual int type() const;
|
||||
|
||||
/** \brief Reimplementation of QCanvasItem::paint*/
|
||||
@ -129,17 +127,13 @@ class QgsComposerScaleBar: QgsComposerItem
|
||||
|
||||
double segmentMillimeters() const;
|
||||
|
||||
/**Left / Middle/ Right
|
||||
@note: this method was added in version 1.8*/
|
||||
/**Left / Middle/ Right */
|
||||
Alignment alignment() const;
|
||||
|
||||
/**@note: this method was added in version 1.8*/
|
||||
void setAlignment( Alignment a );
|
||||
|
||||
/**@note: this method was added in version 1.9*/
|
||||
ScaleBarUnits units() const;
|
||||
|
||||
/**@note: this method was added in version 1.9*/
|
||||
void setUnits( ScaleBarUnits u );
|
||||
|
||||
/** Returns the join style used for drawing lines in the scalebar
|
||||
@ -172,8 +166,7 @@ class QgsComposerScaleBar: QgsComposerItem
|
||||
|
||||
/**Apply default settings*/
|
||||
void applyDefaultSettings();
|
||||
/**Apply default size (scale bar 1/5 of map item width)
|
||||
@note this method was added in version 1.7*/
|
||||
/**Apply default size (scale bar 1/5 of map item width) */
|
||||
void applyDefaultSize( ScaleBarUnits u = Meters );
|
||||
|
||||
/**Sets style by name
|
||||
@ -215,6 +208,9 @@ class QgsComposerScaleBar: QgsComposerItem
|
||||
/**Moves scalebar position to the left / right depending on alignment and change in item width*/
|
||||
void correctXPositionAlignment( double width, double widthAfter );
|
||||
|
||||
//overriden to apply minimum size
|
||||
void setSceneRect( const QRectF &rectangle );
|
||||
|
||||
public slots:
|
||||
void updateSegmentSize();
|
||||
/**Sets mCompositionMap to 0 if the map is deleted*/
|
||||
|
||||
@ -84,14 +84,12 @@ class QgsComposition : QGraphicsScene
|
||||
|
||||
/**Sets the number of pages for the composition.
|
||||
* @param pages number of pages
|
||||
* @note added in version 1.9
|
||||
* @see numPages
|
||||
*/
|
||||
void setNumPages( const int pages );
|
||||
|
||||
/**Returns the number of pages in the composition.
|
||||
* @returns number of pages
|
||||
* @note added in version 1.9
|
||||
* @see setNumPages
|
||||
*/
|
||||
int numPages() const;
|
||||
@ -255,7 +253,7 @@ class QgsComposition : QGraphicsScene
|
||||
*/
|
||||
QgsComposerItem* composerItemAt( const QPointF & position, const QgsComposerItem* belowItem, const bool ignoreLocked = false ) const;
|
||||
|
||||
/** Returns the page number (0-bsaed) given a coordinate */
|
||||
/** Returns the page number (0-based) given a coordinate */
|
||||
int pageNumberAt( const QPointF& position ) const;
|
||||
|
||||
/** Returns on which page number (0-based) is displayed an item */
|
||||
@ -275,7 +273,8 @@ class QgsComposition : QGraphicsScene
|
||||
%End
|
||||
|
||||
/**Return composer items of a specific type
|
||||
@note not available in python bindings
|
||||
* @param itemList list of item type to store matching items in
|
||||
* @note not available in python bindings
|
||||
*/
|
||||
// template<class T> void composerItems( QList<T*>& itemList );
|
||||
|
||||
@ -293,7 +292,6 @@ class QgsComposition : QGraphicsScene
|
||||
|
||||
/**Returns the composer html with specified id (a string as named in the
|
||||
composer user interface item properties).
|
||||
@note Added in QGIS 2.0
|
||||
@param item the item.
|
||||
@return QgsComposerHtml pointer or 0 pointer if no such item exists.
|
||||
*/
|
||||
@ -301,7 +299,6 @@ class QgsComposition : QGraphicsScene
|
||||
|
||||
/**Returns a composer item given its text identifier.
|
||||
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.
|
||||
@return QgsComposerItem pointer or 0 pointer if no such item exists.
|
||||
@ -309,7 +306,6 @@ class QgsComposition : QGraphicsScene
|
||||
const QgsComposerItem* getComposerItemById( const QString theId ) const;
|
||||
|
||||
/**Returns a composer item given its unique identifier.
|
||||
@note added in 2.0
|
||||
@param theUuid A QString representing the UUID of the item to
|
||||
**/
|
||||
const QgsComposerItem* getComposerItemByUuid( const QString theUuid ) const;
|
||||
@ -326,11 +322,9 @@ class QgsComposition : QGraphicsScene
|
||||
QgsComposerMap* worldFileMap();
|
||||
void setWorldFileMap( QgsComposerMap* map );
|
||||
|
||||
/**Returns true if a composition should use advanced effects such as blend modes
|
||||
@note added in 1.9*/
|
||||
/**Returns true if a composition should use advanced effects such as blend modes */
|
||||
bool useAdvancedEffects() const;
|
||||
/**Used to enable or disable advanced effects such as blend modes in a composition
|
||||
@note: added in version 1.9*/
|
||||
/**Used to enable or disable advanced effects such as blend modes in a composition */
|
||||
void setUseAdvancedEffects( const bool effectsEnabled );
|
||||
|
||||
/**Returns pointer to map renderer of qgis map canvas*/
|
||||
@ -525,7 +519,7 @@ class QgsComposition : QGraphicsScene
|
||||
//printing
|
||||
|
||||
/** Prepare the printer for printing */
|
||||
void beginPrint( QPrinter& printer );
|
||||
void beginPrint( QPrinter& printer, const bool evaluateDDPageSize = false );
|
||||
/** Prepare the printer for printing in a PDF */
|
||||
void beginPrintAsPDF( QPrinter& printer, const QString& file );
|
||||
|
||||
@ -539,7 +533,7 @@ class QgsComposition : QGraphicsScene
|
||||
/**Convenience function that prepares the printer and prints
|
||||
* @returns true if print was successful
|
||||
*/
|
||||
bool print( QPrinter &printer );
|
||||
bool print( QPrinter &printer, const bool evaluateDDPageSize = false );
|
||||
|
||||
/**Convenience function that prepares the printer for printing in PDF and prints
|
||||
* @returns true if export was successful
|
||||
@ -552,9 +546,7 @@ class QgsComposition : QGraphicsScene
|
||||
|
||||
/**Render a page to a paint device
|
||||
* @param p destination painter
|
||||
* @param page page number, 0 based such that the first page is page 0
|
||||
* @note added in version 1.9
|
||||
*/
|
||||
* @param page page number, 0 based such that the first page is page 0 */
|
||||
void renderPage( QPainter* p, int page );
|
||||
|
||||
/** Compute world file parameters */
|
||||
@ -601,7 +593,7 @@ class QgsComposition : QGraphicsScene
|
||||
* @param active true if data defined property is active, false if it is disabled
|
||||
* @param useExpression true if the expression should be used
|
||||
* @param expression expression for data defined property
|
||||
* @param field name if the data defined property should take its value from a field
|
||||
* @param field field name if the data defined property should take its value from a field
|
||||
* @note this method was added in version 2.5
|
||||
*/
|
||||
void setDataDefinedProperty( const QgsComposerObject::DataDefinedProperty property, bool active, bool useExpression, const QString &expression, const QString &field );
|
||||
@ -685,4 +677,7 @@ class QgsComposition : QGraphicsScene
|
||||
|
||||
/**Is emitted when item in the composition must be refreshed*/
|
||||
void refreshItemsTriggered();
|
||||
|
||||
/**Is emitted when the composition has an updated status bar message for the composer window*/
|
||||
void statusMsgChanged( QString message );
|
||||
};
|
||||
|
||||
@ -65,6 +65,7 @@ class QGis
|
||||
static bool isSingleType( WkbType type );
|
||||
static bool isMultiType( WkbType type );
|
||||
static int wkbDimensions( WkbType type );
|
||||
|
||||
enum GeometryType
|
||||
{
|
||||
Point,
|
||||
@ -123,13 +124,10 @@ class QGis
|
||||
};
|
||||
|
||||
//! Provides the canonical name of the type value
|
||||
// Added in version 2.0
|
||||
static QString toLiteral( QGis::UnitType unit );
|
||||
//! Converts from the canonical name to the type value
|
||||
// Added in version 2.0
|
||||
static UnitType fromLiteral( QString literal, QGis::UnitType defaultType = UnknownUnit );
|
||||
//! Provides translated version of the type value
|
||||
// Added in version 2.0
|
||||
static QString tr( QGis::UnitType unit );
|
||||
//! Returns the conversion factor between the specified units
|
||||
static double fromUnitToUnitFactor( QGis::UnitType fromUnit, QGis::UnitType toUnit );
|
||||
@ -173,7 +171,7 @@ class QGis
|
||||
|
||||
|
||||
/** Wkt string that represents a geographic coord sys
|
||||
* @note added in 1.8 to replace GEOWkt
|
||||
* @note added to replace GEOWkt
|
||||
*/
|
||||
const QString GEOWKT;
|
||||
const QString PROJECT_SCALES;
|
||||
@ -199,7 +197,6 @@ const int LAT_PREFIX_LEN;
|
||||
const int USER_CRS_START_ID;
|
||||
|
||||
//! Constant that holds the string representation for "No ellips/No CRS"
|
||||
// Added in version 2.0
|
||||
const QString GEO_NONE;
|
||||
|
||||
//
|
||||
@ -212,7 +209,7 @@ const double MINIMUM_POINT_SIZE;
|
||||
const double DEFAULT_POINT_SIZE;
|
||||
const double DEFAULT_LINE_WIDTH;
|
||||
|
||||
/** default snapping tolerance for segments (@note added in 1.8) */
|
||||
/** default snapping tolerance for segments */
|
||||
const double DEFAULT_SEGMENT_EPSILON;
|
||||
|
||||
/** qgssize is used instead of size_t, because size_t is stdlib type, unknown
|
||||
|
||||
@ -107,21 +107,17 @@ static void qtgui_UpdatePyArgv(PyObject *argvlist, int argc, char **argv)
|
||||
|
||||
/** Returns the path to the contributors file.
|
||||
* Contributors are people who have submitted patches
|
||||
* but don't have svn write access.
|
||||
* @note this function was added in version 1.3 */
|
||||
* but don't have commit access. */
|
||||
static const QString contributorsFilePath();
|
||||
|
||||
/**Returns the path to the sponsors file.
|
||||
@note this function was added in version 1.2*/
|
||||
/**Returns the path to the sponsors file.*/
|
||||
static const QString sponsorsFilePath();
|
||||
|
||||
/** Returns the path to the donors file.
|
||||
@note this function was added in version 1.2*/
|
||||
/** Returns the path to the donors file. */
|
||||
static const QString donorsFilePath();
|
||||
|
||||
/**
|
||||
* Returns the path to the sponsors file.
|
||||
* @note This was added in QGIS 1.1
|
||||
*/
|
||||
static const QString translatorsFilePath();
|
||||
|
||||
@ -155,11 +151,9 @@ static void qtgui_UpdatePyArgv(PyObject *argvlist, int argc, char **argv)
|
||||
static const QString srsDbFilePath();
|
||||
|
||||
//! Returns the pathes to svg directories.
|
||||
//! @note added in 1.4
|
||||
static const QStringList svgPaths();
|
||||
|
||||
//! Returns the system environment variables passed to application.
|
||||
//! @note added in 1.9
|
||||
static const QMap<QString, QString> systemEnvVars();
|
||||
|
||||
//! Returns the path to the application prefix directory.
|
||||
@ -179,31 +173,26 @@ static void qtgui_UpdatePyArgv(PyObject *argvlist, int argc, char **argv)
|
||||
|
||||
//! Returns path to the desired icon file.
|
||||
//! First it tries to use the active theme path, then default theme path
|
||||
//! @note Added in 1.5
|
||||
static QString iconPath( QString iconFile );
|
||||
|
||||
//! Helper to get a theme icon. It will fall back to the
|
||||
//! default theme if the active theme does not have the required icon.
|
||||
//! @note Added in 2.0
|
||||
static QIcon getThemeIcon( const QString &theName );
|
||||
|
||||
//! Helper to get a theme icon as a pixmap. It will fall back to the
|
||||
//! default theme if the active theme does not have the required icon.
|
||||
//! @note Added in 2.0
|
||||
static QPixmap getThemePixmap( const QString &theName );
|
||||
|
||||
//! Returns the path to user's style. Added in QGIS 1.4
|
||||
//! Returns the path to user's style.
|
||||
static const QString userStyleV2Path();
|
||||
|
||||
//! Returns the path to default style (works as a starting point). Added in QGIS 1.4
|
||||
//! Returns the path to default style (works as a starting point).
|
||||
static const QString defaultStyleV2Path();
|
||||
|
||||
//! Returns the path containing qgis_core, qgis_gui, qgispython (and other) libraries
|
||||
//! @note Added in 2.0
|
||||
static const QString libraryPath();
|
||||
|
||||
//! Returns the path with utility executables (help viewer, crssync, ...)
|
||||
//! @note Added in 2.0
|
||||
static const QString libexecPath();
|
||||
|
||||
//! Alters prefix path - used by 3rd party apps
|
||||
@ -215,7 +204,7 @@ static void qtgui_UpdatePyArgv(PyObject *argvlist, int argc, char **argv)
|
||||
//! Alters pkg data path - used by 3rd party apps
|
||||
static void setPkgDataPath( const QString &thePkgDataPath );
|
||||
|
||||
//! Alters default svg paths - used by 3rd party apps. Added in QGIS 1.5
|
||||
//! Alters default svg paths - used by 3rd party apps.
|
||||
static void setDefaultSvgPaths( const QStringList& pathList );
|
||||
|
||||
//! loads providers
|
||||
@ -259,48 +248,39 @@ static void qtgui_UpdatePyArgv(PyObject *argvlist, int argc, char **argv)
|
||||
*/
|
||||
static void registerOgrDrivers();
|
||||
|
||||
/**Converts absolute path to path relative to target
|
||||
@note: this method was added in version 1.6*/
|
||||
/**Converts absolute path to path relative to target */
|
||||
static QString absolutePathToRelativePath( QString apath, QString targetPath );
|
||||
/**Converts path relative to target to an absolute path
|
||||
@note: this method was added in version 1.6*/
|
||||
/**Converts path relative to target to an absolute path */
|
||||
static QString relativePathToAbsolutePath( QString rpath, QString targetPath );
|
||||
|
||||
/** Indicates whether running from build directory (not installed)
|
||||
@note added in 2.0 */
|
||||
/** Indicates whether running from build directory (not installed) */
|
||||
static bool isRunningFromBuildDir();
|
||||
/** Returns path to the source directory. Valid only when running from build directory
|
||||
@note added in 2.0 */
|
||||
/** Returns path to the source directory. Valid only when running from build directory */
|
||||
static QString buildSourcePath();
|
||||
/** Returns path to the build output directory. Valid only when running from build directory
|
||||
@note added in 2.0 */
|
||||
/** Returns path to the build output directory. Valid only when running from build directory */
|
||||
static QString buildOutputPath();
|
||||
|
||||
/** Sets the GDAL_SKIP environment variable to include the specified driver
|
||||
* and then calls GDALDriverManager::AutoSkipDrivers() to unregister it. The
|
||||
* driver name should be the short format of the Gdal driver name e.g. GTIFF.
|
||||
* @note added in 2.0
|
||||
*/
|
||||
static void skipGdalDriver( QString theDriver );
|
||||
|
||||
/** Sets the GDAL_SKIP environment variable to exclude the specified driver
|
||||
* and then calls GDALDriverManager::AutoSkipDrivers() to unregister it. The
|
||||
* driver name should be the short format of the Gdal driver name e.g. GTIFF.
|
||||
* @note added in 2.0
|
||||
*/
|
||||
static void restoreGdalDriver( QString theDriver );
|
||||
|
||||
/** Returns the list of gdal drivers that should be skipped (based on
|
||||
* GDAL_SKIP environment variable)
|
||||
* @note added in 2.0
|
||||
*/
|
||||
static QStringList skippedGdalDrivers();
|
||||
|
||||
/** Apply the skipped drivers list to gdal
|
||||
* @see skipGdalDriver
|
||||
* @see restoreGdalDriver
|
||||
* @see skippedGdalDrivers
|
||||
* @note added in 2.0 */
|
||||
* @see skippedGdalDrivers */
|
||||
static void applyGdalSkippedDrivers();
|
||||
|
||||
/** Get maximum concurrent thread count
|
||||
|
||||
@ -56,11 +56,12 @@ class QgsAttributeAction
|
||||
//! Destructor
|
||||
virtual ~QgsAttributeAction();
|
||||
|
||||
//! Add an action with the given name and action details.
|
||||
// Will happily have duplicate names and actions. If
|
||||
// capture is true, when running the action using doAction(),
|
||||
// any stdout from the process will be captured and displayed in a
|
||||
// dialog box.
|
||||
/** Add an action with the given name and action details.
|
||||
* Will happily have duplicate names and actions. If
|
||||
* capture is true, when running the action using doAction(),
|
||||
* any stdout from the process will be captured and displayed in a
|
||||
* dialog box.
|
||||
*/
|
||||
void addAction( QgsAction::ActionType type, QString name, QString action, bool capture = false );
|
||||
|
||||
/** Add an action with the given name and action details.
|
||||
@ -76,22 +77,20 @@ class QgsAttributeAction
|
||||
|
||||
/*! Does the given values. defaultValueIndex is the index of the
|
||||
* field to be used if the action has a $currfield placeholder.
|
||||
* @note added in 1.9
|
||||
* @note available in python bindings as doActionFeature
|
||||
*/
|
||||
void doAction( int index,
|
||||
QgsFeature &feat,
|
||||
const QgsFeature &feat,
|
||||
int defaultValueIndex = 0 ) /PyName=doActionFeature/;
|
||||
|
||||
/*! Does the action using the expression builder to expand it
|
||||
* and getting values from the passed feature attribute map.
|
||||
* substitutionMap is used to pass custom substitutions, to replace
|
||||
* each key in the map with the associated value
|
||||
* @note added in 1.9
|
||||
* @note available in python bindings as doActionFeatureWithSubstitution
|
||||
*/
|
||||
void doAction( int index,
|
||||
QgsFeature &feat,
|
||||
const QgsFeature &feat,
|
||||
const QMap<QString, QVariant> *substitutionMap ) /PyName=doActionFeatureWithSubstitution/;
|
||||
|
||||
//! Removes all actions
|
||||
@ -115,8 +114,6 @@ class QgsAttributeAction
|
||||
*
|
||||
* Additional substitutions can be passed through the substitutionMap
|
||||
* parameter
|
||||
*
|
||||
* @note added in 1.9
|
||||
*/
|
||||
QString expandAction( QString action,
|
||||
QgsFeature &feat,
|
||||
|
||||
@ -132,8 +132,6 @@ class QgsCoordinateReferenceSystem
|
||||
* @note this function generates a WKT string using OSRSetFromUserInput() and
|
||||
* passes it to createFromWkt() function.
|
||||
* @param theDefinition A String containing a coordinate reference system definition.
|
||||
*
|
||||
* @note added in 1.8
|
||||
*/
|
||||
bool createFromUserInput( const QString &theDefinition );
|
||||
|
||||
@ -144,8 +142,6 @@ class QgsCoordinateReferenceSystem
|
||||
* @note This function sets CPL config option GDAL_FIX_ESRI_WKT to a proper value,
|
||||
* unless it has been set by the user through the commandline or an environment variable.
|
||||
* For more details refer to OGRSpatialReference::morphFromESRI() .
|
||||
*
|
||||
* @note added in 1.8
|
||||
*/
|
||||
static void setupESRIWktFix();
|
||||
|
||||
@ -235,7 +231,6 @@ class QgsCoordinateReferenceSystem
|
||||
|
||||
/*! Get the authority identifier for this srs
|
||||
* @return QString the Authority identifier for this srs
|
||||
* @note added in 1.5
|
||||
*/
|
||||
QString authid() const;
|
||||
|
||||
@ -278,7 +273,6 @@ class QgsCoordinateReferenceSystem
|
||||
|
||||
/*! return if axis is inverted (eg. for WMS 1.3)
|
||||
* @return bool Whether this is crs axis is inverted
|
||||
* @note added in 1.8
|
||||
*/
|
||||
bool axisInverted() const;
|
||||
|
||||
@ -299,7 +293,6 @@ class QgsCoordinateReferenceSystem
|
||||
/*! Update proj.4 parameters in our database from proj.4
|
||||
* @returns number of updated CRS on success and
|
||||
* negative number of failed updates in case of errors.
|
||||
* @note added in 1.8
|
||||
*/
|
||||
static int syncDb();
|
||||
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
/** \ingroup core
|
||||
* \class QgsDataDefined
|
||||
* A container class for data source field mapping or expression.
|
||||
* @note added in QGIS 1.9
|
||||
*/
|
||||
|
||||
class QgsDataDefined
|
||||
@ -24,13 +23,13 @@ class QgsDataDefined
|
||||
const QString& field = QString() );
|
||||
|
||||
~QgsDataDefined();
|
||||
|
||||
|
||||
/**Returns whether the data defined container is set to all the default
|
||||
* values, ie, disabled, with empty expression and no assigned field
|
||||
* @returns true if data defined container is set to default values
|
||||
* @note added in QGIS 2.7
|
||||
*/
|
||||
bool hasDefaultValues() const;
|
||||
bool hasDefaultValues() const;
|
||||
|
||||
bool isActive() const;
|
||||
void setActive( bool active );
|
||||
|
||||
@ -83,10 +83,7 @@ class QgsDataProvider : QObject
|
||||
*/
|
||||
virtual bool setSubsetString( QString subset, bool updateFeatureCount = true );
|
||||
|
||||
/**
|
||||
* provider supports setting of subset strings
|
||||
* @note added in 1.4
|
||||
*/
|
||||
/** provider supports setting of subset strings */
|
||||
virtual bool supportsSubsetString();
|
||||
|
||||
/**
|
||||
@ -223,14 +220,12 @@ class QgsDataProvider : QObject
|
||||
/**
|
||||
* This is emitted whenever an asynchronous operation has finished
|
||||
* and the data should be redrawn
|
||||
* @note added in 1.5
|
||||
*/
|
||||
void dataChanged();
|
||||
|
||||
/**
|
||||
* This is emitted whenever data or metadata (e.g. color table, extent) has changed
|
||||
* @param changed binary combination of changes
|
||||
* @note added in 1.7
|
||||
*/
|
||||
void dataChanged( int changed );
|
||||
|
||||
|
||||
@ -12,7 +12,6 @@ class QgsDataSourceURI
|
||||
%End
|
||||
|
||||
public:
|
||||
//! \note enumeration added in version 1.1
|
||||
enum SSLmode { SSLprefer, SSLdisable, SSLallow, SSLrequire };
|
||||
|
||||
//! default constructor
|
||||
@ -28,11 +27,9 @@ class QgsDataSourceURI
|
||||
QString uri() const;
|
||||
|
||||
//! return complete encoded uri (generic mode)
|
||||
// \note added in 1.9
|
||||
QByteArray encodedUri() const;
|
||||
|
||||
//! set complete encoded uri (generic mode)
|
||||
// \note added in 1.9
|
||||
void setEncodedUri( const QString & uri );
|
||||
|
||||
//! quoted table name
|
||||
@ -40,29 +37,23 @@ class QgsDataSourceURI
|
||||
|
||||
//! Set generic param (generic mode)
|
||||
// \note if key exists, another is inserted
|
||||
// \note added in 1.9
|
||||
void setParam( const QString &key, const QString &value );
|
||||
void setParam( const QString &key, const QStringList &value ) /PyName=setParamList/;
|
||||
|
||||
//! Remove generic param (generic mode)
|
||||
// \note remove all occurrences of key, returns number of params removed
|
||||
// \note added in 1.9
|
||||
int removeParam( const QString &key );
|
||||
|
||||
//! Get generic param (generic mode)
|
||||
// \note added in 1.9
|
||||
QString param( const QString &key ) const;
|
||||
|
||||
//! Get multiple generic param (generic mode)
|
||||
// \note added in 1.9
|
||||
QStringList params( const QString &key ) const;
|
||||
|
||||
//! Test if param exists (generic mode)
|
||||
// \note added in 1.9
|
||||
bool hasParam( const QString &key ) const;
|
||||
|
||||
//! Set all connection related members at once
|
||||
//! \note This optional sslmode parameter has been added in version 1.1
|
||||
void setConnection( const QString& aHost,
|
||||
const QString& aPort,
|
||||
const QString& aDatabase,
|
||||
@ -71,7 +62,6 @@ class QgsDataSourceURI
|
||||
SSLmode sslmode = SSLprefer );
|
||||
|
||||
//! Set all connection related members at once (for the service case)
|
||||
//! \note This optional sslmode parameter has been added in version 1.7
|
||||
void setConnection( const QString& aService,
|
||||
const QString& aDatabase,
|
||||
const QString& aUsername,
|
||||
@ -79,7 +69,6 @@ class QgsDataSourceURI
|
||||
SSLmode sslmode = SSLprefer );
|
||||
|
||||
//! Set database
|
||||
// \note added in 1.4
|
||||
void setDatabase( const QString &database );
|
||||
|
||||
//! Set all data source related members at once
|
||||
@ -90,11 +79,9 @@ class QgsDataSourceURI
|
||||
const QString& aKeyColumn = QString() );
|
||||
|
||||
//! set username
|
||||
// added in 1.5
|
||||
void setUsername( QString username );
|
||||
|
||||
//! set password
|
||||
// added in 1.5
|
||||
void setPassword( QString password );
|
||||
|
||||
//! Removes password element from uris
|
||||
@ -107,7 +94,6 @@ class QgsDataSourceURI
|
||||
QString geometryColumn() const;
|
||||
|
||||
//! set use Estimated Metadata
|
||||
// added in 1.5
|
||||
void setUseEstimatedMetadata( bool theFlag );
|
||||
bool useEstimatedMetadata() const;
|
||||
|
||||
@ -117,25 +103,20 @@ class QgsDataSourceURI
|
||||
void clearSchema();
|
||||
void setSql( QString sql );
|
||||
|
||||
// added in version 1.1
|
||||
QString host() const;
|
||||
QString database() const;
|
||||
QString port() const;
|
||||
QString password() const;
|
||||
SSLmode sslMode() const;
|
||||
|
||||
// added in 1.7
|
||||
QString service() const;
|
||||
|
||||
// added in version 1.2
|
||||
QString keyColumn() const;
|
||||
void setKeyColumn( QString column );
|
||||
|
||||
// added in 1.9
|
||||
QGis::WkbType wkbType() const;
|
||||
void setWkbType( QGis::WkbType type );
|
||||
|
||||
// added in 1.9
|
||||
QString srid() const;
|
||||
void setSrid( QString srid );
|
||||
};
|
||||
|
||||
@ -243,7 +243,18 @@ class QgsFeature
|
||||
|
||||
const QgsAttributes& attributes() const;
|
||||
//QgsAttributes& attributes();
|
||||
void setAttributes(const QgsAttributes& attrs);
|
||||
void setAttributes( const QgsAttributes& attrs );
|
||||
|
||||
/**
|
||||
* Set an attribute by id
|
||||
*
|
||||
* @param field The index of the field to set
|
||||
* @param attr The value of the attribute
|
||||
*
|
||||
* @return false, if the field id does not exist
|
||||
*
|
||||
* @note For Python: raises a KeyError exception instead of returning false
|
||||
*/
|
||||
bool setAttribute( int field, const QVariant& attr /GetWrapper/);
|
||||
%MethodCode
|
||||
bool rv;
|
||||
@ -336,14 +347,12 @@ class QgsFeature
|
||||
* @param initAttributes If true, attributes are initialized. Clears any data previously assigned.
|
||||
* C++: Defaults to false
|
||||
* Python: Defaults to true
|
||||
* @note added in 2.0
|
||||
*
|
||||
* TODO: QGIS3 - take reference, not pointer
|
||||
*/
|
||||
void setFields( const QgsFields* fields, bool initAttributes = true );
|
||||
|
||||
/** Get associated field map.
|
||||
* @note added in 2.0
|
||||
*
|
||||
* TODO: QGIS 3 - return reference or value, not pointer
|
||||
*/
|
||||
@ -358,7 +367,6 @@ class QgsFeature
|
||||
* @return false if attribute name could not be converted to index (C++ only)
|
||||
*
|
||||
* @note For Python: raises a KeyError exception instead of returning false
|
||||
* @note added in 2.0
|
||||
*/
|
||||
void setAttribute( const QString& name, QVariant value /GetWrapper/ );
|
||||
%MethodCode
|
||||
@ -389,7 +397,6 @@ class QgsFeature
|
||||
* @return false if attribute name could not be converted to index (C++ only)
|
||||
*
|
||||
* @note For Python: raises a KeyError exception instead of returning false
|
||||
* @note added in 2.0
|
||||
*/
|
||||
bool deleteAttribute( const QString& name );
|
||||
%MethodCode
|
||||
@ -413,7 +420,6 @@ class QgsFeature
|
||||
* @return The value of the attribute (C++: Invalid variant if no such name exists )
|
||||
*
|
||||
* @note For Python: raises a KeyError exception if field is not found
|
||||
* @note added in 2.0
|
||||
*/
|
||||
SIP_PYOBJECT attribute( const QString& name ) const;
|
||||
%MethodCode
|
||||
@ -431,8 +437,6 @@ class QgsFeature
|
||||
%End
|
||||
/** Utility method to get attribute index from name. Returns -1 if field does not exist or field map is not associated.
|
||||
* Field map must be associated to make this work.
|
||||
*
|
||||
* @note added in 2.0
|
||||
*/
|
||||
int fieldNameIndex( const QString& fieldName ) const;
|
||||
|
||||
|
||||
@ -102,7 +102,6 @@ class QgsGeometry
|
||||
size_t wkbSize() const;
|
||||
|
||||
/**Returns a geos geometry. QgsGeometry keeps ownership, don't delete the returned object!
|
||||
@note this method was added in version 1.1
|
||||
@note not available in python bindings
|
||||
*/
|
||||
// const GEOSGeometry* asGeos() const;
|
||||
@ -116,29 +115,19 @@ class QgsGeometry
|
||||
/** Returns true if wkb of the geometry is of WKBMulti* type */
|
||||
bool isMultipart();
|
||||
|
||||
/** compare geometries using GEOS
|
||||
@note added in 1.5
|
||||
*/
|
||||
/** compare geometries using GEOS */
|
||||
bool isGeosEqual( QgsGeometry & );
|
||||
|
||||
/** check validity using GEOS
|
||||
@note added in 1.5
|
||||
*/
|
||||
/** check validity using GEOS */
|
||||
bool isGeosValid();
|
||||
|
||||
/** check if geometry is empty using GEOS
|
||||
@note added in 1.5
|
||||
*/
|
||||
/** check if geometry is empty using GEOS */
|
||||
bool isGeosEmpty();
|
||||
|
||||
/** get area of geometry using GEOS
|
||||
@note added in 1.5
|
||||
*/
|
||||
/** get area of geometry using GEOS */
|
||||
double area();
|
||||
|
||||
/** get length of geometry using GEOS
|
||||
@note added in 1.5
|
||||
*/
|
||||
/** get length of geometry using GEOS */
|
||||
double length();
|
||||
|
||||
double distance( QgsGeometry& geom );
|
||||
@ -225,7 +214,7 @@ class QgsGeometry
|
||||
* @param afterVertex Receives index of the vertex after the closest segment. The vertex
|
||||
* before the closest segment is always afterVertex - 1
|
||||
* @param leftOf Out: Returns if the point lies on the left of right side of the segment ( < 0 means left, > 0 means right )
|
||||
* @param epsilon epsilon for segment snapping (added in 1.8)
|
||||
* @param epsilon epsilon for segment snapping
|
||||
* @return The squared cartesian distance is also returned in sqrDist, negative number on error
|
||||
*/
|
||||
double closestSegmentWithContext( const QgsPoint& point, QgsPoint& minDistPoint /Out/, int& afterVertex /Out/ );
|
||||
@ -275,8 +264,7 @@ class QgsGeometry
|
||||
QList<QgsPoint> &topologyTestPoints /Out/);
|
||||
|
||||
/**Replaces a part of this geometry with another line
|
||||
@return 0 in case of success
|
||||
@note: this function was added in version 1.3*/
|
||||
@return 0 in case of success */
|
||||
int reshapeGeometry( const QList<QgsPoint>& reshapeWithLine );
|
||||
|
||||
/**Changes this geometry such that it does not intersect the other geometry
|
||||
@ -296,32 +284,25 @@ class QgsGeometry
|
||||
/** Test for containment of a point (uses GEOS) */
|
||||
bool contains( const QgsPoint* p ) const;
|
||||
|
||||
/** Test for if geometry is contained in another (uses GEOS)
|
||||
* @note added in 1.5 */
|
||||
/** Test for if geometry is contained in another (uses GEOS) */
|
||||
bool contains( const QgsGeometry* geometry ) const;
|
||||
|
||||
/** Test for if geometry is disjoint of another (uses GEOS)
|
||||
* @note added in 1.5 */
|
||||
/** Test for if geometry is disjoint of another (uses GEOS) */
|
||||
bool disjoint( const QgsGeometry* geometry ) const;
|
||||
|
||||
/** Test for if geometry equals another (uses GEOS)
|
||||
* @note added in 1.5 */
|
||||
/** Test for if geometry equals another (uses GEOS) */
|
||||
bool equals( const QgsGeometry* geometry ) const;
|
||||
|
||||
/** Test for if geometry touch another (uses GEOS)
|
||||
* @note added in 1.5 */
|
||||
/** Test for if geometry touch another (uses GEOS) */
|
||||
bool touches( const QgsGeometry* geometry ) const;
|
||||
|
||||
/** Test for if geometry overlaps another (uses GEOS)
|
||||
* @note added in 1.5 */
|
||||
/** Test for if geometry overlaps another (uses GEOS) */
|
||||
bool overlaps( const QgsGeometry* geometry ) const;
|
||||
|
||||
/** Test for if geometry is within another (uses GEOS)
|
||||
* @note added in 1.5 */
|
||||
/** Test for if geometry is within another (uses GEOS) */
|
||||
bool within( const QgsGeometry* geometry ) const;
|
||||
|
||||
/** Test for if geometry crosses another (uses GEOS)
|
||||
* @note added in 1.5 */
|
||||
/** Test for if geometry crosses another (uses GEOS) */
|
||||
bool crosses( const QgsGeometry* geometry ) const;
|
||||
|
||||
/** Returns a buffer region around this geometry having the given width and with a specified number
|
||||
@ -329,6 +310,7 @@ class QgsGeometry
|
||||
QgsGeometry* buffer( double distance, int segments ) /Factory/;
|
||||
|
||||
/** Returns a buffer region around the geometry, with additional style options.
|
||||
* @param distance buffer distance
|
||||
* @param segments For round joins, number of segments to approximate quarter-circle
|
||||
* @param endCapStyle Round (1) / Flat (2) / Square (3) end cap style
|
||||
* @param joinStyle Round (1) / Mitre (2) / Bevel (3) join style
|
||||
@ -359,9 +341,7 @@ class QgsGeometry
|
||||
/** Returns the smallest convex polygon that contains all the points in the geometry. */
|
||||
QgsGeometry* convexHull() /Factory/;
|
||||
|
||||
/* Return interpolated point on line at distance
|
||||
* @note added in 1.9
|
||||
*/
|
||||
/* Return interpolated point on line at distance */
|
||||
QgsGeometry* interpolate( double distance ) /Factory/;
|
||||
|
||||
/** Returns a geometry representing the points shared by this geometry and other. */
|
||||
@ -386,8 +366,6 @@ class QgsGeometry
|
||||
|
||||
/** Exports the geometry to GeoJSON
|
||||
* @return a QString representing the geometry as GeoJSON
|
||||
* @note added in 1.8
|
||||
* @note python binding added in 1.9
|
||||
* @note precision parameter added in 2.4
|
||||
*/
|
||||
QString exportToGeoJSON( const int &precision = 17 ) const;
|
||||
@ -426,8 +404,7 @@ class QgsGeometry
|
||||
if wkbType is WKBMultiPolygon, otherwise an empty list */
|
||||
QgsMultiPolygon asMultiPolygon() const;
|
||||
|
||||
/** return contents of the geometry as a list of geometries
|
||||
@note added in version 1.1 */
|
||||
/** return contents of the geometry as a list of geometries */
|
||||
QList<QgsGeometry*> asGeometryCollection() const /Factory/;
|
||||
|
||||
/**Return contents of the geometry as a QPointF if wkbType is WKBPoint,
|
||||
@ -445,13 +422,11 @@ class QgsGeometry
|
||||
|
||||
/** delete a ring in polygon or multipolygon.
|
||||
Ring 0 is outer ring and can't be deleted.
|
||||
@return true on success
|
||||
@note added in version 1.2 */
|
||||
@return true on success */
|
||||
bool deleteRing( int ringNum, int partNum = 0 );
|
||||
|
||||
/** delete part identified by the part number
|
||||
@return true on success
|
||||
@note added in version 1.2 */
|
||||
@return true on success */
|
||||
bool deletePart( int partNum );
|
||||
|
||||
/**Converts single type geometry into multitype geometry
|
||||
@ -465,7 +440,6 @@ class QgsGeometry
|
||||
* 2 if avoid intersection would change the geometry type,
|
||||
* 3 other error during intersection removal
|
||||
* @param ignoreFeatures possibility to give a list of features where intersections should be ignored (not available in python bindings)
|
||||
* @note added in 1.5
|
||||
*/
|
||||
int avoidIntersections();
|
||||
|
||||
@ -481,10 +455,7 @@ class QgsGeometry
|
||||
bool hasWhere();
|
||||
};
|
||||
|
||||
/** Validate geometry and produce a list of geometry errors
|
||||
* @note added in 1.5
|
||||
* @note python binding added in 1.6
|
||||
**/
|
||||
/** Validate geometry and produce a list of geometry errors */
|
||||
void validateGeometry( QList<QgsGeometry::Error> &errors /Out/ );
|
||||
|
||||
/** compute the unary union on a list of geometries. May be faster than an iterative union on a set of geometries.
|
||||
|
||||
@ -12,9 +12,7 @@ class QgsGeometryValidator : QThread
|
||||
void run();
|
||||
void stop();
|
||||
|
||||
/** Validate geometry and produce a list of geometry errors
|
||||
* @note added in 1.9
|
||||
**/
|
||||
/** Validate geometry and produce a list of geometry errors */
|
||||
static void validateGeometry( QgsGeometry *g, QList<QgsGeometry::Error> &errors );
|
||||
|
||||
signals:
|
||||
|
||||
@ -6,7 +6,6 @@ class QgsHttpTransaction : QObject
|
||||
public:
|
||||
/**
|
||||
* Constructor.
|
||||
* \note userName and password added in 1.1
|
||||
*/
|
||||
QgsHttpTransaction( QString uri,
|
||||
QString proxyHost = QString(),
|
||||
@ -53,11 +52,7 @@ class QgsHttpTransaction : QObject
|
||||
@return true if proxy settings was applied, false else*/
|
||||
static bool applyProxySettings( QHttp& http, const QString& url );
|
||||
|
||||
/**
|
||||
* Set the credentials (username and password)
|
||||
* \note added in 1.1
|
||||
*/
|
||||
|
||||
/** Set the credentials (username and password) */
|
||||
void setCredentials( const QString& username, const QString &password );
|
||||
|
||||
/**Returns the network timeout in msec*/
|
||||
|
||||
@ -36,7 +36,7 @@ class QgsLabel
|
||||
BorderColor,
|
||||
BorderStyle,
|
||||
MultilineEnabled,
|
||||
StrikeOut, // added in 1.5
|
||||
StrikeOut,
|
||||
LabelFieldCount
|
||||
};
|
||||
|
||||
@ -51,7 +51,6 @@ class QgsLabel
|
||||
* \param feature feature to render the label for
|
||||
* \param selected feature is selected
|
||||
* \param classAttributes attributes to create the label from
|
||||
* \note added in 1.2
|
||||
*/
|
||||
void renderLabel( QgsRenderContext &renderContext, QgsFeature &feature, bool selected, QgsLabelAttributes *classAttributes = 0 );
|
||||
|
||||
|
||||
@ -48,7 +48,6 @@ public:
|
||||
bool underlineIsSet() const;
|
||||
bool underline() const;
|
||||
|
||||
/* strikeout added in 1.5 */
|
||||
void setStrikeOut( bool enable );
|
||||
bool strikeOutIsSet() const;
|
||||
bool strikeOut() const;
|
||||
@ -114,9 +113,7 @@ public:
|
||||
bool multilineEnabled() const;
|
||||
void setMultilineEnabled( bool useMultiline );
|
||||
|
||||
/* label only selected features
|
||||
* added in 1.5
|
||||
*/
|
||||
/* label only selected features */
|
||||
bool selectedOnly() const;
|
||||
void setSelectedOnly( bool selectedonly );
|
||||
};
|
||||
|
||||
@ -22,9 +22,7 @@ class QgsLabelPosition
|
||||
bool isPinned;
|
||||
};
|
||||
|
||||
/** Labeling engine interface.
|
||||
* \note Added in QGIS v1.4
|
||||
*/
|
||||
/** Labeling engine interface. */
|
||||
class QgsLabelingEngineInterface
|
||||
{
|
||||
%TypeHeaderCode
|
||||
@ -43,16 +41,12 @@ class QgsLabelingEngineInterface
|
||||
//! called to find out whether the layer is used for labeling
|
||||
virtual bool willUseLayer( QgsVectorLayer* layer ) = 0;
|
||||
//! clears all PAL layer settings for registered layers
|
||||
//! @note: this method was added in version 1.9
|
||||
virtual void clearActiveLayers() = 0;
|
||||
//! clears data defined objects from PAL layer settings for a registered layer
|
||||
//! @note: this method was added in version 1.9
|
||||
virtual void clearActiveLayer( const QString& layerID ) = 0;
|
||||
//! called when starting rendering of a layer
|
||||
//! @note: this method was added in version 1.6
|
||||
virtual int prepareLayer( QgsVectorLayer* layer, QStringList& attrNames, QgsRenderContext& ctx ) = 0;
|
||||
//! returns PAL layer settings for a registered layer
|
||||
//! @note: this method was added in version 1.9
|
||||
virtual QgsPalLayerSettings& layer( const QString& layerName ) = 0;
|
||||
//! adds a diagram layer to the labeling engine
|
||||
virtual int addDiagramLayer( QgsVectorLayer* layer, const QgsDiagramLayerSettings* s );
|
||||
@ -65,11 +59,9 @@ class QgsLabelingEngineInterface
|
||||
//! called when we're done with rendering
|
||||
virtual void exit() = 0;
|
||||
//! return infos about labels at a given (map) position
|
||||
//! @note: this method was added in version 1.7
|
||||
//! @deprecated since 2.4 - use takeResults() and methods of QgsLabelingResults
|
||||
virtual QList<QgsLabelPosition> labelsAtPosition( const QgsPoint& p ) = 0 /Deprecated/;
|
||||
//! return infos about labels within a given (map) rectangle
|
||||
//! @note: this method was added in version 1.9
|
||||
//! @deprecated since 2.4 - use takeResults() and methods of QgsLabelingResults
|
||||
virtual QList<QgsLabelPosition> labelsWithinRect( const QgsRectangle& r ) = 0 /Deprecated/;
|
||||
|
||||
@ -263,20 +255,16 @@ class QgsMapRenderer : QObject
|
||||
QgsRenderContext* rendererContext();
|
||||
|
||||
//! Labeling engine (NULL if there's no custom engine)
|
||||
//! \note Added in QGIS v1.4
|
||||
QgsLabelingEngineInterface* labelingEngine();
|
||||
|
||||
//! Set labeling engine. Previous engine (if any) is deleted.
|
||||
//! Takes ownership of the engine.
|
||||
//! Added in QGIS v1.4
|
||||
void setLabelingEngine( QgsLabelingEngineInterface* iface /Transfer/ );
|
||||
|
||||
//! Returns a QPainter::CompositionMode corresponding to a BlendMode
|
||||
//! Added in 1.9
|
||||
static QPainter::CompositionMode getCompositionMode( const QgsMapRenderer::BlendMode blendMode );
|
||||
static QPainter::CompositionMode getCompositionMode( const QgsMapRenderer::BlendMode &blendMode );
|
||||
//! Returns a BlendMode corresponding to a QPainter::CompositionMode
|
||||
//! Added in 1.9
|
||||
static QgsMapRenderer::BlendMode getBlendModeEnum( const QPainter::CompositionMode blendMode );
|
||||
static QgsMapRenderer::BlendMode getBlendModeEnum( const QPainter::CompositionMode &blendMode );
|
||||
|
||||
void addLayerCoordinateTransform( const QString& layerId, const QString& srcAuthId, const QString& destAuthId, int srcDatumTransform = -1, int destDatumTransform = -1 );
|
||||
void clearLayerCoordinateTransforms();
|
||||
|
||||
@ -455,12 +455,12 @@ class QgsPalLayerSettings
|
||||
void writeToLayer( QgsVectorLayer* layer );
|
||||
|
||||
/** Get a data defined property pointer
|
||||
* @note added in 1.9, helpful for Python access
|
||||
* @note helpful for Python access
|
||||
*/
|
||||
QgsDataDefined* dataDefinedProperty( QgsPalLayerSettings::DataDefinedProperties p );
|
||||
|
||||
/** Set a property as data defined
|
||||
* @note added in 1.9, helpful for Python access
|
||||
* @note helpful for Python access
|
||||
*/
|
||||
void setDataDefinedProperty( QgsPalLayerSettings::DataDefinedProperties p,
|
||||
bool active, bool useExpr, const QString& expr, const QString& field );
|
||||
@ -469,24 +469,24 @@ class QgsPalLayerSettings
|
||||
void removeDataDefinedProperty( QgsPalLayerSettings::DataDefinedProperties p );
|
||||
|
||||
/** Convert old property value to new one as delimited values
|
||||
* @note not available in python bindings; added in 1.9, as temporary solution until refactoring of project settings
|
||||
* @note not available in python bindings; as temporary solution until refactoring of project settings
|
||||
*/
|
||||
QString updateDataDefinedString( const QString& value );
|
||||
|
||||
/** Get property value as separate values split into Qmap
|
||||
* @note not available in python bindings; added in 1.9
|
||||
* @note not available in python bindings
|
||||
*/
|
||||
QMap<QString, QString> dataDefinedMap( QgsPalLayerSettings::DataDefinedProperties p ) const;
|
||||
|
||||
/** Get data defined property value from expression string or attribute field name
|
||||
* @returns value inside QVariant
|
||||
* @note not available in python bindings; added in 1.9
|
||||
* @note not available in python bindings
|
||||
*/
|
||||
QVariant dataDefinedValue( QgsPalLayerSettings::DataDefinedProperties p, QgsFeature& f, const QgsFields& fields ) const;
|
||||
|
||||
/** Get data defined property value from expression string or attribute field name
|
||||
* @returns true/false whether result is null or invalid
|
||||
* @note not available in python bindings; added in 1.9
|
||||
* @note not available in python bindings
|
||||
*/
|
||||
bool dataDefinedEvaluate( QgsPalLayerSettings::DataDefinedProperties p, QVariant& exprVal ) const;
|
||||
|
||||
@ -511,7 +511,7 @@ class QgsPalLayerSettings
|
||||
* @param mapUnitScale a mapUnitScale clamper
|
||||
* @return font pixel size
|
||||
*/
|
||||
int sizeToPixel( double size, const QgsRenderContext& c , SizeUnit unit, bool rasterfactor = false, const QgsMapUnitScale& mapUnitScale = QgsMapUnitScale() ) const;
|
||||
int sizeToPixel( double size, const QgsRenderContext& c, SizeUnit unit, bool rasterfactor = false, const QgsMapUnitScale& mapUnitScale = QgsMapUnitScale() ) const;
|
||||
|
||||
/** Calculates size (considering output size should be in pixel or map units, scale factors and optionally oversampling)
|
||||
* @param size size to convert
|
||||
@ -520,13 +520,12 @@ class QgsPalLayerSettings
|
||||
* @param rasterfactor whether to consider oversampling
|
||||
* @param mapUnitScale a mapUnitScale clamper
|
||||
* @return size that will render, as double
|
||||
* @note added in 1.9, as a better precision replacement for sizeToPixel
|
||||
*/
|
||||
double scaleToPixelContext( double size, const QgsRenderContext& c, SizeUnit unit, bool rasterfactor = false, const QgsMapUnitScale& mapUnitScale = QgsMapUnitScale() ) const;
|
||||
|
||||
/** Map of data defined enum to names and old-style indecies
|
||||
* The QPair contains a new string for layer property key, and a reference to old-style numeric key (< QGIS 2.0)
|
||||
* @note not available in python bindings; added in 1.9
|
||||
* @note not available in python bindings;
|
||||
*/
|
||||
// QMap<QgsPalLayerSettings::DataDefinedProperties, QPair<QString, int> > dataDefinedNames() const;
|
||||
};
|
||||
@ -686,10 +685,8 @@ class QgsPalLabeling : QgsLabelingEngineInterface
|
||||
static bool staticWillUseLayer( const QString& layerID );
|
||||
|
||||
//! clears all PAL layer settings for registered layers
|
||||
//! @note: this method was added in version 1.9
|
||||
virtual void clearActiveLayers();
|
||||
//! clears data defined objects from PAL layer settings for a registered layer
|
||||
//! @note: this method was added in version 1.9
|
||||
virtual void clearActiveLayer( const QString& layerID );
|
||||
//! hook called when drawing layer before issuing select()
|
||||
virtual int prepareLayer( QgsVectorLayer* layer, QStringList &attrNames, QgsRenderContext& ctx );
|
||||
@ -736,7 +733,6 @@ class QgsPalLabeling : QgsLabelingEngineInterface
|
||||
const QgsPalLayerSettings& tmpLyr );
|
||||
|
||||
//! load/save engine settings to project file
|
||||
//! @note added in QGIS 1.9
|
||||
void loadEngineSettings();
|
||||
void saveEngineSettings();
|
||||
void clearEngineSettings();
|
||||
|
||||
@ -23,8 +23,6 @@ class QgsPluginLayerType
|
||||
|
||||
/** \ingroup core
|
||||
a registry of plugin layers types
|
||||
|
||||
\note added in v1.5
|
||||
*/
|
||||
class QgsPluginLayerRegistry
|
||||
{
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/** \ingroup core
|
||||
* A class to represent a point geometry.
|
||||
* A class to represent a point.
|
||||
* Currently no Z axis / 2.5D support is implemented.
|
||||
*/
|
||||
class QgsPoint
|
||||
@ -80,7 +80,6 @@ class QgsPoint
|
||||
* set to false to use a "-" prefix for west and south coordinates
|
||||
* @param padded set to true to force minutes and seconds to use two decimals,
|
||||
* eg, '05' instead of '5'.
|
||||
* @note added in QGIS 1.4
|
||||
*/
|
||||
QString toDegreesMinutesSeconds( int thePrecision, const bool useSuffix = true, const bool padded = false ) const;
|
||||
|
||||
@ -92,7 +91,6 @@ class QgsPoint
|
||||
* set to false to use a "-" prefix for west and south coordinates
|
||||
* @param padded set to true to force minutes to use two decimals,
|
||||
* eg, '05' instead of '5'.
|
||||
* @note added in QGIS 1.9
|
||||
*/
|
||||
QString toDegreesMinutes( int thePrecision, const bool useSuffix = true, const bool padded = false ) const;
|
||||
|
||||
@ -109,12 +107,10 @@ class QgsPoint
|
||||
/**Returns the squared distance between this and other point*/
|
||||
double sqrDist( const QgsPoint& other ) const;
|
||||
|
||||
/**Returns the minimum distance between this point and a segment
|
||||
@note added in QGIS 1.5*/
|
||||
/**Returns the minimum distance between this point and a segment */
|
||||
double sqrDistToSegment( double x1, double y1, double x2, double y2, QgsPoint& minDistPoint /Out/, double epsilon = DEFAULT_SEGMENT_EPSILON ) const;
|
||||
|
||||
/**Calculates azimuth between this point and other one (clockwise in degree, starting from north)
|
||||
@note: this function has been added in version 1.7*/
|
||||
/**Calculates azimuth between this point and other one (clockwise in degree, starting from north) */
|
||||
double azimuth( const QgsPoint& other );
|
||||
|
||||
//! equality operator
|
||||
|
||||
@ -229,21 +229,17 @@ class QgsProject : QObject
|
||||
*/
|
||||
void dumpProperties() const;
|
||||
|
||||
/** prepare a filename to save it to the project file
|
||||
@note added in 1.3 */
|
||||
/** prepare a filename to save it to the project file */
|
||||
QString writePath( QString filename, QString relativeBasePath = QString::null ) const;
|
||||
|
||||
/** turn filename read from the project file to an absolute path
|
||||
@note added in 1.3 */
|
||||
/** turn filename read from the project file to an absolute path */
|
||||
QString readPath( QString filename ) const;
|
||||
|
||||
/** Return error message from previous read/write
|
||||
@note added in 1.4 */
|
||||
/** Return error message from previous read/write */
|
||||
QString error() const;
|
||||
|
||||
/** Change handler for missing layers.
|
||||
Deletes old handler and takes ownership of the new one.
|
||||
@note added in 1.4 */
|
||||
Deletes old handler and takes ownership of the new one. */
|
||||
void setBadLayerHandler( QgsProjectBadLayerHandler* handler /Transfer/ );
|
||||
|
||||
/** Returns project file path if layer is embedded from other project file. Returns empty string if layer is not embedded*/
|
||||
@ -251,7 +247,6 @@ class QgsProject : QObject
|
||||
|
||||
/** Creates a maplayer instance defined in an arbitrary project file. Caller takes ownership
|
||||
@return the layer or 0 in case of error
|
||||
@note: added in version 1.8
|
||||
*/
|
||||
/*
|
||||
bool createEmbeddedLayer( const QString& layerId, const QString& projectFilePath, QList<QDomNode>& brokenNodes,
|
||||
@ -262,27 +257,22 @@ class QgsProject : QObject
|
||||
*/
|
||||
QgsLayerTreeGroup* createEmbeddedGroup( const QString& groupName, const QString& projectFilePath );
|
||||
|
||||
/** Convenience function to set snap settings per layer
|
||||
@note added in version 1.9*/
|
||||
/** Convenience function to set snap settings per layer */
|
||||
void setSnapSettingsForLayer( const QString& layerId, bool enabled, QgsSnapper::SnappingType type, QgsTolerance::UnitType unit, double tolerance,
|
||||
bool avoidIntersection );
|
||||
|
||||
/** Convenience function to query snap settings of a layer
|
||||
@note added in version 1.9*/
|
||||
/** Convenience function to query snap settings of a layer */
|
||||
bool snapSettingsForLayer( const QString& layerId, bool& enabled /Out/, QgsSnapper::SnappingType& type /Out/, QgsTolerance::UnitType& units /Out/, double& tolerance /Out/,
|
||||
bool& avoidIntersection /Out/ ) const;
|
||||
|
||||
/** Convenience function to set topological editing
|
||||
@note added in version 1.9*/
|
||||
/** Convenience function to set topological editing */
|
||||
void setTopologicalEditing( bool enabled );
|
||||
|
||||
/** Convenience function to query topological editing status
|
||||
@note added in version 1.9*/
|
||||
/** Convenience function to query topological editing status */
|
||||
bool topologicalEditing() const;
|
||||
|
||||
/** Return project's home path
|
||||
@return home path of project (or QString::null if not set)
|
||||
@note added in version 2.0 */
|
||||
@return home path of project (or QString::null if not set) */
|
||||
QString homePath() const;
|
||||
|
||||
QgsRelationManager* relationManager() const;
|
||||
@ -299,12 +289,10 @@ class QgsProject : QObject
|
||||
|
||||
protected:
|
||||
|
||||
/** Set error message from read/write operation
|
||||
@note added in 1.4 */
|
||||
/** Set error message from read/write operation */
|
||||
void setError( QString errorMessage );
|
||||
|
||||
/** Clear error message
|
||||
@note added in 1.4 */
|
||||
/** Clear error message */
|
||||
void clearError();
|
||||
|
||||
//Creates layer and adds it to maplayer registry
|
||||
@ -369,8 +357,7 @@ class QgsProject : QObject
|
||||
}; // QgsProject
|
||||
|
||||
|
||||
/** Interface for classes that handle missing layer files when reading project file.
|
||||
@note added in 1.4 */
|
||||
/** Interface for classes that handle missing layer files when reading project file. */
|
||||
class QgsProjectBadLayerHandler
|
||||
{
|
||||
%TypeHeaderCode
|
||||
@ -383,8 +370,7 @@ class QgsProjectBadLayerHandler
|
||||
};
|
||||
|
||||
|
||||
/** Default bad layer handler which ignores any missing layers.
|
||||
@note added in 1.4 */
|
||||
/** Default bad layer handler which ignores any missing layers. */
|
||||
class QgsProjectBadLayerDefaultHandler : QgsProjectBadLayerHandler
|
||||
{
|
||||
%TypeHeaderCode
|
||||
|
||||
@ -85,21 +85,14 @@ class QgsProviderRegistry
|
||||
This walks through all data providers appending calls to their
|
||||
buildSupportedRasterFileFilter to a string, which is then returned.
|
||||
|
||||
@note this method was added in QGIS 2.0
|
||||
@note This replaces QgsRasterLayer::buildSupportedRasterFileFilter()
|
||||
*/
|
||||
virtual QString fileRasterFilters() const;
|
||||
/** return a string containing the available database drivers
|
||||
* @note this method was added in QGIS 1.1
|
||||
*/
|
||||
/** return a string containing the available database drivers */
|
||||
virtual QString databaseDrivers() const;
|
||||
/** return a string containing the available directory drivers
|
||||
* @note this method was added in QGIS 1.1
|
||||
*/
|
||||
/** return a string containing the available directory drivers */
|
||||
virtual QString directoryDrivers() const;
|
||||
/** return a string containing the available protocol drivers
|
||||
* @note this method was added in QGIS 1.1
|
||||
*/
|
||||
/** return a string containing the available protocol drivers */
|
||||
virtual QString protocolDrivers() const;
|
||||
|
||||
void registerGuis( QWidget *widget );
|
||||
|
||||
@ -17,7 +17,6 @@ class QgsRectangle
|
||||
//! Construct a rectangle from two points. The rectangle is normalized after construction.
|
||||
QgsRectangle( const QgsPoint & p1, const QgsPoint & p2 );
|
||||
//! Construct a rectangle from a QRectF. The rectangle is normalized after construction.
|
||||
//! @note added in 2.0
|
||||
QgsRectangle( const QRectF & qRectF );
|
||||
//! Copy constructor
|
||||
QgsRectangle( const QgsRectangle &other );
|
||||
@ -67,16 +66,14 @@ class QgsRectangle
|
||||
//! returns true when rectangle intersects with other rectangle
|
||||
bool intersects( const QgsRectangle& rect ) const;
|
||||
//! return true when rectangle contains other rectangle
|
||||
//! @note added in version 1.1
|
||||
bool contains( const QgsRectangle& rect ) const;
|
||||
//! return true when rectangle contains a point
|
||||
//! @note added in version 1.3
|
||||
bool contains( const QgsPoint &p ) const;
|
||||
//! expand the rectangle so that covers both the original rectangle and the given rectangle
|
||||
void combineExtentWith( QgsRectangle *rect );
|
||||
//! expand the rectangle so that covers both the original rectangle and the given point
|
||||
void combineExtentWith( double x, double y );
|
||||
//! test if rectangle is empty
|
||||
//! test if rectangle is empty.
|
||||
//! Empty rectangle may still be non-null if it contains valid information (e.g. bounding box of a point)
|
||||
bool isEmpty() const;
|
||||
//! test if the rectangle is null (all coordinates zero or after call to setMinimal()).
|
||||
@ -86,10 +83,8 @@ class QgsRectangle
|
||||
//! returns string representation in Wkt form
|
||||
QString asWktCoordinates() const;
|
||||
//! returns string representation as WKT Polygon
|
||||
//! @note added in 2.0
|
||||
QString asWktPolygon() const;
|
||||
//! returns a QRectF with same coordinates.
|
||||
//! @note added in 2.0
|
||||
QRectF toRectF() const;
|
||||
//! returns string representation of form xmin,ymin xmax,ymax
|
||||
QString toString( bool automaticPrecision = false ) const;
|
||||
@ -113,6 +108,5 @@ class QgsRectangle
|
||||
bool isFinite() const;
|
||||
|
||||
//! swap x/y
|
||||
//! @note added in 1.9
|
||||
void invert();
|
||||
};
|
||||
|
||||
@ -33,21 +33,17 @@ class QgsRenderContext
|
||||
|
||||
bool forceVectorOutput() const;
|
||||
|
||||
/**Returns true if advanced effects such as blend modes such be used
|
||||
@note added in 1.9*/
|
||||
/**Returns true if advanced effects such as blend modes such be used */
|
||||
bool useAdvancedEffects() const;
|
||||
/**Used to enable or disable advanced effects such as blend modes
|
||||
@note: added in version 1.9*/
|
||||
/**Used to enable or disable advanced effects such as blend modes */
|
||||
void setUseAdvancedEffects( bool enabled );
|
||||
|
||||
bool drawEditingInformation() const;
|
||||
|
||||
double rendererScale() const;
|
||||
|
||||
//! Added in QGIS v1.4
|
||||
QgsLabelingEngineInterface* labelingEngine();
|
||||
|
||||
//! Added in QGIS v2.0
|
||||
QColor selectionColor() const;
|
||||
|
||||
/**Returns true if vector selections should be shown in the rendered map
|
||||
@ -70,11 +66,8 @@ class QgsRenderContext
|
||||
void setRasterScaleFactor( double factor );
|
||||
void setRendererScale( double scale );
|
||||
void setPainter( QPainter* p );
|
||||
//! Added in QGIS v1.5
|
||||
void setForceVectorOutput( bool force );
|
||||
//! Added in QGIS v1.4
|
||||
void setLabelingEngine( QgsLabelingEngineInterface* iface );
|
||||
//! Added in QGIS v2.0
|
||||
void setSelectionColor( const QColor& color );
|
||||
|
||||
/**Sets whether vector selections should be shown in the rendered map
|
||||
|
||||
@ -105,7 +105,7 @@ class QgsVectorDataProvider : QgsDataProvider
|
||||
/**
|
||||
* Return a map of indexes with field names for this layer
|
||||
* @return map of fields
|
||||
* @see QgsFieldMap
|
||||
* @see QgsFields
|
||||
*/
|
||||
virtual const QgsFields &fields() const = 0;
|
||||
|
||||
@ -139,7 +139,7 @@ class QgsVectorDataProvider : QgsDataProvider
|
||||
* Return unique values of an attribute
|
||||
* @param index the index of the attribute
|
||||
* @param uniqueValues values reference to the list to fill
|
||||
* @param limit maxmum number of the values to return (added in 1.4)
|
||||
* @param limit maxmum number of the values to return
|
||||
*
|
||||
* Default implementation simply iterates the features
|
||||
*/
|
||||
@ -150,7 +150,6 @@ class QgsVectorDataProvider : QgsDataProvider
|
||||
* or if the given attribute is not an enum type.
|
||||
* @param index the index of the attribute
|
||||
* @param enumList reference to the list to fill
|
||||
* @note: added in version 1.2
|
||||
*/
|
||||
virtual void enumValues( int index, QStringList& enumList /Out/ );
|
||||
|
||||
@ -171,7 +170,6 @@ class QgsVectorDataProvider : QgsDataProvider
|
||||
* Adds new attributes
|
||||
* @param attributes list of new attributes
|
||||
* @return true in case of success and false in case of failure
|
||||
* @note added in 1.2
|
||||
*/
|
||||
virtual bool addAttributes( const QList<QgsField> &attributes );
|
||||
|
||||
@ -251,7 +249,6 @@ class QgsVectorDataProvider : QgsDataProvider
|
||||
|
||||
/**
|
||||
* Return list of indexes of fields that make up the primary key
|
||||
* @note added in 2.0
|
||||
*/
|
||||
virtual QList<int> pkAttributeIndexes();
|
||||
|
||||
@ -262,7 +259,6 @@ class QgsVectorDataProvider : QgsDataProvider
|
||||
|
||||
/**
|
||||
* check if provider supports type of field
|
||||
* @note added in 1.2
|
||||
*/
|
||||
bool supportedType( const QgsField &field ) const;
|
||||
|
||||
@ -281,13 +277,13 @@ class QgsVectorDataProvider : QgsDataProvider
|
||||
|
||||
/**
|
||||
* Returns the names of the supported types
|
||||
* @note added in 1.2
|
||||
*/
|
||||
const QList< QgsVectorDataProvider::NativeType > &nativeTypes() const;
|
||||
|
||||
/** Returns true if the provider is strict about the type of inserted features
|
||||
(e.g. no multipolygon in a polygon layer)
|
||||
@note: added in version 1.4*/
|
||||
/**
|
||||
* Returns true if the provider is strict about the type of inserted features
|
||||
* (e.g. no multipolygon in a polygon layer)
|
||||
*/
|
||||
bool doesStrictFeatureTypeCheck() const;
|
||||
|
||||
/** Returns a list of available encodings */
|
||||
@ -295,19 +291,16 @@ class QgsVectorDataProvider : QgsDataProvider
|
||||
|
||||
/**
|
||||
* Provider has errors to report
|
||||
* @note added in 1.7
|
||||
*/
|
||||
bool hasErrors();
|
||||
|
||||
/**
|
||||
* Clear recorded errors
|
||||
* @note added in 1.7
|
||||
*/
|
||||
void clearErrors();
|
||||
|
||||
/**
|
||||
* Get recorded errors
|
||||
* @note added in 1.7
|
||||
*/
|
||||
QStringList errors();
|
||||
|
||||
|
||||
@ -95,12 +95,11 @@ class QgsVectorFileWriter
|
||||
ErrCreateLayer,
|
||||
ErrAttributeTypeUnsupported,
|
||||
ErrAttributeCreationFailed,
|
||||
ErrProjection, // added in 1.5
|
||||
ErrFeatureWriteFailed, // added in 1.6
|
||||
ErrInvalidLayer, // added in 2.0
|
||||
ErrProjection,
|
||||
ErrFeatureWriteFailed,
|
||||
ErrInvalidLayer,
|
||||
};
|
||||
|
||||
//added in 2.0
|
||||
enum SymbologyExport
|
||||
{
|
||||
NoSymbology, //export only data
|
||||
@ -109,7 +108,6 @@ class QgsVectorFileWriter
|
||||
};
|
||||
|
||||
/** Write contents of vector layer to an (OGR supported) vector formt
|
||||
@note: this method was added in version 1.5
|
||||
@param layer layer to write
|
||||
@param fileName file name to write to
|
||||
@param fileEncoding encoding to use
|
||||
@ -132,12 +130,12 @@ class QgsVectorFileWriter
|
||||
const QString& driverName = "ESRI Shapefile",
|
||||
bool onlySelected = false,
|
||||
QString *errorMessage = 0,
|
||||
const QStringList &datasourceOptions = QStringList(), // added in 1.6
|
||||
const QStringList &layerOptions = QStringList(), // added in 1.6
|
||||
bool skipAttributeCreation = false, // added in 1.6
|
||||
QString *newFilename = 0, // added in 1.9
|
||||
SymbologyExport symbologyExport = NoSymbology, //added in 2.0
|
||||
double symbologyScale = 1.0, // added in 2.0
|
||||
const QStringList &datasourceOptions = QStringList(),
|
||||
const QStringList &layerOptions = QStringList(),
|
||||
bool skipAttributeCreation = false,
|
||||
QString *newFilename = 0,
|
||||
SymbologyExport symbologyExport = NoSymbology,
|
||||
double symbologyScale = 1.0,
|
||||
const QgsRectangle* filterExtent = 0 // added in 2.4
|
||||
);
|
||||
|
||||
@ -165,10 +163,10 @@ class QgsVectorFileWriter
|
||||
QGis::WkbType geometryType,
|
||||
const QgsCoordinateReferenceSystem* srs,
|
||||
const QString& driverName = "ESRI Shapefile",
|
||||
const QStringList &datasourceOptions = QStringList(), // added in 1.6
|
||||
const QStringList &layerOptions = QStringList(), // added in 1.6
|
||||
QString *newFilename = 0, // added in 1.9
|
||||
QgsVectorFileWriter::SymbologyExport symbologyExport = QgsVectorFileWriter::NoSymbology //added in 2.0
|
||||
const QStringList &datasourceOptions = QStringList(),
|
||||
const QStringList &layerOptions = QStringList(),
|
||||
QString *newFilename = 0,
|
||||
QgsVectorFileWriter::SymbologyExport symbologyExport = QgsVectorFileWriter::NoSymbology
|
||||
);
|
||||
|
||||
/**Returns map with format filter string as key and OGR format key as value*/
|
||||
@ -192,9 +190,7 @@ class QgsVectorFileWriter
|
||||
/** checks whether there were any errors in constructor */
|
||||
WriterError hasError();
|
||||
|
||||
/** retrieves error message
|
||||
* @note added in 1.5
|
||||
*/
|
||||
/** retrieves error message */
|
||||
QString errorMessage();
|
||||
|
||||
/** add feature to the currently opened shapefile */
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
typedef QList<int> QgsAttributeList;
|
||||
typedef QSet<int> QgsAttributeIds;
|
||||
|
||||
/** @note Added in 1.9 */
|
||||
class QgsAttributeEditorElement : QObject
|
||||
{
|
||||
%TypeHeaderCode
|
||||
@ -29,7 +28,6 @@ class QgsAttributeEditorElement : QObject
|
||||
virtual QDomElement toDomElement( QDomDocument& doc ) const = 0;
|
||||
};
|
||||
|
||||
/** @note Added in 1.9 */
|
||||
class QgsAttributeEditorContainer : QgsAttributeEditorElement
|
||||
{
|
||||
%TypeHeaderCode
|
||||
@ -43,18 +41,18 @@ class QgsAttributeEditorContainer : QgsAttributeEditorElement
|
||||
|
||||
virtual QDomElement toDomElement( QDomDocument& doc ) const;
|
||||
virtual void addChildElement( QgsAttributeEditorElement *widget );
|
||||
virtual void setIsGroupBox( bool isGroupBox );
|
||||
virtual bool isGroupBox() const;
|
||||
QList<QgsAttributeEditorElement*> children() const;
|
||||
};
|
||||
|
||||
/** @note Added in 1.9 */
|
||||
class QgsAttributeEditorField : QgsAttributeEditorElement
|
||||
{
|
||||
%TypeHeaderCode
|
||||
#include "qgsvectorlayer.h"
|
||||
%End
|
||||
public:
|
||||
QgsAttributeEditorField( QString name , int idx, QObject *parent /TransferThis/ );
|
||||
QgsAttributeEditorField( QString name, int idx, QObject *parent /TransferThis/ );
|
||||
|
||||
~QgsAttributeEditorField();
|
||||
|
||||
@ -84,7 +82,6 @@ class QgsAttributeEditorRelation : QgsAttributeEditorElement
|
||||
bool init( QgsRelationManager *relManager );
|
||||
};
|
||||
|
||||
/** @note added in 1.7 */
|
||||
struct QgsVectorJoinInfo
|
||||
{
|
||||
%TypeHeaderCode
|
||||
@ -122,7 +119,7 @@ class QgsVectorLayer : QgsMapLayer
|
||||
%End
|
||||
|
||||
public:
|
||||
/** The different types to layout the attribute editor. @note added in 1.9 */
|
||||
/** The different types to layout the attribute editor. */
|
||||
enum EditorLayout
|
||||
{
|
||||
GeneratedLayout,
|
||||
@ -142,19 +139,19 @@ class QgsVectorLayer : QgsMapLayer
|
||||
Classification,
|
||||
EditRange,
|
||||
SliderRange,
|
||||
CheckBox, /**< @note added in 1.4 */
|
||||
CheckBox,
|
||||
FileName,
|
||||
Enumeration,
|
||||
Immutable, /**< The attribute value should not be changed in the attribute form */
|
||||
Hidden, /**< The attribute value should not be shown in the attribute form @note added in 1.4 */
|
||||
TextEdit, /**< multiline edit @note added in 1.4*/
|
||||
Calendar, /**< calendar widget @note added in 1.5 */
|
||||
DialRange, /**< dial range @note added in 1.5 */
|
||||
ValueRelation, /**< value map from an table @note added in 1.8 */
|
||||
UuidGenerator, /**< uuid generator - readonly and automatically intialized @note added in 1.9 */
|
||||
Photo, /**< phote widget @note added in 1.9 */
|
||||
WebView, /**< webview widget @note added in 1.9 */
|
||||
Color, /**< color @note added in 1.9 */
|
||||
Hidden, /**< The attribute value should not be shown in the attribute form */
|
||||
TextEdit, /**< multiline edit */
|
||||
Calendar, /**< calendar widget */
|
||||
DialRange, /**< dial range */
|
||||
ValueRelation, /**< value map from an table */
|
||||
UuidGenerator, /**< uuid generator - readonly and automatically intialized */
|
||||
Photo, /**< phote widget */
|
||||
WebView, /**< webview widget */
|
||||
Color, /**< color */
|
||||
EditorWidgetV2, /**< modularized edit widgets @note added in 2.1 */
|
||||
};
|
||||
|
||||
@ -190,13 +187,13 @@ class QgsVectorLayer : QgsMapLayer
|
||||
QString mFilterExpression;
|
||||
bool mAllowNull;
|
||||
bool mOrderByValue;
|
||||
bool mAllowMulti; /* allow selection of multiple keys @added in 1.9 */
|
||||
bool mAllowMulti; /* allow selection of multiple keys */
|
||||
};
|
||||
|
||||
struct GroupData
|
||||
{
|
||||
GroupData();
|
||||
GroupData( QString name , QList<QString> fields );
|
||||
GroupData( QString name, QList<QString> fields );
|
||||
QString mName;
|
||||
QList<QString> mFields;
|
||||
};
|
||||
@ -204,7 +201,7 @@ class QgsVectorLayer : QgsMapLayer
|
||||
struct TabData
|
||||
{
|
||||
TabData();
|
||||
TabData( QString name , QList<QString> fields , QList<QgsVectorLayer::GroupData> groups );
|
||||
TabData( QString name, QList<QString> fields, QList<QgsVectorLayer::GroupData> groups );
|
||||
QString mName;
|
||||
QList<QString> mFields;
|
||||
QList<QgsVectorLayer::GroupData> mGroups;
|
||||
@ -249,7 +246,6 @@ class QgsVectorLayer : QgsMapLayer
|
||||
*
|
||||
* @param displayExpression The expression which will be used to preview features
|
||||
* for this layer
|
||||
* @note added in 2.0
|
||||
*/
|
||||
void setDisplayExpression( const QString &displayExpression );
|
||||
|
||||
@ -258,8 +254,6 @@ class QgsVectorLayer : QgsMapLayer
|
||||
* Uses { @link QgsExpression }
|
||||
*
|
||||
* @return The expression which will be used to preview features for this layer
|
||||
*
|
||||
* @note added in 2.0
|
||||
*/
|
||||
const QString displayExpression();
|
||||
|
||||
@ -279,21 +273,19 @@ 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
|
||||
@note since 2.6 returns bool indicating whether the join can be added */
|
||||
bool addJoin( const QgsVectorJoinInfo& joinInfo );
|
||||
|
||||
/** Removes a vector layer join
|
||||
@note added in 1.7 */
|
||||
/** Removes a vector layer join */
|
||||
void removeJoin( const QString& joinLayerId );
|
||||
|
||||
/** @note added in 1.7 */
|
||||
const QList< QgsVectorJoinInfo >& vectorJoins() const;
|
||||
|
||||
/**
|
||||
* Add a new field which is calculated by the expression specified
|
||||
*
|
||||
* @param exp The expression which calculates the field
|
||||
* @param fld The field to calculate
|
||||
*
|
||||
* @note added in 2.6
|
||||
*/
|
||||
@ -302,7 +294,7 @@ class QgsVectorLayer : QgsMapLayer
|
||||
/**
|
||||
* Remove an expression field
|
||||
*
|
||||
* @param exp The expression which calculates the field
|
||||
* @param index The index of the field
|
||||
*
|
||||
* @note added in 2.6
|
||||
*/
|
||||
@ -369,6 +361,7 @@ class QgsVectorLayer : QgsMapLayer
|
||||
* @return A list of { @link QgsFeature } 's
|
||||
*
|
||||
* @see selectedFeaturesIds()
|
||||
* @see selectedFeaturesIterator() which is more memory friendly when handling large selections
|
||||
*/
|
||||
QgsFeatureList selectedFeatures();
|
||||
|
||||
@ -381,6 +374,7 @@ class QgsVectorLayer : QgsMapLayer
|
||||
* @return Iterator over the selected features
|
||||
*
|
||||
* @see selectedFeaturesIds()
|
||||
* @see selectedFeatures()
|
||||
*/
|
||||
QgsFeatureIterator selectedFeaturesIterator( QgsFeatureRequest request = QgsFeatureRequest() );
|
||||
|
||||
@ -411,20 +405,15 @@ class QgsVectorLayer : QgsMapLayer
|
||||
void setDiagramLayerSettings( const QgsDiagramLayerSettings& s );
|
||||
const QgsDiagramLayerSettings *diagramLayerSettings() const;
|
||||
|
||||
/** Return renderer V2.
|
||||
* @note added in 1.4 */
|
||||
/** Return renderer V2. */
|
||||
QgsFeatureRendererV2* rendererV2();
|
||||
/** Set renderer V2.
|
||||
* @note added in 1.4
|
||||
*/
|
||||
/** Set renderer V2. */
|
||||
void setRendererV2( QgsFeatureRendererV2* r /Transfer/ );
|
||||
|
||||
/** Returns point, line or polygon */
|
||||
QGis::GeometryType geometryType() const;
|
||||
|
||||
/** Returns true if this is a geometry layer and false in case of NoGeometry (table only) or UnknownGeometry
|
||||
* @note added in 1.7
|
||||
*/
|
||||
/** Returns true if this is a geometry layer and false in case of NoGeometry (table only) or UnknownGeometry */
|
||||
bool hasGeometryType() const;
|
||||
|
||||
/**Returns the WKBType or WKBUnknown in case of error*/
|
||||
@ -485,7 +474,7 @@ class QgsVectorLayer : QgsMapLayer
|
||||
*/
|
||||
virtual QString loadNamedStyle( const QString &theURI, bool &theResultFlag );
|
||||
|
||||
virtual bool applyNamedStyle( QString namedStyle , QString errorMsg );
|
||||
virtual bool applyNamedStyle( QString namedStyle, QString errorMsg );
|
||||
|
||||
/** convert a saved attribute editor element into a AttributeEditor structure as it's used internally.
|
||||
* @param elem the DOM element
|
||||
@ -540,7 +529,7 @@ class QgsVectorLayer : QgsMapLayer
|
||||
* @param subset The subset string. This may be the where clause of a sql statement
|
||||
* or other defintion string specific to the underlying dataprovider
|
||||
* and data store.
|
||||
* @return true, when setting the subset string was successful, false otherwise (added in 1.4)
|
||||
* @return true, when setting the subset string was successful, false otherwise
|
||||
*/
|
||||
virtual bool setSubsetString( QString subset );
|
||||
|
||||
@ -567,7 +556,6 @@ class QgsVectorLayer : QgsMapLayer
|
||||
{@link changeGeometry()} instead.
|
||||
@param f Feature to update
|
||||
@return True in case of success and False in case of error
|
||||
@note Added in 1.8
|
||||
*/
|
||||
bool updateFeature( QgsFeature &f );
|
||||
|
||||
@ -682,9 +670,7 @@ class QgsVectorLayer : QgsMapLayer
|
||||
/** Returns true if the provider is in editing mode */
|
||||
virtual bool isEditable() const;
|
||||
|
||||
/** Returns true if the provider is in read-only mode
|
||||
* @note added in 1.6
|
||||
*/
|
||||
/** Returns true if the provider is in read-only mode */
|
||||
virtual bool isReadOnly() const;
|
||||
|
||||
/** Returns true if the provider has been modified since the last commit */
|
||||
@ -710,8 +696,7 @@ class QgsVectorLayer : QgsMapLayer
|
||||
QMultiMap < double, QgsSnappingResult > &snappingResults /Out/,
|
||||
QgsSnapper::SnappingType snap_to );
|
||||
|
||||
/**Synchronises with changes in the datasource
|
||||
@note added in version 1.6*/
|
||||
/**Synchronises with changes in the datasource */
|
||||
virtual void reload();
|
||||
|
||||
/** Return new instance of QgsMapLayerRenderer that will be used for rendering of given context
|
||||
@ -736,9 +721,7 @@ class QgsVectorLayer : QgsMapLayer
|
||||
/** returns list of attributes */
|
||||
QList<int> pendingAllAttributesList();
|
||||
|
||||
/** returns list of attribute making up the primary key
|
||||
* @note added in 2.0
|
||||
*/
|
||||
/** returns list of attribute making up the primary key */
|
||||
QList<int> pendingPkAttributesList();
|
||||
|
||||
/** returns feature count after commit */
|
||||
@ -746,15 +729,13 @@ class QgsVectorLayer : QgsMapLayer
|
||||
|
||||
/** Make layer read-only (editing disabled) or not
|
||||
* @return false if the layer is in editing yet
|
||||
* @note added in 1.6
|
||||
*/
|
||||
bool setReadOnly( bool readonly = true );
|
||||
|
||||
/** Make layer editable */
|
||||
bool startEditing();
|
||||
|
||||
/** change feature's geometry
|
||||
@note added in version 1.2 */
|
||||
/** change feature's geometry */
|
||||
bool changeGeometry( QgsFeatureId fid, QgsGeometry* geom );
|
||||
|
||||
/**
|
||||
@ -778,19 +759,17 @@ class QgsVectorLayer : QgsMapLayer
|
||||
bool changeAttributeValue( QgsFeatureId fid, int field, const QVariant &newValue, const QVariant &oldValue = QVariant() );
|
||||
|
||||
/** add an attribute field (but does not commit it)
|
||||
returns true if the field was added
|
||||
@note added in version 1.2 */
|
||||
returns true if the field was added */
|
||||
bool addAttribute( const QgsField &field );
|
||||
|
||||
/**
|
||||
* Sets an alias (a display name) for attributes to display in dialogs
|
||||
* @note added in version 1.2
|
||||
*/
|
||||
/** Sets an alias (a display name) for attributes to display in dialogs */
|
||||
void addAttributeAlias( int attIndex, QString aliasString );
|
||||
|
||||
/** Removes an alias (a display name) for attributes to display in dialogs */
|
||||
void remAttributeAlias( int attIndex );
|
||||
|
||||
/**
|
||||
* Adds a tab (for the attribute editor form) holding groups and fields
|
||||
* @note added in version 2.0
|
||||
*/
|
||||
void addAttributeEditorWidget( QgsAttributeEditorElement* data );
|
||||
|
||||
@ -836,25 +815,17 @@ class QgsVectorLayer : QgsMapLayer
|
||||
|
||||
/**
|
||||
* Returns a list of tabs holding groups and fields
|
||||
* @note added in version 2.0
|
||||
*/
|
||||
QList< QgsAttributeEditorElement* > &attributeEditorElements();
|
||||
/**
|
||||
* Clears all the tabs for the attribute editor form
|
||||
* @note added in version 2.0
|
||||
*/
|
||||
void clearAttributeEditorWidgets();
|
||||
|
||||
/**
|
||||
* Returns the alias of an attribute name or an empty string if there is no alias
|
||||
* @note added in version 1.2
|
||||
*/
|
||||
/** Returns the alias of an attribute name or an empty string if there is no alias */
|
||||
QString attributeAlias( int attributeIndex ) const;
|
||||
|
||||
/**
|
||||
* Convenience function that returns the attribute alias if defined or the field name else
|
||||
* @note added in version 1.2
|
||||
*/
|
||||
/** Convenience function that returns the attribute alias if defined or the field name else */
|
||||
QString attributeDisplayName( int attributeIndex ) const;
|
||||
|
||||
const QMap< QString, QString >& attributeAliases() const;
|
||||
@ -902,57 +873,88 @@ class QgsVectorLayer : QgsMapLayer
|
||||
const QStringList &commitErrors();
|
||||
|
||||
/** Stop editing and discard the edits
|
||||
* @param deleteBuffer whether to delete editing buffer (added in 1.9)
|
||||
* @param deleteBuffer whether to delete editing buffer
|
||||
*/
|
||||
bool rollBack( bool deleteBuffer = true );
|
||||
|
||||
/**
|
||||
* Get edit type
|
||||
*
|
||||
* @deprecated Use @see{editorWidgetV2} instead
|
||||
* @deprecated Use editorWidgetV2() instead
|
||||
*/
|
||||
EditType editType( int idx ) /Deprecated/;
|
||||
|
||||
/**
|
||||
* Get edit type
|
||||
*
|
||||
* @deprecated Use @see{setEditorWidgetV2} instead
|
||||
* @deprecated Use setEditorWidgetV2() instead
|
||||
*/
|
||||
void setEditType( int idx, EditType edit ) /Deprecated/;
|
||||
|
||||
/** get the active layout for the attribute editor for this layer (added in 1.9) */
|
||||
/** get the active layout for the attribute editor for this layer */
|
||||
EditorLayout editorLayout();
|
||||
|
||||
/** set the active layout for the attribute editor for this layer (added in 1.9) */
|
||||
/** set the active layout for the attribute editor for this layer */
|
||||
void setEditorLayout( EditorLayout editorLayout );
|
||||
|
||||
/**
|
||||
* Set the editor widget type for a field
|
||||
*
|
||||
* QGIS ships the following widget types, additional types may be available depending
|
||||
* on plugins.
|
||||
*
|
||||
* <ul>
|
||||
* <li>CheckBox (QgsCheckboxWidgetWrapper)</li>
|
||||
* <li>Classification (QgsClassificationWidgetWrapper)</li>
|
||||
* <li>Color (QgsColorWidgetWrapper)</li>
|
||||
* <li>DateTime (QgsDateTimeEditWrapper)</li>
|
||||
* <li>Enumeration (QgsEnumerationWidgetWrapper)</li>
|
||||
* <li>FileName (QgsFileNameWidgetWrapper)</li>
|
||||
* <li>Hidden (QgsHiddenWidgetWrapper)</li>
|
||||
* <li>Photo (QgsPhotoWidgetWrapper)</li>
|
||||
* <li>Range (QgsRangeWidgetWrapper)</li>
|
||||
* <li>RelationReference (QgsRelationReferenceWidgetWrapper)</li>
|
||||
* <li>TextEdit (QgsTextEditWrapper)</li>
|
||||
* <li>UniqueValues (QgsUniqueValuesWidgetWrapper)</li>
|
||||
* <li>UuidGenerator (QgsUuidWidgetWrapper)</li>
|
||||
* <li>ValueMap (QgsValueMapWidgetWrapper)</li>
|
||||
* <li>ValueRelation (QgsValueRelationWidgetWrapper)</li>
|
||||
* <li>WebView (QgsWebViewWidgetWrapper)</li>
|
||||
* </ul>
|
||||
*
|
||||
* @param attrIdx Index of the field
|
||||
* @param widgetType Type id of the editor widget to use
|
||||
*/
|
||||
void setEditorWidgetV2( int attrIdx, const QString& widgetType );
|
||||
|
||||
/**
|
||||
* Set the editor widget config for a field
|
||||
* Set the editor widget config for a field.
|
||||
*
|
||||
* Python: Will accept a map.
|
||||
*
|
||||
* Example:
|
||||
* \code{.py}
|
||||
* layer.setEditorWidgetV2Config( 1, { 'Layer': 'otherlayerid_1234', 'Key': 'Keyfield', 'Value': 'ValueField' } )
|
||||
* \endcode
|
||||
*
|
||||
* @param attrIdx Index of the field
|
||||
* @param config The config to set for this field
|
||||
*
|
||||
* @see setEditorWidgetV2() for a list of widgets and choose the widget to see the available options.
|
||||
*/
|
||||
void setEditorWidgetV2Config( int attrIdx, const QMap<QString, QVariant>& config );
|
||||
|
||||
/**
|
||||
* Set string representing 'true' for a checkbox (added in 1.4)
|
||||
* Set string representing 'true' for a checkbox
|
||||
*
|
||||
* @deprecated Use @see{setEditorWidgetV2Config} instead
|
||||
* @deprecated Use setEditorWidgetV2Config() instead
|
||||
*/
|
||||
void setCheckedState( int idx, QString checked, QString notChecked ) /Deprecated/;
|
||||
|
||||
/** get edit form (added in 1.4) */
|
||||
/** get edit form */
|
||||
QString editForm();
|
||||
|
||||
/** set edit form (added in 1.4) */
|
||||
/** set edit form */
|
||||
void setEditForm( QString ui );
|
||||
|
||||
/** Type of feature form pop-up suppression after feature creation (overrides app setting)
|
||||
@ -963,36 +965,32 @@ class QgsVectorLayer : QgsMapLayer
|
||||
* @note added in 2.1 */
|
||||
void setFeatureFormSuppress( QgsVectorLayer::FeatureFormSuppress s );
|
||||
|
||||
/** get annotation form (added in 1.5)*/
|
||||
/** get annotation form */
|
||||
QString annotationForm() const;
|
||||
|
||||
/** set annotation form for layer (added in 1.5)*/
|
||||
/** set annotation form for layer */
|
||||
void setAnnotationForm( const QString& ui );
|
||||
|
||||
/** get python function for edit form initialization (added in 1.4) */
|
||||
/** get python function for edit form initialization */
|
||||
QString editFormInit();
|
||||
|
||||
/** set python function for edit form initialization (added in 1.4) */
|
||||
/** set python function for edit form initialization */
|
||||
void setEditFormInit( QString function );
|
||||
|
||||
/**
|
||||
* Access value map
|
||||
* @deprecated Use @see{editorWidgetV2Config} instead
|
||||
* @deprecated Use editorWidgetV2Config() instead
|
||||
*/
|
||||
QMap<QString, QVariant> valueMap( int idx ) /Deprecated/;
|
||||
|
||||
/**
|
||||
* Access range widget config data
|
||||
*
|
||||
* @deprecated Use @see{editorWidgetV2Config} instead
|
||||
* @deprecated Use editorWidgetV2Config() instead
|
||||
*/
|
||||
RangeData range( int idx ) /Deprecated/;
|
||||
|
||||
/**
|
||||
* Access value relation widget data
|
||||
*
|
||||
* @note added in 1.8
|
||||
*/
|
||||
/** Access value relation widget data */
|
||||
ValueRelationData valueRelation( int idx );
|
||||
|
||||
/**
|
||||
@ -1006,39 +1004,27 @@ class QgsVectorLayer : QgsMapLayer
|
||||
/**
|
||||
* Access date format
|
||||
*
|
||||
* @note added in 1.9
|
||||
*
|
||||
* @deprecated Use @see{setEditorWdigetV2Config} instead
|
||||
* @deprecated Use setEditorWidgetV2Config() instead
|
||||
*/
|
||||
QString dateFormat( int idx ) /Deprecated/;
|
||||
|
||||
/**
|
||||
* Access widget size for photo and webview widget
|
||||
*
|
||||
* @note added in 1.9
|
||||
*
|
||||
* @deprecated Use @see{setEditorWdigetV2Config} instead
|
||||
* @deprecated Use setEditorWidgetV2Config() instead
|
||||
*/
|
||||
QSize widgetSize( int idx ) /Deprecated/;
|
||||
|
||||
/**is edit widget editable
|
||||
* @note added in 1.9
|
||||
**/
|
||||
/**is edit widget editable **/
|
||||
bool fieldEditable( int idx );
|
||||
|
||||
/**label widget on top
|
||||
* @note added in 1.9
|
||||
**/
|
||||
/**label widget on top **/
|
||||
bool labelOnTop( int idx );
|
||||
|
||||
/**set edit widget editable
|
||||
* @note added in 1.9
|
||||
**/
|
||||
/**set edit widget editable **/
|
||||
void setFieldEditable( int idx, bool editable );
|
||||
|
||||
/**label widget on top
|
||||
* @note added in 1.9
|
||||
**/
|
||||
/**label widget on top **/
|
||||
void setLabelOnTop( int idx, bool onTop );
|
||||
|
||||
//! Buffer with uncommitted editing operations. Only valid after editing has been turned on.
|
||||
@ -1056,63 +1042,46 @@ class QgsVectorLayer : QgsMapLayer
|
||||
/** Destroy active command and reverts all changes in it */
|
||||
void destroyEditCommand();
|
||||
|
||||
/** Returns the index of a field name or -1 if the field does not exist
|
||||
@note this method was added in version 1.4
|
||||
*/
|
||||
/** Returns the index of a field name or -1 if the field does not exist */
|
||||
int fieldNameIndex( const QString& fieldName ) const;
|
||||
|
||||
/** Editing vertex markers
|
||||
@note public from version 1.4 */
|
||||
/** Editing vertex markers */
|
||||
enum VertexMarkerType
|
||||
{
|
||||
SemiTransparentCircle,
|
||||
Cross,
|
||||
NoMarker /* added in version 1.1 */
|
||||
NoMarker
|
||||
};
|
||||
|
||||
/** Draws a vertex symbol at (screen) coordinates x, y. (Useful to assist vertex editing.)
|
||||
@note public and static from version 1.4 */
|
||||
/** Draws a vertex symbol at (screen) coordinates x, y. (Useful to assist vertex editing.) */
|
||||
static void drawVertexMarker( double x, double y, QPainter& p, QgsVectorLayer::VertexMarkerType type, int vertexSize );
|
||||
|
||||
/** Assembles mUpdatedFields considering provider fields, joined fields and added fields
|
||||
@note added in 1.7 */
|
||||
/** Assembles mUpdatedFields considering provider fields, joined fields and added fields */
|
||||
void updateFields();
|
||||
|
||||
/** Caches joined attributes if required (and not already done)
|
||||
@note added in 1.7 */
|
||||
/** Caches joined attributes if required (and not already done) */
|
||||
void createJoinCaches();
|
||||
|
||||
/**Returns unique values for column
|
||||
@param index column index for attribute
|
||||
@param uniqueValues out: result list
|
||||
@param limit maximum number of values to return (-1 if unlimited)
|
||||
@note this method was added in version 1.7 */
|
||||
@param limit maximum number of values to return (-1 if unlimited) */
|
||||
void uniqueValues( int index, QList<QVariant> &uniqueValues /Out/, int limit = -1 );
|
||||
|
||||
/**Returns minimum value for an attribute column or invalid variant in case of error
|
||||
@note added in 1.7*/
|
||||
/**Returns minimum value for an attribute column or invalid variant in case of error */
|
||||
QVariant minimumValue( int index );
|
||||
|
||||
/**Returns maximum value for an attribute column or invalid variant in case of error
|
||||
@note added in 1.7*/
|
||||
/**Returns maximum value for an attribute column or invalid variant in case of error */
|
||||
QVariant maximumValue( int index );
|
||||
|
||||
/* Set the blending mode used for rendering each feature
|
||||
* @note added in 2.0
|
||||
*/
|
||||
/* Set the blending mode used for rendering each feature */
|
||||
void setFeatureBlendMode( const QPainter::CompositionMode &blendMode );
|
||||
/* Returns the current blending mode for features
|
||||
* @note added in 2.0
|
||||
*/
|
||||
/* Returns the current blending mode for features */
|
||||
QPainter::CompositionMode featureBlendMode() const;
|
||||
|
||||
/* Set the transparency for the vector layer
|
||||
* @note added in 2.0
|
||||
*/
|
||||
/* Set the transparency for the vector layer */
|
||||
void setLayerTransparency( int layerTransparency );
|
||||
/* Returns the current transparency for the vector layer
|
||||
* @note added in 2.0
|
||||
*/
|
||||
/* Returns the current transparency for the vector layer */
|
||||
int layerTransparency() const;
|
||||
|
||||
QString metadata();
|
||||
@ -1184,16 +1153,9 @@ class QgsVectorLayer : QgsMapLayer
|
||||
*/
|
||||
virtual void updateExtents();
|
||||
|
||||
/** Check if there is a join with a layer that will be removed
|
||||
@note added in 1.7 */
|
||||
/** Check if there is a join with a layer that will be removed */
|
||||
void checkJoinLayerRemove( QString theLayerId );
|
||||
|
||||
/**
|
||||
* @brief Is called when the cache image is being deleted. Overwrite and use to clean up.
|
||||
* @note added in 2.0
|
||||
*/
|
||||
virtual void onCacheImageDelete();
|
||||
|
||||
protected slots:
|
||||
void invalidateSymbolCountedFlag();
|
||||
|
||||
@ -1247,22 +1209,19 @@ class QgsVectorLayer : QgsMapLayer
|
||||
* @see updatedFields()
|
||||
*/
|
||||
void attributeDeleted( int idx );
|
||||
void featureAdded( QgsFeatureId fid ); // added in 1.7
|
||||
void featureAdded( QgsFeatureId fid );
|
||||
void featureDeleted( QgsFeatureId fid );
|
||||
/**
|
||||
* Is emitted, whenever the fields available from this layer have been changed.
|
||||
* This can be due to manually adding attributes or due to a join.
|
||||
*
|
||||
* @note Added in 2.0
|
||||
*/
|
||||
void updatedFields();
|
||||
void layerDeleted();
|
||||
|
||||
void attributeValueChanged( QgsFeatureId fid, int idx, const QVariant & );
|
||||
void geometryChanged( QgsFeatureId fid, QgsGeometry &geom ); // added in 1.9
|
||||
void geometryChanged( QgsFeatureId fid, QgsGeometry &geom );
|
||||
|
||||
/** Signals emitted after committing changes
|
||||
\note added in v1.6 */
|
||||
/** Signals emitted after committing changes */
|
||||
void committedAttributesDeleted( const QString& layerId, const QgsAttributeList& deletedAttributes );
|
||||
void committedAttributesAdded( const QString& layerId, const QList<QgsField>& addedAttributes );
|
||||
void committedFeaturesAdded( const QString& layerId, const QgsFeatureList& addedFeatures );
|
||||
@ -1272,9 +1231,7 @@ class QgsVectorLayer : QgsMapLayer
|
||||
|
||||
void saveLayerToProject();
|
||||
|
||||
/** Emitted when the font family defined for labeling layer is not found on system
|
||||
* @note added in 1.9
|
||||
*/
|
||||
/** Emitted when the font family defined for labeling layer is not found on system */
|
||||
void labelingFontNotFound( QgsVectorLayer* layer, const QString& fontfamily );
|
||||
|
||||
/** Signal emitted when setFeatureBlendMode() is called */
|
||||
@ -1304,6 +1261,32 @@ class QgsVectorLayer : QgsMapLayer
|
||||
*/
|
||||
void editCommandDestroyed();
|
||||
|
||||
/**
|
||||
* Signal emitted whenever the symbology (QML-file) for this layer is being read.
|
||||
* If there is custom style information saved in the file, you can connect to this signal
|
||||
* and update the layer style accordingly.
|
||||
*
|
||||
* @param element The XML layer style element.
|
||||
*
|
||||
* @param errorMessage Write error messages into this string.
|
||||
*/
|
||||
void readCustomSymbology( const QDomElement& element, QString& errorMessage );
|
||||
|
||||
/**
|
||||
* Signal emitted whenever the symbology (QML-file) for this layer is being written.
|
||||
* If there is custom style information you want to save to the file, you can connect
|
||||
* to this signal and update the element accordingly.
|
||||
*
|
||||
* @param element The XML element where you can add additional style information to.
|
||||
* @param doc The XML document that you can use to create new XML nodes.
|
||||
* @param errorMessage Write error messages into this string.
|
||||
*/
|
||||
void writeCustomSymbology( QDomElement& element, QDomDocument& doc, QString& errorMessage ) const;
|
||||
|
||||
private slots:
|
||||
void onRelationsLoaded();
|
||||
void onJoinedFieldsChanged();
|
||||
|
||||
protected:
|
||||
/** Set the extent */
|
||||
void setExtent( const QgsRectangle &rect );
|
||||
|
||||
@ -27,16 +27,14 @@ class QgsVectorLayerEditBuffer : QObject
|
||||
/** delete a feature from the layer (but does not commit it) */
|
||||
bool deleteFeature( QgsFeatureId fid );
|
||||
|
||||
/** change feature's geometry
|
||||
@note added in version 1.2 */
|
||||
/** change feature's geometry */
|
||||
bool changeGeometry( QgsFeatureId fid, QgsGeometry* geom );
|
||||
|
||||
/** changed an attribute value (but does not commit it) */
|
||||
bool changeAttributeValue( QgsFeatureId fid, int field, const QVariant &newValue, const QVariant &oldValue = QVariant() );
|
||||
|
||||
/** add an attribute field (but does not commit it)
|
||||
returns true if the field was added
|
||||
@note added in version 1.2 */
|
||||
returns true if the field was added */
|
||||
bool addAttribute( const QgsField &field );
|
||||
|
||||
/** delete an attribute field (but does not commit it) */
|
||||
@ -97,8 +95,7 @@ class QgsVectorLayerEditBuffer : QObject
|
||||
void attributeAdded( int idx );
|
||||
void attributeDeleted( int idx );
|
||||
|
||||
/** Signals emitted after committing changes
|
||||
\note added in v1.6 */
|
||||
/** Signals emitted after committing changes */
|
||||
void committedAttributesDeleted( const QString& layerId, const QgsAttributeList& deletedAttributes );
|
||||
void committedAttributesAdded( const QString& layerId, const QList<QgsField>& addedAttributes );
|
||||
void committedFeaturesAdded( const QString& layerId, const QgsFeatureList& addedFeatures );
|
||||
|
||||
@ -15,7 +15,7 @@ class QgsColorRampShader : QgsRasterShaderFunction
|
||||
{
|
||||
//! default constructor
|
||||
ColorRampItem();
|
||||
//! convenience constructor - added in v1.6
|
||||
//! convenience constructor
|
||||
ColorRampItem( double val, QColor col, QString lbl = QString() );
|
||||
|
||||
QString label;
|
||||
|
||||
@ -171,19 +171,13 @@ class QgsRasterDataProvider : QgsDataProvider, QgsRasterInterface
|
||||
*/
|
||||
virtual QString lastError() = 0;
|
||||
|
||||
/**
|
||||
* \brief Returns the format of the error text for the last error in this provider
|
||||
*
|
||||
* \note added in 1.6
|
||||
*/
|
||||
/** Returns the format of the error text for the last error in this provider */
|
||||
virtual QString lastErrorFormat();
|
||||
|
||||
/**Returns the dpi of the output device.
|
||||
@note: this method was added in version 1.2*/
|
||||
/**Returns the dpi of the output device. */
|
||||
int dpi() const;
|
||||
|
||||
/**Sets the output device resolution.
|
||||
@note: this method was added in version 1.2*/
|
||||
/**Sets the output device resolution. */
|
||||
void setDpi( int dpi );
|
||||
|
||||
/** Time stamp of data source in the moment when data/metadata were loaded by provider */
|
||||
|
||||
@ -120,8 +120,7 @@ class QgsRasterLayer : QgsMapLayer
|
||||
*/
|
||||
const QgsRasterDataProvider* dataProvider() const /PyName=constDataProvider/;
|
||||
|
||||
/**Synchronises with changes in the datasource
|
||||
@note added in version 1.6*/
|
||||
/**Synchronises with changes in the datasource */
|
||||
virtual void reload();
|
||||
|
||||
/** Return new instance of QgsMapLayerRenderer that will be used for rendering of given context
|
||||
@ -137,8 +136,7 @@ class QgsRasterLayer : QgsMapLayer
|
||||
QgsRasterViewPort * myRasterViewPort,
|
||||
const QgsMapToPixel* theQgsMapToPixel = 0 );
|
||||
|
||||
/**Returns a list with classification items (Text and color)
|
||||
@note this method was added in version 1.8*/
|
||||
/**Returns a list with classification items (Text and color) */
|
||||
QList< QPair< QString, QColor > > legendSymbologyItems() const;
|
||||
|
||||
/** \brief Obtain GDAL Metadata for this layer */
|
||||
@ -147,9 +145,7 @@ class QgsRasterLayer : QgsMapLayer
|
||||
/** \brief Get an 100x100 pixmap of the color palette. If the layer has no palette a white pixmap will be returned */
|
||||
QPixmap paletteAsPixmap( int theBandNumber = 1 );
|
||||
|
||||
/** \brief [ data provider interface ] Which provider is being used for this Raster Layer?
|
||||
* @note added in 2.0
|
||||
*/
|
||||
/** \brief [ data provider interface ] Which provider is being used for this Raster Layer? */
|
||||
QString providerType() const;
|
||||
|
||||
/** \brief Returns the number of raster units per each raster pixel. In a world file, this is normally the first row (without the sign) */
|
||||
@ -161,7 +157,7 @@ class QgsRasterLayer : QgsMapLayer
|
||||
* @param theLimits Limits
|
||||
* @param theExtent Extent used to calculate limits, if empty, use full layer extent
|
||||
* @param theSampleSize Size of data sample to calculate limits, if 0, use full resolution
|
||||
* @param theGenerateLookupTableFlag Generate llokup table. */
|
||||
* @param theGenerateLookupTableFlag Generate lookup table. */
|
||||
|
||||
|
||||
void setContrastEnhancement( QgsContrastEnhancement::ContrastEnhancementAlgorithm theAlgorithm,
|
||||
@ -210,7 +206,7 @@ class QgsRasterLayer : QgsMapLayer
|
||||
public slots:
|
||||
void showStatusMessage( const QString & theMessage );
|
||||
|
||||
//! @deprecated since 2.4 - does nothing
|
||||
//! @deprecated in 2.4 - does nothing
|
||||
void updateProgress( int, int ) /Deprecated/;
|
||||
|
||||
/** \brief receive progress signal from provider */
|
||||
@ -222,7 +218,6 @@ class QgsRasterLayer : QgsMapLayer
|
||||
|
||||
/**
|
||||
* This is emitted whenever data or metadata (e.g. color table, extent) has changed
|
||||
* @note added in 1.7
|
||||
*/
|
||||
void dataChanged();
|
||||
|
||||
|
||||
@ -62,11 +62,9 @@ class QgsCategorizedSymbolRendererV2 : QgsFeatureRendererV2
|
||||
virtual void toSld( QDomDocument& doc, QDomElement &element ) const;
|
||||
|
||||
//! returns bitwise OR-ed capabilities of the renderer
|
||||
//! \note added in 2.0
|
||||
virtual int capabilities();
|
||||
|
||||
virtual QgsSymbolV2List symbols();
|
||||
//! @note added in 2.0
|
||||
void updateSymbols( QgsSymbolV2 * sym );
|
||||
|
||||
const QgsCategoryList& categories() const;
|
||||
@ -108,7 +106,6 @@ class QgsCategorizedSymbolRendererV2 : QgsFeatureRendererV2
|
||||
virtual QgsLegendSymbologyList legendSymbologyItems( QSize iconSize );
|
||||
|
||||
//! return a list of item text / symbol
|
||||
//! @note this method was added in version 1.5
|
||||
//! @note not available in python bindings
|
||||
// virtual QgsLegendSymbolList legendSymbolItems( double scaleDenominator = -1, QString rule = QString() );
|
||||
|
||||
@ -126,23 +123,17 @@ class QgsCategorizedSymbolRendererV2 : QgsFeatureRendererV2
|
||||
//! @note added in 2.5
|
||||
void updateColorRamp( QgsVectorColorRampV2* ramp, bool inverted = false );
|
||||
|
||||
//! @note added in 1.6
|
||||
void setRotationField( QString fieldOrExpression );
|
||||
//! @note added in 1.6
|
||||
QString rotationField() const;
|
||||
|
||||
//! @note added in 1.6
|
||||
void setSizeScaleField( QString fieldOrExpression );
|
||||
//! @note added in 1.6
|
||||
QString sizeScaleField() const;
|
||||
|
||||
//! @note added in 2.0
|
||||
void setScaleMethod( QgsSymbolV2::ScaleMethod scaleMethod );
|
||||
//! @note added in 2.0
|
||||
QgsSymbolV2::ScaleMethod scaleMethod() const;
|
||||
|
||||
//! items of symbology items in legend should be checkable
|
||||
// @note added in 2.5
|
||||
//! @note added in 2.5
|
||||
virtual bool legendSymbolItemsCheckable() const;
|
||||
|
||||
//! item in symbology was checked
|
||||
|
||||
@ -104,7 +104,6 @@ class QgsGraduatedSymbolRendererV2 : QgsFeatureRendererV2
|
||||
virtual void toSld( QDomDocument& doc, QDomElement &element ) const;
|
||||
|
||||
//! returns bitwise OR-ed capabilities of the renderer
|
||||
//! \note added in 2.0
|
||||
virtual int capabilities();
|
||||
|
||||
virtual QgsSymbolV2List symbols();
|
||||
@ -181,7 +180,7 @@ class QgsGraduatedSymbolRendererV2 : QgsFeatureRendererV2
|
||||
QgsVectorColorRampV2* ramp /Transfer/,
|
||||
bool inverted = false,
|
||||
QgsRendererRangeV2LabelFormat labelFormat=QgsRendererRangeV2LabelFormat()
|
||||
);
|
||||
);
|
||||
|
||||
//! create renderer from XML element
|
||||
static QgsFeatureRendererV2* create( QDomElement& element ) /Factory/;
|
||||
@ -193,9 +192,8 @@ class QgsGraduatedSymbolRendererV2 : QgsFeatureRendererV2
|
||||
virtual QgsLegendSymbologyList legendSymbologyItems( QSize iconSize );
|
||||
|
||||
//! return a list of item text / symbol
|
||||
//! @note: this method was added in version 1.5
|
||||
//! @note not available in python bindings
|
||||
// virtual QgsLegendSymbolList legendSymbolItems();
|
||||
// virtual QgsLegendSymbolList legendSymbolItems( double scaleDenominator = -1, QString rule = QString() );
|
||||
|
||||
QgsSymbolV2* sourceSymbol();
|
||||
void setSourceSymbol( QgsSymbolV2* sym /Transfer/ );
|
||||
@ -214,31 +212,25 @@ class QgsGraduatedSymbolRendererV2 : QgsFeatureRendererV2
|
||||
/** Update all the symbols but leave breaks and colors. */
|
||||
void updateSymbols( QgsSymbolV2* sym /Transfer/ );
|
||||
|
||||
//! @note added in 1.6
|
||||
void setRotationField( QString fieldOrExpression );
|
||||
//! @note added in 1.6
|
||||
QString rotationField() const;
|
||||
|
||||
//! @note added in 1.6
|
||||
void setSizeScaleField( QString fieldOrExpression );
|
||||
//! @note added in 1.6
|
||||
QString sizeScaleField() const;
|
||||
|
||||
//! @note added in 2.0
|
||||
void setScaleMethod( QgsSymbolV2::ScaleMethod scaleMethod );
|
||||
//! @note added in 2.0
|
||||
QgsSymbolV2::ScaleMethod scaleMethod() const;
|
||||
|
||||
//! items of symbology items in legend should be checkable
|
||||
// @note added in 2.5
|
||||
//! @note added in 2.5
|
||||
virtual bool legendSymbolItemsCheckable() const;
|
||||
|
||||
//! item in symbology was checked
|
||||
// @note added in 2.5
|
||||
//! @note added in 2.6
|
||||
virtual bool legendSymbolItemChecked( QString key );
|
||||
|
||||
//! item in symbology was checked
|
||||
// @note added in 2.5
|
||||
//! @note added in 2.6
|
||||
virtual void checkLegendSymbolItem( QString key, bool state = true );
|
||||
|
||||
//! If supported by the renderer, return classification attribute for the use in legend
|
||||
@ -246,7 +238,7 @@ class QgsGraduatedSymbolRendererV2 : QgsFeatureRendererV2
|
||||
virtual QString legendClassificationAttribute();
|
||||
|
||||
//! creates a QgsGraduatedSymbolRendererV2 from an existing renderer.
|
||||
//! @note added in 2.5
|
||||
//! @note added in 2.6
|
||||
//! @returns a new renderer if the conversion was possible, otherwise 0.
|
||||
static QgsGraduatedSymbolRendererV2* convertFromRenderer( const QgsFeatureRendererV2 *renderer ) /Factory/;
|
||||
|
||||
|
||||
@ -96,7 +96,6 @@ class QgsFeatureRendererV2
|
||||
};
|
||||
|
||||
//! returns bitwise OR-ed capabilities of the renderer
|
||||
//! \note added in 2.0
|
||||
virtual int capabilities();
|
||||
|
||||
//! for symbol levels
|
||||
@ -112,7 +111,6 @@ class QgsFeatureRendererV2
|
||||
virtual QDomElement save( QDomDocument& doc );
|
||||
|
||||
//! create the SLD UserStyle element following the SLD v1.1 specs
|
||||
//! @note added in 1.9
|
||||
virtual QDomElement writeSld( QDomDocument& doc, const QgsVectorLayer &layer ) const;
|
||||
|
||||
/** create a new renderer according to the information contained in
|
||||
@ -124,12 +122,10 @@ class QgsFeatureRendererV2
|
||||
* @param errorMessage it will contain the error message if something
|
||||
* went wrong
|
||||
* @return the renderer
|
||||
* @note added in 1.9
|
||||
*/
|
||||
static QgsFeatureRendererV2* loadSld( const QDomNode &node, QGis::GeometryType geomType, QString &errorMessage ) /Factory/;
|
||||
|
||||
//! used from subclasses to create SLD Rule elements following SLD v1.1 specs
|
||||
//! @note added in 1.9
|
||||
virtual void toSld( QDomDocument& doc, QDomElement &element ) const;
|
||||
|
||||
//! return a list of symbology items for the legend
|
||||
@ -148,7 +144,6 @@ class QgsFeatureRendererV2
|
||||
virtual void checkLegendSymbolItem( QString key, bool state = true );
|
||||
|
||||
//! return a list of item text / symbol
|
||||
//! @note: this method was added in version 1.5
|
||||
//! @note not available in python bindings
|
||||
// virtual QgsLegendSymbolList legendSymbolItems( double scaleDenominator = -1, QString rule = "" );
|
||||
|
||||
@ -165,22 +160,18 @@ class QgsFeatureRendererV2
|
||||
void setVertexMarkerAppearance( int type, int size );
|
||||
|
||||
//! return rotation field name (or empty string if not set or not supported by renderer)
|
||||
//! @note added in 1.9
|
||||
virtual QString rotationField() const;
|
||||
//! sets rotation field of renderer (if supported by the renderer)
|
||||
//! @note added in 1.9
|
||||
virtual void setRotationField( QString fieldName );
|
||||
|
||||
//! return whether the renderer will render a feature or not.
|
||||
//! Must be called between startRender() and stopRender() calls.
|
||||
//! Default implementation uses symbolForFeature().
|
||||
//! @note added in 1.9
|
||||
virtual bool willRenderFeature( QgsFeature& feat );
|
||||
|
||||
//! return list of symbols used for rendering the feature.
|
||||
//! For renderers that do not support MoreSymbolsPerFeature it is more efficient
|
||||
//! to use symbolForFeature()
|
||||
//! @note added in 1.9
|
||||
virtual QgsSymbolV2List symbolsForFeature( QgsFeature& feat );
|
||||
|
||||
//! Equivalent of originalSymbolsForFeature() call
|
||||
|
||||
@ -115,11 +115,9 @@ class QgsRuleBasedRendererV2 : QgsFeatureRendererV2
|
||||
bool renderFeature( QgsRuleBasedRendererV2::FeatureToRender& featToRender, QgsRenderContext& context, QgsRuleBasedRendererV2::RenderQueue& renderQueue );
|
||||
|
||||
//! only tell whether a feature will be rendered without actually rendering it
|
||||
//! @note added in 1.9
|
||||
bool willRenderFeature( QgsFeature& feat );
|
||||
|
||||
//! tell which symbols will be used to render the feature
|
||||
//! @note added in 1.9
|
||||
QgsSymbolV2List symbolsForFeature( QgsFeature& feat );
|
||||
|
||||
//! tell which rules will be used to render the feature
|
||||
@ -208,7 +206,6 @@ class QgsRuleBasedRendererV2 : QgsFeatureRendererV2
|
||||
virtual void checkLegendSymbolItem( QString key, bool state = true );
|
||||
|
||||
//! return a list of item text / symbol
|
||||
//! @note: this method was added in version 1.5
|
||||
//! @note not available in python bindings
|
||||
// virtual QgsLegendSymbolList legendSymbolItems();
|
||||
|
||||
@ -222,19 +219,16 @@ class QgsRuleBasedRendererV2 : QgsFeatureRendererV2
|
||||
|
||||
//! return whether the renderer will render a feature or not.
|
||||
//! Must be called between startRender() and stopRender() calls.
|
||||
//! @note added in 1.9
|
||||
virtual bool willRenderFeature( QgsFeature& feat );
|
||||
|
||||
//! return list of symbols used for rendering the feature.
|
||||
//! For renderers that do not support MoreSymbolsPerFeature it is more efficient
|
||||
//! to use symbolForFeature()
|
||||
//! @note added in 1.9
|
||||
virtual QgsSymbolV2List symbolsForFeature( QgsFeature& feat );
|
||||
|
||||
virtual QgsSymbolV2List originalSymbolsForFeature( QgsFeature& feat );
|
||||
|
||||
//! returns bitwise OR-ed capabilities of the renderer
|
||||
//! \note added in 2.0
|
||||
virtual int capabilities();
|
||||
|
||||
/////
|
||||
|
||||
@ -22,19 +22,13 @@ class QgsSingleSymbolRendererV2 : QgsFeatureRendererV2
|
||||
QgsSymbolV2* symbol() const;
|
||||
void setSymbol( QgsSymbolV2* s /Transfer/ );
|
||||
|
||||
//! @note added in 1.5
|
||||
void setRotationField( QString fieldOrExpression );
|
||||
//! @note added in 1.5
|
||||
QString rotationField() const;
|
||||
|
||||
//! @note added in 1.5
|
||||
void setSizeScaleField( QString fieldOrExpression );
|
||||
//! @note added in 1.5
|
||||
QString sizeScaleField() const;
|
||||
|
||||
//! @note added in 2.0
|
||||
void setScaleMethod( QgsSymbolV2::ScaleMethod scaleMethod );
|
||||
//! @note added in 2.0
|
||||
QgsSymbolV2::ScaleMethod scaleMethod() const;
|
||||
|
||||
virtual QString dump() const;
|
||||
@ -45,7 +39,6 @@ class QgsSingleSymbolRendererV2 : QgsFeatureRendererV2
|
||||
static QgsFeatureRendererV2* createFromSld( QDomElement& element, QGis::GeometryType geomType );
|
||||
|
||||
//! returns bitwise OR-ed capabilities of the renderer
|
||||
//! \note added in 2.0
|
||||
virtual int capabilities();
|
||||
|
||||
virtual QgsSymbolV2List symbols();
|
||||
@ -60,7 +53,6 @@ class QgsSingleSymbolRendererV2 : QgsFeatureRendererV2
|
||||
virtual QgsLegendSymbologyList legendSymbologyItems( QSize iconSize );
|
||||
|
||||
//! return a list of item text / symbol
|
||||
//! @note: this method was added in version 1.5
|
||||
//! @note not available in python bindings
|
||||
// virtual QgsLegendSymbolList legendSymbolItems( double scaleDenominator = -1, QString rule = QString() );
|
||||
|
||||
|
||||
@ -108,7 +108,6 @@ class QgsStyleV2 : QObject
|
||||
bool removeSymbol( QString name );
|
||||
|
||||
//! change symbol's name
|
||||
//! @note added in v1.7
|
||||
bool renameSymbol( QString oldName, QString newName );
|
||||
|
||||
//! return a NEW copy of symbol
|
||||
@ -200,10 +199,8 @@ class QgsStyleV2 : QObject
|
||||
bool removeColorRamp( QString name );
|
||||
|
||||
//! change ramp's name
|
||||
//! @note added in v1.7
|
||||
bool renameColorRamp( QString oldName, QString newName );
|
||||
|
||||
|
||||
//! load a file into the style
|
||||
bool load( QString filename );
|
||||
|
||||
|
||||
@ -141,6 +141,8 @@ class QgsSymbolLayerV2
|
||||
|
||||
virtual QVector<qreal> dxfCustomDashPattern( QgsSymbolV2::OutputUnit& unit ) const;
|
||||
virtual Qt::PenStyle dxfPenStyle() const;
|
||||
virtual QColor dxfBrushColor( const QgsSymbolV2RenderContext& context ) const;
|
||||
virtual Qt::BrushStyle dxfBrushStyle() const;
|
||||
|
||||
protected:
|
||||
QgsSymbolLayerV2( QgsSymbolV2::SymbolType type, bool locked = false );
|
||||
@ -228,6 +230,8 @@ class QgsMarkerSymbolLayerV2 : QgsSymbolLayerV2
|
||||
//handles marker offset and anchor point shift together
|
||||
void markerOffset( const QgsSymbolV2RenderContext& context, double& offsetX, double& offsetY ) const;
|
||||
|
||||
void markerOffset( const QgsSymbolV2RenderContext& context, double width, double height, double& offsetX, double& offsetY ) const /PyName=markerOffsetWithWidthAndHeight/;
|
||||
|
||||
//! @note available in python bindings as markerOffset2
|
||||
void markerOffset( const QgsSymbolV2RenderContext& context, double width, double height,
|
||||
QgsSymbolV2::OutputUnit widthUnit, QgsSymbolV2::OutputUnit heightUnit,
|
||||
@ -246,7 +250,6 @@ class QgsLineSymbolLayerV2 : QgsSymbolLayerV2
|
||||
public:
|
||||
virtual void renderPolyline( const QPolygonF& points, QgsSymbolV2RenderContext& context ) = 0;
|
||||
|
||||
//! @note added in v1.7
|
||||
virtual void renderPolygonOutline( const QPolygonF& points, QList<QPolygonF>* rings, QgsSymbolV2RenderContext& context );
|
||||
|
||||
virtual void setWidth( double width );
|
||||
|
||||
@ -40,7 +40,6 @@ class QgsSymbolV2
|
||||
ScaleDiameter
|
||||
};
|
||||
|
||||
//! @note added in 1.5
|
||||
enum RenderHint
|
||||
{
|
||||
DataDefinedSizeScale,
|
||||
@ -107,9 +106,7 @@ class QgsSymbolV2
|
||||
//! Set alpha transparency 1 for opaque, 0 for invisible
|
||||
void setAlpha( qreal alpha );
|
||||
|
||||
//! @note added in 1.5
|
||||
void setRenderHints( int hints );
|
||||
//! @note added in 1.5
|
||||
int renderHints() const;
|
||||
|
||||
QSet<QString> usedAttributes() const;
|
||||
@ -124,7 +121,6 @@ class QgsSymbolV2
|
||||
|
||||
//! check whether a symbol layer type can be used within the symbol
|
||||
//! (marker-marker, line-line, fill-fill/line)
|
||||
//! @note added in 1.7
|
||||
bool isSymbolLayerCompatible( SymbolType t );
|
||||
};
|
||||
|
||||
@ -137,7 +133,7 @@ class QgsSymbolV2RenderContext
|
||||
%End
|
||||
|
||||
public:
|
||||
QgsSymbolV2RenderContext( QgsRenderContext& c, QgsSymbolV2::OutputUnit u , qreal alpha = 1.0, bool selected = false, int renderHints = 0, const QgsFeature* f = 0, const QgsFields* fields = 0, const QgsMapUnitScale& mapUnitScale = QgsMapUnitScale() );
|
||||
QgsSymbolV2RenderContext( QgsRenderContext& c, QgsSymbolV2::OutputUnit u, qreal alpha = 1.0, bool selected = false, int renderHints = 0, const QgsFeature* f = 0, const QgsFields* fields = 0, const QgsMapUnitScale& mapUnitScale = QgsMapUnitScale() );
|
||||
~QgsSymbolV2RenderContext();
|
||||
|
||||
QgsRenderContext& renderContext();
|
||||
@ -157,9 +153,7 @@ class QgsSymbolV2RenderContext
|
||||
bool selected() const;
|
||||
void setSelected( bool selected );
|
||||
|
||||
//! @note added in 1.5
|
||||
int renderHints() const;
|
||||
//! @note added in 1.5
|
||||
void setRenderHints( int hints );
|
||||
|
||||
void setFeature( const QgsFeature* f );
|
||||
@ -194,7 +188,6 @@ class QgsMarkerSymbolV2 : QgsSymbolV2
|
||||
public:
|
||||
/** Create a marker symbol with one symbol layer: SimpleMarker with specified properties.
|
||||
This is a convenience method for easier creation of marker symbols.
|
||||
\note added in v1.7
|
||||
*/
|
||||
static QgsMarkerSymbolV2* createSimple( const QgsStringMap& properties ) /Factory/;
|
||||
|
||||
@ -225,7 +218,6 @@ class QgsLineSymbolV2 : QgsSymbolV2
|
||||
public:
|
||||
/** Create a line symbol with one symbol layer: SimpleLine with specified properties.
|
||||
This is a convenience method for easier creation of line symbols.
|
||||
\note added in v1.7
|
||||
*/
|
||||
static QgsLineSymbolV2* createSimple( const QgsStringMap& properties ) /Factory/;
|
||||
|
||||
@ -250,7 +242,6 @@ class QgsFillSymbolV2 : QgsSymbolV2
|
||||
public:
|
||||
/** Create a fill symbol with one symbol layer: SimpleFill with specified properties.
|
||||
This is a convenience method for easier creation of fill symbols.
|
||||
\note added in v1.7
|
||||
*/
|
||||
static QgsFillSymbolV2* createSimple( const QgsStringMap& properties ) /Factory/;
|
||||
|
||||
|
||||
@ -14,7 +14,6 @@ class QgsBusyIndicatorDialog : QDialog
|
||||
* @param message Text to show above busy progress indicator.
|
||||
* @param parent parent object (owner)
|
||||
* @param fl widget flags
|
||||
* @note added in 1.9
|
||||
*/
|
||||
QgsBusyIndicatorDialog( const QString& message = "", QWidget *parent = 0, Qt::WindowFlags fl = QgisGui::ModalDialogFlags );
|
||||
~QgsBusyIndicatorDialog();
|
||||
|
||||
@ -28,14 +28,12 @@ class QgsColorButton: QPushButton
|
||||
* Specify the current color. Will emit a colorChanged signal if the color is different to the previous.
|
||||
*
|
||||
* @param color the new color
|
||||
* @note added in 1.9
|
||||
*/
|
||||
void setColor( const QColor &color );
|
||||
/**
|
||||
* Return the currently selected color.
|
||||
*
|
||||
* @return the currently selected color
|
||||
* @note added in 1.9
|
||||
*/
|
||||
QColor color() const;
|
||||
|
||||
@ -43,7 +41,6 @@ class QgsColorButton: QPushButton
|
||||
* Specify the options for the color chooser dialog (e.g. alpha).
|
||||
*
|
||||
* @param cdo Options for the color chooser dialog
|
||||
* @note added in 1.9
|
||||
*/
|
||||
void setColorDialogOptions( QColorDialog::ColorDialogOptions cdo );
|
||||
|
||||
@ -51,7 +48,6 @@ class QgsColorButton: QPushButton
|
||||
* Returns the options for the color chooser dialog.
|
||||
*
|
||||
* @return Options for the color chooser dialog
|
||||
* @note added in 1.9
|
||||
*/
|
||||
QColorDialog::ColorDialogOptions colorDialogOptions();
|
||||
|
||||
@ -59,7 +55,6 @@ class QgsColorButton: QPushButton
|
||||
* Set the title, which the color chooser dialog will show.
|
||||
*
|
||||
* @param cdt Title for the color chooser dialog
|
||||
* @note added in 1.9
|
||||
*/
|
||||
void setColorDialogTitle( QString cdt );
|
||||
|
||||
@ -67,22 +62,17 @@ class QgsColorButton: QPushButton
|
||||
* Returns the title, which the color chooser dialog shows.
|
||||
*
|
||||
* @return Title for the color chooser dialog
|
||||
* @note added in 1.9
|
||||
*/
|
||||
QString colorDialogTitle();
|
||||
|
||||
/**
|
||||
* Whether the button accepts live updates from QColorDialog.
|
||||
*
|
||||
* @note added in 1.9
|
||||
*/
|
||||
bool acceptLiveUpdates();
|
||||
|
||||
/**
|
||||
* Sets whether the button accepts live updates from QColorDialog.
|
||||
* Live updates may cause changes that are not undoable on QColorDialog cancel.
|
||||
*
|
||||
* @note added in 1.9
|
||||
*/
|
||||
void setAcceptLiveUpdates( bool accept );
|
||||
|
||||
@ -93,7 +83,6 @@ class QgsColorButton: QPushButton
|
||||
* but the color has not changed, i.e. setColor() wouldn't update button and
|
||||
* you want the button to retain the set color's alpha component regardless
|
||||
* @param color Color for button background
|
||||
* @note added in 1.9
|
||||
*/
|
||||
void setButtonBackground( QColor color = QColor() );
|
||||
|
||||
@ -103,7 +92,6 @@ class QgsColorButton: QPushButton
|
||||
* In case the new color is the same, no signal is emitted, to avoid infinite loops.
|
||||
*
|
||||
* @param color New color
|
||||
* @note added in 1.9
|
||||
*/
|
||||
void colorChanged( const QColor &color );
|
||||
|
||||
@ -112,7 +100,7 @@ class QgsColorButton: QPushButton
|
||||
void showEvent( QShowEvent* e );
|
||||
static const QPixmap& transpBkgrd();
|
||||
|
||||
/**
|
||||
/**
|
||||
* Reimplemented to detect right mouse button clicks on the color button and allow dragging colors
|
||||
*/
|
||||
void mousePressEvent( QMouseEvent* e );
|
||||
|
||||
@ -17,9 +17,7 @@ class QgsExpressionBuilderDialog : QDialog
|
||||
|
||||
QString expressionText();
|
||||
|
||||
/** Sets geometry calculator used in distance/area calculations.
|
||||
* @note added in version 2.0
|
||||
*/
|
||||
/** Sets geometry calculator used in distance/area calculations. */
|
||||
void setGeomCalculator( const QgsDistanceArea & da );
|
||||
|
||||
protected:
|
||||
|
||||
@ -84,9 +84,7 @@ class QgsExpressionBuilderWidget : QWidget
|
||||
|
||||
void loadFieldNames( const QgsFields& fields );
|
||||
|
||||
/** Sets geometry calculator used in distance/area calculations.
|
||||
* @note added in version 2.0
|
||||
*/
|
||||
/** Sets geometry calculator used in distance/area calculations. */
|
||||
void setGeomCalculator( const QgsDistanceArea & da );
|
||||
|
||||
/** Gets the expression string that has been set in the expression area.
|
||||
|
||||
@ -23,60 +23,47 @@ class QgsLegendInterface : QObject
|
||||
virtual QList< QPair< QString, QList<QString> > > groupLayerRelationship();
|
||||
|
||||
//! Returns the currently selected layers of QgsLegendLayers.
|
||||
//! @param inDrawOrder return layers in drawing order (added in 1.9)
|
||||
//! @param inDrawOrder return layers in drawing order
|
||||
//! @returns list of layers, else an empty list
|
||||
virtual QList<QgsMapLayer *> selectedLayers( bool inDrawOrder = false ) const = 0;
|
||||
|
||||
//! Return all layers in the project in drawing order
|
||||
//! @note added in 1.5
|
||||
virtual QList< QgsMapLayer * > layers() const = 0;
|
||||
|
||||
//! Check if a group exists
|
||||
//! @note added in 1.5
|
||||
virtual bool groupExists( int groupIndex ) = 0;
|
||||
|
||||
//! Check if a group is expanded
|
||||
//! @note added in 1.5
|
||||
virtual bool isGroupExpanded( int groupIndex ) = 0;
|
||||
|
||||
//! Check if a group is visible
|
||||
//! @note added in 1.5
|
||||
virtual bool isGroupVisible( int groupIndex ) = 0;
|
||||
|
||||
//! Check if a layer is expanded
|
||||
//! @note added in 2.0
|
||||
virtual bool isLayerExpanded( QgsMapLayer * ml ) = 0;
|
||||
|
||||
//! Check if a layer is visible
|
||||
//! @note added in 1.5
|
||||
virtual bool isLayerVisible( QgsMapLayer * ml ) = 0;
|
||||
|
||||
/** Add action for layers in the legend
|
||||
* @note added in 2.0
|
||||
*/
|
||||
/** Add action for layers in the legend */
|
||||
virtual void addLegendLayerAction( QAction* action, QString menu, QString id,
|
||||
QgsMapLayer::LayerType type, bool allLayers ) = 0;
|
||||
|
||||
/** Add action for a specific layers in the legend.
|
||||
* Use this in combination with addLegendLayerAction( allLayers = False )
|
||||
* @note added in 2.0
|
||||
*/
|
||||
virtual void addLegendLayerActionForLayer( QAction* action, QgsMapLayer* layer ) = 0;
|
||||
|
||||
/** Remove action for layers in the legend
|
||||
* @note added in 2.0
|
||||
*/
|
||||
/** Remove action for layers in the legend */
|
||||
virtual bool removeLegendLayerAction( QAction* action ) = 0;
|
||||
|
||||
//! Returns the current layer if the current item is a QgsLegendLayer.
|
||||
//! If the current item is a QgsLegendLayer, its first maplayer is returned.
|
||||
//! Else, 0 is returned.
|
||||
//! @note Added in 2.0
|
||||
virtual QgsMapLayer* currentLayer() = 0;
|
||||
|
||||
//! set the current layer
|
||||
//! returns true if the layer exists, false otherwise
|
||||
//! @note Added in 2.0
|
||||
virtual bool setCurrentLayer( QgsMapLayer *layer ) = 0;
|
||||
|
||||
signals:
|
||||
@ -95,7 +82,6 @@ class QgsLegendInterface : QObject
|
||||
|
||||
//! Emitted whenever current (selected) layer changes
|
||||
// the pointer to layer can be null if no layer is selected
|
||||
//! @note Added in 2.0
|
||||
void currentLayerChanged( QgsMapLayer * layer );
|
||||
|
||||
public slots:
|
||||
@ -115,23 +101,18 @@ class QgsLegendInterface : QObject
|
||||
virtual void moveLayer( QgsMapLayer * ml, int groupIndex ) = 0;
|
||||
|
||||
//! Collapse or expand a group
|
||||
//! @note added in 1.5
|
||||
virtual void setGroupExpanded( int groupIndex, bool expand ) = 0;
|
||||
|
||||
//! Collapse or expand a layer
|
||||
//! @note added in 2.0
|
||||
virtual void setLayerExpanded( QgsMapLayer * ml, bool expand ) = 0;
|
||||
|
||||
//! Set the visibility of a group
|
||||
//! @note added in 1.5
|
||||
virtual void setGroupVisible( int groupIndex, bool visible ) = 0;
|
||||
|
||||
//! Set the visibility of a layer
|
||||
//! @note added in 1.5
|
||||
virtual void setLayerVisible( QgsMapLayer * ml, bool visible ) = 0;
|
||||
|
||||
//! Refresh layer symbology
|
||||
//! @note added in 1.5
|
||||
virtual void refreshLayerSymbology( QgsMapLayer *ml ) = 0;
|
||||
};
|
||||
|
||||
|
||||
@ -148,8 +148,7 @@ class QgsMapCanvas : QGraphicsView
|
||||
Added in version 1.2: optionally specify different than current layer */
|
||||
void zoomToSelected( QgsVectorLayer* layer = NULL );
|
||||
|
||||
/** Pan to the selected features of current (vector) layer keeping same extent.
|
||||
@note added in 2.0 */
|
||||
/** Pan to the selected features of current (vector) layer keeping same extent. */
|
||||
void panToSelected( QgsVectorLayer* layer = NULL );
|
||||
|
||||
/** \brief Sets the map tool currently being used on the canvas */
|
||||
@ -234,7 +233,6 @@ class QgsMapCanvas : QGraphicsView
|
||||
void zoomOut();
|
||||
|
||||
//! Zoom to a specific scale
|
||||
// added in 1.5
|
||||
void zoomScale( double scale );
|
||||
|
||||
//! Zoom with the factor supplied. Factor > 1 zooms out, interval (0,1) zooms in
|
||||
@ -365,8 +363,7 @@ class QgsMapCanvas : QGraphicsView
|
||||
void renderComplete( QPainter * );
|
||||
|
||||
// ### QGIS 3: renamte to mapRefreshFinished()
|
||||
/** Emitted when canvas finished a refresh request.
|
||||
\note Added in 2.0 */
|
||||
/** Emitted when canvas finished a refresh request. */
|
||||
void mapCanvasRefreshed();
|
||||
|
||||
// ### QGIS 3: rename to mapRefreshStarted()
|
||||
@ -396,11 +393,9 @@ class QgsMapCanvas : QGraphicsView
|
||||
void selectionChanged( QgsMapLayer * layer );
|
||||
|
||||
//! Emitted when zoom last status changed
|
||||
//! @note: this signal was added in version 1.4
|
||||
void zoomLastStatusChanged( bool );
|
||||
|
||||
//! Emitted when zoom next status changed
|
||||
//! @note: this signal was added in version 1.4
|
||||
void zoomNextStatusChanged( bool );
|
||||
|
||||
//! Emitted when on-the-fly projection has been turned on/off
|
||||
|
||||
@ -26,8 +26,7 @@ class QgsMapCanvasItem : QGraphicsItem
|
||||
/**Sets render context parameters
|
||||
@param p painter for rendering
|
||||
@param context out: configured context
|
||||
@return true in case of success
|
||||
@note added in version 1.5*/
|
||||
@return true in case of success */
|
||||
bool setRenderContextVariables( QPainter* p, QgsRenderContext& context ) const;
|
||||
|
||||
public:
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
/** \ingroup gui
|
||||
* A generic message for displaying QGIS log messages.
|
||||
* \note added in 1.8
|
||||
*/
|
||||
class QgsMessageLogViewer: QDialog
|
||||
{
|
||||
|
||||
@ -3,8 +3,6 @@
|
||||
Handler for missing layers within project.
|
||||
|
||||
Gives user a chance to select path to the missing layers.
|
||||
|
||||
@note added in 1.4
|
||||
*/
|
||||
class QgsProjectBadLayerGuiHandler : QObject, QgsProjectBadLayerHandler
|
||||
{
|
||||
|
||||
@ -5,8 +5,7 @@ class QgsRubberBand: QgsMapCanvasItem
|
||||
%End
|
||||
|
||||
public:
|
||||
/** Icons
|
||||
* Added in 1.9 */
|
||||
/** Icons */
|
||||
enum IconType
|
||||
{
|
||||
/**
|
||||
@ -39,7 +38,6 @@ class QgsRubberBand: QgsMapCanvasItem
|
||||
* Creates a new RubberBand.
|
||||
* @param mapCanvas The map canvas to draw onto. It's CRS will be used map points onto screen coordinates.
|
||||
* @param geometryType Defines how the data should be drawn onto the screen. (Use QGis::Line, QGis::Polygon or QGis::Point)
|
||||
* @note Added in 1.9.
|
||||
*/
|
||||
QgsRubberBand( QgsMapCanvas* mapCanvas /TransferThis/, QGis::GeometryType geometryType = QGis::Line );
|
||||
/**
|
||||
@ -80,25 +78,21 @@ class QgsRubberBand: QgsMapCanvasItem
|
||||
/**
|
||||
* Set the icon type to highlight point geometries.
|
||||
* @param icon The icon to visualize point geometries
|
||||
* @note Added in 1.9
|
||||
*/
|
||||
void setIcon( IconType icon );
|
||||
|
||||
/**
|
||||
* Set the size of the point icons
|
||||
* @note Added in 1.9
|
||||
*/
|
||||
void setIconSize( int iconSize );
|
||||
|
||||
/**
|
||||
* Set the style of the line
|
||||
* @note Added in 1.9
|
||||
*/
|
||||
void setLineStyle( Qt::PenStyle penStyle );
|
||||
|
||||
/**
|
||||
* Set the style of the brush
|
||||
* @note Added in 1.9
|
||||
*/
|
||||
void setBrushStyle( Qt::BrushStyle brushStyle );
|
||||
|
||||
@ -106,7 +100,6 @@ class QgsRubberBand: QgsMapCanvasItem
|
||||
* Clears all the geometries in this rubberband.
|
||||
* Sets the representation type according to geometryType.
|
||||
* @param geometryType Defines how the data should be drawn onto the screen. (Use QGis::Line, QGis::Polygon or QGis::Point)
|
||||
* @note Added in 1.9.
|
||||
*/
|
||||
void reset( QGis::GeometryType geometryType = QGis::Line );
|
||||
|
||||
@ -139,7 +132,7 @@ class QgsRubberBand: QgsMapCanvasItem
|
||||
/**
|
||||
* Removes the last point. Most useful in connection with undo operations
|
||||
*/
|
||||
void removeLastPoint( int geometryIndex = 0 , bool doUpdate = true );
|
||||
void removeLastPoint( int geometryIndex = 0, bool doUpdate = true );
|
||||
|
||||
/**
|
||||
* Moves the rubber band point specified by index. Note that if the rubber band is
|
||||
@ -173,7 +166,6 @@ class QgsRubberBand: QgsMapCanvasItem
|
||||
/**
|
||||
* Sets this rubber band to a map canvas rectangle
|
||||
* @param rect rectangle in canvas coordinates
|
||||
* @note added in version 1.7
|
||||
*/
|
||||
void setToCanvasRectangle( const QRect& rect );
|
||||
|
||||
@ -187,7 +179,6 @@ class QgsRubberBand: QgsMapCanvasItem
|
||||
* @param geom the geometry object. Will be treated as a collection of vertices.
|
||||
* @param layer the layer containing the feature, used for coord transformation to map
|
||||
* crs. In case of 0 pointer, the coordinates are not going to be transformed.
|
||||
* @note added in 1.5
|
||||
*/
|
||||
void addGeometry( QgsGeometry* geom, QgsVectorLayer* layer );
|
||||
|
||||
@ -201,7 +192,6 @@ class QgsRubberBand: QgsMapCanvasItem
|
||||
/**
|
||||
* Returns number of geometries
|
||||
* @return number of geometries
|
||||
* @note added in 1.5
|
||||
*/
|
||||
int size() const;
|
||||
|
||||
@ -221,7 +211,6 @@ class QgsRubberBand: QgsMapCanvasItem
|
||||
/**
|
||||
* Returns the rubberband as a Geometry.
|
||||
* @return A geometry object which reflects the current state of the rubberband.
|
||||
* @note Added in 1.6
|
||||
*/
|
||||
QgsGeometry* asGeometry();
|
||||
|
||||
|
||||
@ -13,30 +13,23 @@ class QgsScaleComboBox : QComboBox
|
||||
~QgsScaleComboBox();
|
||||
|
||||
//! Function to read the selected scale as text
|
||||
// @note added in 2.0
|
||||
QString scaleString();
|
||||
//! Function to set the selected scale from text
|
||||
// @note added in 2.0
|
||||
bool setScaleString( QString scaleTxt );
|
||||
//! Function to read the selected scale as double
|
||||
// @note added in 2.0
|
||||
double scale();
|
||||
//! Function to set the selected scale from double
|
||||
// @note added in 2.0
|
||||
void setScale( double scale );
|
||||
|
||||
//! Helper function to convert a double to scale string
|
||||
// Performs rounding, so an exact representation is not to
|
||||
// be expected.
|
||||
// @note added in 2.0
|
||||
static QString toString( double scale );
|
||||
//! Helper function to convert a scale string to double
|
||||
// @note added in 2.0
|
||||
static double toDouble( QString scaleString, bool *ok = NULL );
|
||||
|
||||
signals:
|
||||
//! Signal is emitted when *user* has finished editing/selecting a new scale.
|
||||
// @note added in 2.0
|
||||
void scaleChanged();
|
||||
|
||||
public slots:
|
||||
|
||||
@ -222,7 +222,6 @@ class CORE_EXPORT QgsComposerItem: public QgsComposerObject, public QGraphicsRec
|
||||
|
||||
/**Whether this item has a frame or not.
|
||||
* @returns true if there is a frame around this item, otherwise false.
|
||||
* @note introduced since 1.8
|
||||
* @see setFrameEnabled
|
||||
* @see frameOutlineWidth
|
||||
* @see frameJoinStyle
|
||||
@ -232,7 +231,6 @@ class CORE_EXPORT QgsComposerItem: public QgsComposerObject, public QGraphicsRec
|
||||
|
||||
/**Set whether this item has a frame drawn around it or not.
|
||||
* @param drawFrame draw frame
|
||||
* @note introduced in 1.8
|
||||
* @see hasFrame
|
||||
* @see setFrameOutlineWidth
|
||||
* @see setFrameJoinStyle
|
||||
@ -321,7 +319,6 @@ class CORE_EXPORT QgsComposerItem: public QgsComposerObject, public QGraphicsRec
|
||||
|
||||
/**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 setBackgroundEnabled
|
||||
* @see backgroundColor
|
||||
*/
|
||||
@ -330,7 +327,6 @@ class CORE_EXPORT QgsComposerItem: public QgsComposerObject, public QGraphicsRec
|
||||
/**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
|
||||
* @see setBackgroundColor
|
||||
*/
|
||||
@ -338,7 +334,6 @@ class CORE_EXPORT QgsComposerItem: public QgsComposerObject, public QGraphicsRec
|
||||
|
||||
/**Gets the background color for this item
|
||||
* @returns background color
|
||||
* @note introduced in 2.0
|
||||
* @see setBackgroundColor
|
||||
* @see hasBackground
|
||||
*/
|
||||
@ -347,7 +342,6 @@ class CORE_EXPORT QgsComposerItem: public QgsComposerObject, public QGraphicsRec
|
||||
/**Sets the background color for this item
|
||||
* @param backgroundColor new background color
|
||||
* @returns nothing
|
||||
* @note introduced in 2.0
|
||||
* @see backgroundColor
|
||||
* @see setBackgroundEnabled
|
||||
*/
|
||||
@ -379,7 +373,6 @@ class CORE_EXPORT QgsComposerItem: public QgsComposerObject, public QGraphicsRec
|
||||
|
||||
/**Returns whether effects (eg blend modes) are enabled for the item
|
||||
* @returns true if effects are enabled
|
||||
* @note introduced in 2.0
|
||||
* @see setEffectsEnabled
|
||||
* @see transparency
|
||||
* @see blendMode
|
||||
@ -388,7 +381,6 @@ class CORE_EXPORT QgsComposerItem: public QgsComposerObject, public QGraphicsRec
|
||||
|
||||
/**Sets whether effects (eg blend modes) are enabled for the item
|
||||
* @param effectsEnabled set to true to enable effects
|
||||
* @note introduced in 2.0
|
||||
* @see effectsEnabled
|
||||
* @see setTransparency
|
||||
* @see setBlendMode
|
||||
@ -686,12 +678,10 @@ class CORE_EXPORT QgsComposerItem: public QgsComposerObject, public QGraphicsRec
|
||||
|
||||
/**Draws arrowhead
|
||||
* @deprecated use QgsComposerUtils::drawArrowHead instead
|
||||
*/
|
||||
*/
|
||||
Q_DECL_DEPRECATED void drawArrowHead( QPainter* p, double x, double y, double angle, double arrowHeadWidth ) const;
|
||||
|
||||
/**Returns angle of the line from p1 to p2 (clockwise, starting at N)
|
||||
* @deprecated use QgsComposerUtils::angle instead
|
||||
*/
|
||||
/**Returns angle of the line from p1 to p2 (clockwise, starting at N)*/
|
||||
Q_DECL_DEPRECATED double angle( const QPointF& p1, const QPointF& p2 ) const;
|
||||
|
||||
/**Returns the current (zoom level dependent) tolerance to decide if mouse position is close enough to the
|
||||
|
||||
@ -124,11 +124,9 @@ class CORE_EXPORT QgsComposerLabel: public QgsComposerItem
|
||||
*/
|
||||
void setMarginY( const double margin );
|
||||
|
||||
/**Sets text color
|
||||
*/
|
||||
/**Sets text color */
|
||||
void setFontColor( const QColor& c ) { mFontColor = c; }
|
||||
/**Get font color
|
||||
*/
|
||||
/**Get font color */
|
||||
QColor fontColor() const { return mFontColor; }
|
||||
|
||||
/** stores state in Dom element
|
||||
|
||||
@ -235,18 +235,14 @@ class CORE_EXPORT QgsComposerMap : public QgsComposerItem
|
||||
PreviewMode previewMode() const {return mPreviewMode;}
|
||||
void setPreviewMode( PreviewMode m );
|
||||
|
||||
/**Getter for flag that determines if the stored layer set should be used or the current layer set of the qgis mapcanvas
|
||||
*/
|
||||
/**Getter for flag that determines if the stored layer set should be used or the current layer set of the qgis mapcanvas */
|
||||
bool keepLayerSet() const {return mKeepLayerSet;}
|
||||
/**Setter for flag that determines if the stored layer set should be used or the current layer set of the qgis mapcanvas
|
||||
*/
|
||||
/**Setter for flag that determines if the stored layer set should be used or the current layer set of the qgis mapcanvas */
|
||||
void setKeepLayerSet( bool enabled ) {mKeepLayerSet = enabled;}
|
||||
|
||||
/**Getter for stored layer set that is used if mKeepLayerSet is true
|
||||
*/
|
||||
/**Getter for stored layer set that is used if mKeepLayerSet is true */
|
||||
QStringList layerSet() const {return mLayerSet;}
|
||||
/**Setter for stored layer set that is used if mKeepLayerSet is true
|
||||
*/
|
||||
/**Setter for stored layer set that is used if mKeepLayerSet is true */
|
||||
void setLayerSet( const QStringList& layerSet ) {mLayerSet = layerSet;}
|
||||
/**Stores the current layer set of the qgis mapcanvas in mLayerSet*/
|
||||
void storeCurrentLayerSet();
|
||||
@ -281,7 +277,6 @@ class CORE_EXPORT QgsComposerMap : public QgsComposerItem
|
||||
bool readXML( const QDomElement& itemElem, const QDomDocument& doc );
|
||||
|
||||
/**Enables a coordinate grid that is shown on top of this composermap.
|
||||
*
|
||||
* @deprecated use grid()->setEnabled() or grids() instead
|
||||
*/
|
||||
Q_DECL_DEPRECATED void setGridEnabled( bool enabled );
|
||||
@ -292,7 +287,6 @@ class CORE_EXPORT QgsComposerMap : public QgsComposerItem
|
||||
Q_DECL_DEPRECATED bool gridEnabled() const;
|
||||
|
||||
/**Sets coordinate grid style to solid or cross
|
||||
*
|
||||
* @deprecated use grid()->setStyle() or grids() instead
|
||||
*/
|
||||
Q_DECL_DEPRECATED void setGridStyle( GridStyle style );
|
||||
@ -303,7 +297,6 @@ class CORE_EXPORT QgsComposerMap : public QgsComposerItem
|
||||
Q_DECL_DEPRECATED GridStyle gridStyle() const;
|
||||
|
||||
/**Sets coordinate interval in x-direction for composergrid.
|
||||
*
|
||||
* @deprecated use grid()->setIntervalX() or grids() instead
|
||||
*/
|
||||
Q_DECL_DEPRECATED void setGridIntervalX( double interval );
|
||||
@ -314,7 +307,6 @@ class CORE_EXPORT QgsComposerMap : public QgsComposerItem
|
||||
Q_DECL_DEPRECATED double gridIntervalX() const;
|
||||
|
||||
/**Sets coordinate interval in y-direction for composergrid.
|
||||
*
|
||||
* @deprecated use grid()->setIntervalY() or grids() instead
|
||||
*/
|
||||
Q_DECL_DEPRECATED void setGridIntervalY( double interval );
|
||||
@ -325,7 +317,6 @@ class CORE_EXPORT QgsComposerMap : public QgsComposerItem
|
||||
Q_DECL_DEPRECATED double gridIntervalY() const;
|
||||
|
||||
/**Sets x-coordinate offset for composer grid
|
||||
*
|
||||
* @deprecated use grid()->setOffsetX() or grids() instead
|
||||
*/
|
||||
Q_DECL_DEPRECATED void setGridOffsetX( double offset );
|
||||
@ -336,7 +327,6 @@ class CORE_EXPORT QgsComposerMap : public QgsComposerItem
|
||||
Q_DECL_DEPRECATED double gridOffsetX() const;
|
||||
|
||||
/**Sets y-coordinate offset for composer grid
|
||||
*
|
||||
* @deprecated use grid()->setOffsetY() or grids() instead
|
||||
*/
|
||||
Q_DECL_DEPRECATED void setGridOffsetY( double offset );
|
||||
@ -347,7 +337,6 @@ class CORE_EXPORT QgsComposerMap : public QgsComposerItem
|
||||
Q_DECL_DEPRECATED double gridOffsetY() const;
|
||||
|
||||
/**Sets the pen to draw composer grid
|
||||
*
|
||||
* @deprecated use grid()->setPenWidth(), grid()->setPenColor() or grids() instead
|
||||
*/
|
||||
Q_DECL_DEPRECATED void setGridPen( const QPen& p );
|
||||
@ -358,19 +347,16 @@ class CORE_EXPORT QgsComposerMap : public QgsComposerItem
|
||||
Q_DECL_DEPRECATED QPen gridPen() const;
|
||||
|
||||
/**Sets width of grid pen
|
||||
*
|
||||
* @deprecated use grid()->setPenWidth() or grids() instead
|
||||
*/
|
||||
Q_DECL_DEPRECATED void setGridPenWidth( double w );
|
||||
|
||||
/**Sets the color of the grid pen
|
||||
*
|
||||
* @deprecated use grid()->setPenColor() or grids() instead
|
||||
*/
|
||||
Q_DECL_DEPRECATED void setGridPenColor( const QColor& c );
|
||||
|
||||
/**Sets font for grid annotations
|
||||
*
|
||||
* @deprecated use grid()->setAnnotationFont() or grids() instead
|
||||
*/
|
||||
Q_DECL_DEPRECATED void setGridAnnotationFont( const QFont& f );
|
||||
@ -391,7 +377,6 @@ class CORE_EXPORT QgsComposerMap : public QgsComposerItem
|
||||
Q_DECL_DEPRECATED QColor annotationFontColor() const;
|
||||
|
||||
/**Sets coordinate precision for grid annotations
|
||||
*
|
||||
* @deprecated use grid()->setAnnotationPrecision or grids() instead
|
||||
*/
|
||||
Q_DECL_DEPRECATED void setGridAnnotationPrecision( int p );
|
||||
@ -402,7 +387,6 @@ class CORE_EXPORT QgsComposerMap : public QgsComposerItem
|
||||
Q_DECL_DEPRECATED int gridAnnotationPrecision() const;
|
||||
|
||||
/**Sets flag if grid annotation should be shown
|
||||
*
|
||||
* @deprecated use grid()->setAnnotationEnabled() or grids() instead
|
||||
*/
|
||||
Q_DECL_DEPRECATED void setShowGridAnnotation( bool show );
|
||||
@ -423,7 +407,6 @@ class CORE_EXPORT QgsComposerMap : public QgsComposerItem
|
||||
Q_DECL_DEPRECATED GridAnnotationPosition gridAnnotationPosition( QgsComposerMap::Border border ) const;
|
||||
|
||||
/**Sets distance between map frame and annotations
|
||||
*
|
||||
* @deprecated use grid()->setAnnotationFrameDistance() or grids() instead
|
||||
*/
|
||||
Q_DECL_DEPRECATED void setAnnotationFrameDistance( double d );
|
||||
@ -521,7 +504,6 @@ class CORE_EXPORT QgsComposerMap : public QgsComposerItem
|
||||
Q_DECL_DEPRECATED QColor gridFrameFillColor2() const;
|
||||
|
||||
/**Sets length of the cross segments (if grid style is cross)
|
||||
*
|
||||
* @deprecated use grid()->setCrossLength() or grids() instead
|
||||
*/
|
||||
Q_DECL_DEPRECATED void setCrossLength( double l );
|
||||
@ -581,8 +563,7 @@ class CORE_EXPORT QgsComposerMap : public QgsComposerItem
|
||||
*/
|
||||
QgsComposerMapOverview* overview();
|
||||
|
||||
/**In case of annotations, the bounding rectangle can be larger than the map item rectangle
|
||||
*/
|
||||
/**In case of annotations, the bounding rectangle can be larger than the map item rectangle */
|
||||
QRectF boundingRect() const;
|
||||
|
||||
/* reimplement setFrameOutlineWidth, so that updateBoundingRect() is called after setting the frame width */
|
||||
@ -808,12 +789,11 @@ class CORE_EXPORT QgsComposerMap : public QgsComposerItem
|
||||
/**Call updateCachedImage if item is in render mode*/
|
||||
void renderModeUpdateCachedImage();
|
||||
|
||||
/**Updates the bounding rect of this item. Call this function before doing any changes related to annotation out of the map rectangle
|
||||
*/
|
||||
/**Updates the bounding rect of this item. Call this function before doing any changes related to annotation out of the map rectangle */
|
||||
void updateBoundingRect();
|
||||
|
||||
/**@deprecated use QgsComposerMapOverview::overviewExtentChanged instead*/
|
||||
void overviewExtentChanged() {};
|
||||
void overviewExtentChanged() {}
|
||||
|
||||
virtual void refreshDataDefinedProperty( const QgsComposerObject::DataDefinedProperty property = QgsComposerObject::AllProperties );
|
||||
|
||||
|
||||
@ -189,8 +189,7 @@ class CORE_EXPORT QgsComposerScaleBar: public QgsComposerItem
|
||||
|
||||
/**Apply default settings*/
|
||||
void applyDefaultSettings();
|
||||
/**Apply default size (scale bar 1/5 of map item width)
|
||||
*/
|
||||
/**Apply default size (scale bar 1/5 of map item width) */
|
||||
void applyDefaultSize( ScaleBarUnits u = Meters );
|
||||
|
||||
/**Sets style by name
|
||||
|
||||
@ -385,8 +385,7 @@ class CORE_EXPORT QgsComposition : public QGraphicsScene
|
||||
|
||||
/**Returns true if a composition should use advanced effects such as blend modes */
|
||||
bool useAdvancedEffects() const {return mUseAdvancedEffects;}
|
||||
/**Used to enable or disable advanced effects such as blend modes in a composition
|
||||
*/
|
||||
/**Used to enable or disable advanced effects such as blend modes in a composition */
|
||||
void setUseAdvancedEffects( const bool effectsEnabled );
|
||||
|
||||
/**Returns pointer to map renderer of qgis map canvas*/
|
||||
|
||||
@ -81,7 +81,7 @@ class CORE_EXPORT QgsApplication : public QApplication
|
||||
|
||||
/** Returns the path to the contributors file.
|
||||
* Contributors are people who have submitted patches
|
||||
* but don't have svn write access. */
|
||||
* but don't have commit access. */
|
||||
static const QString contributorsFilePath();
|
||||
|
||||
/**Returns the path to the sponsors file.*/
|
||||
@ -223,11 +223,9 @@ class CORE_EXPORT QgsApplication : public QApplication
|
||||
*/
|
||||
static void registerOgrDrivers();
|
||||
|
||||
/**Converts absolute path to path relative to target
|
||||
*/
|
||||
/**Converts absolute path to path relative to target */
|
||||
static QString absolutePathToRelativePath( QString apath, QString targetPath );
|
||||
/**Converts path relative to target to an absolute path
|
||||
*/
|
||||
/**Converts path relative to target to an absolute path */
|
||||
static QString relativePathToAbsolutePath( QString rpath, QString targetPath );
|
||||
|
||||
/** Indicates whether running from build directory (not installed) */
|
||||
|
||||
@ -146,7 +146,7 @@ class CORE_EXPORT QgsAttributeAction
|
||||
* @note available in python bindings as doActionFeatureWithSubstitution
|
||||
*/
|
||||
void doAction( int index,
|
||||
const QgsFeature& feat,
|
||||
const QgsFeature &feat,
|
||||
const QMap<QString, QVariant> *substitutionMap );
|
||||
|
||||
//! Removes all actions
|
||||
|
||||
@ -67,7 +67,7 @@ class CORE_EXPORT QgsDataProvider : public QObject
|
||||
/**
|
||||
* We need this so the subclass destructors get called
|
||||
*/
|
||||
virtual ~QgsDataProvider() {};
|
||||
virtual ~QgsDataProvider() {}
|
||||
|
||||
|
||||
/*! Get the QgsCoordinateReferenceSystem for this layer
|
||||
|
||||
@ -157,13 +157,13 @@ class CORE_EXPORT QgsGeometry
|
||||
/** Returns true if wkb of the geometry is of WKBMulti* type */
|
||||
bool isMultipart();
|
||||
|
||||
/** compare geometries using GEOS */
|
||||
/** compare geometries using GEOS */
|
||||
bool isGeosEqual( QgsGeometry & );
|
||||
|
||||
/** check validity using GEOS */
|
||||
bool isGeosValid();
|
||||
|
||||
/** check if geometry is empty using GEOS */
|
||||
/** check if geometry is empty using GEOS */
|
||||
bool isGeosEmpty();
|
||||
|
||||
/** get area of geometry using GEOS */
|
||||
@ -420,7 +420,6 @@ class CORE_EXPORT QgsGeometry
|
||||
*/
|
||||
QgsGeometry* convertToType( QGis::GeometryType destType, bool destMultipart = false );
|
||||
|
||||
|
||||
/* Accessor functions for getting geometry data */
|
||||
|
||||
/** return contents of the geometry as a point
|
||||
@ -465,13 +464,11 @@ class CORE_EXPORT QgsGeometry
|
||||
|
||||
/** delete a ring in polygon or multipolygon.
|
||||
Ring 0 is outer ring and can't be deleted.
|
||||
@return true on success
|
||||
*/
|
||||
@return true on success */
|
||||
bool deleteRing( int ringNum, int partNum = 0 );
|
||||
|
||||
/** delete part identified by the part number
|
||||
@return true on success
|
||||
*/
|
||||
@return true on success */
|
||||
bool deletePart( int partNum );
|
||||
|
||||
/**Converts single type geometry into multitype geometry
|
||||
|
||||
@ -31,7 +31,7 @@ class CORE_EXPORT QgsGeometryValidator : public QThread
|
||||
void run();
|
||||
void stop();
|
||||
|
||||
/** Validate geometry and produce a list of geometry errors **/
|
||||
/** Validate geometry and produce a list of geometry errors */
|
||||
static void validateGeometry( QgsGeometry *g, QList<QgsGeometry::Error> &errors );
|
||||
|
||||
signals:
|
||||
|
||||
@ -87,10 +87,7 @@ class CORE_EXPORT QgsHttpTransaction : public QObject
|
||||
@return true if proxy settings was applied, false else*/
|
||||
static bool applyProxySettings( QHttp& http, const QString& url );
|
||||
|
||||
/**
|
||||
* Set the credentials (username and password)
|
||||
*/
|
||||
|
||||
/** Set the credentials (username and password) */
|
||||
void setCredentials( const QString& username, const QString &password );
|
||||
|
||||
/**Returns the network timeout in msec*/
|
||||
|
||||
@ -147,9 +147,7 @@ class CORE_EXPORT QgsLabel
|
||||
bool scaleBasedVisibility() const;
|
||||
|
||||
private:
|
||||
/** Does the actual rendering of a label at the given point
|
||||
*
|
||||
*/
|
||||
/** Does the actual rendering of a label at the given point */
|
||||
void renderLabel( QgsRenderContext &renderContext, QgsPoint point,
|
||||
QString text, QFont font, QPen pen,
|
||||
int dx, int dy,
|
||||
|
||||
@ -460,13 +460,13 @@ class CORE_EXPORT QgsPalLayerSettings
|
||||
|
||||
/** Get data defined property value from expression string or attribute field name
|
||||
* @returns value inside QVariant
|
||||
* @note not available in python bindings;
|
||||
* @note not available in python bindings
|
||||
*/
|
||||
QVariant dataDefinedValue( QgsPalLayerSettings::DataDefinedProperties p, QgsFeature& f, const QgsFields& fields ) const;
|
||||
|
||||
/** Get data defined property value from expression string or attribute field name
|
||||
* @returns true/false whether result is null or invalid
|
||||
* @note not available in python bindings;
|
||||
* @note not available in python bindings
|
||||
*/
|
||||
bool dataDefinedEvaluate( QgsPalLayerSettings::DataDefinedProperties p, QVariant& exprVal ) const;
|
||||
|
||||
@ -500,7 +500,6 @@ class CORE_EXPORT QgsPalLayerSettings
|
||||
* @param rasterfactor whether to consider oversampling
|
||||
* @param mapUnitScale a mapUnitScale clamper
|
||||
* @return size that will render, as double
|
||||
* @note added in 1.9, as a better precision replacement for sizeToPixel
|
||||
*/
|
||||
double scaleToPixelContext( double size, const QgsRenderContext& c, SizeUnit unit, bool rasterfactor = false, const QgsMapUnitScale& mapUnitScale = QgsMapUnitScale() ) const;
|
||||
|
||||
|
||||
@ -57,7 +57,7 @@ class CORE_EXPORT QgsVector
|
||||
};
|
||||
|
||||
/** \ingroup core
|
||||
* A class to represent a point geometry.
|
||||
* A class to represent a point.
|
||||
* Currently no Z axis / 2.5D support is implemented.
|
||||
*/
|
||||
class CORE_EXPORT QgsPoint
|
||||
|
||||
@ -326,9 +326,10 @@ class CORE_EXPORT QgsVectorDataProvider : public QgsDataProvider
|
||||
*/
|
||||
const QList< NativeType > &nativeTypes() const;
|
||||
|
||||
/** Returns true if the provider is strict about the type of inserted features
|
||||
(e.g. no multipolygon in a polygon layer)
|
||||
*/
|
||||
/**
|
||||
* Returns true if the provider is strict about the type of inserted features
|
||||
* (e.g. no multipolygon in a polygon layer)
|
||||
*/
|
||||
virtual bool doesStrictFeatureTypeCheck() const { return true;}
|
||||
|
||||
/** Returns a list of available encodings */
|
||||
|
||||
@ -494,10 +494,10 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
|
||||
FileName,
|
||||
Enumeration,
|
||||
Immutable, /**< The attribute value should not be changed in the attribute form */
|
||||
Hidden, /**< The attribute value should not be shown in the attribute form */
|
||||
Hidden, /**< The attribute value should not be shown in the attribute form */
|
||||
TextEdit, /**< multiline edit */
|
||||
Calendar, /**< calendar widget */
|
||||
DialRange, /**< dial range */
|
||||
Calendar, /**< calendar widget */
|
||||
DialRange, /**< dial range */
|
||||
ValueRelation, /**< value map from an table */
|
||||
UuidGenerator, /**< uuid generator - readonly and automatically intialized */
|
||||
Photo, /**< phote widget */
|
||||
@ -638,7 +638,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
|
||||
@note since 2.6 returns bool indicating whether the join can be added */
|
||||
bool addJoin( const QgsVectorJoinInfo& joinInfo );
|
||||
|
||||
/** Removes a vector layer join */
|
||||
/** Removes a vector layer join */
|
||||
void removeJoin( const QString& joinLayerId );
|
||||
|
||||
const QList< QgsVectorJoinInfo >& vectorJoins() const;
|
||||
@ -769,8 +769,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
|
||||
|
||||
/** Return renderer V2. */
|
||||
QgsFeatureRendererV2* rendererV2();
|
||||
/** Set renderer V2.
|
||||
*/
|
||||
/** Set renderer V2. */
|
||||
void setRendererV2( QgsFeatureRendererV2* r );
|
||||
|
||||
/** Returns point, line or polygon */
|
||||
@ -1033,8 +1032,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
|
||||
/** Returns true if the provider is in editing mode */
|
||||
virtual bool isEditable() const;
|
||||
|
||||
/** Returns true if the provider is in read-only mode
|
||||
*/
|
||||
/** Returns true if the provider is in read-only mode */
|
||||
virtual bool isReadOnly() const;
|
||||
|
||||
/** Returns true if the provider has been modified since the last commit */
|
||||
@ -1123,8 +1121,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
|
||||
bool changeAttributeValue( QgsFeatureId fid, int field, const QVariant &newValue, const QVariant &oldValue = QVariant() );
|
||||
|
||||
/** add an attribute field (but does not commit it)
|
||||
returns true if the field was added
|
||||
*/
|
||||
returns true if the field was added */
|
||||
bool addAttribute( const QgsField &field );
|
||||
|
||||
/** Sets an alias (a display name) for attributes to display in dialogs */
|
||||
@ -1383,7 +1380,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
|
||||
/**is edit widget editable **/
|
||||
bool fieldEditable( int idx );
|
||||
|
||||
/**label widget on top **/
|
||||
/**label widget on top **/
|
||||
bool labelOnTop( int idx );
|
||||
|
||||
/**set edit widget editable **/
|
||||
@ -1407,12 +1404,10 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
|
||||
/** Destroy active command and reverts all changes in it */
|
||||
void destroyEditCommand();
|
||||
|
||||
/** Returns the index of a field name or -1 if the field does not exist
|
||||
*/
|
||||
/** Returns the index of a field name or -1 if the field does not exist */
|
||||
int fieldNameIndex( const QString& fieldName ) const;
|
||||
|
||||
/** Editing vertex markers
|
||||
*/
|
||||
/** Editing vertex markers */
|
||||
enum VertexMarkerType
|
||||
{
|
||||
SemiTransparentCircle,
|
||||
@ -1420,8 +1415,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
|
||||
NoMarker
|
||||
};
|
||||
|
||||
/** Draws a vertex symbol at (screen) coordinates x, y. (Useful to assist vertex editing.)
|
||||
*/
|
||||
/** Draws a vertex symbol at (screen) coordinates x, y. (Useful to assist vertex editing.) */
|
||||
static void drawVertexMarker( double x, double y, QPainter& p, QgsVectorLayer::VertexMarkerType type, int vertexSize );
|
||||
|
||||
/** Assembles mUpdatedFields considering provider fields, joined fields and added fields */
|
||||
|
||||
@ -60,8 +60,7 @@ class CORE_EXPORT QgsVectorLayerEditBuffer : public QObject
|
||||
bool changeAttributeValue( QgsFeatureId fid, int field, const QVariant &newValue, const QVariant &oldValue = QVariant() );
|
||||
|
||||
/** add an attribute field (but does not commit it)
|
||||
returns true if the field was added
|
||||
*/
|
||||
returns true if the field was added */
|
||||
bool addAttribute( const QgsField &field );
|
||||
|
||||
/** delete an attribute field (but does not commit it) */
|
||||
|
||||
@ -317,7 +317,7 @@ class CORE_EXPORT QgsRasterLayer : public QgsMapLayer
|
||||
* @param theLimits Limits
|
||||
* @param theExtent Extent used to calculate limits, if empty, use full layer extent
|
||||
* @param theSampleSize Size of data sample to calculate limits, if 0, use full resolution
|
||||
* @param theGenerateLookupTableFlag Generate llokup table. */
|
||||
* @param theGenerateLookupTableFlag Generate lookup table. */
|
||||
|
||||
|
||||
void setContrastEnhancement( QgsContrastEnhancement::ContrastEnhancementAlgorithm theAlgorithm,
|
||||
|
||||
@ -87,7 +87,6 @@ class CORE_EXPORT QgsRuleBasedRendererV2 : public QgsFeatureRendererV2
|
||||
//! Constructor takes ownership of the symbol
|
||||
Rule( QgsSymbolV2* symbol, int scaleMinDenom = 0, int scaleMaxDenom = 0, QString filterExp = QString(),
|
||||
QString label = QString(), QString description = QString(), bool elseRule = false );
|
||||
//Rule( const Rule& other );
|
||||
~Rule();
|
||||
QString dump( int offset = 0 ) const;
|
||||
QSet<QString> usedAttributes();
|
||||
|
||||
@ -76,7 +76,6 @@ class CORE_EXPORT QgsSingleSymbolRendererV2 : public QgsFeatureRendererV2
|
||||
//! @note not available in python bindings
|
||||
virtual QgsLegendSymbolList legendSymbolItems( double scaleDenominator = -1, QString rule = QString() );
|
||||
|
||||
|
||||
//! Return a list of symbology items for the legend. Better choice than legendSymbolItems().
|
||||
//! @note added in 2.6
|
||||
virtual QgsLegendSymbolListV2 legendSymbolItemsV2() const;
|
||||
@ -86,7 +85,6 @@ class CORE_EXPORT QgsSingleSymbolRendererV2 : public QgsFeatureRendererV2
|
||||
//! @returns a new renderer if the conversion was possible, otherwise 0.
|
||||
static QgsSingleSymbolRendererV2* convertFromRenderer( const QgsFeatureRendererV2 *renderer );
|
||||
|
||||
|
||||
protected:
|
||||
QScopedPointer<QgsSymbolV2> mSymbol;
|
||||
QScopedPointer<QgsExpression> mRotation;
|
||||
|
||||
@ -264,7 +264,6 @@ class CORE_EXPORT QgsStyleV2 : public QObject
|
||||
//! change ramp's name
|
||||
bool renameColorRamp( QString oldName, QString newName );
|
||||
|
||||
|
||||
//! load a file into the style
|
||||
bool load( QString filename );
|
||||
|
||||
|
||||
@ -164,12 +164,11 @@ class CORE_EXPORT QgsSymbolV2
|
||||
class CORE_EXPORT QgsSymbolV2RenderContext
|
||||
{
|
||||
public:
|
||||
QgsSymbolV2RenderContext( QgsRenderContext& c, QgsSymbolV2::OutputUnit u, qreal alpha = 1.0, bool selected = false, int renderHints = 0, const QgsFeature* f = 0, const QgsFields* = 0, const QgsMapUnitScale& mapUnitScale = QgsMapUnitScale() );
|
||||
QgsSymbolV2RenderContext( QgsRenderContext& c, QgsSymbolV2::OutputUnit u, qreal alpha = 1.0, bool selected = false, int renderHints = 0, const QgsFeature* f = 0, const QgsFields* fields = 0, const QgsMapUnitScale& mapUnitScale = QgsMapUnitScale() );
|
||||
~QgsSymbolV2RenderContext();
|
||||
|
||||
QgsRenderContext& renderContext() { return mRenderContext; }
|
||||
const QgsRenderContext& renderContext() const { return mRenderContext; }
|
||||
//void setRenderContext( QgsRenderContext& c ) { mRenderContext = c;}
|
||||
|
||||
QgsSymbolV2::OutputUnit outputUnit() const { return mOutputUnit; }
|
||||
void setOutputUnit( QgsSymbolV2::OutputUnit u ) { mOutputUnit = u; }
|
||||
|
||||
@ -35,8 +35,7 @@ class GUI_EXPORT QgsExpressionBuilderDialog : public QDialog, private Ui::QgsExp
|
||||
|
||||
QString expressionText();
|
||||
|
||||
/** Sets geometry calculator used in distance/area calculations.
|
||||
*/
|
||||
/** Sets geometry calculator used in distance/area calculations. */
|
||||
void setGeomCalculator( const QgsDistanceArea & da );
|
||||
|
||||
protected:
|
||||
|
||||
@ -123,8 +123,7 @@ class GUI_EXPORT QgsExpressionBuilderWidget : public QWidget, private Ui::QgsExp
|
||||
|
||||
void loadFieldNames( const QgsFields& fields );
|
||||
|
||||
/** Sets geometry calculator used in distance/area calculations.
|
||||
*/
|
||||
/** Sets geometry calculator used in distance/area calculations. */
|
||||
void setGeomCalculator( const QgsDistanceArea & da );
|
||||
|
||||
/** Gets the expression string that has been set in the expression area.
|
||||
|
||||
@ -78,8 +78,7 @@ class GUI_EXPORT QgsLegendInterface : public QObject
|
||||
//! Check if a layer is visible
|
||||
virtual bool isLayerVisible( QgsMapLayer * ml ) = 0;
|
||||
|
||||
/** Add action for layers in the legend
|
||||
*/
|
||||
/** Add action for layers in the legend */
|
||||
virtual void addLegendLayerAction( QAction* action, QString menu, QString id,
|
||||
QgsMapLayer::LayerType type, bool allLayers ) = 0;
|
||||
|
||||
@ -147,7 +146,6 @@ class GUI_EXPORT QgsLegendInterface : public QObject
|
||||
virtual void setLayerVisible( QgsMapLayer * ml, bool visible ) = 0;
|
||||
|
||||
//! Refresh layer symbology
|
||||
|
||||
virtual void refreshLayerSymbology( QgsMapLayer *ml ) = 0;
|
||||
};
|
||||
|
||||
|
||||
@ -50,7 +50,7 @@ class GUI_EXPORT QgsMapCanvasItem : public QGraphicsItem
|
||||
/**Sets render context parameters
|
||||
@param p painter for rendering
|
||||
@param context out: configured context
|
||||
@return true in case of succes */
|
||||
@return true in case of success */
|
||||
bool setRenderContextVariables( QPainter* p, QgsRenderContext& context ) const;
|
||||
|
||||
public:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user