Skip to content
Permalink
Browse files

Merge pull request #5870 from nyalldawson/virtual

Drop redundant virtual keywords on overrides
  • Loading branch information
nyalldawson committed Dec 16, 2017
2 parents 978d927 + 71a39cb commit 9d251198a66c9898066383ba4069add346f14410
Showing 910 changed files with 3,544 additions and 2,724 deletions.
@@ -32,8 +32,6 @@ using "builder" design patter.
%End
public:

virtual ~QgsGraphDirector();

virtual void makeGraph( QgsGraphBuilderInterface *builder,
const QVector< QgsPointXY > &additionalPoints,
QVector< QgsPointXY > &snappedPoints /Out/,
@@ -22,6 +22,7 @@ used for finding shortest path between two points.
%End
public:
virtual QVariant cost( double distance, const QgsFeature & ) const;

};

/************************************************************************
@@ -48,8 +48,6 @@ Default constructor
attribute value is not set or does not equal to the given values
%End

virtual ~QgsVectorLayerDirector();

virtual void makeGraph( QgsGraphBuilderInterface *builder,
const QVector< QgsPointXY > &additionalPoints,
QVector< QgsPointXY> &snappedPoints /Out/,
@@ -20,10 +20,10 @@ Adds the ability to calculate derivatives in x- and y-directions. Needs to be su
%End
public:
QgsDerivativeFilter( const QString &inputFile, const QString &outputFile, const QString &outputFormat );
virtual ~QgsDerivativeFilter();
virtual float processNineCellWindow( float *x11, float *x21, float *x31,
float *x12, float *x22, float *x32,
float *x13, float *x23, float *x33 ) = 0;

virtual float processNineCellWindow( float *x11, float *x21, float *x31,
float *x12, float *x22, float *x32,
float *x13, float *x23, float *x33 ) = 0;

protected:
float calcFirstDerX( float *x11, float *x21, float *x31, float *x12, float *x22, float *x32, float *x13, float *x23, float *x33 );
@@ -21,7 +21,6 @@ Algorithm from Riley et al. 1999: A terrain ruggedness index that quantifies top
%End
public:
QgsRuggednessFilter( const QString &inputFile, const QString &outputFile, const QString &outputFormat );
~QgsRuggednessFilter();

protected:

@@ -20,7 +20,6 @@ Calculates slope values in a window of 3x3 cells based on first order derivative
%End
public:
QgsSlopeFilter( const QString &inputFile, const QString &outputFile, const QString &outputFormat );
~QgsSlopeFilter();

virtual float processNineCellWindow( float *x11, float *x21, float *x31,
float *x12, float *x22, float *x32,
@@ -20,7 +20,6 @@ Calculates total curvature as described by Wilson, Gallant (2000): terrain analy
%End
public:
QgsTotalCurvatureFilter( const QString &inputFile, const QString &outputFile, const QString &outputFormat );
~QgsTotalCurvatureFilter();

protected:

@@ -30,8 +30,6 @@ An annotation item that embeds HTML content.
Constructor for QgsHtmlAnnotation.
%End

~QgsHtmlAnnotation();

virtual QgsHtmlAnnotation *clone() const /Factory/;


@@ -55,8 +53,10 @@ Returns the file path for the source HTML file.
%End

virtual void writeXml( QDomElement &elem, QDomDocument &doc, const QgsReadWriteContext &context ) const;

virtual void readXml( const QDomElement &itemElem, const QgsReadWriteContext &context );


virtual void setAssociatedFeature( const QgsFeature &feature );


@@ -31,8 +31,10 @@ Constructor for QgsSvgAnnotation.


virtual void writeXml( QDomElement &elem, QDomDocument &doc, const QgsReadWriteContext &context ) const;

virtual void readXml( const QDomElement &itemElem, const QgsReadWriteContext &context );


void setFilePath( const QString &file );
%Docstring
Sets the file path for the source SVG file.
@@ -49,8 +49,10 @@ within the annotation. Ownership is not transferred.
%End

virtual void writeXml( QDomElement &elem, QDomDocument &doc, const QgsReadWriteContext &context ) const;

virtual void readXml( const QDomElement &itemElem, const QgsReadWriteContext &context );


static QgsTextAnnotation *create() /Factory/;
%Docstring
Returns a new QgsTextAnnotation object.
@@ -37,12 +37,15 @@ Constructor for QgsComposerAttributeTableColumnModel.
%End

virtual int rowCount( const QModelIndex &parent = QModelIndex() ) const;

virtual int columnCount( const QModelIndex &parent = QModelIndex() ) const;

virtual QVariant data( const QModelIndex &index, int role ) const;

virtual QVariant headerData( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const;

virtual bool setData( const QModelIndex &index, const QVariant &value, int role = Qt::EditRole );

virtual Qt::ItemFlags flags( const QModelIndex &index ) const;

virtual bool removeRows( int row, int count, const QModelIndex &parent = QModelIndex() );
@@ -176,12 +179,14 @@ Constructor for QgsComposerTableSortColumnsProxyModel.
virtual int columnCount( const QModelIndex &parent = QModelIndex() ) const;

virtual QVariant data( const QModelIndex &index, int role ) const;

virtual QVariant headerData( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const;

virtual Qt::ItemFlags flags( const QModelIndex &index ) const;

virtual bool setData( const QModelIndex &index, const QVariant &value, int role = Qt::EditRole );


QgsComposerTableColumn *columnFromRow( int row );
%Docstring
Returns the QgsComposerTableColumn corresponding to a row in the proxy model.
@@ -68,7 +68,9 @@ A table that displays attributes from a vector layer

virtual QString displayName() const;


virtual bool writeXml( QDomElement &elem, QDomDocument &doc, bool ignoreFrames = false ) const;

%Docstring
Writes properties specific to attribute tables
:param elem: an existing QDomElement in which to store the attribute table's properties.
@@ -81,6 +83,7 @@ Writes properties specific to attribute tables
%End

virtual bool readXml( const QDomElement &itemElem, const QDomDocument &doc, bool ignoreFrames = false );

%Docstring
Reads the properties specific to an attribute table from xml.
:param itemElem: a QDomElement holding the attribute table's desired properties.
@@ -94,6 +97,7 @@ Reads the properties specific to an attribute table from xml.

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


void setSource( const ContentSource source );
%Docstring
Sets the source for attributes to show in table body.
@@ -393,6 +397,7 @@ be replaced by a line break.

virtual QgsExpressionContext createExpressionContext() const;


};

/************************************************************************
@@ -27,6 +27,7 @@ Constructor for QgsComposerEffect.

protected:
virtual void draw( QPainter *painter );

%Docstring
Called whenever source needs to be drawn
%End
@@ -41,6 +41,7 @@ Returns the parent multiframe for the frame.

virtual QString displayName() const;


virtual void setSceneRect( const QRectF &rectangle );


@@ -131,6 +132,7 @@ Returns whether the frame is empty

virtual QgsExpressionContext createExpressionContext() const;


};

/************************************************************************
@@ -265,6 +265,7 @@ Returns whether user stylesheets are enabled for the HTML content.
%End

virtual QString displayName() const;

virtual QSizeF totalSize() const;

virtual void render( QPainter *p, const QRectF &renderExtent, const int frameIndex );
@@ -301,6 +302,7 @@ Recalculates the frame sizes for the current viewport dimensions

virtual void refreshDataDefinedProperty( const QgsComposerObject::DataDefinedProperty property = QgsComposerObject::AllProperties, const QgsExpressionContext *context = 0 );


};

/************************************************************************
@@ -96,7 +96,7 @@ Constructor with box position and composer object
:param composition: parent composition
:param manageZValue: true if the z-Value of this object should be managed by mComposition*
%End
virtual ~QgsComposerItem();
~QgsComposerItem();

virtual int type() const;
%Docstring
@@ -746,6 +746,7 @@ Sets the current layer to draw for exporting
%End

virtual QgsExpressionContext createExpressionContext() const;

%Docstring
Creates an expression context relating to the item's current state. The context includes
scopes for global, project, composition, atlas and item properties.
@@ -799,6 +800,7 @@ around item center. If false, rotation occurs around item origin


virtual void refreshDataDefinedProperty( const QgsComposerObject::DataDefinedProperty property = QgsComposerObject::AllProperties, const QgsExpressionContext *context = 0 );

%Docstring
Refreshes a data defined property for the item by reevaluating the property's value
and redrawing the item with this new value.
@@ -55,6 +55,7 @@ corresponds to 1 scene size unit*

virtual void setVisibility( const bool visible );


virtual bool writeXml( QDomElement &elem, QDomDocument &doc ) const;

%Docstring
@@ -198,6 +198,7 @@ Sets state from Dom document

virtual QString displayName() const;


virtual QRectF boundingRect() const;

%Docstring
@@ -208,11 +209,13 @@ label's frame
%End

virtual void setFrameEnabled( const bool drawFrame );

%Docstring
Reimplemented to call prepareGeometryChange after toggling frame
%End

virtual void setFrameStrokeWidth( const double strokeWidth );

%Docstring
Reimplemented to call prepareGeometryChange after changing stroke width
%End
@@ -110,6 +110,7 @@ Find out whether legend items are filtered to show just the ones visible in the
%End

virtual void updateItem();

%Docstring
Update() overloading. Use it rather than update()

@@ -418,6 +419,7 @@ Sets state from Dom document

virtual QString displayName() const;


const QgsLegendSettings &legendSettings() const;
%Docstring
Returns the legend's renderer settings object.
@@ -440,6 +442,7 @@ Sets mCompositionMap to 0 if the map is deleted
virtual void refreshDataDefinedProperty( const QgsComposerObject::DataDefinedProperty property = QgsComposerObject::AllProperties, const QgsExpressionContext *context = 0 );



};


@@ -28,7 +28,7 @@ Constructor.
%Docstring
Constructor. Settings are read from project.
%End
virtual ~QgsComposerMap();
~QgsComposerMap();

virtual int type() const;
%Docstring
@@ -96,6 +96,7 @@ Move content of map
%End

virtual void zoomContent( const double factor, const QPointF point, const ZoomMode mode = QgsComposerItem::Zoom );

%Docstring
Zoom content of item. Does nothing per default (but implemented in composer map)
:param factor: zoom factor, where > 1 results in a zoom in and < 1 results in a zoom out
@@ -444,6 +445,7 @@ In case of annotations, the bounding rectangle can be larger than the map item r
%End

virtual void setFrameStrokeWidth( const double strokeWidth );

%Docstring
reimplement setFrameStrokeWidth, so that updateBoundingRect() is called after setting the frame width */
%End
@@ -619,6 +621,7 @@ clockwise, starting at the top-left point

virtual QString displayName() const;


QPolygonF transformedMapPolygon() const;
%Docstring
Returns extent that considers rotation and shift with mOffsetX / mOffsetY
@@ -642,6 +645,7 @@ Calculates the extent to request and the yShift of the top-left point in case of

virtual QgsExpressionContext createExpressionContext() const;


signals:
void extentChanged();

@@ -679,6 +683,7 @@ Updates the bounding rect of this item. Call this function before doing any chan

virtual void refreshDataDefinedProperty( const QgsComposerObject::DataDefinedProperty property = QgsComposerObject::AllProperties, const QgsExpressionContext *context = 0 );


};


@@ -284,7 +284,7 @@ Constructor for QgsComposerMapGrid.
:param map: QgsComposerMap the grid is attached to
%End

virtual ~QgsComposerMapGrid();
~QgsComposerMapGrid();

virtual void draw( QPainter *painter );

@@ -1089,6 +1089,7 @@ Retrieves the second fill color for the grid frame.

virtual QgsExpressionContext createExpressionContext() const;


public:
};

@@ -34,6 +34,7 @@ Draws the item on to a painter
%End

virtual bool writeXml( QDomElement &elem, QDomDocument &doc ) const;

%Docstring
Stores map item state in DOM element
:param elem: is DOM element corresponding to a 'ComposerMap' tag
@@ -45,6 +46,7 @@ Stores map item state in DOM element
%End

virtual bool readXml( const QDomElement &itemElem, const QDomDocument &doc );

%Docstring
Sets map item state from a DOM document
:param itemElem: is DOM node corresponding to a 'ComposerMapGrid' tag
@@ -173,7 +173,7 @@ Constructor for QgsComposerMapOverview.
:param map: QgsComposerMap the overview is attached to
%End

virtual ~QgsComposerMapOverview();
~QgsComposerMapOverview();

virtual void draw( QPainter *painter );

@@ -67,7 +67,9 @@ Constructor
virtual Qt::DropActions supportedDropActions() const;

virtual QStringList mimeTypes() const;

virtual QMimeData *mimeData( const QModelIndexList &indexes ) const;

virtual bool dropMimeData( const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent );

virtual bool removeRows( int row, int count, const QModelIndex &parent = QModelIndex() );

0 comments on commit 9d25119

Please sign in to comment.
You can’t perform that action at this time.