25 #include <QPushButton>
30 #include <QFileDialog>
35 if ( dialog.exec() == QDialog::Rejected )
44 switch ( geometrytype )
50 geomType =
"linestring";
56 geomType =
"multipoint";
59 geomType =
"multilinestring";
62 geomType =
"multipolygon";
68 QString layerProperties = QString(
"%1?crs=%2&memoryid=%3" ).arg( geomType ).arg( crsId ).arg( QUuid::createUuid().toString() );
75 : QDialog( parent, fl )
80 restoreGeometry( settings.value(
"/Windows/NewMemoryLayer/geometry" ).toByteArray() );
82 mPointRadioButton->setChecked(
true );
87 mCrsSelector->setCrs( defaultCrs );
89 mNameLineEdit->setText(
tr(
"New scratch layer" ) );
95 settings.setValue(
"/Windows/NewMemoryLayer/geometry", saveGeometry() );
100 if ( mPointRadioButton->isChecked() )
104 else if ( mLineRadioButton->isChecked() )
108 else if ( mPolygonRadioButton->isChecked() )
112 else if ( mMultiPointRadioButton->isChecked() )
116 else if ( mMultiLineRadioButton->isChecked() )
120 else if ( mMultiPolygonRadioButton->isChecked() )
129 return mCrsSelector->crs();
134 return mNameLineEdit->text();