Skip to content
Permalink
Browse files

initial readProject signal support

  • Loading branch information
mbernasocchi authored and pka committed Dec 9, 2010
1 parent f918105 commit 9da6afca1561e39f9f1c1d9125730a375de0da96
@@ -106,9 +106,12 @@ void GlobePlugin::initGui()
this, SLOT( extentsChanged() ) );
//connect( mQGisIface->mapCanvas(), SIGNAL( layersChanged() ),
// this, SLOT( layersChanged() ) );
connect( mQGisIface->mainWindow(), SIGNAL( projectRead() ), this,
SLOT( projectRead() ) );
connect( mQGisIface->mainWindow(), SIGNAL( newProjectCreated() ), this,
SLOT( newProject() ) );
}


void GlobePlugin::run()
{
#ifdef QGISDEBUG
@@ -159,7 +162,6 @@ void GlobePlugin::run()

void GlobePlugin::settings()
{
mSettingsDialog.readElevationDatasources();
if( mSettingsDialog.exec() )
{
//viewer stereo settings set by mSettingsDialog and stored in QSettings
@@ -252,6 +254,17 @@ void GlobePlugin::setupMap()
#endif
}

void GlobePlugin::projectRead()
{
mSettingsDialog.readElevationDatasources();
}

void GlobePlugin::blankProject()
{//TODO
mSettingsDialog.elevationDatasources()->clearContents();
mSettingsDialog.elevationDatasources()->setRowCount(0);
}

struct PanControlHandler : public NavigationControlHandler
{
PanControlHandler( osgEarthUtil::EarthManipulator* manip, double dx, double dy ) : _manip( manip ), _dx( dx ), _dy( dy ) { }
@@ -57,6 +57,7 @@ class GlobePlugin : public QObject, public QgisPlugin
//! show the help document
void help();


//! Called when the main canvas is about to be rendered
void renderStarting();
//! Called when the main canvas has rendered.
@@ -68,6 +69,9 @@ class GlobePlugin : public QObject, public QgisPlugin
//! Sync globe extent to mapCanavas
void syncExtent();

void projectRead();
void blankProject();

//! Place an OSG model on the globe
void placeNode( osg::Node* node, double lat, double lon, double alt = 0.0 );

@@ -269,6 +269,7 @@ void QgsGlobePluginDialog::setRow(QTableWidget* widget, int row, const QList<QTa

void QgsGlobePluginDialog::readElevationDatasources()
{
//showMessageBox("reading");
// clear the widget
elevationDatasourcesWidget->clearContents();
int keysCount = QgsProject::instance()->subkeyList("Globe-Plugin", "/elevationDatasources/").count();

0 comments on commit 9da6afc

Please sign in to comment.
You can’t perform that action at this time.