ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
AsciiSaveDlg.h
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 #pragma once
9 
10 // local
11 #include "CV_io.h"
12 
13 // Qt
14 #include <QDialog>
15 
16 class Ui_AsciiSaveDialog;
17 
19 class CV_IO_LIB_API AsciiSaveDlg : public QDialog {
20  Q_OBJECT
21 
22 public:
24  explicit AsciiSaveDlg(QWidget* parent = nullptr);
25 
27  virtual ~AsciiSaveDlg();
28 
30  bool saveColumnsNamesHeader() const;
32  void enableSaveColumnsNamesHeader(bool state);
33 
35  bool savePointCountHeader() const;
37  void enableSavePointCountHeader(bool state);
38 
40  unsigned char getSeparator() const;
41 
43 
48  void setSeparatorIndex(int index);
50  int getSeparatorIndex() const;
51 
53  int coordsPrecision() const;
55  void setCoordsPrecision(int prec);
56 
58  int sfPrecision() const;
60  void setSfPrecision(int prec);
61 
63  bool swapColorAndSF() const;
65  void enableSwapColorAndSF(bool state);
66 
68  void setAutoShow(bool state) { m_autoShow = state; }
70  bool autoShown() const { return m_autoShow; }
71 
73  void setSaveFloatColors(bool state);
76  bool saveFloatColors() const;
77 
79  void setSaveAlphaChannel(bool state);
81  bool saveAlphaChannel() const;
82 
83 protected slots:
84 
86  void acceptAndSaveSettings();
87 
88 protected:
90  Ui_AsciiSaveDialog* m_ui;
91 
93  void initFromPersistentSettings();
94 
96  bool m_autoShow;
97 };
#define CV_IO_LIB_API
Definition: CV_io.h:15
#define slots
Dialog for configuration of ASCII files saving sequence.
Definition: AsciiSaveDlg.h:19
bool autoShown() const
Returns whether this dialog automatically appears or not.
Definition: AsciiSaveDlg.h:70
bool m_autoShow
Whether this dialog should be automatically shown or not.
Definition: AsciiSaveDlg.h:96
void setAutoShow(bool state)
Sets whether this dialog should appear or not by default.
Definition: AsciiSaveDlg.h:68
Ui_AsciiSaveDialog * m_ui
Associated UI.
Definition: AsciiSaveDlg.h:90