QGIS API Documentation  3.16.0-Hannover (43b64b13f3)
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 "qgswkbtypes.h"
23 #include "qgshelp.h"
24 #include "qgis_gui.h"
25 
26 class QgsFields;
27 class QgsVectorLayer;
28 
33 class GUI_EXPORT QgsNewMemoryLayerDialog: public QDialog, private Ui::QgsNewMemoryLayerDialogBase
34 {
35  Q_OBJECT
36 
37  public:
38 
45  static QgsVectorLayer *runAndCreateLayer( QWidget *parent = nullptr, const QgsCoordinateReferenceSystem &defaultCrs = QgsCoordinateReferenceSystem() );
46 
50  QgsNewMemoryLayerDialog( QWidget *parent SIP_TRANSFERTHIS = nullptr, Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags );
51 
53  QgsWkbTypes::Type selectedType() const;
54 
60  void setCrs( const QgsCoordinateReferenceSystem &crs );
61 
67 
69  QString layerName() const;
70 
75  QgsFields fields() const;
76 
77  private:
78 
79  QString mCrsId;
80  QPushButton *mOkButton = nullptr;
81 
82  private slots:
83 
84  void geometryTypeChanged( int index );
85  void fieldNameChanged( const QString & );
86  void mTypeBox_currentIndexChanged( int index );
87  void mAddAttributeButton_clicked();
88  void mRemoveAttributeButton_clicked();
89  void selectionChanged();
90  void showHelp();
91 };
92 
93 #endif //QGSNEWMEMORYLAYERDIALOG_H
crs
const QgsCoordinateReferenceSystem & crs
Definition: qgswfsgetfeature.cpp:51
QgsFields
Container of fields for a vector layer.
Definition: qgsfields.h:45
QgsWkbTypes::Type
Type
The WKB type describes the number of dimensions a geometry has.
Definition: qgswkbtypes.h:70
QgsNewMemoryLayerDialog
Definition: qgsnewmemorylayerdialog.h:34
QgsCoordinateReferenceSystem
This class represents a coordinate reference system (CRS).
Definition: qgscoordinatereferencesystem.h:206
QgsVectorLayer
Represents a vector layer which manages a vector based data sets.
Definition: qgsvectorlayer.h:387
qgsguiutils.h
qgswkbtypes.h
SIP_TRANSFERTHIS
#define SIP_TRANSFERTHIS
Definition: qgis_sip.h:53
qgshelp.h