Skip to content

Commit

Permalink
update, using one layer tree view indicator for temporal layers
Browse files Browse the repository at this point in the history
  • Loading branch information
Samweli authored and nyalldawson committed Mar 10, 2020
1 parent 2f0eb95 commit 86a336c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 150 deletions.
2 changes: 0 additions & 2 deletions src/app/qgisapp.cpp
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down
90 changes: 0 additions & 90 deletions src/app/qgslayertreeviewprojecttimeindicator.cpp

This file was deleted.

53 changes: 0 additions & 53 deletions src/app/qgslayertreeviewprojecttimeindicator.h

This file was deleted.

14 changes: 9 additions & 5 deletions src/app/qgslayertreeviewtemporalindicator.cpp
Expand Up @@ -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>" );
}

Expand Down

0 comments on commit 86a336c

Please sign in to comment.