Skip to content
Permalink
Browse files
#9191: More fixes
  • Loading branch information
ahuarte47 committed Dec 16, 2013
1 parent 57e9411 commit 32d4af2dc5adbd0036e767930c00860e70cfc3df
@@ -46,11 +46,13 @@ QgsManageConnectionsDialog::QgsManageConnectionsDialog( QWidget *parent, Mode mo
{
label->setText( tr( "Select connections to import" ) );
buttonBox->button( QDialogButtonBox::Ok )->setText( tr( "Import" ) );
buttonBox->button( QDialogButtonBox::Ok )->setEnabled( false );
}
else
{
//label->setText( tr( "Select connections to export" ) );
buttonBox->button( QDialogButtonBox::Ok )->setText( tr( "Export" ) );
buttonBox->button( QDialogButtonBox::Ok )->setEnabled( false );
}

if ( !populateConnections() )
@@ -61,6 +63,13 @@ QgsManageConnectionsDialog::QgsManageConnectionsDialog( QWidget *parent, Mode mo
// use Ok button for starting import and export operations
disconnect( buttonBox, SIGNAL( accepted() ), this, SLOT( accept() ) );
connect( buttonBox, SIGNAL( accepted() ), this, SLOT( doExportImport() ) );

connect( listConnections, SIGNAL( itemSelectionChanged() ), this, SLOT( selectionChanged() ) );
}

void QgsManageConnectionsDialog::selectionChanged()
{
buttonBox->button( QDialogButtonBox::Ok )->setEnabled( !listConnections->selectedItems().isEmpty() );
}

void QgsManageConnectionsDialog::doExportImport()
@@ -945,9 +954,11 @@ void QgsManageConnectionsDialog::loadOracleConnections( const QDomDocument &doc,
void QgsManageConnectionsDialog::selectAll()
{
listConnections->selectAll();
buttonBox->button( QDialogButtonBox::Ok )->setEnabled( !listConnections->selectedItems().isEmpty() );
}

void QgsManageConnectionsDialog::clearSelection()
{
listConnections->clearSelection();
buttonBox->button( QDialogButtonBox::Ok )->setEnabled( false );
}
@@ -52,6 +52,7 @@ class GUI_EXPORT QgsManageConnectionsDialog : public QDialog, private Ui::QgsMan
void doExportImport();
void selectAll();
void clearSelection();
void selectionChanged();

private:
bool populateConnections();
@@ -538,13 +538,15 @@ void QgsOWSSourceSelect::setConnectionListPosition()
mConnectButton->setEnabled( false );
mEditButton->setEnabled( false );
mDeleteButton->setEnabled( false );
mSaveButton->setEnabled( false );
}
else
{
// Connections - enable various buttons
mConnectButton->setEnabled( true );
mEditButton->setEnabled( true );
mDeleteButton->setEnabled( true );
mSaveButton->setEnabled( true );
}

QgsOWSConnection::setSelectedConnection( mService, mConnectionsComboBox->currentText() );
@@ -132,14 +132,15 @@ void QgsWFSSourceSelect::populateConnectionList()
btnConnect->setEnabled( true );
btnEdit->setEnabled( true );
btnDelete->setEnabled( true );
btnSave->setEnabled( true );
}

else
{
// No connections available - disable various buttons
btnConnect->setEnabled( false );
btnEdit->setEnabled( false );
btnDelete->setEnabled( false );
btnSave->setEnabled( false );
}

//set last used connection
@@ -310,13 +311,15 @@ void QgsWFSSourceSelect::deleteEntryOfServerList()
btnConnect->setEnabled( true );
btnEdit->setEnabled( true );
btnDelete->setEnabled( true );
btnSave->setEnabled( true );
}
else
{
// No connections available - disable various buttons
btnConnect->setEnabled( false );
btnEdit->setEnabled( false );
btnDelete->setEnabled( false );
btnSave->setEnabled( false );
}
}
}
@@ -1016,13 +1016,15 @@ void QgsWMSSourceSelect::setConnectionListPosition()
btnConnect->setEnabled( false );
btnEdit->setEnabled( false );
btnDelete->setEnabled( false );
btnSave->setEnabled( false );
}
else
{
// Connections - enable various buttons
btnConnect->setEnabled( true );
btnEdit->setEnabled( true );
btnDelete->setEnabled( true );
btnSave->setEnabled( true );
}
}

0 comments on commit 32d4af2

Please sign in to comment.