mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Added new project and project read signals to the qgis interface (#3160).
Contributed by Alexander Bruy - thanks! git-svn-id: http://svn.osgeo.org/qgis/trunk@14452 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
519f120602
commit
1fbf5eeac1
@ -277,5 +277,26 @@ class QgisInterface : QObject
|
||||
/**This signal is emitted when QGIS' initialization is complete
|
||||
@note added in version 1.6*/
|
||||
void initializationCompleted();
|
||||
|
||||
/** emitted when a project file is successfully read
|
||||
@note
|
||||
This is useful for plug-ins that store properties with project files. A
|
||||
plug-in can connect to this signal. When it is emitted, the plug-in
|
||||
knows to then check the project properties for any relevant state.
|
||||
|
||||
Added in v1.6
|
||||
*/
|
||||
void projectRead();
|
||||
/** emitted when starting an entirely new project
|
||||
@note
|
||||
This is similar to projectRead(); plug-ins might want to be notified
|
||||
that they're in a new project. Yes, projectRead() could have been
|
||||
overloaded to be used in the case of new projects instead. However,
|
||||
it's probably more semantically correct to have an entirely separate
|
||||
signal for when this happens.
|
||||
|
||||
Added in v1.6
|
||||
*/
|
||||
void newProjectCreated();
|
||||
};
|
||||
|
||||
|
@ -52,6 +52,10 @@ QgisAppInterface::QgisAppInterface( QgisApp * _qgis )
|
||||
this, SIGNAL( composerWillBeRemoved( QgsComposerView* ) ) );
|
||||
connect( qgis, SIGNAL( initializationCompleted() ),
|
||||
this, SIGNAL( initializationCompleted() ) );
|
||||
connect( qgis, SIGNAL( newProject() ),
|
||||
this, SIGNAL( newProjectCreated() ) );
|
||||
connect( qgis, SIGNAL( projectRead() ),
|
||||
this, SIGNAL( projectRead() ) );
|
||||
}
|
||||
|
||||
QgisAppInterface::~QgisAppInterface()
|
||||
|
@ -322,6 +322,27 @@ class GUI_EXPORT QgisInterface : public QObject
|
||||
/**This signal is emitted when the initialization is complete
|
||||
@note added in version 1.6*/
|
||||
void initializationCompleted();
|
||||
/** emitted when a project file is successfully read
|
||||
@note
|
||||
This is useful for plug-ins that store properties with project files. A
|
||||
plug-in can connect to this signal. When it is emitted, the plug-in
|
||||
knows to then check the project properties for any relevant state.
|
||||
|
||||
Added in v1.6
|
||||
*/
|
||||
void projectRead();
|
||||
/** emitted when starting an entirely new project
|
||||
@note
|
||||
This is similar to projectRead(); plug-ins might want to be notified
|
||||
that they're in a new project. Yes, projectRead() could have been
|
||||
overloaded to be used in the case of new projects instead. However,
|
||||
it's probably more semantically correct to have an entirely separate
|
||||
signal for when this happens.
|
||||
|
||||
Added in v1.6
|
||||
*/
|
||||
void newProjectCreated();
|
||||
|
||||
};
|
||||
|
||||
// FIXME: also in core/qgis.h
|
||||
|
Loading…
x
Reference in New Issue
Block a user