17#include "moc_qgstiledsceneconnectiondialog.cpp"
25QgsTiledSceneConnectionDialog::QgsTiledSceneConnectionDialog( QWidget *parent )
31 buttonBox->button( QDialogButtonBox::Ok )->setDisabled(
true );
33 connect( mEditName, &QLineEdit::textChanged,
this, &QgsTiledSceneConnectionDialog::updateOkButtonState );
34 connect( mEditUrl, &QLineEdit::textChanged,
this, &QgsTiledSceneConnectionDialog::updateOkButtonState );
37void QgsTiledSceneConnectionDialog::setConnection(
const QString &name,
const QString &uri )
39 mEditName->setText( name );
42 mEditUrl->setText( conn.
url );
44 mAuthSettings->setUsername( conn.
username );
45 mAuthSettings->setPassword( conn.
password );
47 mAuthSettings->setConfigId( conn.
authCfg );
50QString QgsTiledSceneConnectionDialog::connectionUri()
const
53 conn.
url = mEditUrl->text();
55 conn.
username = mAuthSettings->username();
56 conn.
password = mAuthSettings->password();
58 conn.
authCfg = mAuthSettings->configId();
63QString QgsTiledSceneConnectionDialog::connectionName()
const
65 return mEditName->text();
68void QgsTiledSceneConnectionDialog::updateOkButtonState()
70 const bool enabled = !mEditName->text().isEmpty() && !mEditUrl->text().isEmpty();
71 buttonBox->button( QDialogButtonBox::Ok )->setEnabled( enabled );
74void 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.