QGIS API Documentation 3.34.0-Prizren (ffbdd678812)
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:
44
48 QgsPointCloudLayerSaveAsDialog( QgsPointCloudLayer *layer, QWidget *parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags() );
49
55
59 QString filename() const;
60
64 QString layername() const;
65
69 QgsCoordinateReferenceSystem crsObject() const;
70
74 void setMapCanvas( QgsMapCanvas *canvas );
75
81 bool addToCanvas() const;
82
88 void setAddToCanvas( bool checked );
89
94 bool hasFilterExtent() const;
95
100 QgsRectangle filterExtent() const;
101
105 bool hasFilterLayer() const;
106
110 QgsMapLayer *filterLayer() const;
111
115 bool filterLayerSelectedOnly() const;
116
121 bool hasAttributes() const;
122
126 QStringList attributes() const;
127
132 bool hasZRange() const;
133
138 QgsDoubleRange zRange() const;
139
144 bool hasPointsLimit() const;
145
150 int pointsLimit() const;
151
153 QgsVectorFileWriter::ActionOnExistingFile creationActionOnExistingFile() const;
154
155 private slots:
156
157 void mFormatComboBox_currentIndexChanged( int idx );
158 void mFilterGeometryGroupBoxCheckToggled( bool checked );
159 void mMinimumZSpinBoxValueChanged( const double value );
160 void mMaximumZSpinBoxValueChanged( const double value );
161 void mFilterGeometryLayerChanged( QgsMapLayer *layer );
162 void mCrsSelector_crsChanged( const QgsCoordinateReferenceSystem &crs );
163 void showHelp();
164 void accept() override;
165 void mSelectAllAttributes_clicked();
166 void mDeselectAllAttributes_clicked();
167
168 private:
169
170 void setup();
171
175 static QString getTranslatedNameForFormat( QgsPointCloudLayerExporter::ExportFormat format );
176
180 static QString getFilterForFormat( QgsPointCloudLayerExporter::ExportFormat format );
181
182 QgsCoordinateReferenceSystem mSelectedCrs;
183
184 QgsRectangle mLayerExtent;
186 QgsPointCloudLayer *mLayer = nullptr;
187 QgsMapCanvas *mMapCanvas = nullptr;
188 QgsVectorFileWriter::ActionOnExistingFile mActionOnExistingFile;
189 QString mDefaultOutputLayerNameFromInputLayerName;
190 QString mLastUsedFilename;
191 bool mWasAddToCanvasForced = false;
192};
193
194#endif // QGSPOINTCLOUDLAYERSAVEASDIALOG_H
This class represents a coordinate reference system (CRS).
QgsRange which stores a range of double values.
Definition qgsrange.h:203
Map canvas is a class for displaying all GIS data types on a canvas.
Base class for all map layer types.
Definition qgsmaplayer.h:74
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
Combination of CanAddNewLayer, CanAppendToExistingLayer, CanAddNewFieldsToExistingLayer or CanDeleteL...
const QgsCoordinateReferenceSystem & crs