Add sip casting for QgsTemporalNavigationObject

This commit is contained in:
Nyall Dawson 2020-09-02 13:59:07 +10:00
parent 76f856f2c2
commit ac79bfabf1
2 changed files with 34 additions and 1 deletions

View File

@ -10,6 +10,10 @@
%ModuleHeaderCode
#include <qgstemporalnavigationobject.h>
%End
class QgsTemporalController : QObject
{
%Docstring
@ -21,6 +25,16 @@ updates of the objects temporal range.
%TypeHeaderCode
#include "qgstemporalcontroller.h"
%End
%ConvertToSubClassCode
if ( qobject_cast<QgsTemporalNavigationObject *>( sipCpp ) )
{
sipType = sipType_QgsTemporalNavigationObject;
}
else
{
sipType = 0;
}
%End
public:

View File

@ -23,6 +23,13 @@
#include "qgsrange.h"
#include <QObject>
#ifdef SIP_RUN
% ModuleHeaderCode
#include <qgstemporalnavigationobject.h>
% End
#endif
/**
* \class QgsTemporalController
* \ingroup core
@ -31,11 +38,23 @@
*
* \since QGIS 3.14
*/
class CORE_EXPORT QgsTemporalController : public QObject
{
Q_OBJECT
#ifdef SIP_RUN
SIP_CONVERT_TO_SUBCLASS_CODE
if ( qobject_cast<QgsTemporalNavigationObject *>( sipCpp ) )
{
sipType = sipType_QgsTemporalNavigationObject;
}
else
{
sipType = 0;
}
SIP_END
#endif
public:
/**