QGIS API Documentation  2.99.0-Master (ae4d26a)
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 : [email protected]
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 "qgis.h"
25 #include "qgis_gui.h"
26 
31 class GUI_EXPORT QgsNewVectorLayerDialog: public QDialog, private Ui::QgsNewVectorLayerDialogBase
32 {
33  Q_OBJECT
34 
35  public:
36 
41  static QString runAndCreateLayer( QWidget *parent = nullptr, QString *enc = nullptr, const QgsCoordinateReferenceSystem &crs = QgsCoordinateReferenceSystem() );
42 
43  QgsNewVectorLayerDialog( QWidget *parent SIP_TRANSFERTHIS = nullptr, Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags );
46  QgsWkbTypes::Type selectedType() const;
48  void attributes( QList< QPair<QString, QString> > &at ) const;
50  QString selectedFileFormat() const;
52  QString selectedFileEncoding() const;
53 
58  QgsCoordinateReferenceSystem crs() const;
59 
65  void setCrs( const QgsCoordinateReferenceSystem &crs );
66 
67  private slots:
68  void mAddAttributeButton_clicked();
69  void mRemoveAttributeButton_clicked();
70  void mFileFormatComboBox_currentIndexChanged( int index );
71  void mTypeBox_currentIndexChanged( int index );
72 
74  void showHelp();
75  void nameChanged( const QString & );
76  void selectionChanged();
77 
78  private:
79  QPushButton *mOkButton = nullptr;
80 };
81 
82 #endif //qgsnewvectorlayerdialog_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).