show loading layer in status bar

This commit is contained in:
Juergen E. Fischer 2013-04-17 23:30:04 +02:00
parent 51e5894b58
commit a56c05ad6a
3 changed files with 8 additions and 0 deletions

View File

@ -1836,6 +1836,8 @@ void QgisApp::setupConnections()
this, SLOT( oldProjectVersionWarning( QString ) ) ); this, SLOT( oldProjectVersionWarning( QString ) ) );
connect( QgsProject::instance(), SIGNAL( layerLoaded( int, int ) ), connect( QgsProject::instance(), SIGNAL( layerLoaded( int, int ) ),
this, SLOT( showProgress( int, int ) ) ); this, SLOT( showProgress( int, int ) ) );
connect( QgsProject::instance(), SIGNAL( loadingLayer( QString ) ),
this, SLOT( showStatusMessage( QString ) ) );
connect( QgsProject::instance(), SIGNAL( readProject( const QDomDocument & ) ), connect( QgsProject::instance(), SIGNAL( readProject( const QDomDocument & ) ),
this, SLOT( readProject( const QDomDocument & ) ) ); this, SLOT( readProject( const QDomDocument & ) ) );
connect( QgsProject::instance(), SIGNAL( writeProject( QDomDocument & ) ), connect( QgsProject::instance(), SIGNAL( writeProject( QDomDocument & ) ),

View File

@ -685,6 +685,10 @@ QPair< bool, QList<QDomNode> > QgsProject::_getMapLayers( QDomDocument const &do
QDomNode node = nl.item( i ); QDomNode node = nl.item( i );
QDomElement element = node.toElement(); QDomElement element = node.toElement();
QString name = node.namedItem( "layername" ).toElement().text();
if( !name.isNull() )
emit loadingLayer( tr( "Loading layer %1" ).arg( name ) );
if ( element.attribute( "embedded" ) == "1" ) if ( element.attribute( "embedded" ) == "1" )
{ {
createEmbeddedLayer( element.attribute( "id" ), readPath( element.attribute( "project" ) ), brokenNodes, vLayerList ); createEmbeddedLayer( element.attribute( "id" ), readPath( element.attribute( "project" ) ), brokenNodes, vLayerList );

View File

@ -348,6 +348,8 @@ class CORE_EXPORT QgsProject : public QObject
// @param n number of layers // @param n number of layers
void layerLoaded( int i, int n ); void layerLoaded( int i, int n );
void loadingLayer( QString );
void snapSettingsChanged(); void snapSettingsChanged();
private: private: