Skip to content

Commit 7e977bc

Browse files
committedApr 28, 2014
[composer] Some api documentation improvements and fix ups
1 parent 9f84e9f commit 7e977bc

18 files changed

+238
-98
lines changed
 

‎python/core/composer/qgsatlascomposition.sip

Lines changed: 68 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
* Class used to render an Atlas, iterating over geometry features.
33
* prepareForFeature() modifies the atlas map's extent to zoom on the given feature.
44
* This class is used for printing, exporting to PDF and images.
5-
* */
5+
* @note This class should not be created directly. For the atlas to function correctly
6+
* the atlasComposition() property for QgsComposition should be used to retrieve a
7+
* QgsAtlasComposition which is automatically created and attached to the composition.
8+
*/
69
class QgsAtlasComposition : QObject
710
{
811
%TypeHeaderCode
@@ -13,47 +16,101 @@ public:
1316
QgsAtlasComposition( QgsComposition* composition );
1417
~QgsAtlasComposition();
1518

16-
/** Is the atlas generation enabled ? */
19+
/**Returns whether the atlas generation is enabled
20+
* @returns true if atlas is enabled
21+
* @see setEnabled
22+
*/
1723
bool enabled() const;
18-
void setEnabled( bool e );
24+
25+
/**Sets whether the atlas is enabled
26+
* @param enabled set to true to enable to atlas
27+
* @see enabled
28+
*/
29+
void setEnabled( bool enabled );
1930

2031
/**Returns the map used by the atlas
2132
* @deprecated Use QgsComposerMap::atlasDriven() instead
2233
*/
23-
QgsComposerMap* composerMap() const;
34+
QgsComposerMap* composerMap() const /Deprecated/;
35+
2436
/**Sets the map used by the atlas
2537
* @deprecated Use QgsComposerMap::setAtlasDriven( true ) instead
2638
*/
27-
void setComposerMap( QgsComposerMap* map );
39+
void setComposerMap( QgsComposerMap* map ) /Deprecated/;
2840

41+
/**Returns true if the atlas is set to hide the coverage layer
42+
* @returns true if coverage layer is hidden
43+
* @see setHideCoverage
44+
*/
2945
bool hideCoverage() const;
46+
47+
/**Sets whether the coverage layer should be hidden in map items in the composition
48+
* @param hide set to true to hide the coverage layer
49+
* @see hideCoverage
50+
*/
3051
void setHideCoverage( bool hide );
3152

3253
/**Returns whether the atlas map uses a fixed scale
3354
* @deprecated Use QgsComposerMap::atlasFixedScale() instead
3455
*/
35-
bool fixedScale() const;
56+
bool fixedScale() const /Deprecated/;
3657
/**Sets whether the atlas map should use a fixed scale
3758
* @deprecated Use QgsComposerMap::setAtlasFixedScale( bool ) instead
3859
*/
39-
void setFixedScale( bool fixed );
60+
void setFixedScale( bool fixed ) /Deprecated/;
4061

4162
/**Returns the margin for the atlas map
4263
* @deprecated Use QgsComposerMap::atlasMargin() instead
4364
*/
44-
float margin() const;
65+
float margin() const /Deprecated/;
66+
4567
/**Sets the margin for the atlas map
4668
* @deprecated Use QgsComposerMap::setAtlasMargin( double ) instead
4769
*/
48-
void setMargin( float margin );
70+
void setMargin( float margin ) /Deprecated/;
4971

72+
/**Returns the filename expression used for generating output filenames for each
73+
* atlas page.
74+
* @returns filename pattern
75+
* @see setFilenamePattern
76+
* @note This property has no effect when exporting to PDF if singleFile() is true
77+
*/
5078
QString filenamePattern() const;
79+
80+
/**Sets the filename expression used for generating output filenames for each
81+
* atlas page.
82+
* @param pattern expression to use for output filenames
83+
* @see filenamePattern
84+
* @note This method has no effect when exporting to PDF if singleFile() is true
85+
*/
5186
void setFilenamePattern( const QString& pattern );
5287

88+
/**Returns the coverage layer used for the atlas features
89+
* @returns atlas coverage layer
90+
* @see setCoverageLayer
91+
*/
5392
QgsVectorLayer* coverageLayer() const;
54-
void setCoverageLayer( QgsVectorLayer* lmap );
55-
93+
94+
/**Sets the coverage layer to use for the atlas features
95+
* @param layer vector coverage layer
96+
* @see coverageLayer
97+
*/
98+
void setCoverageLayer( QgsVectorLayer* layer );
99+
100+
/**Returns whether the atlas will be exported to a single file. This is only
101+
* applicable for PDF exports.
102+
* @returns true if atlas will be exported to a single file
103+
* @see setSingleFile
104+
* @note This property is only used for PDF exports.
105+
*/
56106
bool singleFile() const;
107+
108+
/**Sets whether the atlas should be exported to a single file. This is only
109+
* applicable for PDF exports.
110+
* @param single set to true to export atlas to a single file.
111+
* @see singleFile
112+
* @note This method is only used for PDF exports.
113+
*/
57114
void setSingleFile( bool single );
58115

59116
bool sortFeatures() const;

‎python/core/composer/qgscomposerattributetable.sip

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class QgsComposerAttributeTable : QgsComposerTable
4242
*/
4343
void setVectorLayer( QgsVectorLayer* layer );
4444

45-
/*Returns the vector layer the attribute table is currently using
45+
/**Returns the vector layer the attribute table is currently using
4646
* @returns attribute table's current vector layer
4747
* @note added in 2.3
4848
* @see setVectorLayer
@@ -61,7 +61,7 @@ class QgsComposerAttributeTable : QgsComposerTable
6161
*/
6262
void setComposerMap( const QgsComposerMap* map /TransferThis/ );
6363

64-
/*Returns the composer map whose extents are controlling the features shown in the
64+
/**Returns the composer map whose extents are controlling the features shown in the
6565
* table. The extents of the map are only used if displayOnlyVisibleFeatures() is true.
6666
* @returns composer map controlling the attribute table
6767
* @note added in 2.3
@@ -79,7 +79,7 @@ class QgsComposerAttributeTable : QgsComposerTable
7979
*/
8080
void setMaximumNumberOfFeatures( int features );
8181

82-
/*Returns the maximum number of features to be shown by the table.
82+
/**Returns the maximum number of features to be shown by the table.
8383
* @returns maximum number of features
8484
* @note added in 2.3
8585
* @see setMaximumNumberOfFeatures
@@ -96,7 +96,7 @@ class QgsComposerAttributeTable : QgsComposerTable
9696
*/
9797
void setDisplayOnlyVisibleFeatures( bool b );
9898

99-
/*Returns true if the table is set to show only features visible on a corresponding
99+
/**Returns true if the table is set to show only features visible on a corresponding
100100
* composer map item.
101101
* @returns true if table only shows visible features
102102
* @note added in 2.3
@@ -105,7 +105,7 @@ class QgsComposerAttributeTable : QgsComposerTable
105105
*/
106106
bool displayOnlyVisibleFeatures() const;
107107

108-
/*Returns true if a feature filter is active on the attribute table
108+
/**Returns true if a feature filter is active on the attribute table
109109
* @returns bool state of the feature filter
110110
* @note added in 2.3
111111
* @see setFilterFeatures
@@ -123,7 +123,7 @@ class QgsComposerAttributeTable : QgsComposerTable
123123
*/
124124
void setFilterFeatures( bool filter );
125125

126-
/*Returns the current expression used to filter features for the table. The filter is only
126+
/**Returns the current expression used to filter features for the table. The filter is only
127127
* active if filterFeatures() is true.
128128
* @returns feature filter expression
129129
* @note added in 2.3
@@ -143,7 +143,7 @@ class QgsComposerAttributeTable : QgsComposerTable
143143
*/
144144
void setFeatureFilter( const QString& expression );
145145

146-
/*Returns the attributes fields which are shown by the table.
146+
/**Returns the attributes fields which are shown by the table.
147147
* @returns a QSet of integers refering to the attributes in the vector layer
148148
* @see setDisplayAttributes
149149
*/
@@ -158,7 +158,7 @@ class QgsComposerAttributeTable : QgsComposerTable
158158
*/
159159
void setDisplayAttributes( const QSet<int>& attr );
160160

161-
/*Returns the attribute field aliases, which control how fields are named in the table's
161+
/**Returns the attribute field aliases, which control how fields are named in the table's
162162
* header row.
163163
* @returns a QMap of integers to strings, where the string is the field's alias.
164164
* @see setFieldAliasMap

‎python/core/composer/qgscomposeritem.sip

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ class QgsComposerItem : QObject, QGraphicsRectItem
383383
* @deprecated Use itemRotation()
384384
* instead
385385
*/
386-
double rotation() const;
386+
double rotation() const /Deprecated/;
387387

388388
/**Updates item, with the possibility to do custom update for subclasses*/
389389
virtual void updateItem();
@@ -471,11 +471,12 @@ class QgsComposerItem : QObject, QGraphicsRectItem
471471

472472
/**Calculates width and hight of the picture (in mm) such that it fits into the item frame with the given rotation*/
473473
bool imageSizeConsideringRotation( double& width, double& height, double rotation ) const;
474+
474475
/**Calculates width and hight of the picture (in mm) such that it fits into the item frame with the given rotation
475476
* @deprecated Use bool imageSizeConsideringRotation( double& width, double& height, double rotation )
476477
* instead
477478
*/
478-
bool imageSizeConsideringRotation( double& width, double& height ) const;
479+
bool imageSizeConsideringRotation( double& width, double& height ) const /Deprecated/;
479480

480481
/**Calculates the largest scaled version of originalRect which fits within boundsRect, when it is rotated by
481482
* a specified amount
@@ -487,19 +488,21 @@ class QgsComposerItem : QObject, QGraphicsRectItem
487488

488489
/**Calculates corner point after rotation and scaling*/
489490
bool cornerPointOnRotatedAndScaledRect( double& x, double& y, double width, double height, double rotation ) const;
491+
490492
/**Calculates corner point after rotation and scaling
491493
* @deprecated Use bool cornerPointOnRotatedAndScaledRect( double& x, double& y, double width, double height, double rotation )
492494
* instead
493495
*/
494-
bool cornerPointOnRotatedAndScaledRect( double& x, double& y, double width, double height ) const;
496+
bool cornerPointOnRotatedAndScaledRect( double& x, double& y, double width, double height ) const /Deprecated/;
495497

496498
/**Calculates width / height of the bounding box of a rotated rectangle*/
499+
497500
void sizeChangedByRotation( double& width, double& height, double rotation );
498501
/**Calculates width / height of the bounding box of a rotated rectangle
499502
* @deprecated Use void sizeChangedByRotation( double& width, double& height, double rotation )
500503
* instead
501504
*/
502-
void sizeChangedByRotation( double& width, double& height );
505+
void sizeChangedByRotation( double& width, double& height ) /Deprecated/;
503506

504507
/**Rotates a point / vector
505508
@param angle rotation angle in degrees, counterclockwise

‎python/core/composer/qgscomposerlegend.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class QgsComposerLegend : QgsComposerItem
3131
void setTitle( const QString& t );
3232
QString title() const;
3333

34-
/*Returns the alignment of the legend title
34+
/**Returns the alignment of the legend title
3535
* @returns Qt::AlignmentFlag for the legend title
3636
* @note added in 2.3
3737
* @see setTitleAlignment

‎python/core/composer/qgscomposermap.sip

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -309,11 +309,12 @@ class QgsComposerMap : QgsComposerItem
309309
way the map is drawn within the item
310310
* @deprecated Use setMapRotation( double rotation ) instead
311311
*/
312-
void setRotation( double r );
312+
void setRotation( double r ) /Deprecated/;
313+
313314
/**Returns the rotation used for drawing the map within the composer item
314315
* @deprecated Use mapRotation() instead
315316
*/
316-
double rotation() const;
317+
double rotation() const /Deprecated/;
317318

318319
/**Sets rotation for the map - this does not affect the composer item shape, only the
319320
way the map is drawn within the item
@@ -374,17 +375,19 @@ class QgsComposerMap : QgsComposerItem
374375
* @deprecated Use bool QgsComposerItem::imageSizeConsideringRotation( double& width, double& height, double rotation )
375376
* instead
376377
*/
377-
bool imageSizeConsideringRotation( double& width, double& height ) const;
378+
bool imageSizeConsideringRotation( double& width, double& height ) const /Deprecated/;
379+
378380
/**Calculates corner point after rotation and scaling
379381
* @deprecated Use QgsComposerItem::cornerPointOnRotatedAndScaledRect( double& x, double& y, double width, double height, double rotation )
380382
* instead
381383
*/
382-
bool cornerPointOnRotatedAndScaledRect( double& x, double& y, double width, double height ) const;
384+
bool cornerPointOnRotatedAndScaledRect( double& x, double& y, double width, double height ) const /Deprecated/;
385+
383386
/**Calculates width / height of the bounding box of a rotated rectangle
384387
* @deprecated Use QgsComposerItem::sizeChangedByRotation( double& width, double& height, double rotation )
385388
* instead
386389
*/
387-
void sizeChangedByRotation( double& width, double& height );
390+
void sizeChangedByRotation( double& width, double& height ) /Deprecated/;
388391

389392
/** Returns true if the map extent is set to follow the current atlas feature */
390393
bool atlasDriven() const;

‎python/core/composer/qgscomposerpicture.sip

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class QgsComposerPicture: QgsComposerItem
4141
/**Returns the rotation used for drawing the picture within the composer item
4242
* @deprecated Use pictureRotation() instead
4343
*/
44-
double rotation() const;
44+
double rotation() const /Deprecated/;
4545

4646
/**Returns the rotation used for drawing the picture within the item
4747
@note this function was added in version 2.1*/
@@ -58,17 +58,17 @@ class QgsComposerPicture: QgsComposerItem
5858
* @deprecated Use bool QgsComposerItem::imageSizeConsideringRotation( double& width, double& height, double rotation )
5959
* instead
6060
*/
61-
bool imageSizeConsideringRotation( double& width, double& height ) const;
61+
bool imageSizeConsideringRotation( double& width, double& height ) const /Deprecated/;
6262
/**Calculates corner point after rotation and scaling
6363
* @deprecated Use QgsComposerItem::cornerPointOnRotatedAndScaledRect( double& x, double& y, double width, double height, double rotation )
6464
* instead
6565
*/
66-
bool cornerPointOnRotatedAndScaledRect( double& x, double& y, double width, double height ) const;
66+
bool cornerPointOnRotatedAndScaledRect( double& x, double& y, double width, double height ) const /Deprecated/;
6767
/**Calculates width / height of the bounding box of a rotated rectangle
6868
* @deprecated Use QgsComposerItem::sizeChangedByRotation( double& width, double& height, double rotation )
6969
* instead
7070
*/
71-
void sizeChangedByRotation( double& width, double& height );
71+
void sizeChangedByRotation( double& width, double& height ) /Deprecated/;
7272

7373
public slots:
7474
/**Sets the picture rotation within the item bounds. This does not affect the item rectangle,

‎python/core/composer/qgscomposertexttable.sip

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,19 @@ class QgsComposerTextTable: QgsComposerTable
99

1010
/** return correct graphics item type. Added in v1.7 */
1111
virtual int type() const;
12-
13-
void setHeaderLabels( const QStringList& l );
12+
13+
/**Sets the text to use for the header row for the table
14+
* @param labels list of strings to use for each column's header row
15+
* @see headerLabels
16+
*/
17+
void setHeaderLabels( const QStringList& labels );
18+
19+
/**Adds a row to the table
20+
* @param row list of strings to use for each cell's value in the newly added row
21+
* @note If row is shorter than the number of columns in the table than blank cells
22+
* will be inserted at the end of the row. If row contains more strings then the number
23+
* of columns in the table then these extra strings will be ignored.
24+
*/
1425
void addRow( const QStringList& row );
1526

1627
bool writeXML( QDomElement& elem, QDomDocument & doc ) const;

‎python/core/composer/qgscomposition.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ class QgsComposition : QGraphicsScene
161161
@return QgsComposerMap or 0 pointer if the composer map item does not exist*/
162162
const QgsComposerMap* getComposerMapById( int id ) const;
163163

164-
/*Returns the composer html with specified id (a string as named in the
164+
/**Returns the composer html with specified id (a string as named in the
165165
composer user interface item properties).
166166
@note Added in QGIS 2.0
167167
@param id - A QString representing the id of the item.

‎src/core/composer/qgsatlascomposition.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ QgsAtlasComposition::~QgsAtlasComposition()
5050
{
5151
}
5252

53-
void QgsAtlasComposition::setEnabled( bool e )
53+
void QgsAtlasComposition::setEnabled( bool enabled )
5454
{
55-
mEnabled = e;
55+
mEnabled = enabled;
5656
mComposition->setAtlasMode( QgsComposition::AtlasOff );
57-
emit toggled( e );
57+
emit toggled( enabled );
5858
}
5959

6060
void QgsAtlasComposition::setCoverageLayer( QgsVectorLayer* layer )

‎src/core/composer/qgsatlascomposition.h

Lines changed: 68 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,55 +33,113 @@ class QgsExpression;
3333
* Class used to render an Atlas, iterating over geometry features.
3434
* prepareForFeature() modifies the atlas map's extent to zoom on the given feature.
3535
* This class is used for printing, exporting to PDF and images.
36-
* */
36+
* @note This class should not be created directly. For the atlas to function correctly
37+
* the atlasComposition() property for QgsComposition should be used to retrieve a
38+
* QgsAtlasComposition which is automatically created and attached to the composition.
39+
*/
3740
class CORE_EXPORT QgsAtlasComposition : public QObject
3841
{
3942
Q_OBJECT
4043
public:
4144
QgsAtlasComposition( QgsComposition* composition );
4245
~QgsAtlasComposition();
4346

44-
/** Is the atlas generation enabled ? */
47+
/**Returns whether the atlas generation is enabled
48+
* @returns true if atlas is enabled
49+
* @see setEnabled
50+
*/
4551
bool enabled() const { return mEnabled; }
46-
void setEnabled( bool e );
52+
53+
/**Sets whether the atlas is enabled
54+
* @param enabled set to true to enable to atlas
55+
* @see enabled
56+
*/
57+
void setEnabled( bool enabled );
4758

4859
/**Returns the map used by the atlas
4960
* @deprecated Use QgsComposerMap::atlasDriven() instead
5061
*/
51-
QgsComposerMap* composerMap() const;
62+
Q_DECL_DEPRECATED QgsComposerMap* composerMap() const;
63+
5264
/**Sets the map used by the atlas
5365
* @deprecated Use QgsComposerMap::setAtlasDriven( true ) instead
5466
*/
55-
void setComposerMap( QgsComposerMap* map );
67+
Q_DECL_DEPRECATED void setComposerMap( QgsComposerMap* map );
5668

69+
/**Returns true if the atlas is set to hide the coverage layer
70+
* @returns true if coverage layer is hidden
71+
* @see setHideCoverage
72+
*/
5773
bool hideCoverage() const { return mHideCoverage; }
74+
75+
/**Sets whether the coverage layer should be hidden in map items in the composition
76+
* @param hide set to true to hide the coverage layer
77+
* @see hideCoverage
78+
*/
5879
void setHideCoverage( bool hide );
5980

6081
/**Returns whether the atlas map uses a fixed scale
6182
* @deprecated Use QgsComposerMap::atlasFixedScale() instead
6283
*/
63-
bool fixedScale() const;
84+
Q_DECL_DEPRECATED bool fixedScale() const;
85+
6486
/**Sets whether the atlas map should use a fixed scale
6587
* @deprecated Use QgsComposerMap::setAtlasFixedScale( bool ) instead
6688
*/
67-
void setFixedScale( bool fixed );
89+
Q_DECL_DEPRECATED void setFixedScale( bool fixed );
6890

6991
/**Returns the margin for the atlas map
7092
* @deprecated Use QgsComposerMap::atlasMargin() instead
7193
*/
72-
float margin() const;
94+
Q_DECL_DEPRECATED float margin() const;
95+
7396
/**Sets the margin for the atlas map
7497
* @deprecated Use QgsComposerMap::setAtlasMargin( double ) instead
7598
*/
76-
void setMargin( float margin );
99+
Q_DECL_DEPRECATED void setMargin( float margin );
77100

101+
/**Returns the filename expression used for generating output filenames for each
102+
* atlas page.
103+
* @returns filename pattern
104+
* @see setFilenamePattern
105+
* @note This property has no effect when exporting to PDF if singleFile() is true
106+
*/
78107
QString filenamePattern() const { return mFilenamePattern; }
108+
109+
/**Sets the filename expression used for generating output filenames for each
110+
* atlas page.
111+
* @param pattern expression to use for output filenames
112+
* @see filenamePattern
113+
* @note This method has no effect when exporting to PDF if singleFile() is true
114+
*/
79115
void setFilenamePattern( const QString& pattern );
80116

117+
/**Returns the coverage layer used for the atlas features
118+
* @returns atlas coverage layer
119+
* @see setCoverageLayer
120+
*/
81121
QgsVectorLayer* coverageLayer() const { return mCoverageLayer; }
82-
void setCoverageLayer( QgsVectorLayer* lmap );
83122

123+
/**Sets the coverage layer to use for the atlas features
124+
* @param layer vector coverage layer
125+
* @see coverageLayer
126+
*/
127+
void setCoverageLayer( QgsVectorLayer* layer );
128+
129+
/**Returns whether the atlas will be exported to a single file. This is only
130+
* applicable for PDF exports.
131+
* @returns true if atlas will be exported to a single file
132+
* @see setSingleFile
133+
* @note This property is only used for PDF exports.
134+
*/
84135
bool singleFile() const { return mSingleFile; }
136+
137+
/**Sets whether the atlas should be exported to a single file. This is only
138+
* applicable for PDF exports.
139+
* @param single set to true to export atlas to a single file.
140+
* @see singleFile
141+
* @note This method is only used for PDF exports.
142+
*/
85143
void setSingleFile( bool single ) { mSingleFile = single; }
86144

87145
bool sortFeatures() const { return mSortFeatures; }

‎src/core/composer/qgscomposerattributetable.h

Lines changed: 37 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,14 @@ class CORE_EXPORT QgsComposerAttributeTable: public QgsComposerTable
5757
* @param layer Vector layer for attribute table
5858
* @note added in 2.3
5959
* @see vectorLayer
60-
*/
60+
*/
6161
void setVectorLayer( QgsVectorLayer* layer );
62-
/*Returns the vector layer the attribute table is currently using
62+
63+
/**Returns the vector layer the attribute table is currently using
6364
* @returns attribute table's current vector layer
6465
* @note added in 2.3
6566
* @see setVectorLayer
66-
*/
67+
*/
6768
QgsVectorLayer* vectorLayer() const { return mVectorLayer; }
6869

6970
/**Sets the composer map to use to limit the extent of features shown in the
@@ -75,15 +76,16 @@ class CORE_EXPORT QgsComposerAttributeTable: public QgsComposerTable
7576
* @note added in 2.3
7677
* @see composerMap
7778
* @see setDisplayOnlyVisibleFeatures
78-
*/
79+
*/
7980
void setComposerMap( const QgsComposerMap* map );
80-
/*Returns the composer map whose extents are controlling the features shown in the
81+
82+
/**Returns the composer map whose extents are controlling the features shown in the
8183
* table. The extents of the map are only used if displayOnlyVisibleFeatures() is true.
8284
* @returns composer map controlling the attribute table
8385
* @note added in 2.3
8486
* @see setComposerMap
8587
* @see displayOnlyVisibleFeatures
86-
*/
88+
*/
8789
const QgsComposerMap* composerMap() const { return mComposerMap; }
8890

8991
/**Sets the maximum number of features shown by the table. Changing this setting may result
@@ -92,13 +94,14 @@ class CORE_EXPORT QgsComposerAttributeTable: public QgsComposerTable
9294
* @param features maximum number of features to show in the table
9395
* @note added in 2.3
9496
* @see maximumNumberOfFeatures
95-
*/
97+
*/
9698
void setMaximumNumberOfFeatures( int features );
97-
/*Returns the maximum number of features to be shown by the table.
99+
100+
/**Returns the maximum number of features to be shown by the table.
98101
* @returns maximum number of features
99102
* @note added in 2.3
100103
* @see setMaximumNumberOfFeatures
101-
*/
104+
*/
102105
int maximumNumberOfFeatures() const { return mMaximumNumberOfFeatures; }
103106

104107
/**Sets attribute table to only show features which are visible in a composer map item. Changing
@@ -108,42 +111,45 @@ class CORE_EXPORT QgsComposerAttributeTable: public QgsComposerTable
108111
* @note added in 2.3
109112
* @see displayOnlyVisibleFeatures
110113
* @see setComposerMap
111-
*/
114+
*/
112115
void setDisplayOnlyVisibleFeatures( bool visibleOnly );
113-
/*Returns true if the table is set to show only features visible on a corresponding
116+
117+
/**Returns true if the table is set to show only features visible on a corresponding
114118
* composer map item.
115119
* @returns true if table only shows visible features
116120
* @note added in 2.3
117121
* @see composerMap
118122
* @see setDisplayOnlyVisibleFeatures
119-
*/
123+
*/
120124
bool displayOnlyVisibleFeatures() const { return mShowOnlyVisibleFeatures; }
121125

122-
/*Returns true if a feature filter is active on the attribute table
126+
/**Returns true if a feature filter is active on the attribute table
123127
* @returns bool state of the feature filter
124128
* @note added in 2.3
125129
* @see setFilterFeatures
126130
* @see featureFilter
127-
*/
131+
*/
128132
bool filterFeatures() const { return mFilterFeatures; }
133+
129134
/**Sets whether the feature filter is active for the attribute table. Changing
130135
* this setting forces the table to refetch features from its vector layer, and may result in
131136
* the table changing size to accomodate the new displayed feature attributes.
132137
* @param filter Set to true to enable the feature filter
133138
* @note added in 2.3
134139
* @see filterFeatures
135140
* @see setFeatureFilter
136-
*/
141+
*/
137142
void setFilterFeatures( bool filter );
138143

139-
/*Returns the current expression used to filter features for the table. The filter is only
144+
/**Returns the current expression used to filter features for the table. The filter is only
140145
* active if filterFeatures() is true.
141146
* @returns feature filter expression
142147
* @note added in 2.3
143148
* @see setFeatureFilter
144149
* @see filterFeatures
145-
*/
150+
*/
146151
QString featureFilter() const { return mFeatureFilter; }
152+
147153
/**Sets the expression used for filtering features in the table. The filter is only
148154
* active if filterFeatures() is set to true. Changing this setting forces the table
149155
* to refetch features from its vector layer, and may result in
@@ -152,28 +158,29 @@ class CORE_EXPORT QgsComposerAttributeTable: public QgsComposerTable
152158
* @note added in 2.3
153159
* @see featureFilter
154160
* @see setFilterFeatures
155-
*/
161+
*/
156162
void setFeatureFilter( const QString& expression );
157163

158-
/*Returns the attributes fields which are shown by the table.
164+
/**Returns the attributes fields which are shown by the table.
159165
* @returns a QSet of integers refering to the attributes in the vector layer
160166
* @see setDisplayAttributes
161-
*/
167+
*/
162168
QSet<int> displayAttributes() const { return mDisplayAttributes; }
169+
163170
/**Sets the attributes to display in the table.
164171
* @param attr QSet of integer values refering to the attributes from the vector layer to show
165172
* @param refresh set to true to force the table to refetch features from its vector layer
166173
* and immediately update the display of the table. This may result in the table changing size
167174
* to accomodate the new displayed feature attributes.
168175
* @see displayAttributes
169-
*/
176+
*/
170177
void setDisplayAttributes( const QSet<int>& attr, bool refresh = true );
171178

172-
/*Returns the attribute field aliases, which control how fields are named in the table's
179+
/**Returns the attribute field aliases, which control how fields are named in the table's
173180
* header row.
174181
* @returns a QMap of integers to strings, where the string is the field's alias.
175182
* @see setFieldAliasMap
176-
*/
183+
*/
177184
QMap<int, QString> fieldAliasMap() const { return mFieldAliasMap; }
178185

179186
/**Sets the attribute field aliases, which control how fields are named in the table's
@@ -184,15 +191,15 @@ class CORE_EXPORT QgsComposerAttributeTable: public QgsComposerTable
184191
* and immediately update the display of the table. This may result in the table changing size
185192
* to accomodate the new displayed feature attributes and field aliases.
186193
* @see fieldAliasMap
187-
*/
194+
*/
188195
void setFieldAliasMap( const QMap<int, QString>& map, bool refresh = true );
189196

190197
/**Adapts mMaximumNumberOfFeatures depending on the rectangle height. Calling this forces
191198
* the table to refetch features from its vector layer and immediately updates the display
192199
* of the table.
193200
* @see maximumNumberOfFeatures
194201
* @see setMaximumNumberOfFeatures
195-
*/
202+
*/
196203
void setSceneRect( const QRectF& rectangle );
197204

198205
/**Sets the attributes to use to sort the table's features.
@@ -206,16 +213,16 @@ class CORE_EXPORT QgsComposerAttributeTable: public QgsComposerTable
206213
* to accomodate the new displayed feature attributes and field aliases.l
207214
* @see sortAttributes
208215
* @note not available in python bindings
209-
*/
216+
*/
210217
void setSortAttributes( const QList<QPair<int, bool> > att, bool refresh = true );
211218

212-
/*Returns the attributes used to sort the table's features.
219+
/**Returns the attributes used to sort the table's features.
213220
* @returns a QList of integer/bool pairs, where the integer refers to the attribute index and
214221
* the bool to the sort order for the attribute. If true the attribute is sorted ascending,
215222
* if false, the attribute is sorted in descending order.
216223
* @see setSortAttributes
217224
* @note not available in python bindings
218-
*/
225+
*/
219226
QList<QPair<int, bool> > sortAttributes() const { return mSortInformation; }
220227

221228
QMap<int, QString> headerLabels() const;
@@ -233,9 +240,9 @@ class CORE_EXPORT QgsComposerAttributeTable: public QgsComposerTable
233240
/**Shows only the features that are visible in the associated composer map (true by default)*/
234241
bool mShowOnlyVisibleFeatures;
235242

236-
// feature filtering
243+
/**True if feature filtering enabled*/
237244
bool mFilterFeatures;
238-
// feature expression filter
245+
/**Feature filter expression*/
239246
QString mFeatureFilter;
240247

241248
/**List of attribute indices to display (or all attributes if list is empty)*/

‎src/core/composer/qgscomposeritem.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ class CORE_EXPORT QgsComposerItem: public QObject, public QGraphicsRectItem
343343
* @deprecated Use itemRotation()
344344
* instead
345345
*/
346-
double rotation() const {return mItemRotation;}
346+
Q_DECL_DEPRECATED double rotation() const {return mItemRotation;}
347347

348348
/**Updates item, with the possibility to do custom update for subclasses*/
349349
virtual void updateItem() { QGraphicsRectItem::update(); }
@@ -477,7 +477,7 @@ class CORE_EXPORT QgsComposerItem: public QObject, public QGraphicsRectItem
477477
* @deprecated Use bool imageSizeConsideringRotation( double& width, double& height, double rotation )
478478
* instead
479479
*/
480-
bool imageSizeConsideringRotation( double& width, double& height ) const;
480+
Q_DECL_DEPRECATED bool imageSizeConsideringRotation( double& width, double& height ) const;
481481

482482
/**Calculates the largest scaled version of originalRect which fits within boundsRect, when it is rotated by
483483
* a specified amount
@@ -493,15 +493,15 @@ class CORE_EXPORT QgsComposerItem: public QObject, public QGraphicsRectItem
493493
* @deprecated Use bool cornerPointOnRotatedAndScaledRect( double& x, double& y, double width, double height, double rotation )
494494
* instead
495495
*/
496-
bool cornerPointOnRotatedAndScaledRect( double& x, double& y, double width, double height ) const;
496+
Q_DECL_DEPRECATED bool cornerPointOnRotatedAndScaledRect( double& x, double& y, double width, double height ) const;
497497

498498
/**Calculates width / height of the bounding box of a rotated rectangle*/
499499
void sizeChangedByRotation( double& width, double& height, double rotation );
500500
/**Calculates width / height of the bounding box of a rotated rectangle
501501
* @deprecated Use void sizeChangedByRotation( double& width, double& height, double rotation )
502502
* instead
503503
*/
504-
void sizeChangedByRotation( double& width, double& height );
504+
Q_DECL_DEPRECATED void sizeChangedByRotation( double& width, double& height );
505505

506506
/**Rotates a point / vector
507507
@param angle rotation angle in degrees, counterclockwise

‎src/core/composer/qgscomposerlegend.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class CORE_EXPORT QgsComposerLegend : public QgsComposerItem
5858
void setTitle( const QString& t ) {mTitle = t;}
5959
QString title() const {return mTitle;}
6060

61-
/*Returns the alignment of the legend title
61+
/**Returns the alignment of the legend title
6262
* @returns Qt::AlignmentFlag for the legend title
6363
* @note added in 2.3
6464
* @see setTitleAlignment

‎src/core/composer/qgscomposermap.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -347,11 +347,12 @@ class CORE_EXPORT QgsComposerMap : public QgsComposerItem
347347
way the map is drawn within the item
348348
* @deprecated Use setMapRotation( double rotation ) instead
349349
*/
350-
void setRotation( double r );
350+
Q_DECL_DEPRECATED void setRotation( double r );
351+
351352
/**Returns the rotation used for drawing the map within the composer item
352353
* @deprecated Use mapRotation() instead
353354
*/
354-
double rotation() const { return mMapRotation;};
355+
Q_DECL_DEPRECATED double rotation() const { return mMapRotation;};
355356

356357
/**Sets rotation for the map - this does not affect the composer item shape, only the
357358
way the map is drawn within the item
@@ -412,17 +413,17 @@ class CORE_EXPORT QgsComposerMap : public QgsComposerItem
412413
* @deprecated Use bool QgsComposerItem::imageSizeConsideringRotation( double& width, double& height, double rotation )
413414
* instead
414415
*/
415-
bool imageSizeConsideringRotation( double& width, double& height ) const;
416+
Q_DECL_DEPRECATED bool imageSizeConsideringRotation( double& width, double& height ) const;
416417
/**Calculates corner point after rotation and scaling
417418
* @deprecated Use QgsComposerItem::cornerPointOnRotatedAndScaledRect( double& x, double& y, double width, double height, double rotation )
418419
* instead
419420
*/
420-
bool cornerPointOnRotatedAndScaledRect( double& x, double& y, double width, double height ) const;
421+
Q_DECL_DEPRECATED bool cornerPointOnRotatedAndScaledRect( double& x, double& y, double width, double height ) const;
421422
/**Calculates width / height of the bounding box of a rotated rectangle
422423
* @deprecated Use QgsComposerItem::sizeChangedByRotation( double& width, double& height, double rotation )
423424
* instead
424425
*/
425-
void sizeChangedByRotation( double& width, double& height );
426+
Q_DECL_DEPRECATED void sizeChangedByRotation( double& width, double& height );
426427

427428
/** Returns true if the map extent is set to follow the current atlas feature */
428429
bool atlasDriven() const { return mAtlasDriven; }

‎src/core/composer/qgscomposerpicture.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class CORE_EXPORT QgsComposerPicture: public QgsComposerItem
6363
/**Returns the rotation used for drawing the picture within the composer item
6464
* @deprecated Use pictureRotation() instead
6565
*/
66-
double rotation() const { return mPictureRotation;};
66+
Q_DECL_DEPRECATED double rotation() const { return mPictureRotation;};
6767

6868
/**Returns the rotation used for drawing the picture within the item
6969
@note this function was added in version 2.1*/
@@ -80,17 +80,17 @@ class CORE_EXPORT QgsComposerPicture: public QgsComposerItem
8080
* @deprecated Use bool QgsComposerItem::imageSizeConsideringRotation( double& width, double& height, double rotation )
8181
* instead
8282
*/
83-
bool imageSizeConsideringRotation( double& width, double& height ) const;
83+
Q_DECL_DEPRECATED bool imageSizeConsideringRotation( double& width, double& height ) const;
8484
/**Calculates corner point after rotation and scaling
8585
* @deprecated Use QgsComposerItem::cornerPointOnRotatedAndScaledRect( double& x, double& y, double width, double height, double rotation )
8686
* instead
8787
*/
88-
bool cornerPointOnRotatedAndScaledRect( double& x, double& y, double width, double height ) const;
88+
Q_DECL_DEPRECATED bool cornerPointOnRotatedAndScaledRect( double& x, double& y, double width, double height ) const;
8989
/**Calculates width / height of the bounding box of a rotated rectangle
9090
* @deprecated Use QgsComposerItem::sizeChangedByRotation( double& width, double& height, double rotation )
9191
* instead
9292
*/
93-
void sizeChangedByRotation( double& width, double& height );
93+
Q_DECL_DEPRECATED void sizeChangedByRotation( double& width, double& height );
9494

9595
public slots:
9696
/**Sets the picture rotation within the item bounds. This does not affect the item rectangle,

‎src/core/composer/qgscomposertable.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class CORE_EXPORT QgsComposerTable: public QgsComposerItem
6161
void setGridColor( const QColor& c ) { mGridColor = c; }
6262
QColor gridColor() const { return mGridColor; }
6363

64-
/*Returns the text used in the column headers for the table.
64+
/**Returns the text used in the column headers for the table.
6565
* @returns QMap of int to QString, where the int is the column index (starting at 0),
6666
* and the string is the text to use for the column's header
6767
* @note added in 2.3
@@ -72,7 +72,7 @@ class CORE_EXPORT QgsComposerTable: public QgsComposerItem
7272
//TODO - make this more generic for next API break, eg rename as getRowValues, use QStringList rather than
7373
//QgsAttributeMap
7474

75-
/*Fetches the text used for the rows of the table.
75+
/**Fetches the text used for the rows of the table.
7676
* @returns true if attribute text was successfully retrieved.
7777
* @param attributeMaps QList of QgsAttributeMap to store retrieved row data in
7878
* @note not available in python bindings

‎src/core/composer/qgscomposertexttable.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ class CORE_EXPORT QgsComposerTextTable: public QgsComposerTable
3030
/** return correct graphics item type. Added in v1.7 */
3131
virtual int type() const { return ComposerTextTable; }
3232

33-
/*Sets the text to use for the header row for the table
33+
/**Sets the text to use for the header row for the table
3434
* @param labels list of strings to use for each column's header row
3535
* @see headerLabels
3636
*/
3737
void setHeaderLabels( const QStringList& labels ) { mHeaderLabels = labels; }
3838

39-
/*Adds a row to the table
39+
/**Adds a row to the table
4040
* @param row list of strings to use for each cell's value in the newly added row
4141
* @note If row is shorter than the number of columns in the table than blank cells
4242
* will be inserted at the end of the row. If row contains more strings then the number

‎src/core/composer/qgscomposition.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ class CORE_EXPORT QgsComposition : public QGraphicsScene
217217
@return QgsComposerMap or 0 pointer if the composer map item does not exist*/
218218
const QgsComposerMap* getComposerMapById( int id ) const;
219219

220-
/*Returns the composer html with specified id (a string as named in the
220+
/**Returns the composer html with specified id (a string as named in the
221221
composer user interface item properties).
222222
@note Added in QGIS 2.0
223223
@param id - A QString representing the id of the item.

0 commit comments

Comments
 (0)
Please sign in to comment.