SciDAVis
1.D4
|
Import ASCII file(s) dialog. More...
#include <ImportASCIIDialog.h>
Public Types | |
enum | ImportMode { NewTables, NewColumns, NewRows, Overwrite } |
Possible destinations for the imported data. More... |
Public Member Functions | |
const QString | columnSeparator () const |
Return the selected column separator. | |
bool | convertToNumeric () const |
Returns whether imported data should be interpreted as numbers. | |
QLocale | decimalSeparators () |
Returns the locale chosen for conversion to numeric format. | |
int | ignoredLines () const |
Return the number of lines to be skipped at the start of each file. | |
ImportASCIIDialog (bool importModeEnabled, QWidget *parent=0, bool extended=true, Qt::WFlags flags=0) | |
Constructor. | |
ImportMode | importMode () const |
Return the selected import mode. | |
bool | rememberOptions () const |
Whether the user wants the import options to be saved. | |
bool | renameColumns () const |
Whether to rename columns based on the first (non-skipped) line. | |
void | setColumnSeparator (const QString &sep) |
Set the selected columns separator. | |
bool | simplifySpaces () const |
Whether to replace sequences of whitespace charecters with a single space. | |
bool | stripSpaces () const |
Whether to remove whitespace from beginning and end of lines. | |
Public Member Functions inherited from ExtensibleFileDialog | |
ExtensibleFileDialog (QWidget *parent=0, bool extended=true, Qt::WFlags flags=0) | |
Constructor. | |
bool | isExtendable () |
Tells weather the dialog has a valid extension widget. | |
bool | isExtended () |
void | setExtended (bool extended) |
void | setExtensionWidget (QWidget *extension) |
Set the extension widget to be displayed when the user presses the toggle button. |
Private Slots | |
void | displayHelp () |
Display help for advanced options. | |
void | updateImportMode (int mode) |
For Overwrite mode, allow only one file to be selected. |
Private Member Functions | |
void | closeEvent (QCloseEvent *) |
void | initAdvancedOptions () |
Initialise d_advanced_options and everything it contains. |
Private Attributes | |
QComboBox * | boxDecimalSeparator |
QGroupBox * | d_advanced_options |
Container widget for all advanced options. | |
QComboBox * | d_column_separator |
QCheckBox * | d_convert_to_numeric |
QPushButton * | d_help_button |
QSpinBox * | d_ignored_lines |
QComboBox * | d_import_mode |
QCheckBox * | d_remember_options |
QCheckBox * | d_rename_columns |
QCheckBox * | d_simplify_spaces |
QCheckBox * | d_strip_spaces |
Additional Inherited Members | |
Protected Attributes inherited from ExtensibleFileDialog | |
QPushButton * | d_extension_toggle |
Button for toggling display of extension on/off. |
Import ASCII file(s) dialog.
Possible destinations for the imported data.
Important: Keep this in sync with the initialization of d_import_mode in initAdvancedOptions().
NewTables |
create a new table for each file (default) |
NewColumns |
add each file as new columns to the current table |
NewRows |
add each file as new rows to the current table |
Overwrite |
replace content of current table with the selected file (like importing a single file in previous versions of SciDAVis) |
ImportASCIIDialog::ImportASCIIDialog | ( | bool | importModeEnabled, |
QWidget * | parent = 0 , |
||
bool | extended = true , |
||
Qt::WFlags | flags = 0 |
||
) |
Constructor.
importModeEnabled | flag: enable/disable import mode combo box |
parent | parent widget (only affects placement of the dialog) |
extended | flag: show/hide the advanced options on start-up |
flags | window flags |
References boxDecimalSeparator, ApplicationWindow::columnSeparator, d_advanced_options, ApplicationWindow::d_ASCII_import_locale, d_convert_to_numeric, ApplicationWindow::d_convert_to_numeric, d_ignored_lines, d_import_mode, d_rename_columns, d_simplify_spaces, d_strip_spaces, ApplicationWindow::ignoredLines, initAdvancedOptions(), ApplicationWindow::renameColumns, setColumnSeparator(), ExtensibleFileDialog::setExtensionWidget(), ApplicationWindow::simplify_spaces, ApplicationWindow::strip_spaces, and updateImportMode().
|
private |
const QString ImportASCIIDialog::columnSeparator | ( | ) | const |
Return the selected column separator.
References d_column_separator, and d_simplify_spaces.
Referenced by ApplicationWindow::importASCII().
|
inline |
Returns whether imported data should be interpreted as numbers.
References d_convert_to_numeric.
Referenced by ApplicationWindow::importASCII().
QLocale ImportASCIIDialog::decimalSeparators | ( | ) |
Returns the locale chosen for conversion to numeric format.
References boxDecimalSeparator.
Referenced by ApplicationWindow::importASCII().
|
privateslot |
Display help for advanced options.
Referenced by initAdvancedOptions().
|
inline |
Return the number of lines to be skipped at the start of each file.
References d_ignored_lines.
Referenced by ApplicationWindow::importASCII().
|
inline |
Return the selected import mode.
References d_import_mode.
Referenced by ApplicationWindow::importASCII().
|
private |
Initialise d_advanced_options and everything it contains.
References boxDecimalSeparator, d_advanced_options, d_column_separator, d_convert_to_numeric, d_help_button, d_ignored_lines, d_import_mode, d_remember_options, d_rename_columns, d_simplify_spaces, d_strip_spaces, and displayHelp().
Referenced by ImportASCIIDialog().
|
inline |
Whether the user wants the import options to be saved.
References d_remember_options.
Referenced by ApplicationWindow::importASCII().
|
inline |
Whether to rename columns based on the first (non-skipped) line.
References d_rename_columns.
Referenced by ApplicationWindow::importASCII().
void ImportASCIIDialog::setColumnSeparator | ( | const QString & | sep | ) |
Set the selected columns separator.
References d_column_separator.
Referenced by ImportASCIIDialog().
|
inline |
Whether to replace sequences of whitespace charecters with a single space.
References d_simplify_spaces.
Referenced by ApplicationWindow::importASCII().
|
inline |
Whether to remove whitespace from beginning and end of lines.
References d_strip_spaces.
Referenced by ApplicationWindow::importASCII().
|
privateslot |
For Overwrite mode, allow only one file to be selected.
References Overwrite.
Referenced by ImportASCIIDialog().
|
private |
Referenced by decimalSeparators(), ImportASCIIDialog(), and initAdvancedOptions().
|
private |
Container widget for all advanced options.
Referenced by ImportASCIIDialog(), and initAdvancedOptions().
|
private |
Referenced by columnSeparator(), initAdvancedOptions(), and setColumnSeparator().
|
private |
Referenced by convertToNumeric(), ImportASCIIDialog(), and initAdvancedOptions().
|
private |
Referenced by initAdvancedOptions().
|
private |
Referenced by ignoredLines(), ImportASCIIDialog(), and initAdvancedOptions().
|
private |
Referenced by ImportASCIIDialog(), importMode(), and initAdvancedOptions().
|
private |
Referenced by initAdvancedOptions(), and rememberOptions().
|
private |
Referenced by ImportASCIIDialog(), initAdvancedOptions(), and renameColumns().
|
private |
Referenced by columnSeparator(), ImportASCIIDialog(), initAdvancedOptions(), and simplifySpaces().
|
private |
Referenced by ImportASCIIDialog(), initAdvancedOptions(), and stripSpaces().