mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-04 00:04:03 -04:00
Merge pull request #61912 from elpaso/bugfix-gh61867-new-http-conn-dlg-too-tall
[ux] New HTTP conn dlg: adjust height
This commit is contained in:
commit
5e0fc5539f
@ -29,6 +29,6 @@ QgsNewHttpConnection.Flag.__and__ = lambda flag1, flag2: _force_int(flag1) & _fo
|
||||
QgsNewHttpConnection.Flag.__or__ = lambda flag1, flag2: QgsNewHttpConnection.Flag(_force_int(flag1) | _force_int(flag2))
|
||||
try:
|
||||
QgsNewHttpConnection.__virtual_methods__ = ['validate', 'wfsSettingsKey', 'wmsSettingsKey']
|
||||
QgsNewHttpConnection.__overridden_methods__ = ['accept']
|
||||
QgsNewHttpConnection.__overridden_methods__ = ['accept', 'showEvent']
|
||||
except (NameError, AttributeError):
|
||||
pass
|
||||
|
@ -123,6 +123,12 @@ Returns the QSettings key for WMS related settings for the connection.
|
||||
%Docstring
|
||||
Triggers a resync of the GUI widgets for the service specific settings
|
||||
(i.e. WFS and WMS related settings).
|
||||
%End
|
||||
|
||||
virtual void showEvent( QShowEvent *event );
|
||||
|
||||
%Docstring
|
||||
Adjust height of dialog to fit the content.
|
||||
%End
|
||||
|
||||
};
|
||||
|
@ -1,6 +1,6 @@
|
||||
# The following has been generated automatically from src/gui/qgsnewhttpconnection.h
|
||||
try:
|
||||
QgsNewHttpConnection.__virtual_methods__ = ['validate', 'wfsSettingsKey', 'wmsSettingsKey']
|
||||
QgsNewHttpConnection.__overridden_methods__ = ['accept']
|
||||
QgsNewHttpConnection.__overridden_methods__ = ['accept', 'showEvent']
|
||||
except (NameError, AttributeError):
|
||||
pass
|
||||
|
@ -123,6 +123,12 @@ Returns the QSettings key for WMS related settings for the connection.
|
||||
%Docstring
|
||||
Triggers a resync of the GUI widgets for the service specific settings
|
||||
(i.e. WFS and WMS related settings).
|
||||
%End
|
||||
|
||||
virtual void showEvent( QShowEvent *event );
|
||||
|
||||
%Docstring
|
||||
Adjust height of dialog to fit the content.
|
||||
%End
|
||||
|
||||
};
|
||||
|
@ -178,10 +178,6 @@ QgsNewHttpConnection::QgsNewHttpConnection( QWidget *parent, ConnectionTypes typ
|
||||
mAuthGroupBox->hide();
|
||||
mGroupBox->layout()->removeWidget( mAuthGroupBox );
|
||||
}
|
||||
// Adjust height
|
||||
const int w = width();
|
||||
adjustSize();
|
||||
resize( w, height() );
|
||||
|
||||
connect( txtName, &QLineEdit::textChanged, this, &QgsNewHttpConnection::nameChanged );
|
||||
connect( txtUrl, &QLineEdit::textChanged, this, &QgsNewHttpConnection::urlChanged );
|
||||
@ -368,6 +364,12 @@ void QgsNewHttpConnection::updateServiceSpecificSettings()
|
||||
txtPageSize->setText( QgsOwsConnection::settingsPagesize->value( detailsParameters ) );
|
||||
}
|
||||
|
||||
void QgsNewHttpConnection::showEvent(QShowEvent* event)
|
||||
{
|
||||
QDialog::showEvent( event );
|
||||
adjustSize();
|
||||
}
|
||||
|
||||
QUrl QgsNewHttpConnection::urlTrimmed() const
|
||||
{
|
||||
QUrl url( txtUrl->text().trimmed() );
|
||||
|
@ -200,6 +200,11 @@ class GUI_EXPORT QgsNewHttpConnection : public QDialog, private Ui::QgsNewHttpCo
|
||||
*/
|
||||
void updateServiceSpecificSettings();
|
||||
|
||||
/**
|
||||
* Adjust height of dialog to fit the content.
|
||||
*/
|
||||
void showEvent( QShowEvent *event ) override;
|
||||
|
||||
private:
|
||||
ConnectionTypes mTypes = ConnectionWms;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user