diff --git a/python/core/composer/qgsatlascomposition.sip b/python/core/composer/qgsatlascomposition.sip index 4f4bc116a6d..be676faa174 100644 --- a/python/core/composer/qgsatlascomposition.sip +++ b/python/core/composer/qgsatlascomposition.sip @@ -2,7 +2,10 @@ * Class used to render an Atlas, iterating over geometry features. * prepareForFeature() modifies the atlas map's extent to zoom on the given feature. * This class is used for printing, exporting to PDF and images. - * */ + * @note This class should not be created directly. For the atlas to function correctly + * the atlasComposition() property for QgsComposition should be used to retrieve a + * QgsAtlasComposition which is automatically created and attached to the composition. + */ class QgsAtlasComposition : QObject { %TypeHeaderCode @@ -13,47 +16,101 @@ public: QgsAtlasComposition( QgsComposition* composition ); ~QgsAtlasComposition(); - /** Is the atlas generation enabled ? */ + /**Returns whether the atlas generation is enabled + * @returns true if atlas is enabled + * @see setEnabled + */ bool enabled() const; - void setEnabled( bool e ); + + /**Sets whether the atlas is enabled + * @param enabled set to true to enable to atlas + * @see enabled + */ + void setEnabled( bool enabled ); /**Returns the map used by the atlas * @deprecated Use QgsComposerMap::atlasDriven() instead */ - QgsComposerMap* composerMap() const; + QgsComposerMap* composerMap() const /Deprecated/; + /**Sets the map used by the atlas * @deprecated Use QgsComposerMap::setAtlasDriven( true ) instead */ - void setComposerMap( QgsComposerMap* map ); + void setComposerMap( QgsComposerMap* map ) /Deprecated/; + /**Returns true if the atlas is set to hide the coverage layer + * @returns true if coverage layer is hidden + * @see setHideCoverage + */ bool hideCoverage() const; + + /**Sets whether the coverage layer should be hidden in map items in the composition + * @param hide set to true to hide the coverage layer + * @see hideCoverage + */ void setHideCoverage( bool hide ); /**Returns whether the atlas map uses a fixed scale * @deprecated Use QgsComposerMap::atlasFixedScale() instead */ - bool fixedScale() const; + bool fixedScale() const /Deprecated/; /**Sets whether the atlas map should use a fixed scale * @deprecated Use QgsComposerMap::setAtlasFixedScale( bool ) instead */ - void setFixedScale( bool fixed ); + void setFixedScale( bool fixed ) /Deprecated/; /**Returns the margin for the atlas map * @deprecated Use QgsComposerMap::atlasMargin() instead */ - float margin() const; + float margin() const /Deprecated/; + /**Sets the margin for the atlas map * @deprecated Use QgsComposerMap::setAtlasMargin( double ) instead */ - void setMargin( float margin ); + void setMargin( float margin ) /Deprecated/; + /**Returns the filename expression used for generating output filenames for each + * atlas page. + * @returns filename pattern + * @see setFilenamePattern + * @note This property has no effect when exporting to PDF if singleFile() is true + */ QString filenamePattern() const; + + /**Sets the filename expression used for generating output filenames for each + * atlas page. + * @param pattern expression to use for output filenames + * @see filenamePattern + * @note This method has no effect when exporting to PDF if singleFile() is true + */ void setFilenamePattern( const QString& pattern ); + /**Returns the coverage layer used for the atlas features + * @returns atlas coverage layer + * @see setCoverageLayer + */ QgsVectorLayer* coverageLayer() const; - void setCoverageLayer( QgsVectorLayer* lmap ); + + /**Sets the coverage layer to use for the atlas features + * @param layer vector coverage layer + * @see coverageLayer + */ + void setCoverageLayer( QgsVectorLayer* layer ); + /**Returns whether the atlas will be exported to a single file. This is only + * applicable for PDF exports. + * @returns true if atlas will be exported to a single file + * @see setSingleFile + * @note This property is only used for PDF exports. + */ bool singleFile() const; + + /**Sets whether the atlas should be exported to a single file. This is only + * applicable for PDF exports. + * @param single set to true to export atlas to a single file. + * @see singleFile + * @note This method is only used for PDF exports. + */ void setSingleFile( bool single ); bool sortFeatures() const; diff --git a/python/core/composer/qgscomposerattributetable.sip b/python/core/composer/qgscomposerattributetable.sip index 3781df1958c..218f648ab2f 100644 --- a/python/core/composer/qgscomposerattributetable.sip +++ b/python/core/composer/qgscomposerattributetable.sip @@ -42,7 +42,7 @@ class QgsComposerAttributeTable : QgsComposerTable */ void setVectorLayer( QgsVectorLayer* layer ); - /*Returns the vector layer the attribute table is currently using + /**Returns the vector layer the attribute table is currently using * @returns attribute table's current vector layer * @note added in 2.3 * @see setVectorLayer @@ -61,7 +61,7 @@ class QgsComposerAttributeTable : QgsComposerTable */ void setComposerMap( const QgsComposerMap* map /TransferThis/ ); - /*Returns the composer map whose extents are controlling the features shown in the + /**Returns the composer map whose extents are controlling the features shown in the * table. The extents of the map are only used if displayOnlyVisibleFeatures() is true. * @returns composer map controlling the attribute table * @note added in 2.3 @@ -79,7 +79,7 @@ class QgsComposerAttributeTable : QgsComposerTable */ void setMaximumNumberOfFeatures( int features ); - /*Returns the maximum number of features to be shown by the table. + /**Returns the maximum number of features to be shown by the table. * @returns maximum number of features * @note added in 2.3 * @see setMaximumNumberOfFeatures @@ -96,7 +96,7 @@ class QgsComposerAttributeTable : QgsComposerTable */ void setDisplayOnlyVisibleFeatures( bool b ); - /*Returns true if the table is set to show only features visible on a corresponding + /**Returns true if the table is set to show only features visible on a corresponding * composer map item. * @returns true if table only shows visible features * @note added in 2.3 @@ -105,7 +105,7 @@ class QgsComposerAttributeTable : QgsComposerTable */ bool displayOnlyVisibleFeatures() const; - /*Returns true if a feature filter is active on the attribute table + /**Returns true if a feature filter is active on the attribute table * @returns bool state of the feature filter * @note added in 2.3 * @see setFilterFeatures @@ -123,7 +123,7 @@ class QgsComposerAttributeTable : QgsComposerTable */ void setFilterFeatures( bool filter ); - /*Returns the current expression used to filter features for the table. The filter is only + /**Returns the current expression used to filter features for the table. The filter is only * active if filterFeatures() is true. * @returns feature filter expression * @note added in 2.3 @@ -143,7 +143,7 @@ class QgsComposerAttributeTable : QgsComposerTable */ void setFeatureFilter( const QString& expression ); - /*Returns the attributes fields which are shown by the table. + /**Returns the attributes fields which are shown by the table. * @returns a QSet of integers refering to the attributes in the vector layer * @see setDisplayAttributes */ @@ -158,7 +158,7 @@ class QgsComposerAttributeTable : QgsComposerTable */ void setDisplayAttributes( const QSet& attr ); - /*Returns the attribute field aliases, which control how fields are named in the table's + /**Returns the attribute field aliases, which control how fields are named in the table's * header row. * @returns a QMap of integers to strings, where the string is the field's alias. * @see setFieldAliasMap diff --git a/python/core/composer/qgscomposeritem.sip b/python/core/composer/qgscomposeritem.sip index 78b7e510b98..17c088f7f8e 100644 --- a/python/core/composer/qgscomposeritem.sip +++ b/python/core/composer/qgscomposeritem.sip @@ -383,7 +383,7 @@ class QgsComposerItem : QObject, QGraphicsRectItem * @deprecated Use itemRotation() * instead */ - double rotation() const; + double rotation() const /Deprecated/; /**Updates item, with the possibility to do custom update for subclasses*/ virtual void updateItem(); @@ -471,11 +471,12 @@ class QgsComposerItem : QObject, QGraphicsRectItem /**Calculates width and hight of the picture (in mm) such that it fits into the item frame with the given rotation*/ bool imageSizeConsideringRotation( double& width, double& height, double rotation ) const; + /**Calculates width and hight of the picture (in mm) such that it fits into the item frame with the given rotation * @deprecated Use bool imageSizeConsideringRotation( double& width, double& height, double rotation ) * instead */ - bool imageSizeConsideringRotation( double& width, double& height ) const; + bool imageSizeConsideringRotation( double& width, double& height ) const /Deprecated/; /**Calculates the largest scaled version of originalRect which fits within boundsRect, when it is rotated by * a specified amount @@ -487,19 +488,21 @@ class QgsComposerItem : QObject, QGraphicsRectItem /**Calculates corner point after rotation and scaling*/ bool cornerPointOnRotatedAndScaledRect( double& x, double& y, double width, double height, double rotation ) const; + /**Calculates corner point after rotation and scaling * @deprecated Use bool cornerPointOnRotatedAndScaledRect( double& x, double& y, double width, double height, double rotation ) * instead */ - bool cornerPointOnRotatedAndScaledRect( double& x, double& y, double width, double height ) const; + bool cornerPointOnRotatedAndScaledRect( double& x, double& y, double width, double height ) const /Deprecated/; /**Calculates width / height of the bounding box of a rotated rectangle*/ + void sizeChangedByRotation( double& width, double& height, double rotation ); /**Calculates width / height of the bounding box of a rotated rectangle * @deprecated Use void sizeChangedByRotation( double& width, double& height, double rotation ) * instead */ - void sizeChangedByRotation( double& width, double& height ); + void sizeChangedByRotation( double& width, double& height ) /Deprecated/; /**Rotates a point / vector @param angle rotation angle in degrees, counterclockwise diff --git a/python/core/composer/qgscomposerlegend.sip b/python/core/composer/qgscomposerlegend.sip index a144964a24d..e9636bf1849 100644 --- a/python/core/composer/qgscomposerlegend.sip +++ b/python/core/composer/qgscomposerlegend.sip @@ -31,7 +31,7 @@ class QgsComposerLegend : QgsComposerItem void setTitle( const QString& t ); QString title() const; - /*Returns the alignment of the legend title + /**Returns the alignment of the legend title * @returns Qt::AlignmentFlag for the legend title * @note added in 2.3 * @see setTitleAlignment diff --git a/python/core/composer/qgscomposermap.sip b/python/core/composer/qgscomposermap.sip index 3a9c9377a21..1b781116e30 100644 --- a/python/core/composer/qgscomposermap.sip +++ b/python/core/composer/qgscomposermap.sip @@ -309,11 +309,12 @@ class QgsComposerMap : QgsComposerItem way the map is drawn within the item * @deprecated Use setMapRotation( double rotation ) instead */ - void setRotation( double r ); + void setRotation( double r ) /Deprecated/; + /**Returns the rotation used for drawing the map within the composer item * @deprecated Use mapRotation() instead */ - double rotation() const; + double rotation() const /Deprecated/; /**Sets rotation for the map - this does not affect the composer item shape, only the way the map is drawn within the item @@ -374,17 +375,19 @@ class QgsComposerMap : QgsComposerItem * @deprecated Use bool QgsComposerItem::imageSizeConsideringRotation( double& width, double& height, double rotation ) * instead */ - bool imageSizeConsideringRotation( double& width, double& height ) const; + bool imageSizeConsideringRotation( double& width, double& height ) const /Deprecated/; + /**Calculates corner point after rotation and scaling * @deprecated Use QgsComposerItem::cornerPointOnRotatedAndScaledRect( double& x, double& y, double width, double height, double rotation ) * instead */ - bool cornerPointOnRotatedAndScaledRect( double& x, double& y, double width, double height ) const; + bool cornerPointOnRotatedAndScaledRect( double& x, double& y, double width, double height ) const /Deprecated/; + /**Calculates width / height of the bounding box of a rotated rectangle * @deprecated Use QgsComposerItem::sizeChangedByRotation( double& width, double& height, double rotation ) * instead */ - void sizeChangedByRotation( double& width, double& height ); + void sizeChangedByRotation( double& width, double& height ) /Deprecated/; /** Returns true if the map extent is set to follow the current atlas feature */ bool atlasDriven() const; diff --git a/python/core/composer/qgscomposerpicture.sip b/python/core/composer/qgscomposerpicture.sip index c62ca1722ae..8a8b3be699c 100644 --- a/python/core/composer/qgscomposerpicture.sip +++ b/python/core/composer/qgscomposerpicture.sip @@ -41,7 +41,7 @@ class QgsComposerPicture: QgsComposerItem /**Returns the rotation used for drawing the picture within the composer item * @deprecated Use pictureRotation() instead */ - double rotation() const; + double rotation() const /Deprecated/; /**Returns the rotation used for drawing the picture within the item @note this function was added in version 2.1*/ @@ -58,17 +58,17 @@ class QgsComposerPicture: QgsComposerItem * @deprecated Use bool QgsComposerItem::imageSizeConsideringRotation( double& width, double& height, double rotation ) * instead */ - bool imageSizeConsideringRotation( double& width, double& height ) const; + bool imageSizeConsideringRotation( double& width, double& height ) const /Deprecated/; /**Calculates corner point after rotation and scaling * @deprecated Use QgsComposerItem::cornerPointOnRotatedAndScaledRect( double& x, double& y, double width, double height, double rotation ) * instead */ - bool cornerPointOnRotatedAndScaledRect( double& x, double& y, double width, double height ) const; + bool cornerPointOnRotatedAndScaledRect( double& x, double& y, double width, double height ) const /Deprecated/; /**Calculates width / height of the bounding box of a rotated rectangle * @deprecated Use QgsComposerItem::sizeChangedByRotation( double& width, double& height, double rotation ) * instead */ - void sizeChangedByRotation( double& width, double& height ); + void sizeChangedByRotation( double& width, double& height ) /Deprecated/; public slots: /**Sets the picture rotation within the item bounds. This does not affect the item rectangle, diff --git a/python/core/composer/qgscomposertexttable.sip b/python/core/composer/qgscomposertexttable.sip index c54f26906ba..966e32836e0 100644 --- a/python/core/composer/qgscomposertexttable.sip +++ b/python/core/composer/qgscomposertexttable.sip @@ -9,8 +9,19 @@ class QgsComposerTextTable: QgsComposerTable /** return correct graphics item type. Added in v1.7 */ virtual int type() const; - - void setHeaderLabels( const QStringList& l ); + + /**Sets the text to use for the header row for the table + * @param labels list of strings to use for each column's header row + * @see headerLabels + */ + void setHeaderLabels( const QStringList& labels ); + + /**Adds a row to the table + * @param row list of strings to use for each cell's value in the newly added row + * @note If row is shorter than the number of columns in the table than blank cells + * will be inserted at the end of the row. If row contains more strings then the number + * of columns in the table then these extra strings will be ignored. + */ void addRow( const QStringList& row ); bool writeXML( QDomElement& elem, QDomDocument & doc ) const; diff --git a/python/core/composer/qgscomposition.sip b/python/core/composer/qgscomposition.sip index 2c087ffcdb1..dc8240e0f49 100644 --- a/python/core/composer/qgscomposition.sip +++ b/python/core/composer/qgscomposition.sip @@ -161,7 +161,7 @@ class QgsComposition : QGraphicsScene @return QgsComposerMap or 0 pointer if the composer map item does not exist*/ const QgsComposerMap* getComposerMapById( int id ) const; - /*Returns the composer html with specified id (a string as named in the + /**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 id - A QString representing the id of the item. diff --git a/src/core/composer/qgsatlascomposition.cpp b/src/core/composer/qgsatlascomposition.cpp index 62ba0b84e21..d391cea6b36 100644 --- a/src/core/composer/qgsatlascomposition.cpp +++ b/src/core/composer/qgsatlascomposition.cpp @@ -50,11 +50,11 @@ QgsAtlasComposition::~QgsAtlasComposition() { } -void QgsAtlasComposition::setEnabled( bool e ) +void QgsAtlasComposition::setEnabled( bool enabled ) { - mEnabled = e; + mEnabled = enabled; mComposition->setAtlasMode( QgsComposition::AtlasOff ); - emit toggled( e ); + emit toggled( enabled ); } void QgsAtlasComposition::setCoverageLayer( QgsVectorLayer* layer ) diff --git a/src/core/composer/qgsatlascomposition.h b/src/core/composer/qgsatlascomposition.h index 3c67f815bcf..35a8a03b7e9 100644 --- a/src/core/composer/qgsatlascomposition.h +++ b/src/core/composer/qgsatlascomposition.h @@ -33,7 +33,10 @@ class QgsExpression; * Class used to render an Atlas, iterating over geometry features. * prepareForFeature() modifies the atlas map's extent to zoom on the given feature. * This class is used for printing, exporting to PDF and images. - * */ + * @note This class should not be created directly. For the atlas to function correctly + * the atlasComposition() property for QgsComposition should be used to retrieve a + * QgsAtlasComposition which is automatically created and attached to the composition. + */ class CORE_EXPORT QgsAtlasComposition : public QObject { Q_OBJECT @@ -41,47 +44,102 @@ class CORE_EXPORT QgsAtlasComposition : public QObject QgsAtlasComposition( QgsComposition* composition ); ~QgsAtlasComposition(); - /** Is the atlas generation enabled ? */ + /**Returns whether the atlas generation is enabled + * @returns true if atlas is enabled + * @see setEnabled + */ bool enabled() const { return mEnabled; } - void setEnabled( bool e ); + + /**Sets whether the atlas is enabled + * @param enabled set to true to enable to atlas + * @see enabled + */ + void setEnabled( bool enabled ); /**Returns the map used by the atlas * @deprecated Use QgsComposerMap::atlasDriven() instead */ - QgsComposerMap* composerMap() const; + Q_DECL_DEPRECATED QgsComposerMap* composerMap() const; + /**Sets the map used by the atlas * @deprecated Use QgsComposerMap::setAtlasDriven( true ) instead */ - void setComposerMap( QgsComposerMap* map ); + Q_DECL_DEPRECATED void setComposerMap( QgsComposerMap* map ); + /**Returns true if the atlas is set to hide the coverage layer + * @returns true if coverage layer is hidden + * @see setHideCoverage + */ bool hideCoverage() const { return mHideCoverage; } + + /**Sets whether the coverage layer should be hidden in map items in the composition + * @param hide set to true to hide the coverage layer + * @see hideCoverage + */ void setHideCoverage( bool hide ); /**Returns whether the atlas map uses a fixed scale * @deprecated Use QgsComposerMap::atlasFixedScale() instead */ - bool fixedScale() const; + Q_DECL_DEPRECATED bool fixedScale() const; + /**Sets whether the atlas map should use a fixed scale * @deprecated Use QgsComposerMap::setAtlasFixedScale( bool ) instead */ - void setFixedScale( bool fixed ); + Q_DECL_DEPRECATED void setFixedScale( bool fixed ); /**Returns the margin for the atlas map * @deprecated Use QgsComposerMap::atlasMargin() instead */ - float margin() const; + Q_DECL_DEPRECATED float margin() const; + /**Sets the margin for the atlas map * @deprecated Use QgsComposerMap::setAtlasMargin( double ) instead */ - void setMargin( float margin ); + Q_DECL_DEPRECATED void setMargin( float margin ); + /**Returns the filename expression used for generating output filenames for each + * atlas page. + * @returns filename pattern + * @see setFilenamePattern + * @note This property has no effect when exporting to PDF if singleFile() is true + */ QString filenamePattern() const { return mFilenamePattern; } + + /**Sets the filename expression used for generating output filenames for each + * atlas page. + * @param pattern expression to use for output filenames + * @see filenamePattern + * @note This method has no effect when exporting to PDF if singleFile() is true + */ void setFilenamePattern( const QString& pattern ); + /**Returns the coverage layer used for the atlas features + * @returns atlas coverage layer + * @see setCoverageLayer + */ QgsVectorLayer* coverageLayer() const { return mCoverageLayer; } - void setCoverageLayer( QgsVectorLayer* lmap ); + /**Sets the coverage layer to use for the atlas features + * @param layer vector coverage layer + * @see coverageLayer + */ + void setCoverageLayer( QgsVectorLayer* layer ); + + /**Returns whether the atlas will be exported to a single file. This is only + * applicable for PDF exports. + * @returns true if atlas will be exported to a single file + * @see setSingleFile + * @note This property is only used for PDF exports. + */ bool singleFile() const { return mSingleFile; } + + /**Sets whether the atlas should be exported to a single file. This is only + * applicable for PDF exports. + * @param single set to true to export atlas to a single file. + * @see singleFile + * @note This method is only used for PDF exports. + */ void setSingleFile( bool single ) { mSingleFile = single; } bool sortFeatures() const { return mSortFeatures; } diff --git a/src/core/composer/qgscomposerattributetable.h b/src/core/composer/qgscomposerattributetable.h index c6953489c14..5c2a70cff3b 100644 --- a/src/core/composer/qgscomposerattributetable.h +++ b/src/core/composer/qgscomposerattributetable.h @@ -57,13 +57,14 @@ class CORE_EXPORT QgsComposerAttributeTable: public QgsComposerTable * @param layer Vector layer for attribute table * @note added in 2.3 * @see vectorLayer - */ + */ void setVectorLayer( QgsVectorLayer* layer ); - /*Returns the vector layer the attribute table is currently using + + /**Returns the vector layer the attribute table is currently using * @returns attribute table's current vector layer * @note added in 2.3 * @see setVectorLayer - */ + */ QgsVectorLayer* vectorLayer() const { return mVectorLayer; } /**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 * @note added in 2.3 * @see composerMap * @see setDisplayOnlyVisibleFeatures - */ + */ void setComposerMap( const QgsComposerMap* map ); - /*Returns the composer map whose extents are controlling the features shown in the + + /**Returns the composer map whose extents are controlling the features shown in the * table. The extents of the map are only used if displayOnlyVisibleFeatures() is true. * @returns composer map controlling the attribute table * @note added in 2.3 * @see setComposerMap * @see displayOnlyVisibleFeatures - */ + */ const QgsComposerMap* composerMap() const { return mComposerMap; } /**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 * @param features maximum number of features to show in the table * @note added in 2.3 * @see maximumNumberOfFeatures - */ + */ void setMaximumNumberOfFeatures( int features ); - /*Returns the maximum number of features to be shown by the table. + + /**Returns the maximum number of features to be shown by the table. * @returns maximum number of features * @note added in 2.3 * @see setMaximumNumberOfFeatures - */ + */ int maximumNumberOfFeatures() const { return mMaximumNumberOfFeatures; } /**Sets attribute table to only show features which are visible in a composer map item. Changing @@ -108,24 +111,26 @@ class CORE_EXPORT QgsComposerAttributeTable: public QgsComposerTable * @note added in 2.3 * @see displayOnlyVisibleFeatures * @see setComposerMap - */ + */ void setDisplayOnlyVisibleFeatures( bool visibleOnly ); - /*Returns true if the table is set to show only features visible on a corresponding + + /**Returns true if the table is set to show only features visible on a corresponding * composer map item. * @returns true if table only shows visible features * @note added in 2.3 * @see composerMap * @see setDisplayOnlyVisibleFeatures - */ + */ bool displayOnlyVisibleFeatures() const { return mShowOnlyVisibleFeatures; } - /*Returns true if a feature filter is active on the attribute table + /**Returns true if a feature filter is active on the attribute table * @returns bool state of the feature filter * @note added in 2.3 * @see setFilterFeatures * @see featureFilter - */ + */ bool filterFeatures() const { return mFilterFeatures; } + /**Sets whether the feature filter is active for the attribute table. Changing * this setting forces the table to refetch features from its vector layer, and may result in * the table changing size to accomodate the new displayed feature attributes. @@ -133,17 +138,18 @@ class CORE_EXPORT QgsComposerAttributeTable: public QgsComposerTable * @note added in 2.3 * @see filterFeatures * @see setFeatureFilter - */ + */ void setFilterFeatures( bool filter ); - /*Returns the current expression used to filter features for the table. The filter is only + /**Returns the current expression used to filter features for the table. The filter is only * active if filterFeatures() is true. * @returns feature filter expression * @note added in 2.3 * @see setFeatureFilter * @see filterFeatures - */ + */ QString featureFilter() const { return mFeatureFilter; } + /**Sets the expression used for filtering features in the table. The filter is only * active if filterFeatures() is set to true. Changing this setting forces the table * to refetch features from its vector layer, and may result in @@ -152,28 +158,29 @@ class CORE_EXPORT QgsComposerAttributeTable: public QgsComposerTable * @note added in 2.3 * @see featureFilter * @see setFilterFeatures - */ + */ void setFeatureFilter( const QString& expression ); - /*Returns the attributes fields which are shown by the table. + /**Returns the attributes fields which are shown by the table. * @returns a QSet of integers refering to the attributes in the vector layer * @see setDisplayAttributes - */ + */ QSet displayAttributes() const { return mDisplayAttributes; } + /**Sets the attributes to display in the table. * @param attr QSet of integer values refering to the attributes from the vector layer to show * @param refresh set to true to force the table to refetch features from its vector layer * and immediately update the display of the table. This may result in the table changing size * to accomodate the new displayed feature attributes. * @see displayAttributes - */ + */ void setDisplayAttributes( const QSet& attr, bool refresh = true ); - /*Returns the attribute field aliases, which control how fields are named in the table's + /**Returns the attribute field aliases, which control how fields are named in the table's * header row. * @returns a QMap of integers to strings, where the string is the field's alias. * @see setFieldAliasMap - */ + */ QMap fieldAliasMap() const { return mFieldAliasMap; } /**Sets the attribute field aliases, which control how fields are named in the table's @@ -184,7 +191,7 @@ class CORE_EXPORT QgsComposerAttributeTable: public QgsComposerTable * and immediately update the display of the table. This may result in the table changing size * to accomodate the new displayed feature attributes and field aliases. * @see fieldAliasMap - */ + */ void setFieldAliasMap( const QMap& map, bool refresh = true ); /**Adapts mMaximumNumberOfFeatures depending on the rectangle height. Calling this forces @@ -192,7 +199,7 @@ class CORE_EXPORT QgsComposerAttributeTable: public QgsComposerTable * of the table. * @see maximumNumberOfFeatures * @see setMaximumNumberOfFeatures - */ + */ void setSceneRect( const QRectF& rectangle ); /**Sets the attributes to use to sort the table's features. @@ -206,16 +213,16 @@ class CORE_EXPORT QgsComposerAttributeTable: public QgsComposerTable * to accomodate the new displayed feature attributes and field aliases.l * @see sortAttributes * @note not available in python bindings - */ + */ void setSortAttributes( const QList > att, bool refresh = true ); - /*Returns the attributes used to sort the table's features. + /**Returns the attributes used to sort the table's features. * @returns a QList of integer/bool pairs, where the integer refers to the attribute index and * the bool to the sort order for the attribute. If true the attribute is sorted ascending, * if false, the attribute is sorted in descending order. * @see setSortAttributes * @note not available in python bindings - */ + */ QList > sortAttributes() const { return mSortInformation; } QMap headerLabels() const; @@ -233,9 +240,9 @@ class CORE_EXPORT QgsComposerAttributeTable: public QgsComposerTable /**Shows only the features that are visible in the associated composer map (true by default)*/ bool mShowOnlyVisibleFeatures; - // feature filtering + /**True if feature filtering enabled*/ bool mFilterFeatures; - // feature expression filter + /**Feature filter expression*/ QString mFeatureFilter; /**List of attribute indices to display (or all attributes if list is empty)*/ diff --git a/src/core/composer/qgscomposeritem.h b/src/core/composer/qgscomposeritem.h index d445fda0c68..0c239e74b4b 100644 --- a/src/core/composer/qgscomposeritem.h +++ b/src/core/composer/qgscomposeritem.h @@ -343,7 +343,7 @@ class CORE_EXPORT QgsComposerItem: public QObject, public QGraphicsRectItem * @deprecated Use itemRotation() * instead */ - double rotation() const {return mItemRotation;} + Q_DECL_DEPRECATED double rotation() const {return mItemRotation;} /**Updates item, with the possibility to do custom update for subclasses*/ virtual void updateItem() { QGraphicsRectItem::update(); } @@ -477,7 +477,7 @@ class CORE_EXPORT QgsComposerItem: public QObject, public QGraphicsRectItem * @deprecated Use bool imageSizeConsideringRotation( double& width, double& height, double rotation ) * instead */ - bool imageSizeConsideringRotation( double& width, double& height ) const; + Q_DECL_DEPRECATED bool imageSizeConsideringRotation( double& width, double& height ) const; /**Calculates the largest scaled version of originalRect which fits within boundsRect, when it is rotated by * a specified amount @@ -493,7 +493,7 @@ class CORE_EXPORT QgsComposerItem: public QObject, public QGraphicsRectItem * @deprecated Use bool cornerPointOnRotatedAndScaledRect( double& x, double& y, double width, double height, double rotation ) * instead */ - bool cornerPointOnRotatedAndScaledRect( double& x, double& y, double width, double height ) const; + Q_DECL_DEPRECATED bool cornerPointOnRotatedAndScaledRect( double& x, double& y, double width, double height ) const; /**Calculates width / height of the bounding box of a rotated rectangle*/ void sizeChangedByRotation( double& width, double& height, double rotation ); @@ -501,7 +501,7 @@ class CORE_EXPORT QgsComposerItem: public QObject, public QGraphicsRectItem * @deprecated Use void sizeChangedByRotation( double& width, double& height, double rotation ) * instead */ - void sizeChangedByRotation( double& width, double& height ); + Q_DECL_DEPRECATED void sizeChangedByRotation( double& width, double& height ); /**Rotates a point / vector @param angle rotation angle in degrees, counterclockwise diff --git a/src/core/composer/qgscomposerlegend.h b/src/core/composer/qgscomposerlegend.h index 7c41d9521dd..d5eee4651e0 100644 --- a/src/core/composer/qgscomposerlegend.h +++ b/src/core/composer/qgscomposerlegend.h @@ -58,7 +58,7 @@ class CORE_EXPORT QgsComposerLegend : public QgsComposerItem void setTitle( const QString& t ) {mTitle = t;} QString title() const {return mTitle;} - /*Returns the alignment of the legend title + /**Returns the alignment of the legend title * @returns Qt::AlignmentFlag for the legend title * @note added in 2.3 * @see setTitleAlignment diff --git a/src/core/composer/qgscomposermap.h b/src/core/composer/qgscomposermap.h index f70721f77d4..6c998be63c9 100644 --- a/src/core/composer/qgscomposermap.h +++ b/src/core/composer/qgscomposermap.h @@ -347,11 +347,12 @@ class CORE_EXPORT QgsComposerMap : public QgsComposerItem way the map is drawn within the item * @deprecated Use setMapRotation( double rotation ) instead */ - void setRotation( double r ); + Q_DECL_DEPRECATED void setRotation( double r ); + /**Returns the rotation used for drawing the map within the composer item * @deprecated Use mapRotation() instead */ - double rotation() const { return mMapRotation;}; + Q_DECL_DEPRECATED double rotation() const { return mMapRotation;}; /**Sets rotation for the map - this does not affect the composer item shape, only the way the map is drawn within the item @@ -412,17 +413,17 @@ class CORE_EXPORT QgsComposerMap : public QgsComposerItem * @deprecated Use bool QgsComposerItem::imageSizeConsideringRotation( double& width, double& height, double rotation ) * instead */ - bool imageSizeConsideringRotation( double& width, double& height ) const; + Q_DECL_DEPRECATED bool imageSizeConsideringRotation( double& width, double& height ) const; /**Calculates corner point after rotation and scaling * @deprecated Use QgsComposerItem::cornerPointOnRotatedAndScaledRect( double& x, double& y, double width, double height, double rotation ) * instead */ - bool cornerPointOnRotatedAndScaledRect( double& x, double& y, double width, double height ) const; + Q_DECL_DEPRECATED bool cornerPointOnRotatedAndScaledRect( double& x, double& y, double width, double height ) const; /**Calculates width / height of the bounding box of a rotated rectangle * @deprecated Use QgsComposerItem::sizeChangedByRotation( double& width, double& height, double rotation ) * instead */ - void sizeChangedByRotation( double& width, double& height ); + Q_DECL_DEPRECATED void sizeChangedByRotation( double& width, double& height ); /** Returns true if the map extent is set to follow the current atlas feature */ bool atlasDriven() const { return mAtlasDriven; } diff --git a/src/core/composer/qgscomposerpicture.h b/src/core/composer/qgscomposerpicture.h index 00dfa1088fc..07a53548fa6 100644 --- a/src/core/composer/qgscomposerpicture.h +++ b/src/core/composer/qgscomposerpicture.h @@ -63,7 +63,7 @@ class CORE_EXPORT QgsComposerPicture: public QgsComposerItem /**Returns the rotation used for drawing the picture within the composer item * @deprecated Use pictureRotation() instead */ - double rotation() const { return mPictureRotation;}; + Q_DECL_DEPRECATED double rotation() const { return mPictureRotation;}; /**Returns the rotation used for drawing the picture within the item @note this function was added in version 2.1*/ @@ -80,17 +80,17 @@ class CORE_EXPORT QgsComposerPicture: public QgsComposerItem * @deprecated Use bool QgsComposerItem::imageSizeConsideringRotation( double& width, double& height, double rotation ) * instead */ - bool imageSizeConsideringRotation( double& width, double& height ) const; + Q_DECL_DEPRECATED bool imageSizeConsideringRotation( double& width, double& height ) const; /**Calculates corner point after rotation and scaling * @deprecated Use QgsComposerItem::cornerPointOnRotatedAndScaledRect( double& x, double& y, double width, double height, double rotation ) * instead */ - bool cornerPointOnRotatedAndScaledRect( double& x, double& y, double width, double height ) const; + Q_DECL_DEPRECATED bool cornerPointOnRotatedAndScaledRect( double& x, double& y, double width, double height ) const; /**Calculates width / height of the bounding box of a rotated rectangle * @deprecated Use QgsComposerItem::sizeChangedByRotation( double& width, double& height, double rotation ) * instead */ - void sizeChangedByRotation( double& width, double& height ); + Q_DECL_DEPRECATED void sizeChangedByRotation( double& width, double& height ); public slots: /**Sets the picture rotation within the item bounds. This does not affect the item rectangle, diff --git a/src/core/composer/qgscomposertable.h b/src/core/composer/qgscomposertable.h index 1cf78a6471b..32b5d1a7392 100644 --- a/src/core/composer/qgscomposertable.h +++ b/src/core/composer/qgscomposertable.h @@ -61,7 +61,7 @@ class CORE_EXPORT QgsComposerTable: public QgsComposerItem void setGridColor( const QColor& c ) { mGridColor = c; } QColor gridColor() const { return mGridColor; } - /*Returns the text used in the column headers for the table. + /**Returns the text used in the column headers for the table. * @returns QMap of int to QString, where the int is the column index (starting at 0), * and the string is the text to use for the column's header * @note added in 2.3 @@ -72,7 +72,7 @@ class CORE_EXPORT QgsComposerTable: public QgsComposerItem //TODO - make this more generic for next API break, eg rename as getRowValues, use QStringList rather than //QgsAttributeMap - /*Fetches the text used for the rows of the table. + /**Fetches the text used for the rows of the table. * @returns true if attribute text was successfully retrieved. * @param attributeMaps QList of QgsAttributeMap to store retrieved row data in * @note not available in python bindings diff --git a/src/core/composer/qgscomposertexttable.h b/src/core/composer/qgscomposertexttable.h index fdacf616eb7..05c71a2089a 100644 --- a/src/core/composer/qgscomposertexttable.h +++ b/src/core/composer/qgscomposertexttable.h @@ -30,13 +30,13 @@ class CORE_EXPORT QgsComposerTextTable: public QgsComposerTable /** return correct graphics item type. Added in v1.7 */ virtual int type() const { return ComposerTextTable; } - /*Sets the text to use for the header row for the table + /**Sets the text to use for the header row for the table * @param labels list of strings to use for each column's header row * @see headerLabels */ void setHeaderLabels( const QStringList& labels ) { mHeaderLabels = labels; } - /*Adds a row to the table + /**Adds a row to the table * @param row list of strings to use for each cell's value in the newly added row * @note If row is shorter than the number of columns in the table than blank cells * will be inserted at the end of the row. If row contains more strings then the number diff --git a/src/core/composer/qgscomposition.h b/src/core/composer/qgscomposition.h index 6719305e897..761845c297e 100644 --- a/src/core/composer/qgscomposition.h +++ b/src/core/composer/qgscomposition.h @@ -217,7 +217,7 @@ class CORE_EXPORT QgsComposition : public QGraphicsScene @return QgsComposerMap or 0 pointer if the composer map item does not exist*/ const QgsComposerMap* getComposerMapById( int id ) const; - /*Returns the composer html with specified id (a string as named in the + /**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 id - A QString representing the id of the item.