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";
82 mPointRadioButton->setChecked(
true );
87 mCrsSelector->setCrs( defaultCrs );
89 mNameLineEdit->setText(
tr(
"New scratch layer" ) );
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();
QGis::WkbType selectedType() const
Returns the selected geometry type.
QByteArray toByteArray() const
void validate()
Perform some validation on this CRS.
WkbType
Used for symbology operations.
QString tr(const char *sourceText, const char *disambiguation, int n)
void setValue(const QString &key, const QVariant &value)
bool createFromOgcWmsCrs(QString theCrs)
Set up this CRS from the given OGC CRS.
const char * name() const
QgsNewMemoryLayerDialog(QWidget *parent=0, const Qt::WindowFlags &fl=QgisGui::ModalDialogFlags)
const QString GEO_EPSG_CRS_AUTHID
Geographic coord sys from EPSG authority.
QString layerName() const
Returns the layer name.
QVariant value(const QString &key, const QVariant &defaultValue) const
~QgsNewMemoryLayerDialog()
Class for storing a coordinate reference system (CRS)
QString authid() const
Get the authority identifier for this srs.
QgsCoordinateReferenceSystem crs() const
Returns the selected crs.
static QgsVectorLayer * runAndCreateLayer(QWidget *parent=0)
Runs the dialoag and creates a new memory layer.
Represents a vector layer which manages a vector based data sets.
QString arg(qlonglong a, int fieldWidth, int base, const QChar &fillChar) const