QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
gui
qgsnewvectorlayerdialog.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsnewvectorlayerdialog.h - description
3
-------------------
4
begin : October 2004
5
copyright : (C) 2004 by Marco Hugentobler
6
email : marco.hugentobler@autoform.ch
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 qgsnewvectorlayerdialog_H
18
#define qgsnewvectorlayerdialog_H
19
20
#include "ui_qgsnewvectorlayerdialogbase.h"
21
22
#include "qgis_gui.h"
23
#include "
qgis_sip.h
"
24
#include "
qgsguiutils.h
"
25
#include "
qgshelp.h
"
26
#include "
qgswkbtypes.h
"
27
33
class
GUI_EXPORT
QgsNewVectorLayerDialog
:
public
QDialog,
private
Ui::QgsNewVectorLayerDialogBase
34
{
35
Q_OBJECT
36
37
public
:
47
Q_DECL_DEPRECATED
static
QString
runAndCreateLayer
(
48
QWidget *parent =
nullptr
, QString *enc =
nullptr
,
const
QgsCoordinateReferenceSystem
&
crs
=
QgsCoordinateReferenceSystem
(),
const
QString &initialPath = QString()
49
)
SIP_DEPRECATED
;
50
72
static
QString
execAndCreateLayer
(
73
QString &errorMessage
SIP_OUT
,
74
QWidget *parent =
nullptr
,
75
const
QString &initialPath = QString(),
76
QString *encoding
SIP_OUT
=
nullptr
,
77
const
QgsCoordinateReferenceSystem
&
crs
=
QgsCoordinateReferenceSystem
()
78
);
79
83
QgsNewVectorLayerDialog
( QWidget *parent
SIP_TRANSFERTHIS
=
nullptr
, Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags );
85
Qgis::WkbType
selectedType
()
const
;
87
void
attributes
( QList<QPair<QString, QString>> &at )
const
;
89
QString
selectedFileFormat
()
const
;
91
QString
selectedFileEncoding
()
const
;
92
98
QString
filename
()
const
;
99
107
void
setFilename
(
const
QString &
filename
);
108
113
QgsCoordinateReferenceSystem
crs
()
const
;
114
119
void
setCrs
(
const
QgsCoordinateReferenceSystem
&
crs
);
120
121
public
slots:
122
void
accept
()
override
;
123
124
private
slots:
125
void
mAddAttributeButton_clicked();
126
void
mRemoveAttributeButton_clicked();
127
void
mFileFormatComboBox_currentIndexChanged(
int
index );
128
void
mTypeBox_currentIndexChanged(
int
index );
129
void
checkOk();
130
132
void
showHelp();
133
void
nameChanged(
const
QString & );
134
void
selectionChanged();
135
void
moveFieldsUp();
136
void
moveFieldsDown();
137
138
private
:
139
QPushButton *mOkButton =
nullptr
;
140
141
void
updateExtension();
142
};
143
144
#endif
//qgsnewvectorlayerdialog_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
QgsNewVectorLayerDialog::runAndCreateLayer
static Q_DECL_DEPRECATED QString runAndCreateLayer(QWidget *parent=nullptr, QString *enc=nullptr, const QgsCoordinateReferenceSystem &crs=QgsCoordinateReferenceSystem(), const QString &initialPath=QString())
Runs the dialog and creates a layer matching the dialog parameters.
Definition
qgsnewvectorlayerdialog.cpp:322
QgsNewVectorLayerDialog::accept
void accept() override
Definition
qgsnewvectorlayerdialog.cpp:352
QgsNewVectorLayerDialog::attributes
void attributes(QList< QPair< QString, QString > > &at) const
Appends the chosen attribute names and types to at.
Definition
qgsnewvectorlayerdialog.cpp:248
QgsNewVectorLayerDialog::crs
QgsCoordinateReferenceSystem crs() const
Returns the selected CRS for the new layer.
Definition
qgsnewvectorlayerdialog.cpp:213
QgsNewVectorLayerDialog::setCrs
void setCrs(const QgsCoordinateReferenceSystem &crs)
Sets the crs value for the new layer in the dialog.
Definition
qgsnewvectorlayerdialog.cpp:218
QgsNewVectorLayerDialog::filename
QString filename() const
Returns the name for the new layer.
Definition
qgsnewvectorlayerdialog.cpp:305
QgsNewVectorLayerDialog::selectedFileFormat
QString selectedFileFormat() const
Returns the file format for storage.
Definition
qgsnewvectorlayerdialog.cpp:261
QgsNewVectorLayerDialog::selectedFileEncoding
QString selectedFileEncoding() const
Returns the file format for storage.
Definition
qgsnewvectorlayerdialog.cpp:268
QgsNewVectorLayerDialog::QgsNewVectorLayerDialog
QgsNewVectorLayerDialog(QWidget *parent=nullptr, Qt::WindowFlags fl=QgsGuiUtils::ModalDialogFlags)
New dialog constructor.
Definition
qgsnewvectorlayerdialog.cpp:46
QgsNewVectorLayerDialog::execAndCreateLayer
static QString execAndCreateLayer(QString &errorMessage, QWidget *parent=nullptr, const QString &initialPath=QString(), QString *encoding=nullptr, const QgsCoordinateReferenceSystem &crs=QgsCoordinateReferenceSystem())
Runs the dialog and creates a layer matching the dialog parameters.
Definition
qgsnewvectorlayerdialog.cpp:391
QgsNewVectorLayerDialog::selectedType
Qgis::WkbType selectedType() const
Returns the selected geometry type.
Definition
qgsnewvectorlayerdialog.cpp:199
QgsNewVectorLayerDialog::setFilename
void setFilename(const QString &filename)
Sets the initial file name to show in the dialog.
Definition
qgsnewvectorlayerdialog.cpp:310
qgis_sip.h
SIP_DEPRECATED
#define SIP_DEPRECATED
Definition
qgis_sip.h:113
SIP_TRANSFERTHIS
#define SIP_TRANSFERTHIS
Definition
qgis_sip.h:52
SIP_OUT
#define SIP_OUT
Definition
qgis_sip.h:57
qgsguiutils.h
qgshelp.h
qgswkbtypes.h
Generated on
for QGIS API Documentation by
1.17.0