Skip to content

Commit de62c4e

Browse files
committedApr 10, 2017
Fix some QgsMapLayer getters which are incorrectly marked as slots
1 parent 1128373 commit de62c4e

File tree

2 files changed

+38
-38
lines changed

2 files changed

+38
-38
lines changed
 

‎python/core/qgsmaplayer.sip

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -807,6 +807,29 @@ Return pointer to layer's undo stack
807807
\see setAutoRefreshInterval()
808808
%End
809809

810+
virtual QString metadata() const;
811+
%Docstring
812+
Obtain Metadata for this layer
813+
814+
:rtype: str
815+
%End
816+
817+
virtual QDateTime timestamp() const;
818+
%Docstring
819+
Time stamp of data source in the moment when data/metadata were loaded by provider
820+
:rtype: QDateTime
821+
%End
822+
823+
virtual QSet<QgsMapLayerDependency> dependencies() const;
824+
%Docstring
825+
Gets the list of dependencies. This includes data dependencies set by the user (\see setDataDependencies)
826+
as well as dependencies given by the provider
827+
828+
:return: a set of QgsMapLayerDependency
829+
.. versionadded:: 3.0
830+
:rtype: set of QgsMapLayerDependency
831+
%End
832+
810833
public slots:
811834

812835
void setMinimumScale( double scale );
@@ -850,19 +873,6 @@ Return pointer to layer's undo stack
850873
in 2.6 function moved from vector/raster subclasses to QgsMapLayer
851874
%End
852875

853-
virtual QString metadata() const;
854-
%Docstring
855-
Obtain Metadata for this layer
856-
857-
:rtype: str
858-
%End
859-
860-
virtual QDateTime timestamp() const;
861-
%Docstring
862-
Time stamp of data source in the moment when data/metadata were loaded by provider
863-
:rtype: QDateTime
864-
%End
865-
866876
void emitStyleChanged();
867877
%Docstring
868878
Triggers an emission of the styleChanged() signal.
@@ -880,16 +890,6 @@ Time stamp of data source in the moment when data/metadata were loaded by provid
880890
:rtype: bool
881891
%End
882892

883-
virtual QSet<QgsMapLayerDependency> dependencies() const;
884-
%Docstring
885-
Gets the list of dependencies. This includes data dependencies set by the user (\see setDataDependencies)
886-
as well as dependencies given by the provider
887-
888-
:return: a set of QgsMapLayerDependency
889-
.. versionadded:: 3.0
890-
:rtype: set of QgsMapLayerDependency
891-
%End
892-
893893
signals:
894894

895895
void statusChanged( const QString &status );

‎src/core/qgsmaplayer.h

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -720,6 +720,21 @@ class CORE_EXPORT QgsMapLayer : public QObject
720720
*/
721721
void setAutoRefreshEnabled( bool enabled );
722722

723+
//! \brief Obtain Metadata for this layer
724+
virtual QString metadata() const;
725+
726+
//! Time stamp of data source in the moment when data/metadata were loaded by provider
727+
virtual QDateTime timestamp() const { return QDateTime() ; }
728+
729+
/**
730+
* Gets the list of dependencies. This includes data dependencies set by the user (\see setDataDependencies)
731+
* as well as dependencies given by the provider
732+
*
733+
* \returns a set of QgsMapLayerDependency
734+
* \since QGIS 3.0
735+
*/
736+
virtual QSet<QgsMapLayerDependency> dependencies() const;
737+
723738
public slots:
724739

725740
/** Sets the minimum scale denominator at which the layer will be visible.
@@ -758,12 +773,6 @@ class CORE_EXPORT QgsMapLayer : public QObject
758773
*/
759774
void triggerRepaint( bool deferredUpdate = false );
760775

761-
//! \brief Obtain Metadata for this layer
762-
virtual QString metadata() const;
763-
764-
//! Time stamp of data source in the moment when data/metadata were loaded by provider
765-
virtual QDateTime timestamp() const { return QDateTime() ; }
766-
767776
/** Triggers an emission of the styleChanged() signal.
768777
* \since QGIS 2.16
769778
*/
@@ -779,15 +788,6 @@ class CORE_EXPORT QgsMapLayer : public QObject
779788
*/
780789
virtual bool setDependencies( const QSet<QgsMapLayerDependency> &layers );
781790

782-
/**
783-
* Gets the list of dependencies. This includes data dependencies set by the user (\see setDataDependencies)
784-
* as well as dependencies given by the provider
785-
*
786-
* \returns a set of QgsMapLayerDependency
787-
* \since QGIS 3.0
788-
*/
789-
virtual QSet<QgsMapLayerDependency> dependencies() const;
790-
791791
signals:
792792

793793
//! Emit a signal with status (e.g. to be caught by QgisApp and display a msg on status bar)

0 commit comments

Comments
 (0)
Please sign in to comment.