QGIS API Documentation  3.22.4-Białowieża (ce8e65e95e)
qgsaddattrdialog.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsaddattrdialog.h - description
3  -------------------
4  begin : January 2005
5  copyright : (C) 2005 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 
18 #ifndef QGSADDATTRDIALOG_H
19 #define QGSADDATTRDIALOG_H
20 
21 // We don't want to expose this in the public API
22 #define SIP_NO_FILE
23 
24 #include "ui_qgsaddattrdialogbase.h"
25 #include "qgsguiutils.h"
26 #include "qgsfields.h"
27 #include "qgis_gui.h"
28 
29 class QgsVectorLayer;
30 
38 class GUI_EXPORT QgsAddAttrDialog: public QDialog, private Ui::QgsAddAttrDialogBase
39 {
40  Q_OBJECT
41  public:
44  QWidget *parent = nullptr, Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags );
46  QgsAddAttrDialog( const std::list<QString> &typelist,
47  QWidget *parent = nullptr, Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags );
48 
50  QgsField field() const;
51 
52  private slots:
53  void mTypeBox_currentIndexChanged( int idx );
54  void mLength_editingFinished();
55  void accept() override;
56 
57  private:
58  bool mIsShapeFile;
59 
60  void setPrecisionMinMax();
61 };
62 
63 #endif
Dialog to add a source field attribute.
QgsAddAttrDialog(const std::list< QString > &typelist, QWidget *parent=nullptr, Qt::WindowFlags fl=QgsGuiUtils::ModalDialogFlags)
constructor
Encapsulate a field in an attribute table or data source.
Definition: qgsfield.h:51
Represents a vector layer which manages a vector based data sets.
const QgsField & field
Definition: qgsfield.h:463