QGIS API Documentation  3.2.0-Bonn (bc43194)
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 );
44  ~QgsNewVectorLayerDialog() override;
46  QgsWkbTypes::Type selectedType() const;
48  void attributes( QList< QPair<QString, QString> > &at ) const;
50  QString selectedFileFormat() const;
52  QString selectedFileEncoding() const;
54  QString filename() const;
55 
60  QgsCoordinateReferenceSystem crs() const;
61 
67  void setCrs( const QgsCoordinateReferenceSystem &crs );
68 
69  private slots:
70  void mAddAttributeButton_clicked();
71  void mRemoveAttributeButton_clicked();
72  void mFileFormatComboBox_currentIndexChanged( int index );
73  void mTypeBox_currentIndexChanged( int index );
74  void checkOk();
75 
77  void showHelp();
78  void nameChanged( const QString & );
79  void selectionChanged();
80 
81  private:
82  QPushButton *mOkButton = nullptr;
83 };
84 
85 #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).