28 connect( mModeComboBox, qOverload< int >( &QComboBox::currentIndexChanged ),
this, &QgsMapLayerRefreshSettingsWidget::updateHelp );
40 mLayer->setAutoRefreshInterval(
static_cast< int >( mRefreshLayerIntervalSpinBox->value() * 1000.0 ) );
41 if ( !mEnabledGroupBox->isChecked() )
56 switch ( mLayer->autoRefreshMode() )
59 mEnabledGroupBox->setChecked(
false );
64 mEnabledGroupBox->setChecked(
true );
65 mModeComboBox->setCurrentIndex( mModeComboBox->findData( QVariant::fromValue( mLayer->autoRefreshMode() ) ) );
69 mRefreshLayerIntervalSpinBox->setValue( mLayer->autoRefreshInterval() / 1000.0 );
73void QgsMapLayerRefreshSettingsWidget::updateHelp()
83 title = tr(
"The layer will be completely refreshed." );
84 help = tr(
"Any cached data will be discarded and refetched from the provider. This mode may result in slower map refreshes." );
88 title = tr(
"The layer will be redrawn only." );
89 help = tr(
"This mode is useful for animation or when the layer's style will be updated at regular intervals. Canvas updates are deferred in order to avoid refreshing multiple times if more than one layer has an auto update interval set." );
93 mHelpLabel->setText( QStringLiteral(
"<b>%1</b><p>%2" ).arg( title, help ) );
AutoRefreshMode
Map layer automatic refresh modes.
@ RedrawOnly
Redraw current data only.
@ ReloadData
Reload data (and draw the new data)
@ Disabled
Automatic refreshing is disabled.
Base class for all map layer types.