Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[temporal] Update the identify tool to take temporal range context in…
…to account
- Loading branch information
Showing
9 changed files
with
290 additions
and
57 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/qgsidentifycontext.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ | ||
|
||
|
||
|
||
class QgsIdentifyContext | ||
{ | ||
%Docstring | ||
Identify contexts are used to encapsulate the settings to be used to perform | ||
an identify action. | ||
|
||
.. versionadded:: 3.16.1 | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include "qgsidentifycontext.h" | ||
%End | ||
public: | ||
|
||
QgsIdentifyContext(); | ||
%Docstring | ||
Constructor for QgsIdentifyContext | ||
%End | ||
|
||
void setTemporalRange( const QgsDateTimeRange &range ); | ||
%Docstring | ||
Set datetime ``range`` to be used with the identify action. | ||
|
||
.. seealso:: :py:func:`temporalRange` | ||
|
||
.. seealso:: :py:func:`isTemporal` | ||
%End | ||
|
||
const QgsDateTimeRange &temporalRange() const; | ||
%Docstring | ||
Returns the datetime range to be used with the identify action. | ||
|
||
.. seealso:: :py:func:`setTemporalRange` | ||
|
||
.. seealso:: :py:func:`isTemporal` | ||
%End | ||
|
||
bool isTemporal() const; | ||
%Docstring | ||
Returns ``True`` if the temporal range setting is enabled. | ||
%End | ||
|
||
}; | ||
|
||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/qgsidentifycontext.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/*************************************************************************** | ||
qgsidentifycontext.cpp | ||
---------------------- | ||
Date : November 2020 | ||
Copyright : (C) 2020 by Mathieu Pellerin | ||
Email : nirvn dot asia 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 "qgsidentifycontext.h" | ||
|
||
|
||
void QgsIdentifyContext::setTemporalRange( const QgsDateTimeRange &range ) | ||
{ | ||
mTemporalRange = range; | ||
} | ||
|
||
const QgsDateTimeRange &QgsIdentifyContext::temporalRange() const | ||
{ | ||
return mTemporalRange; | ||
} | ||
|
||
bool QgsIdentifyContext::isTemporal() const | ||
{ | ||
return mTemporalRange.begin().isValid() || mTemporalRange.end().isValid(); | ||
} |
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,65 @@ | ||
/*************************************************************************** | ||
qgsidentifycontext.h | ||
-------------------- | ||
Date : November 2020 | ||
Copyright : (C) 2020 by Mathieu Pellerin | ||
Email : nirvn dot asia 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 QGSIDENTIFYCONTEXT_H | ||
#define QGSIDENTIFYCONTEXT_H | ||
|
||
#include "qgis_core.h" | ||
#include "qgis_sip.h" | ||
|
||
#include "qgsrange.h" | ||
|
||
/** | ||
* \ingroup core | ||
* \class QgsIdentifyContext | ||
* \brief Identify contexts are used to encapsulate the settings to be used to perform | ||
* an identify action. | ||
* | ||
* \since QGIS 3.16.1 | ||
*/ | ||
class CORE_EXPORT QgsIdentifyContext | ||
{ | ||
public: | ||
|
||
//! Constructor for QgsIdentifyContext | ||
QgsIdentifyContext() = default; | ||
|
||
/** | ||
* Set datetime \a range to be used with the identify action. | ||
* | ||
* \see temporalRange() | ||
* \see isTemporal() | ||
*/ | ||
void setTemporalRange( const QgsDateTimeRange &range ); | ||
|
||
/** | ||
* Returns the datetime range to be used with the identify action. | ||
* | ||
* \see setTemporalRange() | ||
* \see isTemporal() | ||
*/ | ||
const QgsDateTimeRange &temporalRange() const; | ||
|
||
/** | ||
* Returns TRUE if the temporal range setting is enabled. | ||
*/ | ||
bool isTemporal() const; | ||
|
||
private: | ||
|
||
QgsDateTimeRange mTemporalRange; | ||
|
||
}; | ||
|
||
#endif // QGSEXPRESSIONCONTEXT_H |
Oops, something went wrong.