33 connect( mModeFixedRangeRadio, &QRadioButton::toggled, mFixedTimeRangeFrame, &QWidget::setEnabled );
35 mStartTemporalDateTimeEdit->setDisplayFormat(
"yyyy-MM-dd HH:mm:ss" );
36 mEndTemporalDateTimeEdit->setDisplayFormat(
"yyyy-MM-dd HH:mm:ss" );
40 mModeAutomaticRadio->setEnabled(
false );
41 mModeAutomaticRadio->setChecked(
false );
42 mModeFixedRangeRadio->setChecked(
true );
54 QgsDateTimeRange normalRange = QgsDateTimeRange( mStartTemporalDateTimeEdit->dateTime(),
55 mEndTemporalDateTimeEdit->dateTime() );
57 if ( mModeAutomaticRadio->isChecked() )
59 else if ( mModeFixedRangeRadio->isChecked() )
67 switch ( temporalProperties->
mode() )
70 mModeAutomaticRadio->setChecked(
true );
73 mModeFixedRangeRadio->setChecked(
true );
77 mStartTemporalDateTimeEdit->setDateTime( temporalProperties->
fixedTemporalRange().begin() );
78 mEndTemporalDateTimeEdit->setDateTime( temporalProperties->
fixedTemporalRange().end() );
80 mTemporalGroupBox->setChecked( temporalProperties->
isActive() );
bool hasTemporalCapabilities() const
Returns true if the provider has temporal capabilities available.
QgsRasterDataProviderTemporalCapabilities * temporalCapabilities() override
Returns the provider's temporal capabilities.
Implementation of map layer temporal properties for raster layers.
void setMode(TemporalMode mode)
Sets the temporal properties mode.
@ ModeFixedTemporalRange
Mode when temporal properties have fixed start and end datetimes.
@ ModeTemporalRangeFromDataProvider
Mode when raster layer delegates temporal range handling to the dataprovider.
TemporalMode mode() const
Returns the temporal properties mode.
void setFixedTemporalRange(const QgsDateTimeRange &range)
Sets a temporal range to apply to the whole layer.
const QgsDateTimeRange & fixedTemporalRange() const
Returns the fixed temporal range for the layer.
Represents a raster layer.
QgsMapLayerTemporalProperties * temporalProperties() override
Returns the layer's temporal properties.
QgsRasterDataProvider * dataProvider() override
Returns the source data provider.
bool isActive() const
Returns true if the temporal property is active.
void setIsActive(bool active)
Sets whether the temporal property is active.