16 #ifndef QGSNEWDATABASETABLENAMEWIDGET_H
17 #define QGSNEWDATABASETABLENAMEWIDGET_H
20 #include "ui_qgsnewdatabasetablenamewidget.h"
44 class GUI_EXPORT QgsNewDatabaseTableNameWidget :
public QgsPanelWidget,
private Ui::QgsNewDatabaseTableNameWidget
60 const QStringList &providersFilter = QStringList(),
61 QWidget *parent =
nullptr );
68 void setAcceptButtonVisible(
bool visible );
73 QString schema()
const;
84 QString table()
const;
89 QString dataProviderKey()
const;
99 QString validationError()
const;
102 void showEvent( QShowEvent *e )
override;
111 void validationChanged(
bool isValid );
118 void schemaNameChanged(
const QString &schemaName );
125 void tableNameChanged(
const QString &tableName );
133 void providerKeyChanged(
const QString &providerKey );
140 void uriChanged(
const QString &uri );
151 QStringList tableNames();
152 void refreshModel(
const QModelIndex &index );
156 QString mDataProviderKey;
159 QString mConnectionName;
160 bool mIsFilePath =
false;
163 QSet<QString> mShownProviders;
164 bool mIsValid =
false;
165 QString mValidationError;
167 QMap<QString, QStringList> mTableNamesCache;
169 static QStringList FILESYSTEM_BASED_DATAITEM_PROVIDERS;
172 friend class TestQgsNewDatabaseTableNameWidget;
206 const QStringList &providersFilter = QStringList(),
207 QWidget *parent =
nullptr );
212 QString schema()
const;
223 QString table()
const;
228 QString dataProviderKey()
const;
233 bool isValid()
const;
238 QString validationError()
const;
242 QgsNewDatabaseTableNameWidget *mWidget =
nullptr;
245 #endif // QGSNEWDATABASETABLENAMEWIDGET_H