Skip to content

Commit

Permalink
Merge branch 'master' into CategorizedRendererUpdate
Browse files Browse the repository at this point in the history
  • Loading branch information
ccrook committed Sep 23, 2014
2 parents e0b9afb + e194423 commit 91358aa
Show file tree
Hide file tree
Showing 218 changed files with 7,659 additions and 3,548 deletions.
116 changes: 58 additions & 58 deletions doc/TRANSLATORS

Large diffs are not rendered by default.

2,764 changes: 1,724 additions & 1,040 deletions i18n/qgis_de.ts

Large diffs are not rendered by default.

2,752 changes: 1,710 additions & 1,042 deletions i18n/qgis_en.ts

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion python/core/composer/qgsaddremoveitemcommand.sip
Expand Up @@ -13,7 +13,7 @@ class QgsAddRemoveItemCommand: QObject, QUndoCommand
Removed
};

QgsAddRemoveItemCommand( State s, QgsComposerItem* item, QgsComposition* c, const QString& text, QUndoCommand* parent = 0 );
QgsAddRemoveItemCommand( State s, QgsComposerItem* item, QgsComposition* c, const QString& text, QUndoCommand* parent /TransferThis/ = 0 );
~QgsAddRemoveItemCommand();

void redo();
Expand Down
2 changes: 1 addition & 1 deletion python/core/composer/qgsaddremovemultiframecommand.sip
Expand Up @@ -12,7 +12,7 @@ class QgsAddRemoveMultiFrameCommand : QUndoCommand
Removed
};

QgsAddRemoveMultiFrameCommand( State s, QgsComposerMultiFrame* multiFrame, QgsComposition* c, const QString& text, QUndoCommand* parent = 0 );
QgsAddRemoveMultiFrameCommand( State s, QgsComposerMultiFrame* multiFrame, QgsComposition* c, const QString& text, QUndoCommand* parent /TransferThis/ = 0 );
~QgsAddRemoveMultiFrameCommand();
void redo();
void undo();
Expand Down
6 changes: 3 additions & 3 deletions python/core/composer/qgscomposerarrow.sip
Expand Up @@ -15,14 +15,14 @@ class QgsComposerArrow: QgsComposerItem
/**Constructor
* @param c parent composition
*/
QgsComposerArrow( QgsComposition* c );
QgsComposerArrow( QgsComposition* c /TransferThis/ );

/**Constructor
* @param startPoint start point for line
* @param stopPoint end point for line
* @param c parent composition
*/
QgsComposerArrow( const QPointF& startPoint, const QPointF& stopPoint, QgsComposition* c );
QgsComposerArrow( const QPointF& startPoint, const QPointF& stopPoint, QgsComposition* c /TransferThis/ );

~QgsComposerArrow();

Expand Down Expand Up @@ -151,7 +151,7 @@ class QgsComposerArrow: QgsComposerItem
* @see lineSymbol
* @note added in 2.5
*/
void setLineSymbol( QgsLineSymbolV2* symbol );
void setLineSymbol( QgsLineSymbolV2* symbol /Transfer/ );

/**Returns the line symbol used for drawing the line portion of the arrow
* @returns line symbol
Expand Down
2 changes: 1 addition & 1 deletion python/core/composer/qgscomposerattributetable.sip
Expand Up @@ -82,7 +82,7 @@ class QgsComposerAttributeTable : QgsComposerTable
* @see composerMap
* @see setDisplayOnlyVisibleFeatures
*/
void setComposerMap( const QgsComposerMap* map /TransferThis/ );
void setComposerMap( const QgsComposerMap* map );

/**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.
Expand Down
84 changes: 79 additions & 5 deletions python/core/composer/qgscomposerattributetablev2.sip
Expand Up @@ -32,8 +32,17 @@ class QgsComposerAttributeTableV2 : QgsComposerTableV2
%End

public:

/*! Specifies the content source for the attribute table
*/
enum ContentSource
{
LayerAttributes = 0, /*!< table shows attributes from features in a vector layer */
AtlasFeature, /*!< table shows attributes from the current atlas feature */
RelationChildren /*!< table shows attributes from related child features */
};

QgsComposerAttributeTableV2( QgsComposition* composition, bool createUndoCommands );
QgsComposerAttributeTableV2( QgsComposition* composition /TransferThis/, bool createUndoCommands );
~QgsComposerAttributeTableV2();

/**Writes properties specific to attribute tables
Expand All @@ -50,7 +59,27 @@ class QgsComposerAttributeTableV2 : QgsComposerTableV2
*/
virtual bool readXML( const QDomElement& itemElem, const QDomDocument& doc, bool ignoreFrames = false );

virtual void addFrame( QgsComposerFrame* frame, bool recalcFrameSizes = true );
virtual void addFrame( QgsComposerFrame* frame /Transfer/, bool recalcFrameSizes = true );

/**Sets the source for attributes to show in table body.
* @param source content source
* @see source
*/
void setSource( const ContentSource source );

/**Returns the source for attributes shown in the table body.
* @returns content source
* @see setSource
*/
ContentSource source() const;

/**Returns the source layer for the table, considering the table source mode. Eg,
* if the table is set to atlas feature mode, then the source layer will be the
* atlas coverage layer. If the table is set to layer attributes mode, then
* the source layer will be the user specified vector layer.
* @returns actual source layer
*/
QgsVectorLayer* sourceLayer();

/**Sets the vector layer from which to display feature attributes
* @param layer Vector layer for attribute table
Expand All @@ -63,6 +92,22 @@ class QgsComposerAttributeTableV2 : QgsComposerTableV2
* @see setVectorLayer
*/
QgsVectorLayer* vectorLayer() const;

/**Sets the relation id from which to display child features
* @param relationId id for relation to display child features from
* @see relationId
* @see setSource
* @note only used if table source is set to RelationChildren
*/
void setRelationId( const QString relationId );

/**Returns the relation id which the table displays child features from
* @returns relation id
* @see setRelationId
* @see source
* @note only used if table source is set to RelationChildren
*/
QString relationId() const;

/**Resets the attribute table's columns to match the vector layer's fields
* @see setVectorLayer
Expand Down Expand Up @@ -94,22 +139,36 @@ class QgsComposerAttributeTableV2 : QgsComposerTableV2
* @param features maximum number of features to show in the table
* @see maximumNumberOfFeatures
*/
void setMaximumNumberOfFeatures( int features );
void setMaximumNumberOfFeatures( const int features );

/**Returns the maximum number of features to be shown by the table.
* @returns maximum number of features
* @see setMaximumNumberOfFeatures
*/
int maximumNumberOfFeatures() const;

/**Sets attribute table to only show unique rows.
* @param uniqueOnly set to true to show only unique rows. Duplicate rows
* will be stripped from the table.
* @see uniqueRowsOnly
*/
void setUniqueRowsOnly( const bool uniqueOnly );

/**Returns true if the table is set to show only unique rows.
* @returns true if table only shows unique rows and is stripping out
* duplicate rows.
* @see setUniqueRowsOnly
*/
bool uniqueRowsOnly() const;

/**Sets attribute table to only show features which are visible in a composer map item. Changing
* this setting forces the table to refetch features from its vector layer, and may result in
* the table changing size to accommodate the new displayed feature attributes.
* @param visibleOnly set to true to show only visible features
* @see displayOnlyVisibleFeatures
* @see setComposerMap
*/
void setDisplayOnlyVisibleFeatures( bool visibleOnly );
void setDisplayOnlyVisibleFeatures( const bool visibleOnly );

/**Returns true if the table is set to show only features visible on a corresponding
* composer map item.
Expand All @@ -118,6 +177,21 @@ class QgsComposerAttributeTableV2 : QgsComposerTableV2
* @see setDisplayOnlyVisibleFeatures
*/
bool displayOnlyVisibleFeatures() const;

/**Sets attribute table to only show features which intersect the current atlas
* feature.
* @param filterToAtlas set to true to show only features which intersect
* the atlas feature
* @see filterToAtlasFeature
*/
void setFilterToAtlasFeature( const bool filterToAtlas );

/**Returns true if the table is set to only show features which intersect the current atlas
* feature.
* @returns true if table only shows features which intersect the atlas feature
* @see setFilterToAtlasFeature
*/
bool filterToAtlasFeature() const;

/**Returns true if a feature filter is active on the attribute table
* @returns bool state of the feature filter
Expand All @@ -133,7 +207,7 @@ class QgsComposerAttributeTableV2 : QgsComposerTableV2
* @see filterFeatures
* @see setFeatureFilter
*/
void setFilterFeatures( bool filter );
void setFilterFeatures( const bool filter );

/**Returns the current expression used to filter features for the table. The filter is only
* active if filterFeatures() is true.
Expand Down
7 changes: 5 additions & 2 deletions python/core/composer/qgscomposerhtml.sip
Expand Up @@ -14,7 +14,7 @@ class QgsComposerHtml: QgsComposerMultiFrame
ManualHtml /*< HTML content is manually set for the item*/
};

QgsComposerHtml( QgsComposition* c, bool createUndoCommands );
QgsComposerHtml( QgsComposition* c /TransferThis/, bool createUndoCommands );
QgsComposerHtml();
~QgsComposerHtml();

Expand Down Expand Up @@ -176,7 +176,7 @@ class QgsComposerHtml: QgsComposerMultiFrame
void render( QPainter* p, const QRectF& renderExtent, const int frameIndex );
bool writeXML( QDomElement& elem, QDomDocument & doc, bool ignoreFrames = false ) const;
bool readXML( const QDomElement& itemElem, const QDomDocument& doc, bool ignoreFrames = false );
void addFrame( QgsComposerFrame* frame, bool recalcFrameSizes = true );
void addFrame( QgsComposerFrame* frame /Transfer/, bool recalcFrameSizes = true );
//overriden to break frames without dividing lines of text
double findNearbyPageBreak( double yPos );

Expand All @@ -188,6 +188,9 @@ class QgsComposerHtml: QgsComposerMultiFrame
*/
void loadHtml();

/**Recalculates the frame sizes for the current viewport dimensions*/
void recalculateFrameSizes();

void refreshExpressionContext();

virtual void refreshDataDefinedProperty( const QgsComposerObject::DataDefinedProperty property = QgsComposerObject::AllProperties );
Expand Down
2 changes: 1 addition & 1 deletion python/core/composer/qgscomposeritemcommand.sip
Expand Up @@ -6,7 +6,7 @@ class QgsComposerItemCommand: QUndoCommand
#include "qgscomposeritemcommand.h"
%End
public:
QgsComposerItemCommand( QgsComposerItem* item, const QString& text, QUndoCommand* parent = 0 );
QgsComposerItemCommand( QgsComposerItem* item, const QString& text, QUndoCommand* parent /TransferThis/ = 0 );
virtual ~QgsComposerItemCommand();

/**Reverses the command*/
Expand Down
78 changes: 60 additions & 18 deletions python/core/composer/qgscomposermap.sip
Expand Up @@ -511,6 +511,21 @@ class QgsComposerMap : QgsComposerItem
* @note introduced in QGIS 2.5
*/
QgsComposerMapGrid* grid();

/**Returns the map item's overview stack, which is used to control how over
* are drawn over the map's contents.
* @returns pointer to overview stack
* @see overview()
* @note introduced in QGIS 2.5
*/
QgsComposerMapOverviewStack* overviews();

/**Returns the map item's first overview. This is a convenience function.
* @returns pointer to first overview for map item
* @see overviews()
* @note introduced in QGIS 2.5
*/
QgsComposerMapOverview* overview();

/**In case of annotations, the bounding rectangle can be larger than the map item rectangle
@note this function was added in version 1.4*/
Expand Down Expand Up @@ -559,29 +574,56 @@ class QgsComposerMap : QgsComposerItem
double mapUnitsToMM() const;

/**Sets overview frame map. -1 disables the overview frame
@note: this function was added in version 1.9*/
void setOverviewFrameMap( int mapId );
* @note: this function was added in version 1.9
* @deprecated use overview()->setFrameMap() or overviews() instead
*/
void setOverviewFrameMap( int mapId ) /Deprecated/;

/**Returns id of overview frame (or -1 if no overfiew frame)
@note: this function was added in version 1.9*/
int overviewFrameMapId() const;
* @note: this function was added in version 1.9
* @deprecated use overview()->frameMapId() or overviews() instead
*/
int overviewFrameMapId() const /Deprecated/;

/**
* @deprecated use overview()->setFrameSymbol() or overviews() instead
*/
void setOverviewFrameMapSymbol( QgsFillSymbolV2* symbol /Transfer/ ) /Deprecated/;

void setOverviewFrameMapSymbol( QgsFillSymbolV2* symbol /Transfer/ );
QgsFillSymbolV2* overviewFrameMapSymbol();
/**
* @deprecated use overview()->frameSymbol() or overviews() instead
*/
QgsFillSymbolV2* overviewFrameMapSymbol() /Deprecated/;

/** Returns the overview's blending mode */
QPainter::CompositionMode overviewBlendMode() const;
/** Sets the overview's blending mode*/
void setOverviewBlendMode( QPainter::CompositionMode blendMode );
/** Returns the overview's blending mode
* @deprecated use overview()->blendMode() or overviews() instead
*/
QPainter::CompositionMode overviewBlendMode() const /Deprecated/;

/** Returns true if the overview frame is inverted */
bool overviewInverted() const;
/** Sets the overview's inversion mode*/
void setOverviewInverted( bool inverted );
/** Sets the overview's blending mode
* @deprecated use overview()->setBlendMode() or overviews() instead
*/
void setOverviewBlendMode( QPainter::CompositionMode blendMode ) /Deprecated/;

/** Returns true if the extent is forced to center on the overview */
/** Returns true if the overview frame is inverted
* @deprecated use overview()->inverted() or overviews() instead
*/
bool overviewInverted() const /Deprecated/;

/** Sets the overview's inversion mode
* @deprecated use overview()->setInverted() or overviews() instead
*/
void setOverviewInverted( bool inverted ) /Deprecated/;

/** Returns true if the extent is forced to center on the overview
* @deprecated use overview()->centered() or overviews() instead
*/
bool overviewCentered() const;
/** Set the overview's centering mode */
void setOverviewCentered( bool centered );

/** Set the overview's centering mode
* @deprecated use overview()->setCentered() or overviews() instead
*/
void setOverviewCentered( bool centered ) /Deprecated/;

/**Sets mId to a number not yet used in the composition. mId is kept if it is not in use.
Usually, this function is called before adding the composer map to the composition*/
Expand Down Expand Up @@ -693,7 +735,7 @@ class QgsComposerMap : QgsComposerItem
/**Transforms map coordinates to item coordinates (considering rotation and move offset)*/
QPointF mapToItemCoords( const QPointF& mapCoords ) const;

void connectMapOverviewSignals();
void connectMapOverviewSignals() /Deprecated/;

signals:
void extentChanged();
Expand Down

0 comments on commit 91358aa

Please sign in to comment.