QGIS API Documentation  3.0.2-Girona (307d082)
qgsattributetypeloaddialog.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsattributetypeloaddialog.h
3  -------------------
4  begin : June 2009
5  copyright : (C) 2009 by Richard Kostecky
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 QGSATTRIBUTETYPELOADDIALOG_H
18 #define QGSATTRIBUTETYPELOADDIALOG_H
19 
20 #include "ui_qgsattributeloadfrommap.h"
21 
22 #include <vector>
23 #include "qgis_gui.h"
24 
25 class QDialog;
26 class QLayout;
27 class QgsField;
28 class QgsMapCanvas;
29 class QgsVectorLayer;
30 
35 class GUI_EXPORT QgsAttributeTypeLoadDialog: public QDialog, private Ui::QgsAttributeLoadValues
36 {
37  Q_OBJECT
38 
39  public:
41 
46  void accept() override;
47 
52  void setVectorLayer( QgsVectorLayer *layer );
53 
58  QMap<QString, QVariant> &valueMap();
59 
65  bool insertNull();
66 
67  private slots:
68 
73  void fillComboBoxes( int layerIndex );
74 
80  void createPreview( int fieldIndex, bool full = false );
81 
82 
86  void previewButtonPushed();
87 
88  private:
89 
93  void fillLayerList();
94 
98  void loadDataToValueMap();
99 
100  QgsVectorLayer *mLayer = nullptr;
101  QMap<QString, QVariant> mValueMap;
102 };
103 
104 #endif
Map canvas is a class for displaying all GIS data types on a canvas.
Definition: qgsmapcanvas.h:74
Encapsulate a field in an attribute table or data source.
Definition: qgsfield.h:48
Represents a vector layer which manages a vector based data sets.