|
16 | 16 | #include "qgsoracle_plugin.h"
|
17 | 17 | #include "qgsselectgeoraster_ui.h"
|
18 | 18 |
|
| 19 | +#include <QMenu> |
| 20 | + |
19 | 21 | static const QString sName = QObject::tr( "Oracle Spatial GeoRaster" );
|
20 | 22 | static const QString sDescription = QObject::tr( "Access Oracle Spatial GeoRaster" );
|
21 | 23 | static const QString sCategory = QObject::tr( "Layers" );
|
@@ -51,17 +53,17 @@ QgsOraclePlugin::~QgsOraclePlugin()
|
51 | 53 | */
|
52 | 54 | void QgsOraclePlugin::initGui()
|
53 | 55 | {
|
54 |
| - |
55 | 56 | // Create the action for tool
|
56 | 57 | mQActionPointer = new QAction( QIcon( ":/oracleplugin/oracleplugin.png" ), tr( "Add Oracle GeoRaster Layer..." ), this );
|
57 | 58 | // Set the what's this text
|
58 | 59 | mQActionPointer->setWhatsThis( tr( "Add a Oracle Spatial GeoRaster..." ) );
|
59 | 60 | // Connect the action to the run
|
60 | 61 | connect( mQActionPointer, SIGNAL( triggered() ), this, SLOT( run() ) );
|
61 |
| - // Add the icon to the toolbar |
62 |
| - mQGisIface->layerToolBar()->addAction( mQActionPointer ); |
63 |
| - mQGisIface->insertAddLayerAction( mQActionPointer ); |
64 | 62 |
|
| 63 | + // Add the icon to the new layers toolbar |
| 64 | + mQGisIface->layerToolBar()->insertAction( mQGisIface->actionAddWmsLayer(), mQActionPointer ); |
| 65 | + // Also add to Layer menu |
| 66 | + mQGisIface->layerMenu()->insertAction( mQGisIface->actionAddWmsLayer(), mQActionPointer ); |
65 | 67 | }
|
66 | 68 | //method defined in interface
|
67 | 69 |
|
|
0 commit comments