The QgsNewDatabaseTableNameWidget class embeds the browser view to select a DB schema and a new table name.  
 More...
#include <qgsnewdatabasetablenamewidget.h>
The QgsNewDatabaseTableNameWidget class embeds the browser view to select a DB schema and a new table name. 
The table name is validated for uniqueness and the selected data item provider, schema and table names can be retrieved with getters.
- Warning
- The data provider that originated the data item provider must support the connections API
- Since
- QGIS 3.14 
Definition at line 44 of file qgsnewdatabasetablenamewidget.h.
◆ QgsNewDatabaseTableNameWidget()
  
  | 
        
          | QgsNewDatabaseTableNameWidget::QgsNewDatabaseTableNameWidget | ( | QgsBrowserGuiModel * | browserModel = nullptr, |  
          |  |  | const QStringList & | providersFilter = QStringList(), |  
          |  |  | QWidget * | parent = nullptr |  
          |  | ) |  |  |  | explicit | 
 
Constructs a new QgsNewDatabaseTableNameWidget. 
- Parameters
- 
  
    | browserModel | an existing browser model (typically from app), if NULL an instance will be created |  | providersFilter | optional white list of data provider keys that should be shown in the widget, if not specified all providers data items with database capabilities will be shown |  | parent | optional parent for this widget |  
 
Definition at line 34 of file qgsnewdatabasetablenamewidget.cpp.
 
 
◆ accepted
  
  | 
        
          | void QgsNewDatabaseTableNameWidget::accepted | ( |  | ) |  |  | signal | 
 
Emitted when the OK/accept button is clicked. 
 
 
◆ dataProviderKey()
      
        
          | QString QgsNewDatabaseTableNameWidget::dataProviderKey | ( |  | ) | const | 
      
 
 
◆ isValid()
      
        
          | bool QgsNewDatabaseTableNameWidget::isValid | ( |  | ) | const | 
      
 
 
◆ providerKeyChanged
  
  | 
        
          | void QgsNewDatabaseTableNameWidget::providerKeyChanged | ( | const QString & | providerKey | ) |  |  | signal | 
 
This signal is emitted when the selects a data provider or a schema name that has a different data provider than the previously selected one. 
- Parameters
- 
  
    | providerKey | the data provider key of the selected schema |  
 
 
 
◆ schema()
      
        
          | QString QgsNewDatabaseTableNameWidget::schema | ( |  | ) | const | 
      
 
Returns the currently selected schema or file path (in case of filesystem-based DBs like spatialite or GPKG) for the new table. 
Definition at line 234 of file qgsnewdatabasetablenamewidget.cpp.
 
 
◆ schemaNameChanged
  
  | 
        
          | void QgsNewDatabaseTableNameWidget::schemaNameChanged | ( | const QString & | schemaName | ) |  |  | signal | 
 
This signal is emitted when the user selects a schema (or file path for filesystem-based DBs like spatialite or GPKG). 
- Parameters
- 
  
    | schemaName | the name of the selected schema |  
 
 
 
◆ setAcceptButtonVisible()
      
        
          | void QgsNewDatabaseTableNameWidget::setAcceptButtonVisible | ( | bool | visible | ) |  | 
      
 
Sets whether the optional "Ok"/accept button should be visible. 
By default this is hidden, to better allow the widget to be embedded inside other widgets and dialogs. 
Definition at line 162 of file qgsnewdatabasetablenamewidget.cpp.
 
 
◆ showEvent()
  
  | 
        
          | void QgsNewDatabaseTableNameWidget::showEvent | ( | QShowEvent * | e | ) |  |  | override | 
 
 
◆ table()
      
        
          | QString QgsNewDatabaseTableNameWidget::table | ( |  | ) | const | 
      
 
 
◆ tableNameChanged
  
  | 
        
          | void QgsNewDatabaseTableNameWidget::tableNameChanged | ( | const QString & | tableName | ) |  |  | signal | 
 
This signal is emitted when the user enters a table name. 
- Parameters
- 
  
    | tableName | the name of the new table |  
 
 
 
◆ uri()
      
        
          | QString QgsNewDatabaseTableNameWidget::uri | ( |  | ) | const | 
      
 
Returns the (possibly blank) string representation of the new table data source URI. 
The URI might be invalid in case the widget is not in a valid state. 
Definition at line 239 of file qgsnewdatabasetablenamewidget.cpp.
 
 
◆ uriChanged
  
  | 
        
          | void QgsNewDatabaseTableNameWidget::uriChanged | ( | const QString & | uri | ) |  |  | signal | 
 
This signal is emitted when the URI of the new table changes, whether or not it is a valid one. 
- Parameters
- 
  
    | uri | URI string representation |  
 
 
 
◆ validationChanged
  
  | 
        
          | void QgsNewDatabaseTableNameWidget::validationChanged | ( | bool | isValid | ) |  |  | signal | 
 
This signal is emitted whenever the validation status of the widget changes. 
- Parameters
- 
  
    | isValid | trueif the current status of the widget is valid |  
 
 
 
◆ validationError()
      
        
          | QString QgsNewDatabaseTableNameWidget::validationError | ( |  | ) | const | 
      
 
 
◆ TestQgsNewDatabaseTableNameWidget
  
  | 
        
          | friend class TestQgsNewDatabaseTableNameWidget |  | friend | 
 
 
The documentation for this class was generated from the following files: