Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Add shell for QgsVectorDataTemporalCapabilities
Just an API placeholder
- Loading branch information
1 parent
a82c5d0
commit 0a2560a
Showing
10 changed files
with
195 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
python/core/auto_generated/qgsvectordataprovidertemporalcapabilities.sip.in
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/qgsvectordataprovidertemporalcapabilities.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ | ||
|
||
|
||
|
||
|
||
class QgsVectorDataProviderTemporalCapabilities : QgsDataProviderTemporalCapabilities | ||
{ | ||
%Docstring | ||
Implementation of data provider temporal properties for QgsVectorDataProviders. | ||
|
||
Data provider temporal capabilities reflect the temporal capabilities of a QgsDataProvider. | ||
Unlike QgsMapLayerTemporalProperties, these settings are not user-configurable, | ||
and should only be set by the QgsDataProvider itself. | ||
|
||
.. versionadded:: 3.14 | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include "qgsvectordataprovidertemporalcapabilities.h" | ||
%End | ||
public: | ||
|
||
QgsVectorDataProviderTemporalCapabilities( bool enabled = false ); | ||
%Docstring | ||
Constructor for QgsVectorDataProviderTemporalCapabilities. | ||
|
||
The ``enabled`` argument specifies whether the data provider has temporal capabilities. | ||
%End | ||
|
||
void setAvailableTemporalRange( const QgsDateTimeRange &range ); | ||
%Docstring | ||
Sets the datetime ``range`` extent from which temporal data is available from the provider. | ||
|
||
.. seealso:: :py:func:`availableTemporalRange` | ||
%End | ||
|
||
const QgsDateTimeRange &availableTemporalRange() const; | ||
%Docstring | ||
Returns the datetime range extent from which temporal data is available from the provider. | ||
|
||
.. seealso:: :py:func:`setAvailableTemporalRange` | ||
%End | ||
|
||
}; | ||
|
||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/qgsvectordataprovidertemporalcapabilities.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/*************************************************************************** | ||
qgsvectordataprovidertemporalcapabilities.cpp | ||
--------------- | ||
begin : March 2020 | ||
copyright : (C) 2020 by Nyall Dawson | ||
email : nyall dot dawson at gmail dot com | ||
***************************************************************************/ | ||
|
||
/*************************************************************************** | ||
* * | ||
* This program is free software; you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation; either version 2 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
***************************************************************************/ | ||
|
||
#include "qgsvectordataprovidertemporalcapabilities.h" | ||
|
||
QgsVectorDataProviderTemporalCapabilities::QgsVectorDataProviderTemporalCapabilities( bool enabled ) | ||
: QgsDataProviderTemporalCapabilities( enabled ) | ||
{ | ||
} | ||
|
||
void QgsVectorDataProviderTemporalCapabilities::setAvailableTemporalRange( const QgsDateTimeRange &dateTimeRange ) | ||
{ | ||
if ( !hasTemporalCapabilities() ) | ||
setHasTemporalCapabilities( true ); | ||
|
||
mAvailableTemporalRange = dateTimeRange; | ||
} | ||
|
||
const QgsDateTimeRange &QgsVectorDataProviderTemporalCapabilities::availableTemporalRange() const | ||
{ | ||
return mAvailableTemporalRange; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
/*************************************************************************** | ||
qgsvectordataprovidertemporalcapabilities.h | ||
--------------- | ||
begin : March 2020 | ||
copyright : (C) 2020 by Nyall Dawson | ||
email : nyall dot dawson at gmail dot com | ||
***************************************************************************/ | ||
|
||
/*************************************************************************** | ||
* * | ||
* This program is free software; you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation; either version 2 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
***************************************************************************/ | ||
|
||
#ifndef QGSVECTORDATAPROVIDERTEMPORALCAPABILITIES_H | ||
#define QGSVECTORDATAPROVIDERTEMPORALCAPABILITIES_H | ||
|
||
#include "qgis_core.h" | ||
#include "qgis_sip.h" | ||
#include "qgsrange.h" | ||
#include "qgsdataprovidertemporalcapabilities.h" | ||
|
||
/** | ||
* \class QgsVectorDataProviderTemporalCapabilities | ||
* \ingroup core | ||
* Implementation of data provider temporal properties for QgsVectorDataProviders. | ||
* | ||
* Data provider temporal capabilities reflect the temporal capabilities of a QgsDataProvider. | ||
* Unlike QgsMapLayerTemporalProperties, these settings are not user-configurable, | ||
* and should only be set by the QgsDataProvider itself. | ||
* | ||
* \since QGIS 3.14 | ||
*/ | ||
class CORE_EXPORT QgsVectorDataProviderTemporalCapabilities : public QgsDataProviderTemporalCapabilities | ||
{ | ||
public: | ||
|
||
/** | ||
* Constructor for QgsVectorDataProviderTemporalCapabilities. | ||
* | ||
* The \a enabled argument specifies whether the data provider has temporal capabilities. | ||
*/ | ||
QgsVectorDataProviderTemporalCapabilities( bool enabled = false ); | ||
|
||
/** | ||
* Sets the datetime \a range extent from which temporal data is available from the provider. | ||
* | ||
* \see availableTemporalRange() | ||
*/ | ||
void setAvailableTemporalRange( const QgsDateTimeRange &range ); | ||
|
||
/** | ||
* Returns the datetime range extent from which temporal data is available from the provider. | ||
* | ||
* \see setAvailableTemporalRange() | ||
*/ | ||
const QgsDateTimeRange &availableTemporalRange() const; | ||
|
||
private: | ||
|
||
/** | ||
* Represents available data provider datetime range. | ||
* | ||
* This is for determining the providers lower and upper datetime bounds, | ||
* any updates on the mRange should get out the range bound defined | ||
* by this member. | ||
* | ||
*/ | ||
QgsDateTimeRange mAvailableTemporalRange; | ||
|
||
}; | ||
|
||
#endif // QGSVECTORDATAPROVIDERTEMPORALCAPABILITIES_H |