Skip to content
Permalink
Browse files
Sipify and indentation
  • Loading branch information
rduivenvoorde authored and nyalldawson committed Sep 8, 2021
1 parent 47bf9e3 commit 9b1894cf46be6594cd9959e649e4e2c5d0f412fa
@@ -74,6 +74,12 @@ The ``enabled`` argument specifies whether the temporal properties are initially
ModeRedrawLayerOnly,
};

enum LimitMode
{
ModeIncludeBeginExcludeEnd,
ModeIncludeBeginIncludeEnd,
};

TemporalMode mode() const;
%Docstring
Returns the temporal properties mode.
@@ -86,6 +92,20 @@ Returns the temporal properties mode.
Sets the temporal properties ``mode``.

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

LimitMode limitMode() const;
%Docstring
Returns the temporal limit mode (to include or exclude begin/end limits).

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

void setLimitMode( LimitMode mode );
%Docstring
Sets the temporal ``limit`` mode (to include or exclude begin/end limits).

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

virtual QgsTemporalProperty::Flags flags() const;
@@ -450,11 +450,11 @@ QString QgsVectorLayerTemporalProperties::createFilterString( QgsVectorLayerTemp
QgsDateTimeRange filter;
if ( limitMode() == QgsVectorLayerTemporalProperties::ModeIncludeBeginIncludeEnd )
{
filter = QgsDateTimeRange(filterRange.begin(), filterRange.end(), true, true);
filter = QgsDateTimeRange( filterRange.begin(), filterRange.end(), true, true );
}
else
{
filter = QgsDateTimeRange(filterRange.begin(), filterRange.end(), true, false); // default is include begin, exclude end of filter
filter = QgsDateTimeRange( filterRange.begin(), filterRange.end(), true, false ); // default is include begin, exclude end of filter
}

switch ( mMode )
@@ -101,8 +101,8 @@ class CORE_EXPORT QgsVectorLayerTemporalProperties : public QgsMapLayerTemporalP
*/
enum LimitMode
{
ModeIncludeBeginExcludeEnd = 0, //!< Default mode: include the Begin limit, but exclude the End limit
ModeIncludeBeginIncludeEnd, //!< Mode to include both limits of the filtering timeframe
ModeIncludeBeginExcludeEnd = 0, //!< Default mode: include the Begin limit, but exclude the End limit
ModeIncludeBeginIncludeEnd, //!< Mode to include both limits of the filtering timeframe
};

/**
@@ -107,7 +107,7 @@ void QgsVectorLayerTemporalPropertiesWidget::saveTemporalProperties()

properties->setIsActive( mTemporalGroupBox->isChecked() );
properties->setMode( static_cast< QgsVectorLayerTemporalProperties::TemporalMode >( mModeComboBox->currentData().toInt() ) );
properties->setLimitMode(static_cast< QgsVectorLayerTemporalProperties::LimitMode >( mLimitsComboBox->currentData().toInt() ));
properties->setLimitMode( static_cast< QgsVectorLayerTemporalProperties::LimitMode >( mLimitsComboBox->currentData().toInt() ) );

const QgsDateTimeRange normalRange = QgsDateTimeRange( mStartTemporalDateTimeEdit->dateTime(),
mEndTemporalDateTimeEdit->dateTime() );

0 comments on commit 9b1894c

Please sign in to comment.