ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
facetsExportDlg.cpp
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #include "facetsExportDlg.h"
9 
10 // Qt
11 #include <QFileDialog>
12 
13 // System
14 #include <assert.h>
15 
17  : QDialog(parent, Qt::Tool), Ui::FacetsExportDlg(), m_mode(mode) {
18  setupUi(this);
19 
20  connect(browseToolButton, &QAbstractButton::clicked, this,
22 }
23 
25  QString saveFileFilter;
26  switch (m_mode) {
27  case SHAPE_FILE_IO:
28  saveFileFilter = "Shapefile (*.shp)";
29  break;
30  case ASCII_FILE_IO:
31  saveFileFilter = "ASCII table (*.csv)";
32  break;
33  default:
34  assert(false);
35  return;
36  }
37 
38  // open file saving dialog
39  QString outputFilename = QFileDialog::getSaveFileName(
40  0, "Select destination", destinationPathLineEdit->text(),
41  saveFileFilter);
42 
43  if (outputFilename.isEmpty()) return;
44 
45  destinationPathLineEdit->setText(outputFilename);
46 }
Dialog for exporting facets or facets info (qFacets plugin)
void browseDestination()
Called when the 'browse' tool button is pressed.
FacetsExportDlg(IOMode mode, QWidget *parent=0)
Default constructor.
IOMode m_mode
Current I/O mode.
IOMode
Usage mode.