Dialog for configuration of ASCII files opening sequence.
More...
#include <AsciiOpenDlg.h>
|
using | Sequence = std::vector< SequenceItem > |
| ASCII open sequence.
|
|
|
| AsciiOpenDlg (QWidget *parent=nullptr) |
| Default constructor. More...
|
|
| ~AsciiOpenDlg () override |
| Default destructor.
|
|
void | setInput (const QString &filename, QTextStream *stream=nullptr) |
| Sets the input filename or text stream. More...
|
|
bool | restorePreviousContext () |
| Restores the previous context ('Apply all' button) More...
|
|
Sequence | getOpenSequence () const |
| Returns the whole "opening" sequence as set by the user.
|
|
unsigned | getSkippedLinesCount () const |
| Returns number of lines to skip.
|
|
unsigned char | getSeparator () const |
| Returns user selected separator.
|
|
bool | useCommaAsDecimal () const |
| Returns whether comma should be used as decimal point.
|
|
double | getAverageLineSize () const |
| Returns roughly estimated average line size (in bytes)
|
|
unsigned | getColumnsCount () const |
| Returns columns count per line.
|
|
unsigned | getMaxCloudSize () const |
| Returns the max number of points per cloud.
|
|
bool | showLabelsIn2D () const |
| Whether labels should be visible in 2D.
|
|
bool | safeSequence () const |
| Returns whether the current sequence is 'safe'. More...
|
|
void | onSeparatorChange (const QString &separator) |
| Slot called when separator changes.
|
|
void | updateTable () |
| Forces the table to update itself.
|
|
void | setSkippedLines (int linesCount) |
| Sets the number of lines to skip.
|
|
void | commaDecimalCheckBoxToggled (bool) |
| Slot called when the 'comma as decimal' checkbox is toggled.
|
|
|
static bool | CheckOpenSequence (const Sequence &sequence, QString &errorMessage) |
| Checks the "opening" sequence as set by the user. More...
|
|
static void | ResetApplyAll () |
| Resets the "apply all" flag (if set)
|
|
|
enum | ColumnType { TEXT = 0
, UNKNOWN = 1
, IGNORED = 2
, VALID = 3
} |
|
|
bool | apply () |
|
void | applyAll () |
|
void | columnsTypeHasChanged (int index) |
|
void | shortcutButtonPressed () |
|
void | checkSelectedColumnsValidity () |
|
void | autoFindBestSeparator () |
| Tries to guess the best separator automagically.
|
|
void | setSeparator (QChar) |
| Sets the current separator.
|
|
|
Ui_AsciiOpenDialog * | m_ui |
|
unsigned | m_skippedLines |
|
QChar | m_separator |
|
double | m_averageLineSize |
|
QString | m_filename |
|
QTextStream * | m_stream |
|
QString | m_headerLine |
|
std::vector< ColumnType > | m_columnType |
| Identifies columns with numbers only [mandatory].
|
|
unsigned | m_columnsCount |
|
Dialog for configuration of ASCII files opening sequence.
◆ AsciiOpenDlg()
AsciiOpenDlg::AsciiOpenDlg |
( |
QWidget * |
parent = nullptr | ) |
|
|
explicit |
Default constructor.
- Parameters
-
◆ CheckOpenSequence()
bool AsciiOpenDlg::CheckOpenSequence |
( |
const Sequence & |
sequence, |
|
|
QString & |
errorMessage |
|
) |
| |
|
static |
Checks the "opening" sequence as set by the user.
- Returns
- validity (+ error message if not)
◆ restorePreviousContext()
bool AsciiOpenDlg::restorePreviousContext |
( |
| ) |
|
Restores the previous context ('Apply all' button)
- Returns
- whether a context was saved or not
◆ safeSequence()
bool AsciiOpenDlg::safeSequence |
( |
| ) |
const |
Returns whether the current sequence is 'safe'.
A safe sequence is safe if it matches the header (if any) or if the file has less than 6 columns.
◆ setInput()
void AsciiOpenDlg::setInput |
( |
const QString & |
filename, |
|
|
QTextStream * |
stream = nullptr |
|
) |
| |
Sets the input filename or text stream.
- Parameters
-
filename | filename |
stream | text stream |
The documentation for this class was generated from the following files:
- AsciiOpenDlg.h
- AsciiOpenDlg.cpp