Skip to content
Permalink
Browse files

fixed conflicts

  • Loading branch information
Samweli authored and nyalldawson committed Feb 16, 2020
1 parent 6352d68 commit 1cbb8e76b642967d8d8b10a0cafb0acb9344f786
@@ -32,11 +32,7 @@
#include "qgsexpressioncontext.h"
#include "qgsmaplayer.h"
#include "qgsgeometry.h"
<<<<<<< HEAD
#include "qgstemporalrangeobject.h"
=======
#include "temporal/qgsabstracttemporal.h"
>>>>>>> de9992479d... updates on tests and abstract temporal class

class QPainter;

@@ -87,11 +83,7 @@ class CORE_EXPORT QgsLabelBlockingRegion
*
* \since QGIS 2.4
*/
<<<<<<< HEAD
class CORE_EXPORT QgsMapSettings : public QgsTemporalRangeObject
=======
class CORE_EXPORT QgsMapSettings : public QgsAbstractTemporal
>>>>>>> de9992479d... updates on tests and abstract temporal class
{
public:
QgsMapSettings();
@@ -34,11 +34,7 @@
#include "qgscoordinatetransformcontext.h"
#include "qgspathresolver.h"
#include "qgssymbollayerreference.h"
<<<<<<< HEAD
#include "qgstemporalrangeobject.h"
=======
#include "temporal/qgsabstracttemporal.h"
>>>>>>> de9992479d... updates on tests and abstract temporal class

class QPainter;
class QgsAbstractGeometry;
@@ -56,12 +52,8 @@ class QgsMaskIdProvider;
* The context of a rendering operation defines properties such as
* the conversion ratio between screen and map units, the extents
* to be rendered etc.
**/
<<<<<<< HEAD
*/
class CORE_EXPORT QgsRenderContext : public QgsTemporalRangeObject
=======
class CORE_EXPORT QgsRenderContext : public QgsAbstractTemporal
>>>>>>> de9992479d... updates on tests and abstract temporal class
{
public:
QgsRenderContext();
@@ -19,87 +19,10 @@
#include "qgstemporalproperty.h"

QgsTemporalProperty::QgsTemporalProperty( bool enabled )
: mActive( enabled )
: mActive( enabled )
{
}

QgsTemporalProperty::QgsTemporalProperty( const QgsDateTimeRange dateTimeRange, bool enabled )
: mDateTimeRange( dateTimeRange )
, mActive( enabled )
{
}

QgsTemporalProperty::QgsTemporalProperty( const QDateTime dateTime, bool enabled )
: mDateTime( dateTime )
, mActive( enabled )
{
}

QgsTemporalProperty::QgsTemporalProperty( const QDate date, bool enabled )
: mDate( date )
, mActive( enabled )
{
}

QgsTemporalProperty::QgsTemporalProperty( const QString date, bool enabled )
:mActive ( enabled )
{
// parseDate( date );
}

QgsTemporalProperty::QgsTemporalProperty( const QgsTemporalProperty &temporalProperty )
{
mDateTimeRange = temporalProperty.mDateTimeRange;
mDateTime = temporalProperty.mDateTime;
mDate = temporalProperty.mDate;
}

bool QgsTemporalProperty::equal(const QgsTemporalProperty &otherTemporalProperty ) const
{
return mDateTimeRange == otherTemporalProperty.mDateTimeRange
&& mDateTime == otherTemporalProperty.mDateTime
&& mDate == otherTemporalProperty.mDate;
}

void QgsTemporalProperty::setTemporalRange( const QgsDateTimeRange &dateTimeRange )
{
if ( dateTimeRange == mDateTimeRange )
return;

mDateTimeRange = dateTimeRange;
}

const QgsDateTimeRange &QgsTemporalProperty::temporalRange() const
{
return mDateTimeRange;
}

void QgsTemporalProperty::setTemporalDateTimeInstant( const QDateTime &dateTime )
{
if ( dateTime == mDateTime )
return;

mDateTime = dateTime;
}

const QDateTime &QgsTemporalProperty::temporalDateTimeInstant() const
{
return mDateTime;
}

void QgsTemporalProperty::setTemporalDateInstant( const QDate &date )
{
if ( date == mDate )
return;

mDate = date;
}

const QDate &QgsTemporalProperty::temporalDateInstant() const
{
return mDate;
}

void QgsTemporalProperty::setIsActive( bool enabled )
{
mActive = enabled;
@@ -109,14 +32,3 @@ bool QgsTemporalProperty::isActive() const
{
return mActive;
}

void parseDate()
{
// For single value

// QDateTime dateTime = QDateTime::fromString( date, "YYYY-MM-DDTHH:MM:SS");

// For list values

// For interval values
}
@@ -39,81 +39,10 @@ class CORE_EXPORT QgsTemporalProperty
/**
* Constructor for QgsTemporalProperty.
*/
QgsTemporalProperty( bool enabled = true );

/**
* Creates temporal property with the specified temporal state.
*/
QgsTemporalProperty( const QgsDateTimeRange dateTimeRange, bool enabled = true );

/**
* Initialize the temporal property with datetime instant.
*/
QgsTemporalProperty( const QDateTime dateTime, bool enabled = true );

/**
* Initialize the temporal property with date instant.
*/
QgsTemporalProperty( const QDate date, bool enabled = true );

/**
* Initialize temporal property with ISO 8601 date string
*
* This will support initializing WMS-T layers with right temporal property range
*
*
*/
QgsTemporalProperty( const QString date, bool enabled = true );
QgsTemporalProperty( bool enabled = false );

virtual ~QgsTemporalProperty() = default;

/**
* Compare temporal property objects
*/
bool equal(const QgsTemporalProperty &temporalProperty ) const;

/**
* Set datetime range for the temporal property.
*
* \see temporalRange()
*/
void setTemporalRange( const QgsDateTimeRange &dateTimeRange );

/**
* Returns datetime range for the temporal property.
*
* \see setTemporalRange()
*/
const QgsDateTimeRange &temporalRange() const;

/**
* Set datetime for the temporal property.
*
* \see temporalDateTimeInstant()
*/
void setTemporalDateTimeInstant( const QDateTime &dateTime );

/**
* Returns datetime instant for the temporal property.
*
* \see setTemporalDateTimeInstant()
*/
const QDateTime& temporalDateTimeInstant() const;

/**
* Set date for the temporal property.
*
* \see temporalDateInstant()
*/
void setTemporalDateInstant( const QDate &date );

/**
* Returns date instant for the temporal property.
*
* \see setTemporalDateInstant()
*/
const QDate& temporalDateInstant() const;

/**
* Sets temporal property status.
*
@@ -123,45 +52,13 @@ class CORE_EXPORT QgsTemporalProperty

/**
* Returns true temporal property status.
* \see setIsActive()
*/
bool isActive() const;

/**
* Sets temporal property status.
*
* \see isActive()
*/
void setIsActive( bool enabled );

/**
* Returns true temporal property status.
* \see setIsActive()
*/
bool isActive() const;

private:

/**
* Parse the given string date into one of either date instant or range.
*
*/
void parseDate( QString date );


//! \brief Represents datetime range member.
QgsDateTimeRange mDateTimeRange;

//! \brief Datetime instant
QDateTime mDateTime;

//! \brief Date instant
QDate mDate;

//! \brief Stores temporal status
bool mActive = false;

//! \brief Stores temporal status
bool mActive = false;

};
@@ -522,6 +522,9 @@ void QgsRasterDataProvider::copyBaseSettings( const QgsRasterDataProvider &other
mTemporalProperties->setTemporalRange( other.mTemporalProperties->temporalRange() );
mTemporalProperties->setFixedTemporalRange( other.mTemporalProperties->fixedTemporalRange() );
mTemporalProperties->setEnableTime( other.mTemporalProperties->isTimeEnabled() );
mTemporalProperties->setHasReference( other.mTemporalProperties->hasReference() );
mTemporalProperties->setReferenceTemporalRange( other.mTemporalProperties->referenceTemporalRange() );
mTemporalProperties->setFixedReferenceTemporalRange( other.mTemporalProperties->fixedReferenceTemporalRange() );
}

// ENDS

0 comments on commit 1cbb8e7

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