34 mExtraWidgetLayout =
new QVBoxLayout();
35 mExtraWidgetLayout->setContentsMargins( 0, 0, 0, 0 );
36 mExtraWidgetLayout->addStretch();
37 mExtraWidgetContainer->setLayout( mExtraWidgetLayout );
39 connect( mModeFixedRangeRadio, &QRadioButton::toggled, mFixedTimeRangeFrame, &QWidget::setEnabled );
41 connect( mTemporalGroupBox, &QGroupBox::toggled,
this, &QgsRasterLayerTemporalPropertiesWidget::temporalGroupBoxChecked );
42 connect( mModeRedrawLayer, &QRadioButton::toggled, mLabelRedrawLayer, &QWidget::setEnabled );
44 mStartTemporalDateTimeEdit->setDisplayFormat( QStringLiteral(
"yyyy-MM-dd HH:mm:ss" ) );
45 mEndTemporalDateTimeEdit->setDisplayFormat( QStringLiteral(
"yyyy-MM-dd HH:mm:ss" ) );
49 mModeAutomaticRadio->setEnabled(
false );
50 mModeAutomaticRadio->setChecked(
false );
51 mModeFixedRangeRadio->setChecked(
true );
64 mEndTemporalDateTimeEdit->dateTime() );
66 if ( mModeAutomaticRadio->isChecked() )
68 else if ( mModeFixedRangeRadio->isChecked() )
70 else if ( mModeRedrawLayer->isChecked() )
83 switch ( temporalProperties->
mode() )
86 mModeAutomaticRadio->setChecked(
true );
89 mModeFixedRangeRadio->setChecked(
true );
92 mModeRedrawLayer->setChecked(
true );
99 mTemporalGroupBox->setChecked( temporalProperties->
isActive() );
101 mLabelRedrawLayer->setEnabled( mModeRedrawLayer->isChecked() );
105 widget->syncToLayer( mLayer );
111 mExtraWidgets << widget;
112 mExtraWidgetLayout->insertWidget( mExtraWidgetLayout->count() - 1, widget );
115void QgsRasterLayerTemporalPropertiesWidget::temporalGroupBoxChecked(
bool checked )
119 widget->emit dynamicTemporalControlToggled( checked );
@ RedrawLayerOnly
Redraw the layer when temporal range changes, but don't apply any filtering. Useful when raster symbo...
@ TemporalRangeFromDataProvider
Mode when raster layer delegates temporal range handling to the dataprovider.
@ FixedTemporalRange
Mode when temporal properties have fixed start and end datetimes.
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.
Qgis::RasterTemporalMode mode() const
Returns the temporal properties mode.
void setMode(Qgis::RasterTemporalMode mode)
Sets 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.
T begin() const
Returns the beginning of the range.
T end() const
Returns the upper bound of the range.
QgsTemporalRange< QDateTime > QgsDateTimeRange
QgsRange which stores a range of date times.