Skip to content
Permalink
Browse files

Dox, header cleanups

  • Loading branch information
nyalldawson committed Mar 11, 2020
1 parent d0aa808 commit f7e5347a3aba404c3d9599cb1711f316b6acf408
@@ -16,7 +16,7 @@ class QgsMapLayerTemporalProperties : QgsTemporalProperty
%Docstring
Base class for storage of map layer temporal properties.

QgsMapLayerTemporalProperties expose user-configurable settings for controlling
QgsMapLayerTemporalProperties exposes user-configurable settings for controlling
how an individual QgsMapLayer behaves in a temporal context, e.g. while animating a map object.

.. versionadded:: 3.14
@@ -27,15 +27,13 @@ how an individual QgsMapLayer behaves in a temporal context, e.g. while animatin
%End
public:

QgsMapLayerTemporalProperties( QObject *parent, bool enabled = false );
QgsMapLayerTemporalProperties( QObject *parent /TransferThis/, bool enabled = false );
%Docstring
Constructor for QgsMapLayerTemporalProperties.
Constructor for QgsMapLayerTemporalProperties, with the specified ``parent`` object.

The ``enabled`` argument specifies whether the temporal properties are initially enabled or not (see isActive()).
%End

~QgsMapLayerTemporalProperties();

virtual QDomElement writeXml( QDomElement &element, QDomDocument &doc, const QgsReadWriteContext &context ) = 0;
%Docstring
Writes the properties to a DOM ``element``, to be used later with readXml().
@@ -603,8 +603,8 @@ relating to how a QgsProject should be viewed and behave inside a map canvas

QgsProjectTimeSettings *timeSettings();
%Docstring
Returns the project's time settings, contains temporal range, which can
be used in constraining temporal properties from temporal layers in the project.
Returns the project's time settings, which contains the project's temporal range and other
time based settings.

.. versionadded:: 3.14
%End
@@ -13,7 +13,7 @@ class QgsProjectTimeSettings : QObject
{
%Docstring
Contains temporal settings and properties for the project,
this will be used in animating/showing temporal layers.
this may be used when animating maps or showing temporal layers.

.. versionadded:: 3.14
%End
@@ -23,7 +23,7 @@ this will be used in animating/showing temporal layers.
%End
public:

QgsProjectTimeSettings( QObject *parent = 0 );
QgsProjectTimeSettings( QObject *parent /TransferThis/ = 0 );
%Docstring
Constructor for QgsProjectTimeSettings with the specified ``parent`` object.
%End
@@ -35,21 +35,39 @@ Resets the settings to a default state.

QgsDateTimeRange temporalRange() const;
%Docstring
Returns the project temporal range.
Returns the project's temporal range, which indicates the earliest
and latest datetime ranges associated with the project.

.. note::

This is a manual, use-set property, and does not necessarily
coincide with the earliest and latest temporal ranges set for
individual layers in the project.

.. seealso:: :py:func:`setTemporalRange`

.. seealso:: :py:func:`temporalRangeChanged`
%End

void setTemporalRange( const QgsDateTimeRange &extent );
void setTemporalRange( const QgsDateTimeRange &range );
%Docstring
Sets the project temporal range
Sets the project's temporal ``range``, which indicates the earliest
and latest datetime ranges associated with the project.

.. note::

This is a manual, use-set property, and does not necessarily
coincide with the earliest and latest temporal ranges set for
individual layers in the project.

.. seealso:: :py:func:`temporalRange`

.. seealso:: :py:func:`temporalRangeChanged`
%End

bool readXml( const QDomElement &element, const QgsReadWriteContext &context );
%Docstring
Reads the settings's state from a DOM element.
Reads the settings's state from a DOM ``element``.

.. seealso:: :py:func:`writeXml`
%End
@@ -61,17 +79,17 @@ Returns a DOM element representing the settings.
.. seealso:: :py:func:`readXml`
%End


signals:

void temporalRangeChanged();
%Docstring
Emitted when temporal range changes.
Emitted when the temporal range changes.

.. seealso:: :py:func:`temporalRange`

.. seealso:: :py:func:`setTemporalRange`
%End

};


@@ -25,9 +25,9 @@ Base class for temporal property.
%End
public:

QgsTemporalProperty( QObject *parent = 0, bool enabled = false );
QgsTemporalProperty( QObject *parent /TransferThis/ = 0, bool enabled = false );
%Docstring
Constructor for QgsTemporalProperty.
Constructor for QgsTemporalProperty, with the specified ``parent`` object.

The ``active`` argument specifies whether the property is initially active (see isActive()).
%End
@@ -23,15 +23,13 @@ Implementation of map layer temporal properties for raster layers.
%End
public:

QgsRasterLayerTemporalProperties( QObject *parent = 0, bool enabled = false );
QgsRasterLayerTemporalProperties( QObject *parent /TransferThis/ = 0, bool enabled = false );
%Docstring
Constructor for QgsRasterLayerTemporalProperties.
Constructor for QgsRasterLayerTemporalProperties, with the specified ``parent`` object.

The ``enabled`` argument specifies whether the temporal properties are initially enabled or not (see isActive()).
%End

virtual ~QgsRasterLayerTemporalProperties();

enum TemporalMode
{
ModeFixedTemporalRange,
@@ -22,10 +22,6 @@ QgsMapLayerTemporalProperties::QgsMapLayerTemporalProperties( QObject *parent, b
{
}

QgsMapLayerTemporalProperties::~QgsMapLayerTemporalProperties()
{
}

void QgsMapLayerTemporalProperties::setTemporalSource( QgsMapLayerTemporalProperties::TemporalSource source )
{
if ( mSource != source )
@@ -31,7 +31,7 @@
* \ingroup core
* Base class for storage of map layer temporal properties.
*
* QgsMapLayerTemporalProperties expose user-configurable settings for controlling
* QgsMapLayerTemporalProperties exposes user-configurable settings for controlling
* how an individual QgsMapLayer behaves in a temporal context, e.g. while animating a map object.
*
* \since QGIS 3.14
@@ -43,13 +43,11 @@ class CORE_EXPORT QgsMapLayerTemporalProperties : public QgsTemporalProperty
public:

/**
* Constructor for QgsMapLayerTemporalProperties.
* Constructor for QgsMapLayerTemporalProperties, with the specified \a parent object.
*
* The \a enabled argument specifies whether the temporal properties are initially enabled or not (see isActive()).
*/
QgsMapLayerTemporalProperties( QObject *parent, bool enabled = false );

~QgsMapLayerTemporalProperties() override;
QgsMapLayerTemporalProperties( QObject *parent SIP_TRANSFERTHIS, bool enabled = false );

/**
* Writes the properties to a DOM \a element, to be used later with readXml().
@@ -613,17 +613,17 @@ class CORE_EXPORT QgsProject : public QObject, public QgsExpressionContextGenera
QgsProjectViewSettings *viewSettings();

/**
* Returns the project's time settings, contains temporal range, which can
* be used in constraining temporal properties from temporal layers in the project.
* Returns the project's time settings, which contains the project's temporal range and other
* time based settings.
*
* \note not available in Python bindings
* \since QGIS 3.14
*/
const QgsProjectTimeSettings *timeSettings() const SIP_SKIP;

/**
* Returns the project's time settings, contains temporal range, which can
* be used in constraining temporal properties from temporal layers in the project.
* Returns the project's time settings, which contains the project's temporal range and other
* time based settings.
*
* \since QGIS 3.14
*/
@@ -27,7 +27,7 @@ class QDomDocument;

/**
* Contains temporal settings and properties for the project,
* this will be used in animating/showing temporal layers.
* this may be used when animating maps or showing temporal layers.
*
* \ingroup core
* \since QGIS 3.14
@@ -41,29 +41,41 @@ class CORE_EXPORT QgsProjectTimeSettings : public QObject
/**
* Constructor for QgsProjectTimeSettings with the specified \a parent object.
*/
QgsProjectTimeSettings( QObject *parent = nullptr );
QgsProjectTimeSettings( QObject *parent SIP_TRANSFERTHIS = nullptr );

/**
* Resets the settings to a default state.
*/
void reset();

/**
* Returns the project temporal range.
* Returns the project's temporal range, which indicates the earliest
* and latest datetime ranges associated with the project.
*
* \note This is a manual, use-set property, and does not necessarily
* coincide with the earliest and latest temporal ranges set for
* individual layers in the project.
*
* \see setTemporalRange()
* \see temporalRangeChanged()
*/
QgsDateTimeRange temporalRange() const;

/**
* Sets the project temporal range
* Sets the project's temporal \a range, which indicates the earliest
* and latest datetime ranges associated with the project.
*
* \note This is a manual, use-set property, and does not necessarily
* coincide with the earliest and latest temporal ranges set for
* individual layers in the project.
*
* \see temporalRange()
* \see temporalRangeChanged()
*/
void setTemporalRange( const QgsDateTimeRange &extent );
void setTemporalRange( const QgsDateTimeRange &range );

/**
* Reads the settings's state from a DOM element.
* Reads the settings's state from a DOM \a element.
* \see writeXml()
*/
bool readXml( const QDomElement &element, const QgsReadWriteContext &context );
@@ -74,16 +86,16 @@ class CORE_EXPORT QgsProjectTimeSettings : public QObject
*/
QDomElement writeXml( QDomDocument &document, const QgsReadWriteContext &context ) const;


signals:

/**
* Emitted when temporal range changes.
* Emitted when the temporal range changes.
*
* \see temporalRange()
* \see setTemporalRange()
*/
void temporalRangeChanged();

private:

QgsDateTimeRange mRange;
@@ -39,11 +39,11 @@ class CORE_EXPORT QgsTemporalProperty : public QObject
public:

/**
* Constructor for QgsTemporalProperty.
* Constructor for QgsTemporalProperty, with the specified \a parent object.
*
* The \a active argument specifies whether the property is initially active (see isActive()).
*/
QgsTemporalProperty( QObject *parent = nullptr, bool enabled = false );
QgsTemporalProperty( QObject *parent SIP_TRANSFERTHIS = nullptr, bool enabled = false );

/**
* Sets whether the temporal property is \a active.
@@ -38,21 +38,19 @@ class CORE_EXPORT QgsRasterLayerTemporalProperties : public QgsMapLayerTemporalP
public:

/**
* Constructor for QgsRasterLayerTemporalProperties.
* Constructor for QgsRasterLayerTemporalProperties, with the specified \a parent object.
*
* The \a enabled argument specifies whether the temporal properties are initially enabled or not (see isActive()).
*/
QgsRasterLayerTemporalProperties( QObject *parent = nullptr, bool enabled = false );

virtual ~QgsRasterLayerTemporalProperties() = default;
QgsRasterLayerTemporalProperties( QObject *parent SIP_TRANSFERTHIS = nullptr, bool enabled = false );

/**
* Mode of the raster temporal properties
**/
enum TemporalMode
{
ModeFixedTemporalRange = 0, //! Mode when temporal properties have fixed start and end datetimes.
ModeTemporalRangeFromDataProvider = 1, //! Mode when raster layer depends on temporal range from its dataprovider.
ModeFixedTemporalRange = 0, //!< Mode when temporal properties have fixed start and end datetimes.
ModeTemporalRangeFromDataProvider = 1, //!< Mode when raster layer depends on temporal range from its dataprovider.
};

/**
@@ -75,9 +73,9 @@ class CORE_EXPORT QgsRasterLayerTemporalProperties : public QgsMapLayerTemporalP
**/
enum FetchMode
{
Earliest = 0, //! Use the start datetime in the temporal range.
Latest = 1, //! Use the end datetime in the temporal range.
Range = 2 //! Use the datetimes in temporal range as range.
Earliest = 0, //!< Use the start datetime in the temporal range.
Latest = 1, //!< Use the end datetime in the temporal range.
Range = 2 //!< Use the datetimes in temporal range as range.
};

/**

0 comments on commit f7e5347

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