Skip to content

Commit

Permalink
sip sync
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Nov 21, 2014
1 parent c94b9f3 commit 9ceb5ce
Show file tree
Hide file tree
Showing 82 changed files with 397 additions and 815 deletions.
12 changes: 6 additions & 6 deletions python/analysis/vector/qgsgeometryanalyzer.sip
Expand Up @@ -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 );

Expand All @@ -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 );

Expand All @@ -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
Expand All @@ -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 );

Expand All @@ -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 );

Expand All @@ -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 );

Expand Down
2 changes: 1 addition & 1 deletion python/analysis/vector/qgsoverlayanalyzer.sip
Expand Up @@ -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 );
Expand Down
4 changes: 1 addition & 3 deletions python/core/composer/qgscomposerarrow.sip
Expand Up @@ -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 */
Expand Down
45 changes: 16 additions & 29 deletions python/core/composer/qgscomposeritem.sip
Expand Up @@ -99,7 +99,7 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
ComposerLabel,
ComposerLegend,
ComposerMap,
ComposerPaper, // QgsPaperItem
ComposerPaper, // QgsPaperItem
ComposerPicture,
ComposerScaleBar,
ComposerShape,
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
*/
Expand All @@ -377,15 +375,13 @@ 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
*/
void setBackgroundEnabled( const bool drawBackground );

/**Gets the background color for this item
* @returns background color
* @note introduced in 2.0
* @see setBackgroundColor
* @see hasBackground
*/
Expand All @@ -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
*/
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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/;
Expand Down Expand Up @@ -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;
Expand All @@ -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
Expand Down Expand Up @@ -662,7 +649,6 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
*/
virtual void refreshDataDefinedProperty( const QgsComposerObject::DataDefinedProperty property = QgsComposerObject::AllProperties );


protected:

//event handlers
Expand All @@ -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)*/
Expand All @@ -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
Expand Down Expand Up @@ -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/;

Expand Down
19 changes: 5 additions & 14 deletions python/core/composer/qgscomposerlabel.sip
Expand Up @@ -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*/
Expand All @@ -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 */
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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();
};

0 comments on commit 9ceb5ce

Please sign in to comment.