QGIS API Documentation 3.40.0-Bratislava (b56115d8743)
Loading...
Searching...
No Matches
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
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#include "qgsguiutils.h"
22#include "qgshelp.h"
23
24#include "qgswkbtypes.h"
25#include "qgis_gui.h"
26#include "qgis_sip.h"
27
32class GUI_EXPORT QgsNewVectorLayerDialog: public QDialog, private Ui::QgsNewVectorLayerDialogBase
33{
34 Q_OBJECT
35
36 public:
37
47 Q_DECL_DEPRECATED static QString runAndCreateLayer( QWidget *parent = nullptr, QString *enc = nullptr, const QgsCoordinateReferenceSystem &crs = QgsCoordinateReferenceSystem(),
48 const QString &initialPath = QString() ) SIP_DEPRECATED;
49
71 static QString execAndCreateLayer( QString &errorMessage SIP_OUT, QWidget *parent = nullptr, const QString &initialPath = QString(), QString *encoding SIP_OUT = nullptr, const QgsCoordinateReferenceSystem &crs = QgsCoordinateReferenceSystem() );
72
76 QgsNewVectorLayerDialog( QWidget *parent SIP_TRANSFERTHIS = nullptr, Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags );
78 Qgis::WkbType selectedType() const;
80 void attributes( QList< QPair<QString, QString> > &at ) const;
82 QString selectedFileFormat() const;
84 QString selectedFileEncoding() const;
85
91 QString filename() const;
92
100 void setFilename( const QString &filename );
101
107
112 void setCrs( const QgsCoordinateReferenceSystem &crs );
113
114 public slots:
115 void accept() override;
116
117 private slots:
118 void mAddAttributeButton_clicked();
119 void mRemoveAttributeButton_clicked();
120 void mFileFormatComboBox_currentIndexChanged( int index );
121 void mTypeBox_currentIndexChanged( int index );
122 void checkOk();
123
125 void showHelp();
126 void nameChanged( const QString & );
127 void selectionChanged();
128 void moveFieldsUp();
129 void moveFieldsDown();
130
131 private:
132 QPushButton *mOkButton = nullptr;
133
134 void updateExtension();
135};
136
137#endif //qgsnewvectorlayerdialog_H
WkbType
The WKB type describes the number of dimensions a geometry has.
Definition qgis.h:256
This class represents a coordinate reference system (CRS).
#define SIP_DEPRECATED
Definition qgis_sip.h:106
#define SIP_TRANSFERTHIS
Definition qgis_sip.h:53
#define SIP_OUT
Definition qgis_sip.h:58
const QgsCoordinateReferenceSystem & crs