Skip to content

Commit 0f41da3

Browse files
committed
move all raster related plugins to the Raster menu (adresses #4395)
1 parent 02555ad commit 0f41da3

File tree

4 files changed

+21
-19
lines changed

4 files changed

+21
-19
lines changed

src/plugins/georeferencer/qgsgeorefplugin.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ void QgsGeorefPlugin::initGui()
108108
connect( mQGisIface, SIGNAL( currentThemeChanged( QString ) ), this, SLOT( setCurrentTheme( QString ) ) );
109109

110110
// Add to the toolbar & menu
111-
mQGisIface->addToolBarIcon( mActionRunGeoref );
112-
mQGisIface->addPluginToMenu( tr( "&Georeferencer" ), mActionRunGeoref );
113-
mQGisIface->addPluginToMenu( tr( "&Georeferencer" ), mActionAbout );
111+
mQGisIface->addRasterToolBarIcon( mActionRunGeoref );
112+
mQGisIface->addPluginToRasterMenu( tr( "&Georeferencer" ), mActionRunGeoref );
113+
mQGisIface->addPluginToRasterMenu( tr( "&Georeferencer" ), mActionAbout );
114114
}
115115

116116
// Slot called when the buffer menu item is triggered
@@ -126,9 +126,9 @@ void QgsGeorefPlugin::run()
126126
void QgsGeorefPlugin::unload()
127127
{
128128
// remove the GUI
129-
mQGisIface->removePluginMenu( tr( "&Georeferencer" ), mActionAbout );
130-
mQGisIface->removePluginMenu( tr( "&Georeferencer" ), mActionRunGeoref );
131-
mQGisIface->removeToolBarIcon( mActionRunGeoref );
129+
mQGisIface->removePluginRasterMenu( tr( "&Georeferencer" ), mActionAbout );
130+
mQGisIface->removePluginRasterMenu( tr( "&Georeferencer" ), mActionRunGeoref );
131+
mQGisIface->removeRasterToolBarIcon( mActionRunGeoref );
132132

133133
delete mActionRunGeoref;
134134
delete mActionAbout;

src/plugins/interpolation/qgsinterpolationplugin.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,17 @@ void QgsInterpolationPlugin::initGui()
4444
mInterpolationAction = new QAction( QIcon(), tr( "&Interpolation" ), 0 );
4545
setCurrentTheme( "" );
4646
QObject::connect( mInterpolationAction, SIGNAL( triggered() ), this, SLOT( showInterpolationDialog() ) );
47-
mIface->addToolBarIcon( mInterpolationAction );
48-
mIface->addPluginToMenu( tr( "&Interpolation" ), mInterpolationAction );
47+
mIface->addRasterToolBarIcon( mInterpolationAction );
48+
mIface->addPluginToRasterMenu( tr( "&Interpolation" ), mInterpolationAction );
4949
// this is called when the icon theme is changed
5050
connect( mIface, SIGNAL( currentThemeChanged( QString ) ), this, SLOT( setCurrentTheme( QString ) ) );
5151
}
5252
}
5353

5454
void QgsInterpolationPlugin::unload()
5555
{
56-
mIface->removePluginMenu( tr( "&Interpolation" ), mInterpolationAction );
57-
mIface->removeToolBarIcon( mInterpolationAction );
56+
mIface->removePluginRasterMenu( tr( "&Interpolation" ), mInterpolationAction );
57+
mIface->removeRasterToolBarIcon( mInterpolationAction );
5858
delete mInterpolationAction;
5959
}
6060

src/plugins/raster_terrain_analysis/qgsrasterterrainanalysisplugin.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,19 +49,19 @@ void QgsRasterTerrainAnalysisPlugin::initGui()
4949
//create Action
5050
if ( mIface )
5151
{
52-
mAction = new QAction( QIcon( ":/raster/raster_terrain_icon.png" ), tr( "&Raster based terrain analysis..." ), 0 );
52+
mAction = new QAction( QIcon( ":/raster/raster_terrain_icon.png" ), tr( "&Raster based terrain analysis" ), 0 );
5353
QObject::connect( mAction, SIGNAL( triggered() ), this, SLOT( run() ) );
54-
mIface->addToolBarIcon( mAction );
55-
mIface->addPluginToMenu( tr( "&Raster based terrain analysis..." ), mAction );
54+
mIface->addRasterToolBarIcon( mAction );
55+
mIface->addPluginToRasterMenu( tr( "&Raster based terrain analysis" ), mAction );
5656
}
5757
}
5858

5959
void QgsRasterTerrainAnalysisPlugin::unload()
6060
{
6161
if ( mIface )
6262
{
63-
mIface->removePluginMenu( tr( "&Raster based terrain analysis..." ), mAction );
64-
mIface ->removeToolBarIcon( mAction );
63+
mIface->removePluginRasterMenu( tr( "&Raster based terrain analysis" ), mAction );
64+
mIface ->removeRasterToolBarIcon( mAction );
6565
delete mAction;
6666
}
6767
}

src/plugins/zonal_statistics/qgszonalstatisticsplugin.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,17 @@ QgsZonalStatisticsPlugin::~QgsZonalStatisticsPlugin()
3939

4040
void QgsZonalStatisticsPlugin::initGui()
4141
{
42-
mAction = new QAction( tr( "&Zonal statistics..." ), 0 );
42+
mAction = new QAction( tr( "&Zonal statistics" ), 0 );
4343
QObject::connect( mAction, SIGNAL( triggered() ), this, SLOT( run() ) );
44-
mIface->addToolBarIcon( mAction );
45-
mIface->addPluginToMenu( tr( "&Zonal statistics..." ), mAction );
44+
mIface->addRasterToolBarIcon( mAction );
45+
mIface->addPluginToRasterMenu( tr( "&Zonal statistics" ), mAction );
4646
}
4747

4848
void QgsZonalStatisticsPlugin::unload()
4949
{
50-
50+
mIface->removeRasterToolBarIcon( mAction );
51+
mIface->removePluginRasterMenu( tr( "&Zonal statistics" ), mAction );
52+
delete mAction;
5153
}
5254

5355
void QgsZonalStatisticsPlugin::run()

0 commit comments

Comments
 (0)