diff --git a/debian/qgis.install b/debian/qgis.install
index 3ee989b7342..3c2521bc80a 100644
--- a/debian/qgis.install
+++ b/debian/qgis.install
@@ -1,7 +1,6 @@
usr/lib/qgis/plugins/libgeorefplugin.so
usr/lib/qgis/plugins/libgpsimporterplugin.so
usr/lib/qgis/plugins/libcoordinatecaptureplugin.so
-usr/lib/qgis/plugins/liboracleplugin.so
usr/lib/qgis/plugins/libevis.so
usr/lib/qgis/plugins/libspatialqueryplugin.so
usr/lib/qgis/plugins/libofflineeditingplugin.so
diff --git a/ms-windows/osgeo4w/package.cmd b/ms-windows/osgeo4w/package.cmd
index 6c28b6ecfee..36c4ee1236a 100644
--- a/ms-windows/osgeo4w/package.cmd
+++ b/ms-windows/osgeo4w/package.cmd
@@ -386,7 +386,6 @@ tar -C %OSGEO4W_ROOT% -cjf %ARCH%/release/qgis/%PACKAGENAME%/%PACKAGENAME%-%VERS
"apps/%PACKAGENAME%/plugins/georefplugin.dll" ^
"apps/%PACKAGENAME%/plugins/gpsimporterplugin.dll" ^
"apps/%PACKAGENAME%/plugins/offlineeditingplugin.dll" ^
- "apps/%PACKAGENAME%/plugins/oracleplugin.dll" ^
"apps/%PACKAGENAME%/plugins/spatialqueryplugin.dll" ^
"apps/%PACKAGENAME%/plugins/topolplugin.dll" ^
"apps/%PACKAGENAME%/plugins/geometrycheckerplugin.dll" ^
diff --git a/ms-windows/plugins.nsh b/ms-windows/plugins.nsh
index 987f02f225a..8b1962db9f9 100644
--- a/ms-windows/plugins.nsh
+++ b/ms-windows/plugins.nsh
@@ -15,7 +15,6 @@ WriteRegStr HKEY_CURRENT_USER "Software\QGIS\QGIS3\Plugins" "globeplugin" "false
WriteRegStr HKEY_CURRENT_USER "Software\QGIS\QGIS3\Plugins" "gpsimporterplugin" "true"
WriteRegStr HKEY_CURRENT_USER "Software\QGIS\QGIS3\Plugins" "grassplugin" "true"
WriteRegStr HKEY_CURRENT_USER "Software\QGIS\QGIS3\Plugins" "offlineeditingplugin" "true"
-WriteRegStr HKEY_CURRENT_USER "Software\QGIS\QGIS3\Plugins" "oracleplugin" "true"
WriteRegStr HKEY_CURRENT_USER "Software\QGIS\QGIS3\Plugins" "spatialqueryplugin" "true"
WriteRegStr HKEY_CURRENT_USER "Software\QGIS\QGIS3\Plugins" "topolplugin" "true"
diff --git a/src/plugins/CMakeLists.txt b/src/plugins/CMakeLists.txt
index 115ba52c414..15a9d864008 100644
--- a/src/plugins/CMakeLists.txt
+++ b/src/plugins/CMakeLists.txt
@@ -6,7 +6,6 @@ ENDIF()
SET (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${QGIS_OUTPUT_DIRECTORY}/${QGIS_PLUGIN_SUBDIR})
SET (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${QGIS_OUTPUT_DIRECTORY}/${QGIS_PLUGIN_SUBDIR})
-ADD_SUBDIRECTORY(oracle_raster)
ADD_SUBDIRECTORY(coordinate_capture)
ADD_SUBDIRECTORY(evis)
ADD_SUBDIRECTORY(spatialquery)
diff --git a/src/plugins/oracle_raster/CMakeLists.txt b/src/plugins/oracle_raster/CMakeLists.txt
deleted file mode 100644
index 6883379ef27..00000000000
--- a/src/plugins/oracle_raster/CMakeLists.txt
+++ /dev/null
@@ -1,57 +0,0 @@
-
-########################################################
-# Files
-
-SET (ORACLE_SRCS
- qgsoracle_plugin.cpp
- qgsselectgeoraster_ui.cpp
- qgsoracleconnect_ui.cpp
-)
-
-SET (ORACLE_UIS
- qgsselectgeorasterbase.ui
- qgsoracleconnectbase.ui
-)
-
-SET (ORACLE_MOC_HDRS
- qgsoracle_plugin.h
- qgsselectgeoraster_ui.h
- qgsoracleconnect_ui.h
-)
-
-SET (ORACLE_RCCS oracleplugin.qrc)
-
-########################################################
-# Build
-
-QT5_WRAP_UI (ORACLE_UIS_H ${ORACLE_UIS})
-
-QT5_WRAP_CPP (ORACLE_MOC_SRCS ${ORACLE_MOC_HDRS})
-
-QT5_ADD_RESOURCES(ORACLE_RCC_SRCS ${ORACLE_RCCS})
-
-ADD_LIBRARY (oracleplugin MODULE ${ORACLE_SRCS} ${ORACLE_MOC_SRCS} ${ORACLE_RCC_SRCS} ${ORACLE_UIS_H})
-
-INCLUDE_DIRECTORIES(
- ${CMAKE_CURRENT_BINARY_DIR}
- ../../core ../../core/geometry ../../core/raster
- ../../gui
- ..
-)
-INCLUDE_DIRECTORIES( SYSTEM
- ${GDAL_INCLUDE_DIR}
-)
-
-TARGET_LINK_LIBRARIES(oracleplugin
- qgis_core
- qgis_gui
-)
-
-
-########################################################
-# Install
-
-INSTALL(TARGETS oracleplugin
- RUNTIME DESTINATION ${QGIS_PLUGIN_DIR}
- LIBRARY DESTINATION ${QGIS_PLUGIN_DIR})
-
diff --git a/src/plugins/oracle_raster/oracleplugin.qrc b/src/plugins/oracle_raster/oracleplugin.qrc
deleted file mode 100644
index a61f639ba62..00000000000
--- a/src/plugins/oracle_raster/oracleplugin.qrc
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
- oracleraster.svg
-
-
diff --git a/src/plugins/oracle_raster/oracleraster.svg b/src/plugins/oracle_raster/oracleraster.svg
deleted file mode 100644
index f470eb5cc19..00000000000
--- a/src/plugins/oracle_raster/oracleraster.svg
+++ /dev/null
@@ -1,377 +0,0 @@
-
-
-
-
diff --git a/src/plugins/oracle_raster/qgsoracle_plugin.cpp b/src/plugins/oracle_raster/qgsoracle_plugin.cpp
deleted file mode 100644
index 05dff2b304a..00000000000
--- a/src/plugins/oracle_raster/qgsoracle_plugin.cpp
+++ /dev/null
@@ -1,170 +0,0 @@
-/***************************************************************************
- oracleplugin.cpp Access Oracle Spatial Plugin
- -------------------
- begin : Oracle Spatial Plugin
- copyright : (C) Ivan Lucena
- email : ivan.lucena@pmldnet.com
- ***************************************************************************
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- ***************************************************************************/
-
-#include "qgsoracle_plugin.h"
-#include "qgsselectgeoraster_ui.h"
-
-#include
-
-static const QString sName = QObject::tr( "Oracle Spatial GeoRaster" );
-static const QString sDescription = QObject::tr( "Access Oracle Spatial GeoRaster" );
-static const QString sCategory = QObject::tr( "Layers" );
-static const QString sPluginVersion = QObject::tr( "Version 0.1" );
-static const QgisPlugin::PLUGINTYPE sPluginType = QgisPlugin::UI;
-static const QString sPluginIcon = QStringLiteral( ":/oracleplugin/oracleraster.svg" );
-
-//////////////////////////////////////////////////////////////////////
-//
-// THE FOLLOWING METHODS ARE MANDATORY FOR ALL PLUGINS
-//
-//////////////////////////////////////////////////////////////////////
-
-/**
- * Constructor for the plugin. The plugin is passed a pointer
- * an interface object that provides access to exposed functions in QGIS.
- * @param theQGisInterface - Pointer to the QGIS interface object
- */
-QgsOraclePlugin::QgsOraclePlugin( QgisInterface * theQgisInterface )
- : QgisPlugin( sName, sDescription, sCategory, sPluginVersion, sPluginType )
- , mQGisIface( theQgisInterface )
- , mQActionPointer( nullptr )
-{
-}
-
-QgsOraclePlugin::~QgsOraclePlugin()
-{
-
-}
-
-/*
- * Initialize the GUI interface for the plugin - this is only called once when the plugin is
- * added to the plugin registry in the QGIS application.
- */
-void QgsOraclePlugin::initGui()
-{
- // Create the action for tool
- mQActionPointer = new QAction( QIcon( ":/oracleplugin/oracleraster.svg" ), tr( "Add Oracle GeoRaster Layer..." ), this );
- mQActionPointer->setObjectName( QStringLiteral( "mQActionPointer" ) );
- // Set the what's this text
- mQActionPointer->setWhatsThis( tr( "Add a Oracle Spatial GeoRaster..." ) );
- // Connect the action to the run
- connect( mQActionPointer, SIGNAL( triggered() ), this, SLOT( run() ) );
-
- // Add the icon to the new layers toolbar
- mQGisIface->layerToolBar()->insertAction( mQGisIface->actionAddWmsLayer(), mQActionPointer );
- // Also add to Layer menu
- mQGisIface->insertAddLayerAction( mQActionPointer );
-}
-//method defined in interface
-
-void QgsOraclePlugin::help()
-{
- //implement me!
-}
-
-// Slot called when the menu item is triggered
-// If you created more menu items / toolbar buttons in initiGui, you should
-// create a separate handler for each action - this single run() method will
-// not be enough
-
-void QgsOraclePlugin::run()
-{
- QgsOracleSelectGeoraster *myPluginGui = new QgsOracleSelectGeoraster( mQGisIface->mainWindow(), mQGisIface, QgisGui::ModalDialogFlags );
- myPluginGui->setAttribute( Qt::WA_DeleteOnClose );
-
- myPluginGui->show();
-}
-
-// Unload the plugin by cleaning up the GUI
-
-void QgsOraclePlugin::unload()
-{
- // remove the GUI
- mQGisIface->layerToolBar()->removeAction( mQActionPointer );
- mQGisIface->removeAddLayerAction( mQActionPointer );
- delete mQActionPointer;
- mQActionPointer = nullptr;
-}
-
-
-//////////////////////////////////////////////////////////////////////////
-//
-//
-// THE FOLLOWING CODE IS AUTOGENERATED BY THE PLUGIN BUILDER SCRIPT
-// YOU WOULD NORMALLY NOT NEED TO MODIFY THIS, AND YOUR PLUGIN
-// MAY NOT WORK PROPERLY IF YOU MODIFY THIS INCORRECTLY
-//
-//
-//////////////////////////////////////////////////////////////////////////
-
-
-/**
- * Required extern functions needed for every plugin
- * These functions can be called prior to creating an instance
- * of the plugin class
- */
-// Class factory to return a new instance of the plugin class
-
-QGISEXTERN QgisPlugin * classFactory( QgisInterface * theQgisInterfacePointer )
-{
- return new QgsOraclePlugin( theQgisInterfacePointer );
-}
-// Return the name of the plugin - note that we do not user class members as
-// the class may not yet be insantiated when this method is called.
-
-QGISEXTERN QString name()
-{
- return sName;
-}
-
-// Return the description
-
-QGISEXTERN QString description()
-{
- return sDescription;
-}
-
-// Return the description
-
-QGISEXTERN QString category()
-{
- return sCategory;
-}
-
-// Return the type (either UI or MapLayer plugin)
-
-QGISEXTERN int type()
-{
- return sPluginType;
-}
-
-// Return the version number for the plugin
-
-QGISEXTERN QString version()
-{
- return sPluginVersion;
-}
-
-QGISEXTERN QString icon()
-{
- return sPluginIcon;
-}
-
-// Delete ourself
-
-QGISEXTERN void unload( QgisPlugin * thePluginPointer )
-{
- delete thePluginPointer;
-}
diff --git a/src/plugins/oracle_raster/qgsoracle_plugin.h b/src/plugins/oracle_raster/qgsoracle_plugin.h
deleted file mode 100644
index 1463a563710..00000000000
--- a/src/plugins/oracle_raster/qgsoracle_plugin.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/***************************************************************************
- oracleplugin.h
- -------------------
- begin : Oracle Spatial Plugin
- copyright : (C) Ivan Lucena
- email : ivan.lucena@pmldnet.com
- ***************************************************************************
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- ***************************************************************************/
-
-#ifndef OraclePlugin_H
-#define OraclePlugin_H
-
-// Qt Includes
-#include
-#include
-#include
-
-// QGIS Includes
-#include
-#include
-#include
-
-class QgsOraclePlugin : public QObject, public QgisPlugin
-{
- Q_OBJECT
-
- public:
-
- /**
- * Constructor for a plugin. The QgisInterface pointer is passed by
- * QGIS when it attempts to instantiate the plugin.
- * @param theInterface Pointer to the QgisInterface object.
- */
- explicit QgsOraclePlugin( QgisInterface * theInterface );
- //! Destructor
- virtual ~QgsOraclePlugin();
-
- public slots:
-
- //! init the gui
- virtual void initGui() override;
- //! Show the dialog box
- void run();
- //! unload the plugin
- void unload() override;
- //! show the help document
- void help();
-
- private:
-
- //! Pointer to the QGIS interface object
- QgisInterface *mQGisIface;
- //!pointer to the qaction for this plugin
- QAction * mQActionPointer;
-
-};
-
-#endif //OraclePlugin_H
diff --git a/src/plugins/oracle_raster/qgsoracleconnect_ui.cpp b/src/plugins/oracle_raster/qgsoracleconnect_ui.cpp
deleted file mode 100644
index e4ae2a8e676..00000000000
--- a/src/plugins/oracle_raster/qgsoracleconnect_ui.cpp
+++ /dev/null
@@ -1,91 +0,0 @@
-/***************************************************************************
- oracleconnectgui.cpp
- -------------------
- begin : Oracle Spatial Plugin
- copyright : (C) Ivan Lucena
- email : ivan.lucena@pmldnet.com
- ***************************************************************************
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- ***************************************************************************/
-
-#include "qgsoracleconnect_ui.h"
-
-// Qt Includes
-#include
-#include
-
-QgsOracleConnect::QgsOracleConnect( QWidget* parent,
- const QString& connName,
- Qt::WindowFlags fl ) : QDialog( parent, fl )
-{
- setupUi( this );
-
- if ( ! connName.isEmpty() )
- {
- // populate the dialog with the information stored for the connection
- // populate the fields with the stored setting parameters
-
- QSettings settings;
-
- QString key = "/Oracle/connections/" + connName;
-
- txtDatabase->setText( settings.value( key + "/database" ).toString() );
- txtUsername->setText( settings.value( key + "/username" ).toString() );
-
- if ( settings.value( key + "/savepass" ).toString() == QLatin1String( "true" ) )
- {
- txtPassword->setText( settings.value( key + "/password" ).toString() );
- chkStorePassword->setChecked( true );
- }
- txtName->setText( connName );
- }
-}
-
-QgsOracleConnect::~QgsOracleConnect()
-{
-}
-
-void QgsOracleConnect::on_buttonBox_rejected()
-{
- // cancel button mapped to context help - changed this to close the
- // dialog instead. If context help is to be added, a Help button
- // is required. - gsherman
- // helpInfo();
- reject();
-}
-
-void QgsOracleConnect::on_buttonBox_accepted()
-{
- saveConnection();
-}
-
-void QgsOracleConnect::saveConnection()
-{
- QSettings settings;
-
- QString baseKey = QStringLiteral( "/Oracle/connections/" );
-
- settings.setValue( baseKey + "selected", txtName->text() );
- baseKey += txtName->text();
- settings.setValue( baseKey + "/database", txtDatabase->text() );
- settings.setValue( baseKey + "/username", txtUsername->text() );
- settings.setValue( baseKey + "/password", txtPassword->text() );
- settings.setValue( baseKey + "/savepass", chkStorePassword->isChecked() ? "true" : "false" );
- settings.setValue( baseKey + "/subdtset", "GEOR:" +
- txtUsername->text() + '/' +
- txtPassword->text() + '@' +
- txtDatabase->text() );
-
- accept();
-}
-
-void QgsOracleConnect::helpInfo()
-{
- // QgsContextHelp::run( context_id );
-}
-
diff --git a/src/plugins/oracle_raster/qgsoracleconnect_ui.h b/src/plugins/oracle_raster/qgsoracleconnect_ui.h
deleted file mode 100644
index c94e6961183..00000000000
--- a/src/plugins/oracle_raster/qgsoracleconnect_ui.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/***************************************************************************
- oracleconnectgui.u
- -------------------
- begin : Oracle Spatial Plugin
- copyright : (C) Ivan Lucena
- email : ivan.lucena@pmldnet.com
- ***************************************************************************
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- ***************************************************************************/
-
-#ifndef QgsOracleConnect_H
-#define QgsOracleConnect_H
-
-// Qt Designer Includes
-#include "ui_qgsoracleconnectbase.h"
-
-// QGIS Includes
-#include
-
-class QgsOracleConnect : public QDialog, private Ui::OracleConnectGuiBase
-{
- Q_OBJECT
-
- public:
- QgsOracleConnect( QWidget* parent = nullptr,
- const QString& connName = QString::null,
- Qt::WindowFlags fl = QgisGui::ModalDialogFlags );
- ~QgsOracleConnect();
-
- private:
- void saveConnection();
- void helpInfo();
-
- public slots:
- void on_buttonBox_accepted();
- void on_buttonBox_rejected();
-};
-
-#endif /* _ORACLECONNECTGUI_H */
diff --git a/src/plugins/oracle_raster/qgsoracleconnectbase.ui b/src/plugins/oracle_raster/qgsoracleconnectbase.ui
deleted file mode 100644
index e1fd799c831..00000000000
--- a/src/plugins/oracle_raster/qgsoracleconnectbase.ui
+++ /dev/null
@@ -1,109 +0,0 @@
-
-
- OracleConnectGuiBase
-
-
-
- 0
- 0
- 318
- 213
-
-
-
- Create Oracle Connection
-
-
-
-
-
-
-
- -
-
-
- Name
-
-
- txtName
-
-
-
- -
-
-
- Name of the new connection
-
-
-
- -
-
-
- Database instance
-
-
- txtDatabase
-
-
-
- -
-
-
- -
-
-
- Username
-
-
- txtUsername
-
-
-
- -
-
-
- -
-
-
- Password
-
-
- txtPassword
-
-
-
- -
-
-
- QLineEdit::Password
-
-
-
- -
-
-
- Save Password
-
-
-
- -
-
-
- QDialogButtonBox::Cancel|QDialogButtonBox::Ok
-
-
-
-
-
-
-
- txtName
- txtDatabase
- txtUsername
- txtPassword
- chkStorePassword
- buttonBox
-
-
-
-
diff --git a/src/plugins/oracle_raster/qgsselectgeoraster_ui.cpp b/src/plugins/oracle_raster/qgsselectgeoraster_ui.cpp
deleted file mode 100644
index 1c6e941385f..00000000000
--- a/src/plugins/oracle_raster/qgsselectgeoraster_ui.cpp
+++ /dev/null
@@ -1,335 +0,0 @@
-/***************************************************************************
- oracleselectgui.cpp
- -------------------
- begin : Oracle Spatial Plugin
- copyright : (C) Ivan Lucena
- email : ivan.lucena@pmldnet.com
- ***************************************************************************
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- ***************************************************************************/
-
-#include "qgsselectgeoraster_ui.h"
-#include "qgsoracleconnect_ui.h"
-
-//GDAL includes
-
-#include "gdal.h"
-#include "ogr_api.h"
-#include "ogrsf_frmts.h"
-#include
-
-#include "qgsvectorlayer.h"
-
-#if defined(GDAL_VERSION_NUM) && GDAL_VERSION_NUM >= 1800
-#define TO8F(x) (x).toUtf8().constData()
-#else
-#define TO8F(x) QFile::encodeName( x ).constData()
-#endif
-
-QgsOracleSelectGeoraster::QgsOracleSelectGeoraster( QWidget* parent,
- QgisInterface* iface,
- Qt::WindowFlags fl )
- : QDialog( parent, fl )
- , mIface( iface )
-{
- setupUi( this );
-
- /*
- * Load the list of connection from the registry
- */
-
- populateConnectionList();
-
- /*
- * Repeat last selected connection
- */
-
- QSettings settings;
- QString selected = settings.value( QStringLiteral( "/Oracle/connections/selected" ) ).toString();
-
- restoreGeometry( settings.value( QStringLiteral( "/Oracle/geometry" ) ).toByteArray() );
-
- cmbConnections->setCurrentIndex( cmbConnections->findText( selected ) );
- if ( selected == cmbConnections->currentText() )
- {
- connectToServer();
- }
-}
-
-QgsOracleSelectGeoraster::~QgsOracleSelectGeoraster()
-{
- QSettings settings;
- settings.setValue( QStringLiteral( "/Oracle/geometry" ), saveGeometry() );
- settings.setValue( QStringLiteral( "/Oracle/connections/selected" ), cmbConnections->currentText() );
-}
-
-void QgsOracleSelectGeoraster::populateConnectionList()
-{
- QSettings settings;
- settings.beginGroup( QStringLiteral( "/Oracle/connections" ) );
- QStringList keys = settings.childGroups();
- QStringList::Iterator it = keys.begin();
-
- /*
- * Fillup the combobox with connection names
- */
-
- cmbConnections->clear();
- while ( it != keys.end() )
- {
- cmbConnections->addItem( *it );
- ++it;
- }
- settings.endGroup();
- setConnectionListPosition();
-
- /*
- * Update the status of several buttons
- */
-
- if ( keys.begin() == keys.end() )
- {
- btnConnect->setEnabled( false );
- btnEdit->setEnabled( false );
- btnDelete->setEnabled( false );
- }
- else
- {
- btnConnect->setEnabled( true );
- btnEdit->setEnabled( true );
- btnDelete->setEnabled( true );
- }
-}
-
-void QgsOracleSelectGeoraster::on_btnNew_clicked()
-{
- QgsOracleConnect *oc = new QgsOracleConnect( this, QStringLiteral( "New Connection" ) );
- if ( oc->exec() )
- {
- populateConnectionList();
- }
-}
-
-void QgsOracleSelectGeoraster::on_btnEdit_clicked()
-{
- QgsOracleConnect *oc = new QgsOracleConnect( this, cmbConnections->currentText() );
- if ( oc->exec() )
- {
- populateConnectionList();
- }
-}
-
-void QgsOracleSelectGeoraster::on_btnDelete_clicked()
-{
- QSettings settings;
- QString key = "/Oracle/connections/" + cmbConnections->currentText();
- QString msg = tr( "Are you sure you want to remove the %1 connection and all associated settings?" )
- .arg( cmbConnections->currentText() );
- QMessageBox::StandardButton result = QMessageBox::information( this,
- tr( "Confirm Delete" ),
- msg,
- QMessageBox::Ok | QMessageBox::Cancel );
- if ( result == QMessageBox::Ok )
- {
- settings.remove( key + "/database" );
- settings.remove( key + "/username" );
- settings.remove( key + "/password" );
- settings.remove( key + "/savepass" );
- settings.remove( key + "/subdtset" );
- settings.remove( key );
- cmbConnections->removeItem( cmbConnections->currentIndex() );
- setConnectionListPosition();
- lineEdit->setText( QLatin1String( "" ) );
- listWidget->clear();
- }
-}
-
-void QgsOracleSelectGeoraster::connectToServer()
-{
- if ( cmbConnections->currentText().isEmpty() )
- return;
-
- QSettings settings;
- QString key = "/Oracle/connections/" + cmbConnections->currentText();
- QString username = settings.value( key + "/username" ).toString();
- QString savepass = settings.value( key + "/savepass" ).toString();
- QString database = settings.value( key + "/database" ).toString();
- QString subdtset = settings.value( key + "/subdtset" ).toString();
- bool makeConnection = true;
- if ( savepass == QLatin1String( "false" ) )
- {
- makeConnection = false;
- ( void )QInputDialog::getText( this,
- tr( "Password for %1/@%2" ).arg( username, database ),
- tr( "Please enter your password:" ),
- QLineEdit::Password,
- QString::null,
- &makeConnection );
- }
- if ( makeConnection )
- {
- settings.setValue( QStringLiteral( "/Oracle/connections/selected" ),
- cmbConnections->currentText() );
- showSelection( subdtset );
- lineEdit->setText( subdtset );
- }
-}
-
-void QgsOracleSelectGeoraster::showSelection( const QString & line )
-{
- QString identification = line;
-
- GDALDatasetH hDS = nullptr;
- GDALAccess eAccess = GA_ReadOnly;
-
- /*
- * Set access mode
- */
-
- if ( checkBox->checkState() == Qt::Checked )
- {
- eAccess = GA_Update;
- }
-
- /*
- * Try to open georaster dataset
- */
-
- hDS = GDALOpenShared( TO8F( identification ), eAccess );
-
- buttonBox->button( QDialogButtonBox::Ok )->setEnabled( false );
- if ( !hDS )
- {
- QMessageBox::information( this,
- tr( "Open failed" ),
- tr( "The connection to %1 failed. Please verify your connection parameters. Make sure you have the GDAL GeoRaster plugin installed." )
- .arg( identification ) );
- return;
- }
- buttonBox->button( QDialogButtonBox::Ok )->setEnabled( true );
-
- /*
- * Get subdataset list
- */
-
- char **papszMetadata = nullptr;
- papszMetadata = GDALGetMetadata( hDS, "SUBDATASETS" );
- int nSubDatasets = CSLCount( papszMetadata );
-
- /*
- * Add GeoRaster Layer
- */
-
- if ( ! nSubDatasets )
- {
- mIface->addRasterLayer( identification );
- GDALClose( hDS );
- return;
- }
-
- /*
- * Save subdataset
- */
-
- QSettings settings;
- settings.setValue( "/Oracle/connections/" +
- cmbConnections->currentText() + "/subdtset", identification );
-
- /*
- * List subdatasets
- */
-
- QStringList fields = identification.split( ',' );
- QString count = QString::number( nSubDatasets / 2 );
-
- QString plural = QStringLiteral( "s" );
-
- if ( count == QLatin1String( "1" ) )
- {
- plural = QLatin1String( "" );
- }
-
- if ( fields.size() < 4 )
- {
- labelStatus->setText( QStringLiteral( "%1 GeoRaster table%2" )
- .arg( count, plural ) );
- checkBox->setEnabled( false );
- }
- else if ( fields.size() == 4 )
- {
- labelStatus->setText( QStringLiteral( "%1 GeoRaster column%2 on table %3" )
- .arg( count, plural, fields[3] ) );
- checkBox->setEnabled( false );
- }
- else if ( fields.size() == 5 )
- {
- labelStatus->setText( QStringLiteral( "%1 GeoRaster object%2 on table %3 column %4" )
- .arg( count, plural, fields[3], fields[4] ) );
- checkBox->setEnabled( true );
- }
- else
- {
- labelStatus->setText( QStringLiteral( "%1 GeoRaster object%2 on table %3 column %4 where %5" )
- .arg( count, plural, fields[3], fields[4], fields[5] ) );
- checkBox->setEnabled( true );
- }
-
- /*
- * Populate selection list based on subdataset names
- */
-
- listWidget->clear();
- QListWidgetItem *textItem;
-
- for ( int i = 0; i < nSubDatasets; i += 2 )
- {
- QString metadata = papszMetadata[i];
- QStringList subdataset = metadata.split( '=' );
- textItem = new QListWidgetItem( subdataset[1] );
- listWidget->addItem( textItem );
- }
-
- GDALClose( hDS );
-}
-
-void QgsOracleSelectGeoraster::on_listWidget_clicked( const QModelIndex& Index )
-{
- Q_UNUSED( Index );
- if ( lineEdit->text() == listWidget->currentItem()->text() )
- {
- showSelection( lineEdit->text() );
- }
- else
- {
- lineEdit->setText( listWidget->currentItem()->text() );
- }
-}
-
-void QgsOracleSelectGeoraster::setConnectionListPosition()
-{
- // If possible, set the item currently displayed database
- QSettings settings;
- QString toSelect = settings.value( QStringLiteral( "/Oracle/connections/selected" ) ).toString();
- cmbConnections->setCurrentIndex( cmbConnections->findText( toSelect ) );
-
- // If we couldn't find the stored item, but there are some,
- // default to the last item (this makes some sense when deleting
- // items as it allows the user to repeatidly click on delete to
- // remove a whole lot of items).
- if ( cmbConnections->currentIndex() == -1 && cmbConnections->count() > 0 )
- {
- // If toSelect is null, then the selected connection wasn't found
- // by QSettings, which probably means that this is the first time
- // the user has used qgis with database connections, so default to
- // the first in the list of connetions. Otherwise default to the last.
- if ( toSelect.isNull() )
- cmbConnections->setCurrentIndex( 0 );
- else
- cmbConnections->setCurrentIndex( cmbConnections->count() - 1 );
- }
-}
diff --git a/src/plugins/oracle_raster/qgsselectgeoraster_ui.h b/src/plugins/oracle_raster/qgsselectgeoraster_ui.h
deleted file mode 100644
index 6a1ae2d00cb..00000000000
--- a/src/plugins/oracle_raster/qgsselectgeoraster_ui.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/***************************************************************************
- oracleselectgui.h
- -------------------
- begin : Oracle Spatial Plugin
- copyright : (C) Ivan Lucena
- email : ivan.lucena@pmldnet.com
- ***************************************************************************
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- ***************************************************************************/
-
-#ifndef OraclePluginGUI_H
-#define OraclePluginGUI_H
-
-// Qt Designer Includes
-#include "ui_qgsselectgeorasterbase.h"
-
-//Qt includes
-#include
-#include
-#include
-
-// QGIS Includes
-#include
-#include
-#include "qgscontexthelp.h"
-
-class QgsOracleSelectGeoraster : public QDialog, private Ui::SelectGeoRasterBase
-{
- Q_OBJECT
-
- public:
- QgsOracleSelectGeoraster( QWidget* parent, QgisInterface* iface, Qt::WindowFlags fl = 0 );
- ~QgsOracleSelectGeoraster();
-
- private:
- QgisInterface* mIface;
- QString mUri;
-
- private:
- void populateConnectionList();
- void connectToServer();
- void setConnectionListPosition();
- void showSelection( const QString & line );
-
- public slots:
- void on_btnConnect_clicked() { connectToServer(); }
- void on_btnNew_clicked();
- void on_btnEdit_clicked();
- void on_btnDelete_clicked();
- void on_listWidget_clicked( const QModelIndex& Index );
- void on_buttonBox_helpRequested() { QgsContextHelp::run( metaObject()->className() ); }
-};
-
-#endif
diff --git a/src/plugins/oracle_raster/qgsselectgeorasterbase.ui b/src/plugins/oracle_raster/qgsselectgeorasterbase.ui
deleted file mode 100644
index 94b900e7d42..00000000000
--- a/src/plugins/oracle_raster/qgsselectgeorasterbase.ui
+++ /dev/null
@@ -1,239 +0,0 @@
-
-
- SelectGeoRasterBase
-
-
-
- 0
- 0
- 461
- 454
-
-
-
- Select Oracle Spatial GeoRaster
-
-
-
- ../../ui../../ui
-
-
- true
-
-
- true
-
-
-
- 9
-
-
- 6
-
- -
-
-
- Server Connections
-
-
-
- 9
-
-
- 6
-
-
-
-
-
- -
-
-
- false
-
-
- Edit
-
-
-
- -
-
-
- false
-
-
- Delete
-
-
-
- -
-
-
- &New
-
-
-
- -
-
-
- false
-
-
- C&onnect
-
-
-
- -
-
-
- Qt::Horizontal
-
-
- QSizePolicy::Expanding
-
-
-
- 131
- 30
-
-
-
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- 16
- 64
-
-
-
- Subdatasets
-
-
-
-
-
-
-
- 0
- 0
-
-
-
- false
-
-
-
-
-
-
- -
-
-
- QDialogButtonBox::Cancel|QDialogButtonBox::Help|QDialogButtonBox::Ok
-
-
-
- -
-
-
- Selection
-
-
-
-
-
-
- -
-
-
- false
-
-
- Update
-
-
-
- -
-
-
-
-
-
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- Ready
-
-
- false
-
-
-
-
-
-
-
- cmbConnections
- btnConnect
- btnNew
- btnEdit
- btnDelete
- listWidget
- lineEdit
- checkBox
- buttonBox
-
-
-
-
- buttonBox
- accepted()
- SelectGeoRasterBase
- accept()
-
-
- 378
- 406
-
-
- 460
- 372
-
-
-
-
- buttonBox
- rejected()
- SelectGeoRasterBase
- reject()
-
-
- 297
- 406
-
-
- 455
- 434
-
-
-
-
-