Esempio n. 1
0
QgisAppInterface::QgisAppInterface( QgisApp * _qgis )
    : qgis( _qgis )
    , mTimer( nullptr )
    , legendIface( _qgis->layerTreeView() )
    , pluginManagerIface( _qgis->pluginManager() )
{
  // connect signals
  connect( qgis->layerTreeView(), SIGNAL( currentLayerChanged( QgsMapLayer * ) ),
           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( composerRemoved( QgsComposerView* ) ),
           this, SIGNAL( composerRemoved( QgsComposerView* ) ) );
  connect( qgis, SIGNAL( initializationCompleted() ),
           this, SIGNAL( initializationCompleted() ) );
  connect( qgis, SIGNAL( newProject() ),
           this, SIGNAL( newProjectCreated() ) );
  connect( qgis, SIGNAL( projectRead() ),
           this, SIGNAL( projectRead() ) );
  connect( qgis, SIGNAL( layerSavedAs( QgsMapLayer*, QString ) ),
           this, SIGNAL( layerSavedAs( QgsMapLayer*, QString ) ) );
}
Esempio n. 2
0
QgisAppInterface::QgisAppInterface( QgisApp * _qgis )
    : qgis( _qgis ),
    legendIface( _qgis->legend() )
{
  // connect signals
  connect( qgis->legend(), SIGNAL( currentLayerChanged( QgsMapLayer * ) ),
           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( initializationCompleted() ),
           this, SIGNAL( initializationCompleted() ) );
  connect( qgis, SIGNAL( newProject() ),
           this, SIGNAL( newProjectCreated() ) );
  connect( qgis, SIGNAL( projectRead() ),
           this, SIGNAL( projectRead() ) );
}