Skip to content
Permalink
Browse files

formatted wms provider code

  • Loading branch information
Samweli authored and nyalldawson committed Mar 6, 2020
1 parent c119ea5 commit d446c0a22368e960e8180244fdfdd6d0f38548ff
@@ -9,6 +9,7 @@




class QgsRasterDataProviderTemporalCapabilities : QgsDataProviderTemporalCapabilities
{
%Docstring
@@ -111,6 +112,10 @@ Intended to be used by the provider in fetching data.
void setEnableTime( bool enabled );
%Docstring
Sets the time enabled status.
This enables whether time part in the temporal range should be
used when updated the temporal range of these capabilities.

This is useful in some temporal layers who use dates only.

.. seealso:: :py:func:`isTimeEnabled`
%End
@@ -134,6 +139,20 @@ Sets the usage status of the reference range.
Returns the enabled status of the reference range.

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

void setDateTimes( QList<QDateTime> dateTimes );
%Docstring
Sets the list of available datetimes.

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

const QList<QDateTime> dateTimes() const;
%Docstring
Returns the list of the available datetimes.

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

};
@@ -196,6 +196,7 @@
%Include auto_generated/qgstablewidgetitem.sip
%Include auto_generated/qgstabwidget.sip
%Include auto_generated/qgstaskmanagerwidget.sip
%Include auto_generated/qgstemporalvcrdockwidget.sip
%Include auto_generated/qgstextformatwidget.sip
%Include auto_generated/qgstextpreview.sip
%Include auto_generated/qgstreewidgetitem.sip
@@ -26,6 +26,8 @@
/**
* \class QgsTemporalController
* \ingroup core
* A controller base class for temporal objects, contains a signal for notifying
* updates of the objects temporal range.
*
* \since QGIS 3.14
*/
@@ -45,6 +47,11 @@ class CORE_EXPORT QgsTemporalController : public QObject
virtual ~QgsTemporalController() = default;

signals:

/**
* Signals that a temporal \a range has changed and need to be updated to
* the related objects.
*/
void updateTemporalRange( const QgsDateTimeRange &range );

};
@@ -56,7 +56,7 @@ class CORE_EXPORT QgsTemporalNavigationObject : public QgsTemporalController
enum Mode
{
NearestPreviousProduct, //! Get the nearest previous data if the requested one is not available
Snapshot, //! Return the layer data whic match exactly the datetime value in the request
Snapshot, //! Return the layer data which match exactly the datetime value in the request
Composite //! Get the range of datetimes, using the specified time steps
};

@@ -160,7 +160,7 @@ class CORE_EXPORT QgsRasterDataProviderTemporalCapabilities : public QgsDataProv
/**
* Returns the list of the available datetimes.
*
* \see setDateTime()
* \see setDateTimes()
*/
const QList<QDateTime> dateTimes() const;

@@ -157,6 +157,7 @@ QgsWmsProvider::QgsWmsProvider( QString const &uri, const ProviderOptions &optio
Q_ASSERT_X( temporalCapabilities(), "QgsWmsProvider::QgsWmsProvider()", "Data provider temporal capabilities object does not exist" );
temporalCapabilities()->setHasTemporalCapabilities( true );
temporalCapabilities()->setFixedTemporalRange( mSettings.mFixedRange );

temporalCapabilities()->setDateTimes( mSettings.mDateTimes );
if ( mSettings.mIsBiTemporal )
{
@@ -162,4 +162,3 @@ ADD_QGIS_TEST(relationreferencewidget testqgsrelationreferencewidget.cpp)
ADD_QGIS_TEST(featurelistcombobox testqgsfeaturelistcombobox.cpp)
ADD_QGIS_TEST(texteditwrapper testqgstexteditwrapper.cpp)
ADD_QGIS_TEST(tableeditorwidget testqgstableeditor.cpp)
ADD_QGIS_TEST(temporalvcrdockwidget testqgstemporalvcrdockwidget.cpp)

0 comments on commit d446c0a

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