18 #include <QCloseEvent>
19 #include <QFileDialog>
20 #include <QMessageBox>
21 #include <QPushButton>
23 #include <QTextStream>
29 , mFileName( fileName )
31 , mConnectionType( type )
37 pb =
new QPushButton(
tr(
"Select all" ) );
38 buttonBox->addButton( pb, QDialogButtonBox::ActionRole );
39 connect( pb, SIGNAL( clicked() ),
this, SLOT(
selectAll() ) );
41 pb =
new QPushButton(
tr(
"Clear selection" ) );
42 buttonBox->addButton( pb, QDialogButtonBox::ActionRole );
43 connect( pb, SIGNAL( clicked() ),
this, SLOT(
clearSelection() ) );
47 label->setText(
tr(
"Select connections to import" ) );
48 buttonBox->button( QDialogButtonBox::Ok )->setText(
tr(
"Import" ) );
53 buttonBox->button( QDialogButtonBox::Ok )->setText(
tr(
"Export" ) );
58 QApplication::postEvent(
this,
new QCloseEvent() );
62 disconnect( buttonBox, SIGNAL( accepted() ),
this, SLOT( accept() ) );
63 connect( buttonBox, SIGNAL( accepted() ),
this, SLOT(
doExportImport() ) );
68 QList<QListWidgetItem *> selection = listConnections->selectedItems();
69 if ( selection.isEmpty() )
71 QMessageBox::warning(
this,
tr(
"Export/import error" ),
72 tr(
"You should select at least one connection from list." ) );
77 for (
int i = 0; i < selection.size(); ++i )
79 items.append( selection.at( i )->text() );
84 QString fileName = QFileDialog::getSaveFileName(
this,
tr(
"Save connections" ),
".",
85 tr(
"XML files (*.xml *.XML)" ) );
86 if ( fileName.isEmpty() )
92 if ( !fileName.toLower().endsWith(
".xml" ) )
123 if ( !file.open( QIODevice::WriteOnly | QIODevice::Text ) )
125 QMessageBox::warning(
this,
tr(
"Saving connections" ),
126 tr(
"Cannot write file %1:\n%2." )
128 .arg( file.errorString() ) );
132 QTextStream out( &file );
138 if ( !file.open( QIODevice::ReadOnly | QIODevice::Text ) )
140 QMessageBox::warning(
this,
tr(
"Loading connections" ),
141 tr(
"Cannot read file %1:\n%2." )
143 .arg( file.errorString() ) );
152 if ( !doc.setContent( &file,
true, &errorStr, &errorLine, &errorColumn ) )
154 QMessageBox::warning(
this,
tr(
"Loading connections" ),
155 tr(
"Parse error at line %1, column %2:\n%3" )
184 listConnections->clear();
200 settings.beginGroup(
"/Qgis/connections-wms" );
203 settings.beginGroup(
"/Qgis/connections-wfs" );
206 settings.beginGroup(
"/Qgis/connections-wcs" );
209 settings.beginGroup(
"/PostgreSQL/connections" );
212 settings.beginGroup(
"/MSSQL/connections" );
215 settings.beginGroup(
"/Oracle/connections" );
218 QStringList keys = settings.childGroups();
219 QStringList::Iterator it = keys.begin();
220 while ( it != keys.end() )
222 QListWidgetItem *item =
new QListWidgetItem();
223 item->setText( *it );
224 listConnections->addItem( item );
233 if ( !file.open( QIODevice::ReadOnly | QIODevice::Text ) )
235 QMessageBox::warning(
this,
tr(
"Loading connections" ),
236 tr(
"Cannot read file %1:\n%2." )
238 .arg( file.errorString() ) );
247 if ( !doc.setContent( &file,
true, &errorStr, &errorLine, &errorColumn ) )
249 QMessageBox::warning(
this,
tr(
"Loading connections" ),
250 tr(
"Parse error at line %1, column %2:\n%3" )
257 QDomElement root = doc.documentElement();
261 if ( root.tagName() !=
"qgsWMSConnections" )
263 QMessageBox::information(
this,
tr(
"Loading connections" ),
264 tr(
"The file is not an WMS connections exchange file." ) );
270 if ( root.tagName() !=
"qgsWFSConnections" )
272 QMessageBox::information(
this,
tr(
"Loading connections" ),
273 tr(
"The file is not an WFS connections exchange file." ) );
279 if ( root.tagName() !=
"qgsWCSConnections" )
281 QMessageBox::information(
this,
tr(
"Loading connections" ),
282 tr(
"The file is not an WCS connections exchange file." ) );
288 if ( root.tagName() !=
"qgsPgConnections" )
290 QMessageBox::information(
this,
tr(
"Loading connections" ),
291 tr(
"The file is not an PostGIS connections exchange file." ) );
297 if ( root.tagName() !=
"qgsMssqlConnections" )
299 QMessageBox::information(
this,
tr(
"Loading connections" ),
300 tr(
"The file is not an MSSQL connections exchange file." ) );
305 if ( root.tagName() !=
"qgsOracleConnections" )
307 QMessageBox::information(
this,
tr(
"Loading connections" ),
308 tr(
"The file is not an Oracle connections exchange file." ) );
314 QDomElement child = root.firstChildElement();
315 while ( !child.isNull() )
317 QListWidgetItem *item =
new QListWidgetItem();
318 item->setText( child.attribute(
"name" ) );
319 listConnections->addItem( item );
320 child = child.nextSiblingElement();
328 QDomDocument doc(
"connections" );
329 QDomElement root = doc.createElement(
"qgs" + service.toUpper() +
"Connections" );
330 root.setAttribute(
"version",
"1.0" );
331 doc.appendChild( root );
335 for (
int i = 0; i < connections.count(); ++i )
337 path =
"/Qgis/connections-" + service.toLower() +
"/";
338 QDomElement el = doc.createElement( service.toLower() );
339 el.setAttribute(
"name", connections[ i ] );
340 el.setAttribute(
"url", settings.value( path + connections[ i ] +
"/url",
"" ).toString() );
342 if ( service ==
"WMS" )
344 el.setAttribute(
"ignoreGetMapURI", settings.value( path + connections[i] +
"/ignoreGetMapURI",
false ).toBool() ?
"true" :
"false" );
345 el.setAttribute(
"ignoreGetFeatureInfoURI", settings.value( path + connections[i] +
"/ignoreGetFeatureInfoURI",
false ).toBool() ?
"true" :
"false" );
346 el.setAttribute(
"ignoreAxisOrientation", settings.value( path + connections[i] +
"/ignoreAxisOrientation",
false ).toBool() ?
"true" :
"false" );
347 el.setAttribute(
"invertAxisOrientation", settings.value( path + connections[i] +
"/invertAxisOrientation",
false ).toBool() ?
"true" :
"false" );
348 el.setAttribute(
"referer", settings.value( path + connections[ i ] +
"/referer",
"" ).toString() );
349 el.setAttribute(
"smoothPixmapTransform", settings.value( path + connections[i] +
"/smoothPixmapTransform",
false ).toBool() ?
"true" :
"false" );
352 path =
"/Qgis/" + service.toUpper() +
"/";
353 el.setAttribute(
"username", settings.value( path + connections[ i ] +
"/username",
"" ).toString() );
354 el.setAttribute(
"password", settings.value( path + connections[ i ] +
"/password",
"" ).toString() );
355 root.appendChild( el );
363 QDomDocument doc(
"connections" );
364 QDomElement root = doc.createElement(
"qgsWFSConnections" );
365 root.setAttribute(
"version",
"1.0" );
366 doc.appendChild( root );
370 for (
int i = 0; i < connections.count(); ++i )
372 path =
"/Qgis/connections-wfs/";
373 QDomElement el = doc.createElement(
"wfs" );
374 el.setAttribute(
"name", connections[ i ] );
375 el.setAttribute(
"url", settings.value( path + connections[ i ] +
"/url",
"" ).toString() );
377 el.setAttribute(
"referer", settings.value( path + connections[ i ] +
"/referer",
"" ).toString() );
380 el.setAttribute(
"username", settings.value( path + connections[ i ] +
"/username",
"" ).toString() );
381 el.setAttribute(
"password", settings.value( path + connections[ i ] +
"/password",
"" ).toString() );
382 root.appendChild( el );
390 QDomDocument doc(
"connections" );
391 QDomElement root = doc.createElement(
"qgsPgConnections" );
392 root.setAttribute(
"version",
"1.0" );
393 doc.appendChild( root );
397 for (
int i = 0; i < connections.count(); ++i )
399 path =
"/PostgreSQL/connections/" + connections[ i ];
400 QDomElement el = doc.createElement(
"postgis" );
401 el.setAttribute(
"name", connections[ i ] );
402 el.setAttribute(
"host", settings.value( path +
"/host",
"" ).toString() );
403 el.setAttribute(
"port", settings.value( path +
"/port",
"" ).toString() );
404 el.setAttribute(
"database", settings.value( path +
"/database",
"" ).toString() );
405 el.setAttribute(
"service", settings.value( path +
"/service",
"" ).toString() );
406 el.setAttribute(
"sslmode", settings.value( path +
"/sslmode",
"1" ).toString() );
407 el.setAttribute(
"estimatedMetadata", settings.value( path +
"/estimatedMetadata",
"0" ).toString() );
409 el.setAttribute(
"saveUsername", settings.value( path +
"/saveUsername",
"false" ).toString() );
411 if ( settings.value( path +
"/saveUsername",
"false" ).toString() ==
"true" )
413 el.setAttribute(
"username", settings.value( path +
"/username",
"" ).toString() );
416 el.setAttribute(
"savePassword", settings.value( path +
"/savePassword",
"false" ).toString() );
418 if ( settings.value( path +
"/savePassword",
"false" ).toString() ==
"true" )
420 el.setAttribute(
"password", settings.value( path +
"/password",
"" ).toString() );
423 root.appendChild( el );
431 QDomDocument doc(
"connections" );
432 QDomElement root = doc.createElement(
"qgsMssqlConnections" );
433 root.setAttribute(
"version",
"1.0" );
434 doc.appendChild( root );
438 for (
int i = 0; i < connections.count(); ++i )
440 path =
"/MSSQL/connections/" + connections[ i ];
441 QDomElement el = doc.createElement(
"mssql" );
442 el.setAttribute(
"name", connections[ i ] );
443 el.setAttribute(
"host", settings.value( path +
"/host",
"" ).toString() );
444 el.setAttribute(
"port", settings.value( path +
"/port",
"" ).toString() );
445 el.setAttribute(
"database", settings.value( path +
"/database",
"" ).toString() );
446 el.setAttribute(
"service", settings.value( path +
"/service",
"" ).toString() );
447 el.setAttribute(
"sslmode", settings.value( path +
"/sslmode",
"1" ).toString() );
448 el.setAttribute(
"estimatedMetadata", settings.value( path +
"/estimatedMetadata",
"0" ).toString() );
450 el.setAttribute(
"saveUsername", settings.value( path +
"/saveUsername",
"false" ).toString() );
452 if ( settings.value( path +
"/saveUsername",
"false" ).toString() ==
"true" )
454 el.setAttribute(
"username", settings.value( path +
"/username",
"" ).toString() );
457 el.setAttribute(
"savePassword", settings.value( path +
"/savePassword",
"false" ).toString() );
459 if ( settings.value( path +
"/savePassword",
"false" ).toString() ==
"true" )
461 el.setAttribute(
"password", settings.value( path +
"/password",
"" ).toString() );
464 root.appendChild( el );
472 QDomDocument doc(
"connections" );
473 QDomElement root = doc.createElement(
"qgsOracleConnections" );
474 root.setAttribute(
"version",
"1.0" );
475 doc.appendChild( root );
479 for (
int i = 0; i < connections.count(); ++i )
481 path =
"/Oracle/connections/" + connections[ i ];
482 QDomElement el = doc.createElement(
"oracle" );
483 el.setAttribute(
"name", connections[ i ] );
484 el.setAttribute(
"host", settings.value( path +
"/host",
"" ).toString() );
485 el.setAttribute(
"port", settings.value( path +
"/port",
"" ).toString() );
486 el.setAttribute(
"database", settings.value( path +
"/database",
"" ).toString() );
487 el.setAttribute(
"estimatedMetadata", settings.value( path +
"/estimatedMetadata",
"0" ).toString() );
488 el.setAttribute(
"userTablesOnly", settings.value( path +
"/userTablesOnly",
"0" ).toString() );
489 el.setAttribute(
"geometryColumnsOnly", settings.value( path +
"/geometryColumnsOnly",
"0" ).toString() );
490 el.setAttribute(
"allowGeometrylessTables", settings.value( path +
"/allowGeometrylessTables",
"0" ).toString() );
492 el.setAttribute(
"saveUsername", settings.value( path +
"/saveUsername",
"false" ).toString() );
494 if ( settings.value( path +
"/saveUsername",
"false" ).toString() ==
"true" )
496 el.setAttribute(
"username", settings.value( path +
"/username",
"" ).toString() );
499 el.setAttribute(
"savePassword", settings.value( path +
"/savePassword",
"false" ).toString() );
501 if ( settings.value( path +
"/savePassword",
"false" ).toString() ==
"true" )
503 el.setAttribute(
"password", settings.value( path +
"/password",
"" ).toString() );
506 root.appendChild( el );
514 QDomElement root = doc.documentElement();
515 if ( root.tagName() !=
"qgs" + service.toUpper() +
"Connections" )
517 QMessageBox::information(
this,
tr(
"Loading connections" ),
518 tr(
"The file is not an %1 connections exchange file." ).arg( service ) );
522 QString connectionName;
524 settings.beginGroup(
"/Qgis/connections-" + service.toLower() );
525 QStringList keys = settings.childGroups();
527 QDomElement child = root.firstChildElement();
529 bool overwrite =
true;
531 while ( !child.isNull() )
533 connectionName = child.attribute(
"name" );
534 if ( !items.contains( connectionName ) )
536 child = child.nextSiblingElement();
541 if ( keys.contains( connectionName ) && prompt )
543 int res = QMessageBox::warning(
this,
544 tr(
"Loading connections" ),
545 tr(
"Connection with name '%1' already exists. Overwrite?" )
546 .arg( connectionName ),
547 QMessageBox::Yes | QMessageBox::YesToAll | QMessageBox::No | QMessageBox::NoToAll | QMessageBox::Cancel );
551 case QMessageBox::Cancel:
553 case QMessageBox::No:
554 child = child.nextSiblingElement();
556 case QMessageBox::Yes:
559 case QMessageBox::YesToAll:
563 case QMessageBox::NoToAll:
570 if ( keys.contains( connectionName ) && !overwrite )
572 child = child.nextSiblingElement();
577 settings.beginGroup(
"/Qgis/connections-" + service.toLower() );
578 settings.setValue( QString(
"/" + connectionName +
"/url" ) , child.attribute(
"url" ) );
579 settings.setValue( QString(
"/" + connectionName +
"/ignoreGetMapURI" ), child.attribute(
"ignoreGetMapURI" ) ==
"true" );
580 settings.setValue( QString(
"/" + connectionName +
"/ignoreGetFeatureInfoURI" ), child.attribute(
"ignoreGetFeatureInfoURI" ) ==
"true" );
581 settings.setValue( QString(
"/" + connectionName +
"/ignoreAxisOrientation" ), child.attribute(
"ignoreAxisOrientation" ) ==
"true" );
582 settings.setValue( QString(
"/" + connectionName +
"/invertAxisOrientation" ), child.attribute(
"invertAxisOrientation" ) ==
"true" );
583 settings.setValue( QString(
"/" + connectionName +
"/referer" ), child.attribute(
"referer" ) );
584 settings.setValue( QString(
"/" + connectionName +
"/smoothPixmapTransform" ), child.attribute(
"smoothPixmapTransform" ) ==
"true" );
587 if ( !child.attribute(
"username" ).isEmpty() )
589 settings.beginGroup(
"/Qgis/" + service.toUpper() +
"/" + connectionName );
590 settings.setValue(
"/username", child.attribute(
"username" ) );
591 settings.setValue(
"/password", child.attribute(
"password" ) );
594 child = child.nextSiblingElement();
600 QDomElement root = doc.documentElement();
601 if ( root.tagName() !=
"qgsWFSConnections" )
603 QMessageBox::information(
this,
tr(
"Loading connections" ),
604 tr(
"The file is not an WFS connections exchange file." ) );
608 QString connectionName;
610 settings.beginGroup(
"/Qgis/connections-wfs" );
611 QStringList keys = settings.childGroups();
613 QDomElement child = root.firstChildElement();
615 bool overwrite =
true;
617 while ( !child.isNull() )
619 connectionName = child.attribute(
"name" );
620 if ( !items.contains( connectionName ) )
622 child = child.nextSiblingElement();
627 if ( keys.contains( connectionName ) && prompt )
629 int res = QMessageBox::warning(
this,
630 tr(
"Loading connections" ),
631 tr(
"Connection with name '%1' already exists. Overwrite?" )
632 .arg( connectionName ),
633 QMessageBox::Yes | QMessageBox::YesToAll | QMessageBox::No | QMessageBox::NoToAll | QMessageBox::Cancel );
637 case QMessageBox::Cancel:
639 case QMessageBox::No:
640 child = child.nextSiblingElement();
642 case QMessageBox::Yes:
645 case QMessageBox::YesToAll:
649 case QMessageBox::NoToAll:
656 if ( keys.contains( connectionName ) && !overwrite )
658 child = child.nextSiblingElement();
663 settings.beginGroup(
"/Qgis/connections-wfs" );
664 settings.setValue( QString(
"/" + connectionName +
"/url" ) , child.attribute(
"url" ) );
667 if ( !child.attribute(
"username" ).isEmpty() )
669 settings.beginGroup(
"/Qgis/WFS/" + connectionName );
670 settings.setValue(
"/username", child.attribute(
"username" ) );
671 settings.setValue(
"/password", child.attribute(
"password" ) );
674 child = child.nextSiblingElement();
681 QDomElement root = doc.documentElement();
682 if ( root.tagName() !=
"qgsPgConnections" )
684 QMessageBox::information(
this,
685 tr(
"Loading connections" ),
686 tr(
"The file is not an PostGIS connections exchange file." ) );
690 QString connectionName;
692 settings.beginGroup(
"/PostgreSQL/connections" );
693 QStringList keys = settings.childGroups();
695 QDomElement child = root.firstChildElement();
697 bool overwrite =
true;
699 while ( !child.isNull() )
701 connectionName = child.attribute(
"name" );
702 if ( !items.contains( connectionName ) )
704 child = child.nextSiblingElement();
709 if ( keys.contains( connectionName ) && prompt )
711 int res = QMessageBox::warning(
this,
712 tr(
"Loading connections" ),
713 tr(
"Connection with name '%1' already exists. Overwrite?" )
714 .arg( connectionName ),
715 QMessageBox::Yes | QMessageBox::YesToAll | QMessageBox::No | QMessageBox::NoToAll | QMessageBox::Cancel );
718 case QMessageBox::Cancel:
720 case QMessageBox::No:
721 child = child.nextSiblingElement();
723 case QMessageBox::Yes:
726 case QMessageBox::YesToAll:
730 case QMessageBox::NoToAll:
737 if ( keys.contains( connectionName ) && !overwrite )
739 child = child.nextSiblingElement();
744 settings.beginGroup(
"/PostgreSQL/connections/" + connectionName );
746 settings.setValue(
"/host", child.attribute(
"host" ) );
747 settings.setValue(
"/port", child.attribute(
"port" ) );
748 settings.setValue(
"/database", child.attribute(
"database" ) );
749 if ( child.hasAttribute(
"service" ) )
751 settings.setValue(
"/service", child.attribute(
"service" ) );
755 settings.setValue(
"/service",
"" );
757 settings.setValue(
"/sslmode", child.attribute(
"sslmode" ) );
758 settings.setValue(
"/estimatedMetadata", child.attribute(
"estimatedMetadata" ) );
759 settings.setValue(
"/saveUsername", child.attribute(
"saveUsername" ) );
760 settings.setValue(
"/username", child.attribute(
"username" ) );
761 settings.setValue(
"/savePassword", child.attribute(
"savePassword" ) );
762 settings.setValue(
"/password", child.attribute(
"password" ) );
765 child = child.nextSiblingElement();
771 QDomElement root = doc.documentElement();
772 if ( root.tagName() !=
"qgsMssqlConnections" )
774 QMessageBox::information(
this,
775 tr(
"Loading connections" ),
776 tr(
"The file is not an MSSQL connections exchange file." ) );
780 QString connectionName;
782 settings.beginGroup(
"/MSSQL/connections" );
783 QStringList keys = settings.childGroups();
785 QDomElement child = root.firstChildElement();
787 bool overwrite =
true;
789 while ( !child.isNull() )
791 connectionName = child.attribute(
"name" );
792 if ( !items.contains( connectionName ) )
794 child = child.nextSiblingElement();
799 if ( keys.contains( connectionName ) && prompt )
801 int res = QMessageBox::warning(
this,
802 tr(
"Loading connections" ),
803 tr(
"Connection with name '%1' already exists. Overwrite?" )
804 .arg( connectionName ),
805 QMessageBox::Yes | QMessageBox::YesToAll | QMessageBox::No | QMessageBox::NoToAll | QMessageBox::Cancel );
808 case QMessageBox::Cancel:
810 case QMessageBox::No:
811 child = child.nextSiblingElement();
813 case QMessageBox::Yes:
816 case QMessageBox::YesToAll:
820 case QMessageBox::NoToAll:
827 if ( keys.contains( connectionName ) && !overwrite )
829 child = child.nextSiblingElement();
834 settings.beginGroup(
"/MSSQL/connections/" + connectionName );
836 settings.setValue(
"/host", child.attribute(
"host" ) );
837 settings.setValue(
"/port", child.attribute(
"port" ) );
838 settings.setValue(
"/database", child.attribute(
"database" ) );
839 if ( child.hasAttribute(
"service" ) )
841 settings.setValue(
"/service", child.attribute(
"service" ) );
845 settings.setValue(
"/service",
"" );
847 settings.setValue(
"/sslmode", child.attribute(
"sslmode" ) );
848 settings.setValue(
"/estimatedMetadata", child.attribute(
"estimatedMetadata" ) );
849 settings.setValue(
"/saveUsername", child.attribute(
"saveUsername" ) );
850 settings.setValue(
"/username", child.attribute(
"username" ) );
851 settings.setValue(
"/savePassword", child.attribute(
"savePassword" ) );
852 settings.setValue(
"/password", child.attribute(
"password" ) );
855 child = child.nextSiblingElement();
861 QDomElement root = doc.documentElement();
862 if ( root.tagName() !=
"qgsOracleConnections" )
864 QMessageBox::information(
this,
865 tr(
"Loading connections" ),
866 tr(
"The file is not an Oracle connections exchange file." ) );
870 QString connectionName;
872 settings.beginGroup(
"/Oracle/connections" );
873 QStringList keys = settings.childGroups();
875 QDomElement child = root.firstChildElement();
877 bool overwrite =
true;
879 while ( !child.isNull() )
881 connectionName = child.attribute(
"name" );
882 if ( !items.contains( connectionName ) )
884 child = child.nextSiblingElement();
889 if ( keys.contains( connectionName ) && prompt )
891 int res = QMessageBox::warning(
this,
892 tr(
"Loading connections" ),
893 tr(
"Connection with name '%1' already exists. Overwrite?" )
894 .arg( connectionName ),
895 QMessageBox::Yes | QMessageBox::YesToAll | QMessageBox::No | QMessageBox::NoToAll | QMessageBox::Cancel );
898 case QMessageBox::Cancel:
900 case QMessageBox::No:
901 child = child.nextSiblingElement();
903 case QMessageBox::Yes:
906 case QMessageBox::YesToAll:
910 case QMessageBox::NoToAll:
917 if ( keys.contains( connectionName ) && !overwrite )
919 child = child.nextSiblingElement();
924 settings.beginGroup(
"/Oracle/connections/" + connectionName );
926 settings.setValue(
"/host", child.attribute(
"host" ) );
927 settings.setValue(
"/port", child.attribute(
"port" ) );
928 settings.setValue(
"/database", child.attribute(
"database" ) );
929 settings.setValue(
"/estimatedMetadata", child.attribute(
"estimatedMetadata" ) );
930 settings.setValue(
"/userTablesOnly", child.attribute(
"userTablesOnly" ) );
931 settings.setValue(
"/geometryColumnsOnly", child.attribute(
"geometryColumnsOnly" ) );
932 settings.setValue(
"/allowGeometrylessTables", child.attribute(
"allowGeometrylessTables" ) );
933 settings.setValue(
"/saveUsername", child.attribute(
"saveUsername" ) );
934 settings.setValue(
"/username", child.attribute(
"username" ) );
935 settings.setValue(
"/savePassword", child.attribute(
"savePassword" ) );
936 settings.setValue(
"/password", child.attribute(
"password" ) );
939 child = child.nextSiblingElement();
945 listConnections->selectAll();
950 listConnections->clearSelection();