QGIS API Documentation  3.0.2-Girona (307d082)
qgsnewmemorylayerdialog.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsnewmemorylayerdialog.h
3  -------------------
4  begin : September 2014
5  copyright : (C) 2014 by Nyall Dawson, Marco Hugentobler
6  email : nyall dot dawson at gmail dot com
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 #ifndef QGSNEWMEMORYLAYERDIALOG_H
18 #define QGSNEWMEMORYLAYERDIALOG_H
19 
20 #include "ui_qgsnewmemorylayerdialogbase.h"
21 #include "qgsguiutils.h"
22 #include "qgis.h"
23 #include "qgshelp.h"
24 #include "qgis_gui.h"
25 
26 class QgsVectorLayer;
27 
32 class GUI_EXPORT QgsNewMemoryLayerDialog: public QDialog, private Ui::QgsNewMemoryLayerDialogBase
33 {
34  Q_OBJECT
35 
36  public:
37 
44  static QgsVectorLayer *runAndCreateLayer( QWidget *parent = nullptr, const QgsCoordinateReferenceSystem &defaultCrs = QgsCoordinateReferenceSystem() );
45 
46  QgsNewMemoryLayerDialog( QWidget *parent SIP_TRANSFERTHIS = nullptr, Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags );
47  ~QgsNewMemoryLayerDialog() override;
48 
50  QgsWkbTypes::Type selectedType() const;
51 
57  void setCrs( const QgsCoordinateReferenceSystem &crs );
58 
63  QgsCoordinateReferenceSystem crs() const;
64 
66  QString layerName() const;
67 
68  private:
69 
70  QString mCrsId;
71 
72  private slots:
73 
74  void geometryTypeChanged( int index );
75  void showHelp();
76 };
77 
78 #endif //QGSNEWMEMORYLAYERDIALOG_H
#define SIP_TRANSFERTHIS
Definition: qgis_sip.h:46
Type
The WKB type describes the number of dimensions a geometry has.
Definition: qgswkbtypes.h:67
This class represents a coordinate reference system (CRS).
Represents a vector layer which manages a vector based data sets.