19#include "moc_qgsmaplayerrefreshsettingswidget.cpp"
29 connect( mModeComboBox, qOverload< int >( &QComboBox::currentIndexChanged ),
this, &QgsMapLayerRefreshSettingsWidget::updateHelp );
41 mLayer->setAutoRefreshInterval(
static_cast< int >( mRefreshLayerIntervalSpinBox->value() * 1000.0 ) );
42 if ( !mEnabledGroupBox->isChecked() )
57 switch ( mLayer->autoRefreshMode() )
60 mEnabledGroupBox->setChecked(
false );
65 mEnabledGroupBox->setChecked(
true );
66 mModeComboBox->setCurrentIndex( mModeComboBox->findData( QVariant::fromValue( mLayer->autoRefreshMode() ) ) );
70 mRefreshLayerIntervalSpinBox->setValue( mLayer->autoRefreshInterval() / 1000.0 );
74void QgsMapLayerRefreshSettingsWidget::updateHelp()
84 title = tr(
"The layer will be completely refreshed." );
85 help = tr(
"Any cached data will be discarded and refetched from the provider. This mode may result in slower map refreshes." );
89 title = tr(
"The layer will be redrawn only." );
90 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." );
94 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.