QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
Go to the documentation of this file.
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() );
@ ModeTemporalRangeFromDataProvider
Mode when raster layer delegates temporal range handling to the dataprovider.
Implementation of map layer temporal properties for raster layers.
@ ModeFixedTemporalRange
Mode when temporal properties have fixed start and end datetimes.
bool isActive() const
Returns true if the temporal property is active.
void setFixedTemporalRange(const QgsDateTimeRange &range)
Sets a temporal range to apply to the whole layer.
QgsRasterDataProviderTemporalCapabilities * temporalCapabilities() override
Returns the provider's temporal capabilities.
QgsMapLayerTemporalProperties * temporalProperties() override
Returns the layer's temporal properties.
QgsRasterDataProvider * dataProvider() override
Returns the source data provider.
TemporalMode mode() const
Returns the temporal properties mode.
Represents a raster layer.
void setIsActive(bool active)
Sets whether the temporal property is active.
void setMode(TemporalMode mode)
Sets the temporal properties mode.
const QgsDateTimeRange & fixedTemporalRange() const
Returns the fixed temporal range for the layer.
bool hasTemporalCapabilities() const
Returns true if the provider has temporal capabilities available.