QGIS API Documentation
4.3.0-Master (52aa6503bed)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
gui
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
22
#include "qgis_gui.h"
23
#include "
qgsguiutils.h
"
24
#include "
qgshelp.h
"
25
#include "
qgswkbtypes.h
"
26
27
class
QgsFields
;
28
class
QgsVectorLayer
;
29
35
class
GUI_EXPORT
QgsNewMemoryLayerDialog
:
public
QDialog,
private
Ui::QgsNewMemoryLayerDialogBase
36
{
37
Q_OBJECT
38
39
public
:
46
static
QgsVectorLayer
*
runAndCreateLayer
( QWidget *parent =
nullptr
,
const
QgsCoordinateReferenceSystem
&defaultCrs =
QgsCoordinateReferenceSystem
() );
47
51
QgsNewMemoryLayerDialog
( QWidget *parent
SIP_TRANSFERTHIS
=
nullptr
, Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags );
52
54
Qgis::WkbType
selectedType
()
const
;
55
60
void
setCrs
(
const
QgsCoordinateReferenceSystem
&
crs
);
61
66
QgsCoordinateReferenceSystem
crs
()
const
;
67
69
QString
layerName
()
const
;
70
75
QgsFields
fields
()
const
;
76
77
void
accept
()
override
;
78
79
private
:
80
QString mCrsId;
81
QPushButton *mOkButton =
nullptr
;
82
83
private
slots:
84
85
void
geometryTypeChanged(
int
index );
86
void
fieldNameChanged(
const
QString & );
87
void
mTypeBox_currentIndexChanged(
int
index );
88
void
mAddAttributeButton_clicked();
89
void
mRemoveAttributeButton_clicked();
90
void
selectionChanged();
91
void
showHelp();
92
void
moveFieldsUp();
93
void
moveFieldsDown();
94
};
95
96
#endif
//QGSNEWMEMORYLAYERDIALOG_H
Qgis::WkbType
WkbType
The WKB type describes the number of dimensions a geometry has.
Definition
qgis.h:314
QgsCoordinateReferenceSystem
Represents a coordinate reference system (CRS).
Definition
qgscoordinatereferencesystem.h:216
QgsFields
Container of fields for a vector layer.
Definition
qgsfields.h:45
QgsNewMemoryLayerDialog::crs
QgsCoordinateReferenceSystem crs() const
Returns the selected CRS for the new layer.
Definition
qgsnewmemorylayerdialog.cpp:248
QgsNewMemoryLayerDialog::fields
QgsFields fields() const
Returns attributes for the new layer.
Definition
qgsnewmemorylayerdialog.cpp:270
QgsNewMemoryLayerDialog::accept
void accept() override
Definition
qgsnewmemorylayerdialog.cpp:332
QgsNewMemoryLayerDialog::layerName
QString layerName() const
Returns the layer name.
Definition
qgsnewmemorylayerdialog.cpp:253
QgsNewMemoryLayerDialog::selectedType
Qgis::WkbType selectedType() const
Returns the selected geometry type.
Definition
qgsnewmemorylayerdialog.cpp:136
QgsNewMemoryLayerDialog::setCrs
void setCrs(const QgsCoordinateReferenceSystem &crs)
Sets the crs value for the new layer in the dialog.
Definition
qgsnewmemorylayerdialog.cpp:243
QgsNewMemoryLayerDialog::runAndCreateLayer
static QgsVectorLayer * runAndCreateLayer(QWidget *parent=nullptr, const QgsCoordinateReferenceSystem &defaultCrs=QgsCoordinateReferenceSystem())
Runs the dialog and creates a new memory layer.
Definition
qgsnewmemorylayerdialog.cpp:41
QgsNewMemoryLayerDialog::QgsNewMemoryLayerDialog
QgsNewMemoryLayerDialog(QWidget *parent=nullptr, Qt::WindowFlags fl=QgsGuiUtils::ModalDialogFlags)
New dialog constructor.
Definition
qgsnewmemorylayerdialog.cpp:57
QgsVectorLayer
Represents a vector layer which manages a vector based dataset.
Definition
qgsvectorlayer.h:414
SIP_TRANSFERTHIS
#define SIP_TRANSFERTHIS
Definition
qgis_sip.h:52
qgsguiutils.h
qgshelp.h
qgswkbtypes.h
Generated on
for QGIS API Documentation by
1.17.0