Skip to content

Commit a299f69

Browse files
author
jef
committed
apply #2791
git-svn-id: http://svn.osgeo.org/qgis/trunk@13921 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent d69a5c2 commit a299f69

File tree

6 files changed

+28
-2
lines changed

6 files changed

+28
-2
lines changed

python/gui/qgisinterface.sip

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,5 +266,8 @@ class QgisInterface : QObject
266266
@note added in version 1.4*/
267267
void composerWillBeRemoved( QgsComposerView* v );
268268

269+
/**This signal is emitted when QGIS' initialization is complete
270+
@note added in version 1.6*/
271+
void initializationCompleted();
269272
};
270273

src/app/main.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -774,5 +774,8 @@ int main( int argc, char *argv[] )
774774

775775
mypSplash->finish( qgis );
776776
delete mypSplash;
777+
778+
qgis->completeInitialization();
779+
777780
return myApp.exec();
778781
}

src/app/qgisapp.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6843,3 +6843,8 @@ void QgisApp::namUpdate()
68436843
QgsNetworkAccessManager::instance()->setProxy( proxy );
68446844
#endif
68456845
}
6846+
6847+
void QgisApp::completeInitialization()
6848+
{
6849+
emit initializationCompleted();
6850+
}

src/app/qgisapp.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,10 @@ class QgisApp : public QMainWindow
364364
void skipNextContextMenuEvent();
365365
#endif
366366

367+
//! emit initializationCompleted signal
368+
//! @note added in 1.6
369+
void completeInitialization();
370+
367371
public slots:
368372
//! Zoom to full extent
369373
void zoomFull();
@@ -752,6 +756,10 @@ class QgisApp : public QMainWindow
752756
@note added in version 1.4*/
753757
void composerWillBeRemoved( QgsComposerView* v );
754758

759+
/**This signal is emitted when QGIS' initialization is complete
760+
@note added in version 1.6*/
761+
void initializationCompleted();
762+
755763
private:
756764
/** This method will open a dialog so the user can select the sublayers
757765
* to load

src/app/qgisappinterface.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,12 @@ QgisAppInterface::QgisAppInterface( QgisApp * _qgis )
3939
this, SIGNAL( currentLayerChanged( QgsMapLayer * ) ) );
4040
connect( qgis, SIGNAL( currentThemeChanged( QString ) ),
4141
this, SIGNAL( currentThemeChanged( QString ) ) );
42-
connect( qgis, SIGNAL( composerAdded( QgsComposerView* ) ), this, SIGNAL( composerAdded( QgsComposerView* ) ) );
43-
connect( qgis, SIGNAL( composerWillBeRemoved( QgsComposerView* ) ), this, SIGNAL( composerWillBeRemoved( QgsComposerView* ) ) );
42+
connect( qgis, SIGNAL( composerAdded( QgsComposerView* ) ),
43+
this, SIGNAL( composerAdded( QgsComposerView* ) ) );
44+
connect( qgis, SIGNAL( composerWillBeRemoved( QgsComposerView* ) ),
45+
this, SIGNAL( composerWillBeRemoved( QgsComposerView* ) ) );
46+
connect( qgis, SIGNAL( initializationCompleted() ),
47+
this, SIGNAL( initializationCompleted() ) );
4448
}
4549

4650
QgisAppInterface::~QgisAppInterface()

src/gui/qgisinterface.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,9 @@ class GUI_EXPORT QgisInterface : public QObject
309309
/**This signal is emitted before a new composer instance is going to be removed
310310
@note added in version 1.4*/
311311
void composerWillBeRemoved( QgsComposerView* v );
312+
/**This signal is emitted when the initialization is complete
313+
@note added in version 1.6*/
314+
void initializationCompleted();
312315
};
313316

314317
// FIXME: also in core/qgis.h

0 commit comments

Comments
 (0)