Skip to content
Permalink
Browse files

update, using one layer tree view indicator for temporal layers

  • Loading branch information
Samweli authored and nyalldawson committed Mar 7, 2020
1 parent 2f0eb95 commit 86a336ca197eb37f4ed58e40c71b51e79f7988f4
@@ -235,7 +235,6 @@ Q_GUI_EXPORT extern int qt_defaultDpiX();
#include "qgslayertreeviewbadlayerindicator.h"
#include "qgslayertreeviewnonremovableindicator.h"
#include "qgslayertreeviewnocrsindicator.h"
#include "qgslayertreeviewprojecttimeindicator.h"
#include "qgslayertreeviewtemporalindicator.h"
#include "qgslayout.h"
#include "qgslayoutatlas.h"
@@ -4503,7 +4502,6 @@ void QgisApp::initLayerTreeView()
new QgsLayerTreeViewFilterIndicatorProvider( mLayerTreeView ); // gets parented to the layer view
new QgsLayerTreeViewEmbeddedIndicatorProvider( mLayerTreeView ); // gets parented to the layer view
new QgsLayerTreeViewMemoryIndicatorProvider( mLayerTreeView ); // gets parented to the layer view
new QgsLayerTreeViewProjectTimeIndicatorProvider( mLayerTreeView ); // gets parented to the layer view
new QgsLayerTreeViewTemporalIndicatorProvider( mLayerTreeView ); // gets parented to the layer view
new QgsLayerTreeViewNoCrsIndicatorProvider( mLayerTreeView ); // gets parented to the layer view
QgsLayerTreeViewBadLayerIndicatorProvider *badLayerIndicatorProvider = new QgsLayerTreeViewBadLayerIndicatorProvider( mLayerTreeView ); // gets parented to the layer view

This file was deleted.

This file was deleted.

@@ -53,22 +53,26 @@ bool QgsLayerTreeViewTemporalIndicatorProvider::acceptLayer( QgsMapLayer *layer
{
if ( !layer )
return false;
if ( layer->temporalProperties() &&
layer->temporalProperties()->temporalSource() ==
QgsMapLayerTemporalProperties::TemporalSource::Layer )
if ( layer->temporalProperties() )
return true;
return false;
}

QString QgsLayerTreeViewTemporalIndicatorProvider::iconName( QgsMapLayer *layer )
{
Q_UNUSED( layer );
if ( layer->temporalProperties()->temporalSource() ==
QgsMapLayerTemporalProperties::TemporalSource::Project )
return QStringLiteral( "/mIndicatorTimeFromProject.svg" );

return QStringLiteral( "/mIndicatorTemporal.svg" );
}

QString QgsLayerTreeViewTemporalIndicatorProvider::tooltipText( QgsMapLayer *layer )
{
Q_UNUSED( layer );
if ( layer->temporalProperties()->temporalSource() ==
QgsMapLayerTemporalProperties::TemporalSource::Project )
return tr( "<b>Temporal layer using Project time </b>" );

return tr( "<b>Temporal layer</b>" );
}

0 comments on commit 86a336c

Please sign in to comment.
You can’t perform that action at this time.