1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219
|
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsnewdatabasetablenamewidget.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
class QgsNewDatabaseTableNameWidget : QgsPanelWidget
{
%Docstring(signature="appended")
The :py:class:`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
.. versionadded:: 3.14
%End
%TypeHeaderCode
#include "qgsnewdatabasetablenamewidget.h"
%End
public:
explicit QgsNewDatabaseTableNameWidget( QgsBrowserGuiModel *browserModel = 0, const QStringList &providersFilter = QStringList(), QWidget *parent = 0 );
%Docstring
Constructs a new QgsNewDatabaseTableNameWidget
:param browserModel: an existing browser model (typically from app), if
``None`` an instance will be created
:param 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
:param parent: optional parent for this widget
%End
void setAcceptButtonVisible( bool visible );
%Docstring
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.
%End
QString schema() const;
%Docstring
Returns the currently selected schema or file path (in case of
filesystem-based DBs like spatialite or GPKG) for the new table
%End
QString uri() const;
%Docstring
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.
%End
QString table() const;
%Docstring
Returns the current name of the new table
%End
QString dataProviderKey() const;
%Docstring
Returns the currently selected data item provider key
%End
bool isValid() const;
%Docstring
Returns ``True`` if the widget contains a valid new table name
%End
QString validationError() const;
%Docstring
Returns the validation error or an empty string is the widget status is
valid
%End
virtual void showEvent( QShowEvent *e );
%Docstring
Scroll to last selected index and expand it's children
%End
signals:
void validationChanged( bool isValid );
%Docstring
This signal is emitted whenever the validation status of the widget
changes.
:param isValid: ``True`` if the current status of the widget is valid
%End
void schemaNameChanged( const QString &schemaName );
%Docstring
This signal is emitted when the user selects a schema (or file path for
filesystem-based DBs like spatialite or GPKG).
:param schemaName: the name of the selected schema
%End
void tableNameChanged( const QString &tableName );
%Docstring
This signal is emitted when the user enters a table name
:param tableName: the name of the new table
%End
void providerKeyChanged( const QString &providerKey );
%Docstring
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.
:param providerKey: the data provider key of the selected schema
%End
void uriChanged( const QString &uri );
%Docstring
This signal is emitted when the URI of the new table changes, whether or
not it is a valid one.
:param uri: URI string representation
%End
void accepted();
%Docstring
Emitted when the OK/accept button is clicked.
%End
};
class QgsNewDatabaseTableNameDialog : QDialog
{
%Docstring(signature="appended")
:py:class:`QgsNewDatabaseTableNameDialog` is a dialog which allows
selection of 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
.. versionadded:: 3.14
%End
%TypeHeaderCode
#include "qgsnewdatabasetablenamewidget.h"
%End
public:
explicit QgsNewDatabaseTableNameDialog( QgsBrowserGuiModel *browserModel = 0, const QStringList &providersFilter = QStringList(), QWidget *parent = 0 );
%Docstring
Constructs a new QgsNewDatabaseTableNameDialog
:param browserModel: an existing browser model (typically from app), if
``None`` an instance will be created
:param 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
:param parent: optional parent for this widget
%End
QString schema() const;
%Docstring
Returns the currently selected schema or file path (in case of
filesystem-based DBs like spatialite or GPKG) for the new table
%End
QString uri() const;
%Docstring
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.
%End
QString table() const;
%Docstring
Returns the current name of the new table
%End
QString dataProviderKey() const;
%Docstring
Returns the currently selected data item provider key
%End
bool isValid() const;
%Docstring
Returns ``True`` if the widget contains a valid new table name
%End
QString validationError() const;
%Docstring
Returns the validation error or an empty string is the widget status is
valid
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsnewdatabasetablenamewidget.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
|