Skip to content

Commit

Permalink
apply #2791
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@13921 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Jul 17, 2010
1 parent d69a5c2 commit a299f69
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 2 deletions.
3 changes: 3 additions & 0 deletions python/gui/qgisinterface.sip
Original file line number Diff line number Diff line change
Expand Up @@ -266,5 +266,8 @@ class QgisInterface : QObject
@note added in version 1.4*/
void composerWillBeRemoved( QgsComposerView* v );

/**This signal is emitted when QGIS' initialization is complete
@note added in version 1.6*/
void initializationCompleted();
};

3 changes: 3 additions & 0 deletions src/app/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -774,5 +774,8 @@ int main( int argc, char *argv[] )

mypSplash->finish( qgis );
delete mypSplash;

qgis->completeInitialization();

return myApp.exec();
}
5 changes: 5 additions & 0 deletions src/app/qgisapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6843,3 +6843,8 @@ void QgisApp::namUpdate()
QgsNetworkAccessManager::instance()->setProxy( proxy );
#endif
}

void QgisApp::completeInitialization()
{
emit initializationCompleted();
}
8 changes: 8 additions & 0 deletions src/app/qgisapp.h
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,10 @@ class QgisApp : public QMainWindow
void skipNextContextMenuEvent();
#endif

//! emit initializationCompleted signal
//! @note added in 1.6
void completeInitialization();

public slots:
//! Zoom to full extent
void zoomFull();
Expand Down Expand Up @@ -752,6 +756,10 @@ class QgisApp : public QMainWindow
@note added in version 1.4*/
void composerWillBeRemoved( QgsComposerView* v );

/**This signal is emitted when QGIS' initialization is complete
@note added in version 1.6*/
void initializationCompleted();

private:
/** This method will open a dialog so the user can select the sublayers
* to load
Expand Down
8 changes: 6 additions & 2 deletions src/app/qgisappinterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,12 @@ QgisAppInterface::QgisAppInterface( QgisApp * _qgis )
this, SIGNAL( currentLayerChanged( QgsMapLayer * ) ) );
connect( qgis, SIGNAL( currentThemeChanged( QString ) ),
this, SIGNAL( currentThemeChanged( QString ) ) );
connect( qgis, SIGNAL( composerAdded( QgsComposerView* ) ), this, SIGNAL( composerAdded( QgsComposerView* ) ) );
connect( qgis, SIGNAL( composerWillBeRemoved( QgsComposerView* ) ), this, SIGNAL( composerWillBeRemoved( QgsComposerView* ) ) );
connect( qgis, SIGNAL( composerAdded( QgsComposerView* ) ),
this, SIGNAL( composerAdded( QgsComposerView* ) ) );
connect( qgis, SIGNAL( composerWillBeRemoved( QgsComposerView* ) ),
this, SIGNAL( composerWillBeRemoved( QgsComposerView* ) ) );
connect( qgis, SIGNAL( initializationCompleted() ),
this, SIGNAL( initializationCompleted() ) );
}

QgisAppInterface::~QgisAppInterface()
Expand Down
3 changes: 3 additions & 0 deletions src/gui/qgisinterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,9 @@ class GUI_EXPORT QgisInterface : public QObject
/**This signal is emitted before a new composer instance is going to be removed
@note added in version 1.4*/
void composerWillBeRemoved( QgsComposerView* v );
/**This signal is emitted when the initialization is complete
@note added in version 1.6*/
void initializationCompleted();
};

// FIXME: also in core/qgis.h
Expand Down

0 comments on commit a299f69

Please sign in to comment.