QGIS API Documentation 3.41.0-Master (57ec4277f5e)
Loading...
Searching...
No Matches
qgspointcloudlayersaveasdialog.h
Go to the documentation of this file.
1/***************************************************************************
2 qgspointcloudlayersaveasdialog.h
3 Dialog to select destination, type and crs to save as pointcloud layers
4 -------------------
5 begin : July 2022
6 copyright : (C) 2022 by Stefanos Natsis
7 email : uclaros at gmail dot com
8 ***************************************************************************/
9
10/***************************************************************************
11 * *
12 * This program is free software; you can redistribute it and/or modify *
13 * it under the terms of the GNU General Public License as published by *
14 * the Free Software Foundation; either version 2 of the License, or *
15 * (at your option) any later version. *
16 * *
17 ***************************************************************************/
18#ifndef QGSPOINTCLOUDLAYERSAVEASDIALOG_H
19#define QGSPOINTCLOUDLAYERSAVEASDIALOG_H
20
21#include "ui_qgspointcloudlayersaveasdialogbase.h"
22#include <QDialog>
23#include "qgshelp.h"
24#include "qgsfields.h"
25#include "qgsvectorfilewriter.h"
26#include "qgis_gui.h"
28
29#define SIP_NO_FILE
30
32
39class GUI_EXPORT QgsPointCloudLayerSaveAsDialog : public QDialog, private Ui::QgsPointCloudLayerSaveAsDialogBase
40{
41 Q_OBJECT
42
43 public:
47 QgsPointCloudLayerSaveAsDialog( QgsPointCloudLayer *layer, QWidget *parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags() );
48
54
58 QString filename() const;
59
63 QString layername() const;
64
68 QgsCoordinateReferenceSystem crsObject() const;
69
73 void setMapCanvas( QgsMapCanvas *canvas );
74
80 bool addToCanvas() const;
81
87 void setAddToCanvas( bool checked );
88
93 bool hasFilterExtent() const;
94
99 QgsRectangle filterExtent() const;
100
104 bool hasFilterLayer() const;
105
109 QgsMapLayer *filterLayer() const;
110
114 bool filterLayerSelectedOnly() const;
115
120 bool hasAttributes() const;
121
125 QStringList attributes() const;
126
131 bool hasZRange() const;
132
137 QgsDoubleRange zRange() const;
138
143 bool hasPointsLimit() const;
144
149 int pointsLimit() const;
150
152 QgsVectorFileWriter::ActionOnExistingFile creationActionOnExistingFile() const;
153
154 private slots:
155
156 void mFormatComboBox_currentIndexChanged( int idx );
157 void mFilterGeometryGroupBoxCheckToggled( bool checked );
158 void mMinimumZSpinBoxValueChanged( const double value );
159 void mMaximumZSpinBoxValueChanged( const double value );
160 void mFilterGeometryLayerChanged( QgsMapLayer *layer );
161 void mCrsSelector_crsChanged( const QgsCoordinateReferenceSystem &crs );
162 void showHelp();
163 void accept() override;
164 void mSelectAllAttributes_clicked();
165 void mDeselectAllAttributes_clicked();
166
167 private:
168 void setup();
169
173 static QString getTranslatedNameForFormat( QgsPointCloudLayerExporter::ExportFormat format );
174
178 static QString getFilterForFormat( QgsPointCloudLayerExporter::ExportFormat format );
179
180 QgsCoordinateReferenceSystem mSelectedCrs;
181
182 QgsRectangle mLayerExtent;
184 QgsPointCloudLayer *mLayer = nullptr;
185 QgsMapCanvas *mMapCanvas = nullptr;
186 QgsVectorFileWriter::ActionOnExistingFile mActionOnExistingFile;
187 QString mDefaultOutputLayerNameFromInputLayerName;
188 QString mLastUsedFilename;
189 bool mWasAddToCanvasForced = false;
190};
191
192#endif // QGSPOINTCLOUDLAYERSAVEASDIALOG_H
This class represents a coordinate reference system (CRS).
QgsRange which stores a range of double values.
Definition qgsrange.h:231
Map canvas is a class for displaying all GIS data types on a canvas.
Base class for all map layer types.
Definition qgsmaplayer.h:76
ExportFormat
Supported export formats for point clouds.
Class to select destination file, type and CRS for ogr layers.
Represents a map layer supporting display of point clouds.
A rectangle specified with double values.
ActionOnExistingFile
Enumeration to describe how to handle existing files.
const QgsCoordinateReferenceSystem & crs