Skip to content

Commit 78097a7

Browse files
mbernasocchipka
authored andcommitted
Globe is now visible to other (python as well) plugins. signals from globe can be catched.
1 parent c64de21 commit 78097a7

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/plugins/globe/globe_plugin.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ GlobePlugin::GlobePlugin( QgisInterface* theQgisInterface )
8080
mObjectPlacer( NULL )
8181
{
8282
mIsGlobeRunning = false;
83+
//needed to be "seen" by other plugins by doing
84+
//iface.mainWindow().findChild( QObject, "globePlugin" )
85+
this->setObjectName("globePlugin");
86+
this->setParent(theQgisInterface->mainWindow());
8387
}
8488

8589
//destructor
@@ -198,10 +202,7 @@ void GlobePlugin::initGui()
198202
connect( &mQDockWidget, SIGNAL( globeClosed() ), this,
199203
SLOT( setGlobeNotRunning() ) );
200204
connect( this, SIGNAL( xyCoordinates( const QgsPoint & ) ),
201-
mQGisIface->mainWindow(), SLOT( showMouseCoordinate( const QgsPoint & ) ) );
202-
// connect( this, SIGNAL( xyCoordinates( const QgsPoint & ) ),
203-
// this, SLOT( showSelectedCoordinates() ) );
204-
205+
mQGisIface->mapCanvas(), SIGNAL( xyCoordinates( const QgsPoint & ) ) );
205206
}
206207

207208
void GlobePlugin::run()

0 commit comments

Comments
 (0)