Skip to content

Commit abd4a04

Browse files
committed
sip update
1 parent 932baa9 commit abd4a04

File tree

126 files changed

+689
-239
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+689
-239
lines changed

python/core/composer/qgscomposerattributetablemodel.sip

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class QgsComposerAttributeTableColumnModel: QAbstractTableModel
4040
* @param direction direction to move the attribute table column
4141
* @note added in 2.3
4242
*/
43-
bool moveRow( int row , ShiftDirection direction );
43+
bool moveRow( int row, ShiftDirection direction );
4444

4545
/**Resets the attribute table's columns to match the source layer's fields. Remove all existing
4646
* attribute table columns and column customisations.

python/core/composer/qgscomposerattributetablemodelv2.sip

+1-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ class QgsComposerAttributeTableColumnModelV2: QAbstractTableModel
1515
ShiftDown /*!< shift the row/column down */
1616
};
1717

18-
/**Constructor for QgsComposerAttributeTableColumnModel.
1918
/**Constructor for QgsComposerAttributeTableColumnModel.
2019
* @param composerTable QgsComposerAttributeTable the model is attached to
2120
* @param parent optional parent
@@ -41,7 +40,7 @@ class QgsComposerAttributeTableColumnModelV2: QAbstractTableModel
4140
* @param direction direction to move the attribute table column
4241
* @note added in 2.3
4342
*/
44-
bool moveRow( int row , ShiftDirection direction );
43+
bool moveRow( int row, ShiftDirection direction );
4544

4645
/**Resets the attribute table's columns to match the source layer's fields. Remove all existing
4746
* attribute table columns and column customisations.

python/core/composer/qgscomposerattributetablev2.sip

+4-3
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ class QgsComposerAttributeTableCompareV2
77
%End
88

99
public:
10-
1110
QgsComposerAttributeTableCompareV2();
12-
1311
bool operator()( const QgsComposerTableRow& m1, const QgsComposerTableRow& m2 );
1412

1513
/**Sets column number to sort by
@@ -24,6 +22,7 @@ class QgsComposerAttributeTableCompareV2
2422

2523
};
2624

25+
2726
/**A table that displays attributes from a vector layer*/
2827
class QgsComposerAttributeTableV2 : QgsComposerTableV2
2928
{
@@ -50,13 +49,15 @@ class QgsComposerAttributeTableV2 : QgsComposerTableV2
5049
/**Writes properties specific to attribute tables
5150
* @param elem an existing QDomElement in which to store the attribute table's properties.
5251
* @param doc QDomDocument for the destination xml.
52+
* @param ignoreFrames ignore frames
5353
* @see readXML
5454
*/
5555
virtual bool writeXML( QDomElement& elem, QDomDocument & doc, bool ignoreFrames = false ) const;
5656

5757
/**Reads the properties specific to an attribute table from xml.
5858
* @param itemElem a QDomElement holding the attribute table's desired properties.
5959
* @param doc QDomDocument for the source xml.
60+
* @param ignoreFrames ignore frames
6061
* @see writeXML
6162
*/
6263
virtual bool readXML( const QDomElement& itemElem, const QDomDocument& doc, bool ignoreFrames = false );
@@ -248,7 +249,7 @@ class QgsComposerAttributeTableV2 : QgsComposerTableV2
248249
//QList<QPair<int, bool> > sortAttributes() const;
249250

250251
/**Queries the attribute table's vector layer for attributes to show in the table.
251-
* @param attributeMaps list of QgsAttributeMaps where the fetched feature attributes will be stored
252+
* @param contents table content
252253
* @returns true if attributes were successfully fetched
253254
* @note not available in python bindings
254255
*/

python/core/composer/qgscomposerframe.sip

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ class QgsComposerFrame: QgsComposerItem
55
#include "qgscomposerframe.h"
66
%End
77

8-
public:
8+
public:
99
QgsComposerFrame( QgsComposition* c /TransferThis/, QgsComposerMultiFrame* mf, qreal x, qreal y, qreal width, qreal height );
10+
1011
~QgsComposerFrame();
1112

1213
/**Sets the visible part of the multiframe's content which is visible within

python/core/composer/qgscomposerhtml.sip

+3-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ class QgsComposerHtml: QgsComposerMultiFrame
1515
};
1616

1717
QgsComposerHtml( QgsComposition* c /TransferThis/, bool createUndoCommands );
18+
19+
//should be private - fix for QGIS 3.0
1820
QgsComposerHtml();
21+
1922
~QgsComposerHtml();
2023

2124
/**Sets the source mode for item's HTML content.
@@ -192,7 +195,6 @@ class QgsComposerHtml: QgsComposerMultiFrame
192195

193196
/**Recalculates the frame sizes for the current viewport dimensions*/
194197
void recalculateFrameSizes();
195-
196198
void refreshExpressionContext();
197199

198200
virtual void refreshDataDefinedProperty( const QgsComposerObject::DataDefinedProperty property = QgsComposerObject::AllProperties );

python/core/composer/qgscomposeritem.sip

+3-3
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
507507
/**Returns a font where size is in pixel and font size is upscaled with FONT_WORKAROUND_SCALE
508508
* @deprecated use QgsComposerUtils::scaledFontPixelSize instead
509509
*/
510-
QFont scaledFontPixelSize( const QFont& font ) const;
510+
QFont scaledFontPixelSize( const QFont& font ) const /Deprecated/;
511511

512512
/**Locks / unlocks the item position for mouse drags
513513
* @param lock set to true to prevent item movement and resizing via the mouse
@@ -672,10 +672,10 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem
672672
/**Draws arrowhead
673673
* @deprecated use QgsComposerUtils::drawArrowHead instead
674674
*/
675-
void drawArrowHead( QPainter* p, double x, double y, double angle, double arrowHeadWidth ) const;
675+
void drawArrowHead( QPainter* p, double x, double y, double angle, double arrowHeadWidth ) const /Deprecated/;
676676

677677
/**Returns angle of the line from p1 to p2 (clockwise, starting at N)*/
678-
double angle( const QPointF& p1, const QPointF& p2 ) const;
678+
double angle( const QPointF& p1, const QPointF& p2 ) const /Deprecated/;
679679

680680
/**Returns the current (zoom level dependent) tolerance to decide if mouse position is close enough to the
681681
item border for resizing*/

python/core/composer/qgscomposeritemcommand.sip

+3-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class QgsComposerItemCommand: QUndoCommand
2828
/**Returns the target item the command applies to.
2929
* @returns target composer item
3030
*/
31-
QgsComposerItem* item() const;
31+
QgsComposerItem *item() const;
3232

3333
protected:
3434
void saveState( QDomDocument& stateDoc ) const;
@@ -94,7 +94,8 @@ class QgsComposerMergeCommand : QgsComposerItemCommand
9494
ItemOutlineWidth,
9595
ItemMove,
9696
ItemRotation,
97-
ItemTransparency
97+
ItemTransparency,
98+
ItemZoomContent
9899
};
99100

100101
QgsComposerMergeCommand( Context c, QgsComposerItem* item, const QString& text );

python/core/composer/qgscomposeritemgroup.sip

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class QgsComposerItemGroup: QgsComposerItem
77
QgsComposerItemGroup( QgsComposition* c /TransferThis/ );
88
~QgsComposerItemGroup();
99

10-
/** return correct graphics item type. Added in v1.7 */
10+
/** return correct graphics item type. */
1111
virtual int type() const;
1212

1313
/**Adds an item to the group. All the group members are deleted

python/core/composer/qgscomposermap.sip

+1-1
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ class QgsComposerMap : QgsComposerItem
521521
*/
522522
QgsComposerMapGrid* grid();
523523

524-
/**Returns the map item's overview stack, which is used to control how over
524+
/**Returns the map item's overview stack, which is used to control how overviews
525525
* are drawn over the map's contents.
526526
* @returns pointer to overview stack
527527
* @see overview()

python/core/composer/qgscomposermapgrid.sip

+7-1
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,10 @@ class QgsComposerMapGridStack : QgsComposerMapItemStack
105105

106106
};
107107

108+
//
109+
// QgsComposerMapGrid
110+
//
111+
108112
/**\ingroup MapComposer
109113
* \class QgsComposerMapGrid
110114
* \brief An individual grid which is drawn above the map content in a
@@ -226,7 +230,7 @@ class QgsComposerMapGrid : QgsComposerMapItem
226230

227231
/**Constructor for QgsComposerMapGrid.
228232
* @param name friendly display name for grid
229-
* @parm map QgsComposerMap the grid stack is attached to
233+
* @param map QgsComposerMap the grid is attached to
230234
*/
231235
QgsComposerMapGrid( const QString& name, QgsComposerMap* map );
232236

@@ -275,6 +279,8 @@ class QgsComposerMapGrid : QgsComposerMapItem
275279
*/
276280
QPainter::CompositionMode blendMode() const;
277281

282+
bool usesAdvancedEffects() const;
283+
278284
/**Calculates the maximum distance the grid extends beyond the QgsComposerMap's
279285
* item rect
280286
* @returns maximum extension in millimetres

python/core/composer/qgscomposermapitem.sip

+3-2
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ class QgsComposerMapItem : QgsComposerObject
8686
};
8787

8888

89+
8990
/**\ingroup MapComposer
9091
* \class QgsComposerMapItemStack
9192
* \brief A collection of map items which are drawn above the map content in a
@@ -154,7 +155,7 @@ class QgsComposerMapItemStack
154155
void addItem( QgsComposerMapItem* item /Transfer/);
155156

156157
/**Removes an item from the stack and deletes the corresponding QgsComposerMapItem
157-
* @param QgsComposerMapItem id for the QgsComposerMapItem to remove
158+
* @param itemId id for the QgsComposerMapItem to remove
158159
* @note after removing an item from the stack, update()
159160
* should be called for the QgsComposerMap to prevent rendering artifacts
160161
* @see addItem
@@ -205,7 +206,7 @@ class QgsComposerMapItemStack
205206
* @see item
206207
* @note not available in python bindings
207208
*/
208-
//QgsComposerMapItem &operator[]( int idx );
209+
// QgsComposerMapItem &operator[]( int idx );
209210

210211
/**Returns a list of QgsComposerMapItems contained by the stack
211212
* @returns list of items

python/core/composer/qgscomposermapoverview.sip

+1-2
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ class QgsComposerMapOverviewStack : QgsComposerMapItemStack
9898

9999
};
100100

101-
102101
/**\ingroup MapComposer
103102
* \class QgsComposerMapOverview
104103
* \brief An individual overview which is drawn above the map content in a
@@ -173,7 +172,7 @@ class QgsComposerMapOverview : QgsComposerMapItem
173172
QPainter::CompositionMode blendMode() const;
174173

175174
/**Sets the blending mode used for drawing the overview.
176-
* @param mode blending mode for overview
175+
* @param blendMode blending mode for overview
177176
* @see blendMode
178177
*/
179178
void setBlendMode( const QPainter::CompositionMode blendMode );

python/core/composer/qgscomposermodel.sip

+19-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ class QgsComposerModel : QAbstractItemModel
2424
public:
2525

2626
/**Constructor
27-
* @param composition parent composition
27+
* @param composition composition to attach to
28+
* @param parent parent object
2829
*/
2930
explicit QgsComposerModel( QgsComposition* composition, QObject* parent = 0 );
3031

@@ -39,6 +40,11 @@ class QgsComposerModel : QAbstractItemModel
3940
Qt::ItemFlags flags( const QModelIndex & index ) const;
4041
bool setData( const QModelIndex & index, const QVariant & value, int role );
4142
QVariant headerData( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const;
43+
Qt::DropActions supportedDropActions() const;
44+
virtual QStringList mimeTypes() const;
45+
virtual QMimeData* mimeData( const QModelIndexList &indexes ) const;
46+
bool dropMimeData( const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent );
47+
bool removeRows( int row, int count, const QModelIndex & parent = QModelIndex() );
4248

4349
/**Clears all items from z-order list and resets the model
4450
* @note added in QGIS 2.5
@@ -164,6 +170,7 @@ class QgsComposerModel : QAbstractItemModel
164170
* @param item item to update
165171
* @see updateItemLockStatus
166172
* @see updateItemVisibility
173+
* @see updateItemSelectStatus
167174
* @note added in QGIS 2.5
168175
*/
169176
void updateItemDisplayName( QgsComposerItem *item );
@@ -172,6 +179,7 @@ class QgsComposerModel : QAbstractItemModel
172179
* @param item item to update
173180
* @see updateItemDisplayName
174181
* @see updateItemVisibility
182+
* @see updateItemSelectStatus
175183
* @note added in QGIS 2.5
176184
*/
177185
void updateItemLockStatus( QgsComposerItem *item );
@@ -180,10 +188,20 @@ class QgsComposerModel : QAbstractItemModel
180188
* @param item item to update
181189
* @see updateItemDisplayName
182190
* @see updateItemLockStatus
191+
* @see updateItemSelectStatus
183192
* @note added in QGIS 2.5
184193
*/
185194
void updateItemVisibility( QgsComposerItem *item );
186195

196+
/**Must be called when an item's selection status changes
197+
* @param item item to update
198+
* @see updateItemDisplayName
199+
* @see updateItemVisibility
200+
* @see updateItemLockStatus
201+
* @note added in QGIS 2.5
202+
*/
203+
void updateItemSelectStatus( QgsComposerItem *item );
204+
187205
public slots:
188206

189207
/**Sets an item as the current selection from a QModelIndex

python/core/composer/qgscomposermultiframecommand.sip

-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ class QgsComposerMultiFrameCommand : QUndoCommand
2929
bool checkFirstRun();
3030
};
3131

32-
3332
/**A composer command that merges together with other commands having the same context (=id)
3433
* for multi frame items. Keeps the oldest previous state and uses the newest after state.
3534
* The purpose is to avoid too many micro changes in the history*/

python/core/composer/qgscomposerobject.sip

+6-4
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ class QgsComposerObject : QObject
1515
{
1616
NoProperty = 0, /*< no property */
1717
AllProperties, /*< all properties for item */
18+
TestProperty, /*< dummy property with no effect on item*/
1819
//composer page properties
1920
PresetPaperSize, /*< preset paper size for composition */
2021
PaperWidth, /*< paper width */
@@ -40,7 +41,9 @@ class QgsComposerObject : QObject
4041
MapYMax, /*< map extent y maximum */
4142
MapAtlasMargin, /*< map atlas margin*/
4243
//composer picture
43-
PictureSource /*< picture source url */
44+
PictureSource, /*< picture source url */
45+
//html item
46+
SourceUrl /*< html source url */
4447
};
4548

4649
/** Specifies whether the value returned by a function should be the original, user
@@ -57,7 +60,6 @@ class QgsComposerObject : QObject
5760
* @param composition parent composition
5861
*/
5962
QgsComposerObject( QgsComposition* composition );
60-
6163
virtual ~QgsComposerObject();
6264

6365
/**Returns the composition the item is attached to.
@@ -66,7 +68,7 @@ class QgsComposerObject : QObject
6668
const QgsComposition* composition() const;
6769

6870
/**Stores item state in DOM element
69-
* @param elem is DOM element corresponding to 'Composer' tag
71+
* @param elem is DOM element corresponding to item tag
7072
* @param doc is the DOM document
7173
*/
7274
virtual bool writeXML( QDomElement& elem, QDomDocument & doc ) const;
@@ -88,7 +90,7 @@ class QgsComposerObject : QObject
8890
* @param active true if data defined property is active, false if it is disabled
8991
* @param useExpression true if the expression should be used
9092
* @param expression expression for data defined property
91-
* @field field name if the data defined property should take its value from a field
93+
* @param field field name if the data defined property should take its value from a field
9294
* @note this method was added in version 2.5
9395
*/
9496
void setDataDefinedProperty( const DataDefinedProperty property, const bool active, const bool useExpression, const QString &expression, const QString &field );

python/core/composer/qgscomposerpicture.sip

+4-3
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class QgsComposerPicture: QgsComposerItem
3333
QgsComposerPicture( QgsComposition *composition /TransferThis/);
3434
~QgsComposerPicture();
3535

36-
/** return correct graphics item type. Added in v1.7 */
36+
/** return correct graphics item type. */
3737
virtual int type() const;
3838

3939
/**Reimplementation of QCanvasItem::paint*/
@@ -57,7 +57,7 @@ class QgsComposerPicture: QgsComposerItem
5757
*/
5858
QString pictureFile() const /Deprecated/;
5959

60-
/**Sets the source path of the image (may be svg or a raster format). Data defined
60+
/**Sets the source path of the image (may be svg or a raster format). Data defined
6161
* picture source may override this value. The path can either be a local path
6262
* or a remote (http) path.
6363
* @param path path for the source image
@@ -76,7 +76,6 @@ class QgsComposerPicture: QgsComposerItem
7676
*/
7777
QString picturePath() const;
7878

79-
8079
/**Sets this items bound in scene coordinates such that 1 item size units
8180
* corresponds to 1 scene size unit and resizes the svg symbol / image
8281
*/
@@ -263,6 +262,8 @@ class QgsComposerPicture: QgsComposerItem
263262
*/
264263
void recalculateSize();
265264

265+
virtual void refreshDataDefinedProperty( const QgsComposerObject::DataDefinedProperty property = QgsComposerObject::AllProperties );
266+
266267
signals:
267268
/**Is emitted on picture rotation change*/
268269
void pictureRotationChanged( double newRotation );

python/core/composer/qgscomposertable.sip

+1-3
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class QgsComposerTable: QgsComposerItem
2020
QgsComposerTable( QgsComposition* composition /TransferThis/ );
2121
virtual ~QgsComposerTable();
2222

23-
/** return correct graphics item type. Added in v1.7 */
23+
/** return correct graphics item type. */
2424
virtual int type() const;
2525

2626
/** \brief Reimplementation of QCanvasItem::paint*/
@@ -219,8 +219,6 @@ class QgsComposerTable: QgsComposerItem
219219
virtual void adjustFrameToSize();
220220

221221
protected:
222-
/**Retrieves feature attributes*/
223-
// virtual bool getFeatureAttributes( QList<QgsAttributeMap>& attributeMaps );
224222
/**Calculates the maximum width of text shown in columns.
225223
* @param maxWidthMap QMap of int to double in which to store the maximum widths. The int will be filled
226224
* with the column number and the double with the maximum width of text present in the column.

0 commit comments

Comments
 (0)