Skip to content
Permalink
Browse files

added temporal source for temporal layers

  • Loading branch information
Samweli authored and nyalldawson committed Mar 6, 2020
1 parent 1b53cbc commit 54d608cf2f9264b9dc12c65a0018c5fd97b2b83c
Showing with 36 additions and 0 deletions.
  1. +10 −0 src/core/qgsmaplayertemporalproperties.cpp
  2. +26 −0 src/core/qgsmaplayertemporalproperties.h
@@ -22,3 +22,13 @@ QgsMapLayerTemporalProperties::QgsMapLayerTemporalProperties( bool enabled )
{
}

void QgsMapLayerTemporalProperties::setTemporalSource( QgsMapLayerTemporalProperties::TemporalSource source )
{
mSource = source;
}

QgsMapLayerTemporalProperties::TemporalSource QgsMapLayerTemporalProperties::temporalSource() const
{
return mSource;
}

@@ -63,6 +63,32 @@ class CORE_EXPORT QgsMapLayerTemporalProperties : public QgsTemporalProperty
*/
virtual bool readXml( const QDomElement &element, const QgsReadWriteContext &context ) = 0;

/**
* Source of the temporal range of these properties.
*/
enum TemporalSource
{
Layer, //! Defined from layer .
Project//! Defined from project time settings;
};

/**
* Returns the temporal properties temporal range source, can be layer or project.
*
*\see setTemporalSource()
**/
TemporalSource temporalSource() const;

/**
* Sets the temporal properties temporal range \a source.
*
*\see temporalSource()
**/
void setTemporalSource( TemporalSource source );
private:

TemporalSource mSource = TemporalSource::Layer;

};

#endif // QGSMAPLAYERTEMPORALPROPERTIES_H

0 comments on commit 54d608c

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