ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
profileImportDlg.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 "profileImportDlg.h"
9 
10 // Qt
11 #include <QFileDialog>
12 
13 // System
14 #include <assert.h>
15 
17  : QDialog(parent, Qt::Tool), Ui::ProfileImportDlg() {
18  setupUi(this);
19 
20  connect(browseToolButton, &QAbstractButton::clicked, this,
22 }
23 
25  return axisDimComboBox->currentIndex();
26 }
27 
29  QString filter("2D profile (*.txt)");
30 
31  // open file loading dialog
32  QString filename = QFileDialog::getOpenFileName(
33  0, "Select profile file", getFilename(), filter
34 #if defined(Q_OS_WIN) && defined(_DEBUG)
35  ,
36  0, QFileDialog::DontUseNativeDialog
37 #endif
38 
39  );
40 
41  if (filename.isEmpty()) return;
42 
44 }
45 
47  inputFileLineEdit->setText(filename);
48 }
49 
50 QString ProfileImportDlg::getFilename() const {
51  return inputFileLineEdit->text();
52 }
53 
55  return absoluteHeightValuesCheckBox->isChecked();
56 }
std::string filename
Dialog for importing a 2D revolution profile (qSRA plugin)
QString getFilename() const
Returns input filename (on completion)
int getAxisDimension() const
bool absoluteHeightValues() const
ProfileImportDlg(QWidget *parent=0)
Default constructor.
void setDefaultFilename(QString filename)
Sets default filename.
void browseFile()
Called when the 'browse' tool button is pressed.