mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
The interface class now allows QgisApp access via app().
This was necessary to allow plug-ins to connect() to various QgisApp slots and signals. Since this somewhat short-circuits the need for the QgisInterface classes, this might indicate the need for design refactoring. git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@2267 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
d8c9b8b997
commit
79aba2e52d
@ -133,3 +133,10 @@ QgsMapLayerRegistry * QgisIface::getLayerRegistry()
|
||||
{
|
||||
return qgis->getLayerRegistry();
|
||||
}
|
||||
|
||||
|
||||
QgisApp *
|
||||
QgisIface::app()
|
||||
{
|
||||
return qgis;
|
||||
} // QgisIface::app()
|
||||
|
@ -85,6 +85,21 @@ class QgisIface : public QgisInterface{
|
||||
QgsMapCanvas * getMapCanvas();
|
||||
/** Return a pointer to the map layer registry */
|
||||
QgsMapLayerRegistry * getLayerRegistry();
|
||||
|
||||
|
||||
/** Gives access to main QgisApp object
|
||||
|
||||
Even though this class is supposed to act as a Facade for the
|
||||
QgisApp, the plug-ins need direct access to the application object
|
||||
for their connect() calls.
|
||||
|
||||
@todo XXX this may call into question the current need for this
|
||||
interface? Maybe these connect() calls can be done in some other
|
||||
less intrusive way?
|
||||
|
||||
*/
|
||||
QgisApp * app();
|
||||
|
||||
private:
|
||||
|
||||
/// QgisIface aren't copied
|
||||
|
Loading…
x
Reference in New Issue
Block a user