24QgsTiledSceneConnectionDialog::QgsTiledSceneConnectionDialog( QWidget *parent )
30 buttonBox->button( QDialogButtonBox::Ok )->setDisabled(
true );
32 connect( mEditName, &QLineEdit::textChanged,
this, &QgsTiledSceneConnectionDialog::updateOkButtonState );
33 connect( mEditUrl, &QLineEdit::textChanged,
this, &QgsTiledSceneConnectionDialog::updateOkButtonState );
36void QgsTiledSceneConnectionDialog::setConnection(
const QString &name,
const QString &uri )
38 mEditName->setText( name );
41 mEditUrl->setText( conn.
url );
43 mAuthSettings->setUsername( conn.
username );
44 mAuthSettings->setPassword( conn.
password );
46 mAuthSettings->setConfigId( conn.
authCfg );
49QString QgsTiledSceneConnectionDialog::connectionUri()
const
52 conn.
url = mEditUrl->text();
54 conn.
username = mAuthSettings->username();
55 conn.
password = mAuthSettings->password();
57 conn.
authCfg = mAuthSettings->configId( );
62QString QgsTiledSceneConnectionDialog::connectionName()
const
64 return mEditName->text();
67void QgsTiledSceneConnectionDialog::updateOkButtonState()
69 const bool enabled = !mEditName->text().isEmpty() && !mEditUrl->text().isEmpty();
70 buttonBox->button( QDialogButtonBox::Ok )->setEnabled( enabled );
73void QgsTiledSceneConnectionDialog::accept()
static void enableAutoGeometryRestore(QWidget *widget, const QString &key=QString())
Register the widget to allow its position to be automatically saved and restored when open and closed...
static Data decodedUri(const QString &uri)
Returns a connection uri decoded to a data structure.
static QString encodedUri(const Data &data)
Returns connection data encoded as a string.
Represents decoded data of a tiled scene connection.
QString authCfg
Authentication configuration ID.
QString password
HTTP Basic password.
QString username
HTTP Basic username.
QgsHttpHeaders httpHeaders
HTTP headers.