#include <ImportASCIIDialog.h>

Public Types | |
| enum | ImportMode { NewTables, NewMatrices, NewColumns, NewRows, Overwrite } |
| Possible destinations for the imported data. More... | |
Public Member Functions | |
| const QString | columnSeparator () const |
| Return the selected column separator. | |
| QString | commentString () |
| Returns a string used to comment lines when importing ASCII files. | |
| QLocale | decimalSeparators () |
| Returns a locale having the decimal separators set to user custom settings. | |
| int | endLineChar () |
| Returns the convention used for the end line character! | |
| int | ignoredLines () const |
| Return the number of lines to be skipped at the start of each file. | |
| ImportASCIIDialog (bool new_windows_only, QWidget *parent=0, bool extended=true, Qt::WFlags flags=0) | |
| Constructor. | |
| bool | importComments () |
| Returns true if the second line of the ASCII file should be used to set comments in table. | |
| ImportMode | importMode () const |
| Return the selected import mode. | |
| bool | readOnly () 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. | |
Private Slots | |
| void | changePreviewFile (const QString &path) |
| void | displayHelp () |
| Display help for advanced options. | |
| void | enableTableOptions (bool on) |
| Enable/Disable options which are only available for tables. | |
| void | preview () |
| 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. | |
| void | initPreview (int previewMode) |
| void | previewMatrix () |
| void | previewTable () |
| void | setNewWindowsOnly (bool on) |
Private Attributes | |
| QComboBox * | boxDecimalSeparator |
| QComboBox * | boxEndLine |
| QGroupBox * | d_advanced_options |
| Container widget for all advanced options. | |
| QComboBox * | d_column_separator |
| QLineEdit * | d_comment_string |
| QString | d_current_path |
| QPushButton * | d_help_button |
| QSpinBox * | d_ignored_lines |
| QCheckBox * | d_import_comments |
| QComboBox * | d_import_mode |
| QCheckBox * | d_omit_thousands_sep |
| QCheckBox * | d_preview_button |
| QSpinBox * | d_preview_lines_box |
| PreviewMatrix * | d_preview_matrix |
| QStackedWidget * | d_preview_stack |
| PreviewTable * | d_preview_table |
| QCheckBox * | d_read_only |
| QCheckBox * | d_rename_columns |
| QCheckBox * | d_simplify_spaces |
| QCheckBox * | d_strip_spaces |
Possible destinations for the imported data.
Important: Keep this in sync with the initialization of d_import_mode in initAdvancedOptions().
| ImportASCIIDialog::ImportASCIIDialog | ( | bool | new_windows_only, | |
| 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, boxEndLine, changePreviewFile(), ApplicationWindow::columnSeparator, d_advanced_options, ApplicationWindow::d_ASCII_comment_string, ApplicationWindow::d_ASCII_end_line, ApplicationWindow::d_ASCII_import_comments, ApplicationWindow::d_ASCII_import_locale, ApplicationWindow::d_ASCII_import_mode, ApplicationWindow::d_ASCII_import_preview, ApplicationWindow::d_ASCII_import_read_only, d_column_separator, d_comment_string, d_current_path, d_ignored_lines, d_import_comments, d_import_mode, d_omit_thousands_sep, d_preview_button, ApplicationWindow::d_preview_lines, d_preview_lines_box, d_preview_stack, d_read_only, d_rename_columns, d_simplify_spaces, d_strip_spaces, ApplicationWindow::ignoredLines, initAdvancedOptions(), initPreview(), ApplicationWindow::locale(), preview(), ApplicationWindow::renameColumns, setColumnSeparator(), ExtensibleFileDialog::setExtensionWidget(), setNewWindowsOnly(), ApplicationWindow::simplify_spaces, ApplicationWindow::strip_spaces, and updateImportMode().
| void ImportASCIIDialog::changePreviewFile | ( | const QString & | path | ) | [private, slot] |
| void ImportASCIIDialog::closeEvent | ( | QCloseEvent * | e | ) | [private] |
| const QString ImportASCIIDialog::columnSeparator | ( | ) | const |
Return the selected column separator.
References d_column_separator, and d_simplify_spaces.
Referenced by ApplicationWindow::importASCII(), previewMatrix(), and previewTable().
| QString ImportASCIIDialog::commentString | ( | ) | [inline] |
Returns a string used to comment lines when importing ASCII files.
References d_comment_string.
Referenced by ApplicationWindow::importASCII().
| QLocale ImportASCIIDialog::decimalSeparators | ( | ) |
Returns a locale having the decimal separators set to user custom settings.
References boxDecimalSeparator, and d_omit_thousands_sep.
Referenced by ApplicationWindow::importASCII(), previewMatrix(), and previewTable().
| void ImportASCIIDialog::displayHelp | ( | ) | [private, slot] |
| void ImportASCIIDialog::enableTableOptions | ( | bool | on | ) | [private, slot] |
Enable/Disable options which are only available for tables.
References d_import_comments, d_read_only, and d_rename_columns.
Referenced by initPreview().
| int ImportASCIIDialog::endLineChar | ( | ) | [inline] |
Returns the convention used for the end line character!
References boxEndLine.
Referenced by ApplicationWindow::importASCII().
| int ImportASCIIDialog::ignoredLines | ( | ) | const [inline] |
Return the number of lines to be skipped at the start of each file.
References d_ignored_lines.
Referenced by ApplicationWindow::importASCII().
| bool ImportASCIIDialog::importComments | ( | ) | [inline] |
Returns true if the second line of the ASCII file should be used to set comments in table.
References d_import_comments.
Referenced by ApplicationWindow::importASCII().
| ImportMode ImportASCIIDialog::importMode | ( | ) | const [inline] |
Return the selected import mode.
References d_import_mode.
Referenced by ApplicationWindow::importASCII(), previewMatrix(), and previewTable().
| void ImportASCIIDialog::initAdvancedOptions | ( | ) | [private] |
Initialise d_advanced_options and everything it contains.
References boxDecimalSeparator, boxEndLine, d_advanced_options, d_column_separator, d_comment_string, d_help_button, d_ignored_lines, d_import_comments, d_import_mode, d_omit_thousands_sep, d_preview_button, d_preview_lines_box, d_preview_matrix, d_preview_stack, d_preview_table, d_read_only, d_rename_columns, d_simplify_spaces, d_strip_spaces, displayHelp(), and preview().
Referenced by ImportASCIIDialog().
| void ImportASCIIDialog::initPreview | ( | int | previewMode | ) | [private] |
References ApplicationWindow::activeWindow(), ApplicationWindow::d_decimal_digits, d_preview_matrix, d_preview_stack, d_preview_table, enableTableOptions(), NewColumns, NewMatrices, NewRows, NewTables, Overwrite, preview(), and PreviewTable::setNumericPrecision().
Referenced by ImportASCIIDialog(), and updateImportMode().
| void ImportASCIIDialog::preview | ( | ) | [private, slot] |
References d_preview_button, d_preview_matrix, d_preview_stack, d_preview_table, previewMatrix(), and previewTable().
Referenced by changePreviewFile(), ImportASCIIDialog(), initAdvancedOptions(), and initPreview().
| void ImportASCIIDialog::previewMatrix | ( | ) | [private] |
References boxEndLine, PreviewMatrix::clear(), columnSeparator(), d_comment_string, d_current_path, d_ignored_lines, d_import_mode, d_preview_lines_box, d_preview_matrix, d_simplify_spaces, d_strip_spaces, decimalSeparators(), PreviewMatrix::importASCII(), importMode(), NewMatrices, and Matrix::Overwrite.
Referenced by preview().
| void ImportASCIIDialog::previewTable | ( | ) | [private] |
References boxEndLine, PreviewTable::clear(), columnSeparator(), d_comment_string, d_current_path, d_ignored_lines, d_import_comments, d_import_mode, d_preview_lines_box, d_preview_table, d_rename_columns, d_simplify_spaces, d_strip_spaces, decimalSeparators(), PreviewTable::importASCII(), importMode(), NewTables, Table::Overwrite, PreviewTable::resetHeader(), and PreviewTable::updateDecimalSeparators().
Referenced by preview().
| bool ImportASCIIDialog::readOnly | ( | ) | const [inline] |
Whether the user wants the import options to be saved.
References d_read_only.
Referenced by ApplicationWindow::importASCII().
| bool ImportASCIIDialog::renameColumns | ( | ) | const [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().
| void ImportASCIIDialog::setNewWindowsOnly | ( | bool | on | ) | [private] |
| bool ImportASCIIDialog::simplifySpaces | ( | ) | const [inline] |
Whether to replace sequences of whitespace charecters with a single space.
References d_simplify_spaces.
Referenced by ApplicationWindow::importASCII().
| bool ImportASCIIDialog::stripSpaces | ( | ) | const [inline] |
Whether to remove whitespace from beginning and end of lines.
References d_strip_spaces.
Referenced by ApplicationWindow::importASCII().
| void ImportASCIIDialog::updateImportMode | ( | int | mode | ) | [private, slot] |
For Overwrite mode, allow only one file to be selected.
References initPreview(), and Overwrite.
Referenced by ImportASCIIDialog().
QComboBox * ImportASCIIDialog::boxDecimalSeparator [private] |
Referenced by decimalSeparators(), ImportASCIIDialog(), and initAdvancedOptions().
QComboBox * ImportASCIIDialog::boxEndLine [private] |
Referenced by endLineChar(), ImportASCIIDialog(), initAdvancedOptions(), previewMatrix(), and previewTable().
QGroupBox* ImportASCIIDialog::d_advanced_options [private] |
Container widget for all advanced options.
Referenced by ImportASCIIDialog(), and initAdvancedOptions().
QComboBox * ImportASCIIDialog::d_column_separator [private] |
Referenced by columnSeparator(), ImportASCIIDialog(), initAdvancedOptions(), and setColumnSeparator().
QLineEdit* ImportASCIIDialog::d_comment_string [private] |
Referenced by commentString(), ImportASCIIDialog(), initAdvancedOptions(), previewMatrix(), and previewTable().
QString ImportASCIIDialog::d_current_path [private] |
Referenced by changePreviewFile(), ImportASCIIDialog(), previewMatrix(), and previewTable().
QPushButton* ImportASCIIDialog::d_help_button [private] |
Referenced by initAdvancedOptions().
QSpinBox* ImportASCIIDialog::d_ignored_lines [private] |
Referenced by ignoredLines(), ImportASCIIDialog(), initAdvancedOptions(), previewMatrix(), and previewTable().
QCheckBox * ImportASCIIDialog::d_import_comments [private] |
Referenced by enableTableOptions(), ImportASCIIDialog(), importComments(), initAdvancedOptions(), and previewTable().
QComboBox* ImportASCIIDialog::d_import_mode [private] |
Referenced by ImportASCIIDialog(), importMode(), initAdvancedOptions(), previewMatrix(), previewTable(), and setNewWindowsOnly().
QCheckBox * ImportASCIIDialog::d_omit_thousands_sep [private] |
Referenced by decimalSeparators(), ImportASCIIDialog(), and initAdvancedOptions().
QCheckBox* ImportASCIIDialog::d_preview_button [private] |
Referenced by closeEvent(), ImportASCIIDialog(), initAdvancedOptions(), preview(), and setNewWindowsOnly().
QSpinBox * ImportASCIIDialog::d_preview_lines_box [private] |
Referenced by closeEvent(), ImportASCIIDialog(), initAdvancedOptions(), previewMatrix(), and previewTable().
PreviewMatrix* ImportASCIIDialog::d_preview_matrix [private] |
Referenced by initAdvancedOptions(), initPreview(), preview(), and previewMatrix().
QStackedWidget* ImportASCIIDialog::d_preview_stack [private] |
Referenced by ImportASCIIDialog(), initAdvancedOptions(), initPreview(), and preview().
PreviewTable* ImportASCIIDialog::d_preview_table [private] |
Referenced by initAdvancedOptions(), initPreview(), preview(), and previewTable().
QCheckBox* ImportASCIIDialog::d_read_only [private] |
Referenced by enableTableOptions(), ImportASCIIDialog(), initAdvancedOptions(), and readOnly().
QCheckBox* ImportASCIIDialog::d_rename_columns [private] |
Referenced by enableTableOptions(), ImportASCIIDialog(), initAdvancedOptions(), previewTable(), and renameColumns().
QCheckBox * ImportASCIIDialog::d_simplify_spaces [private] |
Referenced by columnSeparator(), ImportASCIIDialog(), initAdvancedOptions(), previewMatrix(), previewTable(), and simplifySpaces().
QCheckBox * ImportASCIIDialog::d_strip_spaces [private] |
Referenced by ImportASCIIDialog(), initAdvancedOptions(), previewMatrix(), previewTable(), and stripSpaces().
1.5.6