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 
87 
88 protected:
90  Ui_AsciiSaveDialog* m_ui;
91 
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
void enableSaveColumnsNamesHeader(bool state)
Sets whether columns names should be be saved in header.
bool m_autoShow
Whether this dialog should be automatically shown or not.
Definition: AsciiSaveDlg.h:96
virtual ~AsciiSaveDlg()
Destructor.
void acceptAndSaveSettings()
Saves dialog state to persistent settings.
void setSaveAlphaChannel(bool state)
Sets whether to save the alpha (transparency) channel.
int sfPrecision() const
Returns SF precision.
bool saveAlphaChannel() const
Returns whether to save the alpha (transparency) channel.
unsigned char getSeparator() const
Returns separator.
void setSeparatorIndex(int index)
Set separator (index)
bool savePointCountHeader() const
Returns whether the number of points should be saved in header.
bool saveColumnsNamesHeader() const
Returns whether columns names should be be saved in header.
void initFromPersistentSettings()
Inits dialog state from persistent settings.
void setCoordsPrecision(int prec)
Sets coordinates precision.
void enableSavePointCountHeader(bool state)
Sets whether the number of points should be saved in header.
int getSeparatorIndex() const
Returns separator index.
void setAutoShow(bool state)
Sets whether this dialog should appear or not by default.
Definition: AsciiSaveDlg.h:68
int coordsPrecision() const
Returns coordinates precision.
Ui_AsciiSaveDialog * m_ui
Associated UI.
Definition: AsciiSaveDlg.h:90
void setSfPrecision(int prec)
Sets SF precision.
bool swapColorAndSF() const
Returns whether SF(s) and color should be swapped.
void setSaveFloatColors(bool state)
Sets whether to save colors as float values (instead of unsigned bytes)
void enableSwapColorAndSF(bool state)
Sets whether SF(s) and color should be swapped.
AsciiSaveDlg(QWidget *parent=nullptr)
Default constructor.
bool saveFloatColors() const