Skip to content
Permalink
Browse files
rename QgsDbSourceSelectBase to QgsAbstractDbSourceSelect
  • Loading branch information
3nids committed Nov 12, 2021
1 parent 93bdf53 commit e841f76251e6bce8d321c71befdf43982e34c4a4
@@ -1,7 +1,7 @@
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/providers/qgsdbsourceselectbase.h *
* src/gui/providers/qgsabstractdbsourceselect.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
@@ -10,19 +10,19 @@



class QgsDbSourceSelectBase : QgsAbstractDataSourceWidget, protected Ui::QgsDbSourceSelectBase
class QgsAbstractDbSourceSelect : QgsAbstractDataSourceWidget, protected Ui::QgsAbstractDbSourceSelect
{
%Docstring(signature="appended")
The :py:class:`QgsDbSourceSelectBase` class is a base class for database source widget selector
The :py:class:`QgsAbstractDbSourceSelect` class is a base class for database source widget selector

.. versionadded:: 3.24
%End

%TypeHeaderCode
#include "qgsdbsourceselectbase.h"
#include "qgsabstractdbsourceselect.h"
%End
public:
QgsDbSourceSelectBase( QWidget *parent = 0, Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags, QgsProviderRegistry::WidgetMode widgetMode = QgsProviderRegistry::WidgetMode::None );
QgsAbstractDbSourceSelect( QWidget *parent = 0, Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags, QgsProviderRegistry::WidgetMode widgetMode = QgsProviderRegistry::WidgetMode::None );
%Docstring
Constructor
%End
@@ -52,7 +52,7 @@ This is called to define the SQL query and must be re-implemented. The implement
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/providers/qgsdbsourceselectbase.h *
* src/gui/providers/qgsabstractdbsourceselect.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
@@ -361,7 +361,7 @@ set(QGIS_GUI_SRCS
processing/models/qgsmodelviewtooltemporarymousepan.cpp
processing/models/qgsmodelviewtoolzoom.cpp

providers/qgsdbsourceselectbase.cpp
providers/qgsabstractdbsourceselect.cpp
providers/qgspointcloudproviderguimetadata.cpp
providers/qgspointcloudsourceselect.cpp

@@ -1181,7 +1181,7 @@ set(QGIS_GUI_HDRS
processing/models/qgsmodelviewtooltemporarymousepan.h
processing/models/qgsmodelviewtoolzoom.h

providers/qgsdbsourceselectbase.h
providers/qgsabstractdbsourceselect.h
providers/qgspointcloudsourceselect.h
providers/qgspointcloudproviderguimetadata.h

@@ -34,7 +34,7 @@

QgsOgrDbSourceSelect::QgsOgrDbSourceSelect( const QString &theSettingsKey, const QString &theName,
const QString &theExtensions, QWidget *parent, Qt::WindowFlags fl, QgsProviderRegistry::WidgetMode theWidgetMode )
: QgsDbSourceSelectBase( parent, fl, theWidgetMode )
: QgsAbstractDbSourceSelect( parent, fl, theWidgetMode )
, mOgrDriverName( theSettingsKey )
, mName( theName )
, mExtension( theExtensions )
@@ -20,7 +20,7 @@

#include "qgsguiutils.h"
#include "qgshelp.h"
#include "qgsdbsourceselectbase.h"
#include "qgsabstractdbsourceselect.h"
#include "qgsproviderregistry.h"
#include "qgis_sip.h"

@@ -35,7 +35,7 @@ class QgsOgrDbTableModel;
* source selects.
*
*/
class QgsOgrDbSourceSelect: public QgsDbSourceSelectBase
class QgsOgrDbSourceSelect: public QgsAbstractDbSourceSelect
{
Q_OBJECT

@@ -1,5 +1,5 @@
/***************************************************************************
qgsdbsourceselectbase.h
qgsabstractdbsourceselect.h
--------------------------------------
Date : 08.11.2021
Copyright : (C) 2021 Denis Rouzaud
@@ -14,13 +14,13 @@
***************************************************************************/

#include "qgsabstractdbtablemodel.h"
#include "qgsdbsourceselectbase.h"
#include "qgsabstractdbsourceselect.h"

#include <QMenu>
#include <QSortFilterProxyModel>
#include <QItemDelegate>

QgsDbSourceSelectBase::QgsDbSourceSelectBase( QWidget *parent, Qt::WindowFlags fl, QgsProviderRegistry::WidgetMode widgetMode )
QgsAbstractDbSourceSelect::QgsAbstractDbSourceSelect( QWidget *parent, Qt::WindowFlags fl, QgsProviderRegistry::WidgetMode widgetMode )
: QgsAbstractDataSourceWidget( parent, fl, widgetMode )
{
setupUi( this );
@@ -45,13 +45,13 @@ QgsDbSourceSelectBase::QgsDbSourceSelectBase( QWidget *parent, Qt::WindowFlags f
mBuildQueryButton->setDisabled( true );
buttonBox->addButton( mBuildQueryButton, QDialogButtonBox::ActionRole );

connect( mTablesTreeView, &QTreeView::clicked, this, &QgsDbSourceSelectBase::treeviewClicked );
connect( mTablesTreeView, &QTreeView::doubleClicked, this, &QgsDbSourceSelectBase::treeviewDoubleClicked );
connect( mTablesTreeView, &QTreeView::clicked, this, &QgsAbstractDbSourceSelect::treeviewClicked );
connect( mTablesTreeView, &QTreeView::doubleClicked, this, &QgsAbstractDbSourceSelect::treeviewDoubleClicked );

connect( mBuildQueryButton, &QAbstractButton::clicked, this, [ = ]() {setSql( mTablesTreeView->currentIndex() );} );
}

void QgsDbSourceSelectBase::init( QgsAbstractDbTableModel *model, QItemDelegate *delegate )
void QgsAbstractDbSourceSelect::init( QgsAbstractDbTableModel *model, QItemDelegate *delegate )
{
mProxyModel->setSourceModel( model );
mTablesTreeView->setModel( mProxyModel );
@@ -107,18 +107,18 @@ void QgsDbSourceSelectBase::init( QgsAbstractDbTableModel *model, QItemDelegate
connect( mSearchTableEdit, &QLineEdit::textChanged, this, [ = ]() {filterResults();} );
}

void QgsDbSourceSelectBase::treeviewClicked( const QModelIndex &index )
void QgsAbstractDbSourceSelect::treeviewClicked( const QModelIndex &index )
{
mBuildQueryButton->setEnabled( index.parent().isValid() );
}

void QgsDbSourceSelectBase::treeviewDoubleClicked( const QModelIndex &index )
void QgsAbstractDbSourceSelect::treeviewDoubleClicked( const QModelIndex &index )
{
Q_UNUSED( index )
addButtonClicked();
}

void QgsDbSourceSelectBase::filterResults()
void QgsAbstractDbSourceSelect::filterResults()
{
QString searchText = mSearchTableEdit->text();
bool regex = mSearchModeRegexAction->isChecked();
@@ -1,5 +1,5 @@
/***************************************************************************
qgsdbsourceselectbase.h
qgsabstractdbsourceselect.h
--------------------------------------
Date : 08.11.2021
Copyright : (C) 2021 Denis Rouzaud
@@ -13,8 +13,8 @@
* *
***************************************************************************/

#ifndef QGSDBSOURCESELECTBASE_H
#define QGSDBSOURCESELECTBASE_H
#ifndef QGSABSTRACTDBSOURCESELECT_H
#define QGSABSTRACTDBSOURCESELECT_H


#include "qgis_gui.h"
@@ -27,15 +27,15 @@ class QItemDelegate;

/**
* \ingroup gui
* \brief The QgsDbSourceSelectBase class is a base class for database source widget selector
* \brief The QgsAbstractDbSourceSelect class is a base class for database source widget selector
* \since QGIS 3.24
*/
class GUI_EXPORT QgsDbSourceSelectBase : public QgsAbstractDataSourceWidget, protected Ui::QgsDbSourceSelectBase
class GUI_EXPORT QgsAbstractDbSourceSelect : public QgsAbstractDataSourceWidget, protected Ui::QgsAbstractDbSourceSelect
{
Q_OBJECT
public:
//! Constructor
QgsDbSourceSelectBase( QWidget *parent = nullptr, Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags, QgsProviderRegistry::WidgetMode widgetMode = QgsProviderRegistry::WidgetMode::None );
QgsAbstractDbSourceSelect( QWidget *parent = nullptr, Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags, QgsProviderRegistry::WidgetMode widgetMode = QgsProviderRegistry::WidgetMode::None );

protected:
//! Sets the source model for the table and optionally a delegate
@@ -65,4 +65,4 @@ class GUI_EXPORT QgsDbSourceSelectBase : public QgsAbstractDataSourceWidget, pro
QPushButton *mBuildQueryButton = nullptr;
};

#endif // QGSDBSOURCESELECTBASE_H
#endif // QGSABSTRACTDBSOURCESELECT_H
@@ -123,7 +123,7 @@ void QgsDb2SourceSelectDelegate::setModelData( QWidget *editor, QAbstractItemMod
}

QgsDb2SourceSelect::QgsDb2SourceSelect( QWidget *parent, Qt::WindowFlags fl, QgsProviderRegistry::WidgetMode theWidgetMode )
: QgsDbSourceSelectBase( parent, fl, theWidgetMode )
: QgsAbstractDbSourceSelect( parent, fl, theWidgetMode )
{
QgsGui::instance()->enableAutoGeometryRestore( this );

@@ -19,12 +19,12 @@
#ifndef QGSDB2SOURCESELECT_H
#define QGSDB2SOURCESELECT_H

#include "ui_qgsdbsourceselectbase.h"
#include "ui_qgsabstractdbsourceselect.h"
#include "qgsguiutils.h"
#include "qgsdb2tablemodel.h"
#include "qgshelp.h"
#include "qgsproviderregistry.h"
#include "qgsdbsourceselectbase.h"
#include "qgsabstractdbsourceselect.h"

#include <QMap>
#include <QPair>
@@ -87,7 +87,7 @@ class QgsDb2GeomColumnTypeThread : public QThread
* for Db2 databases. The user can then connect and add
* tables from the database to the map canvas.
*/
class QgsDb2SourceSelect : public QgsDbSourceSelectBase
class QgsDb2SourceSelect : public QgsAbstractDbSourceSelect
{
Q_OBJECT

@@ -200,7 +200,7 @@ QgsHanaSourceSelect::QgsHanaSourceSelect(
QWidget *parent,
Qt::WindowFlags fl,
QgsProviderRegistry::WidgetMode theWidgetMode )
: QgsDbSourceSelectBase( parent, fl, theWidgetMode )
: QgsAbstractDbSourceSelect( parent, fl, theWidgetMode )
{
QgsGui::instance()->enableAutoGeometryRestore( this );

@@ -22,7 +22,7 @@
#include "qgshelp.h"
#include "qgsproviderregistry.h"
#include "qgsguiutils.h"
#include "qgsdbsourceselectbase.h"
#include "qgsabstractdbsourceselect.h"


#include <QMap>
@@ -63,7 +63,7 @@ class QgsHanaSourceSelectDelegate : public QItemDelegate
* for SAP HANA databases. The user can then connect and add
* tables from the database to the map canvas.
*/
class QgsHanaSourceSelect : public QgsDbSourceSelectBase
class QgsHanaSourceSelect : public QgsAbstractDbSourceSelect
{
Q_OBJECT

@@ -125,7 +125,7 @@ void QgsMssqlSourceSelectDelegate::setModelData( QWidget *editor, QAbstractItemM
}

QgsMssqlSourceSelect::QgsMssqlSourceSelect( QWidget *parent, Qt::WindowFlags fl, QgsProviderRegistry::WidgetMode theWidgetMode )
: QgsDbSourceSelectBase( parent, fl, theWidgetMode )
: QgsAbstractDbSourceSelect( parent, fl, theWidgetMode )
{
QgsGui::instance()->enableAutoGeometryRestore( this );

@@ -20,7 +20,7 @@
#include "qgsguiutils.h"
#include "qgshelp.h"
#include "qgsproviderregistry.h"
#include "qgsdbsourceselectbase.h"
#include "qgsabstractdbsourceselect.h"
#include "qgsmssqltablemodel.h"


@@ -57,7 +57,7 @@ class QgsMssqlSourceSelectDelegate : public QItemDelegate
* for MSSQL databases. The user can then connect and add
* tables from the database to the map canvas.
*/
class QgsMssqlSourceSelect : public QgsDbSourceSelectBase
class QgsMssqlSourceSelect : public QgsAbstractDbSourceSelect
{
Q_OBJECT

@@ -173,7 +173,7 @@ void QgsOracleSourceSelectDelegate::setModelData( QWidget *editor, QAbstractItem
}

QgsOracleSourceSelect::QgsOracleSourceSelect( QWidget *parent, Qt::WindowFlags fl, QgsProviderRegistry::WidgetMode theWidgetMode )
: QgsDbSourceSelectBase( parent, fl, theWidgetMode )
: QgsAbstractDbSourceSelect( parent, fl, theWidgetMode )
{
QgsGui::instance()->enableAutoGeometryRestore( this );
setupButtons( buttonBox );
@@ -21,7 +21,7 @@
#include "qgshelp.h"
#include "qgsoracleconnpool.h"
#include "qgsproviderregistry.h"
#include "qgsdbsourceselectbase.h"
#include "qgsabstractdbsourceselect.h"

#include <QMap>
#include <QPair>
@@ -79,7 +79,7 @@ class QgsOracleSourceSelectDelegate : public QItemDelegate
* for Oracle databases. The user can then connect and add
* tables from the database to the map canvas.
*/
class QgsOracleSourceSelect : public QgsDbSourceSelectBase
class QgsOracleSourceSelect : public QgsAbstractDbSourceSelect
{
Q_OBJECT

@@ -215,7 +215,7 @@ void QgsPgSourceSelectDelegate::setModelData( QWidget *editor, QAbstractItemMode
}

QgsPgSourceSelect::QgsPgSourceSelect( QWidget *parent, Qt::WindowFlags fl, QgsProviderRegistry::WidgetMode theWidgetMode )
: QgsDbSourceSelectBase( parent, fl, theWidgetMode )
: QgsAbstractDbSourceSelect( parent, fl, theWidgetMode )
{
QgsGui::instance()->enableAutoGeometryRestore( this );

@@ -21,7 +21,7 @@
#include "qgsdatasourceuri.h"
#include "qgshelp.h"
#include "qgsproviderregistry.h"
#include "qgsdbsourceselectbase.h"
#include "qgsabstractdbsourceselect.h"
#include "qgspostgresconn.h"

#include <QMap>
@@ -59,7 +59,7 @@ class QgsPgSourceSelectDelegate : public QItemDelegate
* for PostGIS enabled PostgreSQL databases. The user can then connect and add
* tables from the database to the map canvas.
*/
class QgsPgSourceSelect : public QgsDbSourceSelectBase
class QgsPgSourceSelect : public QgsAbstractDbSourceSelect
{
Q_OBJECT

@@ -46,7 +46,7 @@ email : a.furieri@lqt.it
#endif

QgsSpatiaLiteSourceSelect::QgsSpatiaLiteSourceSelect( QWidget *parent, Qt::WindowFlags fl, QgsProviderRegistry::WidgetMode theWidgetMode ):
QgsDbSourceSelectBase( parent, fl, theWidgetMode )
QgsAbstractDbSourceSelect( parent, fl, theWidgetMode )
{
QgsGui::instance()->enableAutoGeometryRestore( this );

@@ -20,7 +20,7 @@
#include "qgsguiutils.h"
#include "qgshelp.h"
#include "qgsproviderregistry.h"
#include "qgsdbsourceselectbase.h"
#include "qgsabstractdbsourceselect.h"

#include <QThread>
#include <QMap>
@@ -42,7 +42,7 @@ class QPushButton;
* for SpatiaLite/SQLite databases. The user can then connect and add
* tables from the database to the map canvas.
*/
class QgsSpatiaLiteSourceSelect: public QgsDbSourceSelectBase
class QgsSpatiaLiteSourceSelect: public QgsAbstractDbSourceSelect
{
Q_OBJECT

0 comments on commit e841f76

Please sign in to comment.