|
QtiPlot
0.9.8.2
|
Import ASCII file(s) dialog. More...
#include <ImportASCIIDialog.h>
Public Types | |
| enum | ImportMode { NewTables, NewMatrices, NewColumns, NewRows, Overwrite } |
| Possible destinations for the imported data. More... | |
Public Slots | |
| void | selectFilter (const QString &filter) |
Public Member Functions | |
| QStringList | columnFormats () |
| const QString | columnSeparator () const |
| Return the selected column separator. More... | |
| QList< int > | columnTypes () |
| QString | commentString () |
| Returns a string used to comment lines when importing ASCII files. More... | |
| QLocale | decimalSeparators () |
| Returns a locale having the decimal separators set to user custom settings. More... | |
| int | endLineChar () |
| Returns the convention used for the end line character! More... | |
| int | ignoredLines () const |
| Return the number of lines to be skipped at the start of each file. More... | |
| ImportASCIIDialog (bool new_windows_only, QWidget *parent=0, bool extended=true, Qt::WFlags flags=0) | |
| Constructor. More... | |
| bool | importComments () |
| Returns true if the second line of the ASCII file should be used to set comments in table. More... | |
| ImportMode | importMode () const |
| Return the selected import mode. More... | |
| bool | readOnly () const |
| Whether the user wants the import options to be saved. More... | |
| bool | renameColumns () const |
| Whether to rename columns based on the first (non-skipped) line. More... | |
| void | setColumnSeparator (const QString &sep) |
| Set the selected columns separator. More... | |
| void | setCurrentPath (const QString &path) |
| bool | simplifySpaces () const |
| Whether to replace sequences of whitespace charecters with a single space. More... | |
| bool | stripSpaces () const |
| Whether to remove whitespace from beginning and end of lines. More... | |
| bool | useFirstRow () const |
| bool | useSecondRow () const |
Public Member Functions inherited from ExtensibleFileDialog | |
| ExtensibleFileDialog (QWidget *parent=0, bool extended=true, Qt::WFlags flags=0) | |
| Constructor. More... | |
| bool | isExtendable () |
| Tells weather the dialog has a valid extension widget. More... | |
| bool | isExtended () |
| void | setEditableFilter (bool on=true) |
| Enables/Disables editing of the file type filter. More... | |
| void | setExtended (bool extended) |
| Toggle extension widget on/off. More... | |
| void | setExtensionWidget (QWidget *extension) |
| Set the extension widget to be displayed when the user presses the toggle button. More... | |
| void | setExtentionToggleButtonText (const QString &text) |
| Sets the text to be displayed in the toggle button. More... | |
Private Slots | |
| void | changePreviewFile (const QString &path) |
| void | displayHelp () |
| Display help for advanced options. More... | |
| void | enableComments () |
| void | enableTableOptions (bool on) |
| Enable/Disable options which are only available for tables. More... | |
| void | preview () |
| void | showColTypeDialog () |
| void | updateImportMode (int mode) |
| For Overwrite mode, allow only one file to be selected. More... | |
Private Member Functions | |
| void | closeEvent (QCloseEvent *) |
| void | initAdvancedOptions () |
| Initialise d_advanced_options and everything it contains. More... | |
| 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. More... | |
| QPushButton * | d_col_types_button |
| QComboBox * | d_column_separator |
| QLineEdit * | d_comment_string |
| QString | d_current_path |
| QComboBox * | d_first_line_role |
| 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 |
Additional Inherited Members | |
Protected Attributes inherited from ExtensibleFileDialog | |
| QPushButton * | d_extension_toggle |
| Button for toggling display of extension on/off. More... | |
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().
| 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_first_row_role, 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_first_line_role, 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(), preview(), ApplicationWindow::renameColumns, selectFilter(), setColumnSeparator(), ExtensibleFileDialog::setEditableFilter(), ExtensibleFileDialog::setExtensionWidget(), setNewWindowsOnly(), ApplicationWindow::simplify_spaces, ApplicationWindow::strip_spaces, and updateImportMode().
|
privateslot |
References d_current_path, and preview().
Referenced by ImportASCIIDialog(), and setCurrentPath().
|
private |
References ApplicationWindow::d_ASCII_file_filter, ApplicationWindow::d_ASCII_import_first_row_role, ApplicationWindow::d_ASCII_import_preview, ApplicationWindow::d_extended_import_ASCII_dialog, d_first_line_role, ApplicationWindow::d_import_ASCII_dialog_size, d_preview_button, ApplicationWindow::d_preview_lines, d_preview_lines_box, and ExtensibleFileDialog::isExtended().
|
inline |
References PreviewTable::columnFormats(), and d_preview_table.
Referenced by ApplicationWindow::importASCII().
| 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().
|
inline |
References PreviewTable::columnTypes(), and d_preview_table.
Referenced by ApplicationWindow::importASCII().
|
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().
|
privateslot |
Display help for advanced options.
Referenced by initAdvancedOptions().
|
privateslot |
References d_first_line_role, d_import_comments, and d_rename_columns.
Referenced by initAdvancedOptions().
|
privateslot |
Enable/Disable options which are only available for tables.
References d_col_types_button, d_import_comments, d_read_only, and d_rename_columns.
Referenced by initPreview().
|
inline |
Returns the convention used for the end line character!
References boxEndLine.
Referenced by ApplicationWindow::importASCII().
|
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 | ( | ) |
Returns true if the second line of the ASCII file should be used to set comments in table.
References d_first_line_role, d_import_comments, and d_rename_columns.
Referenced by ApplicationWindow::importASCII(), and previewTable().
|
inline |
Return the selected import mode.
References d_import_mode.
Referenced by ApplicationWindow::importASCII(), previewMatrix(), and previewTable().
|
private |
Initialise d_advanced_options and everything it contains.
References boxDecimalSeparator, boxEndLine, d_advanced_options, d_col_types_button, d_column_separator, d_comment_string, d_first_line_role, 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(), enableComments(), preview(), and showColTypeDialog().
Referenced by ImportASCIIDialog().
|
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().
|
privateslot |
References d_preview_button, d_preview_matrix, d_preview_stack, d_preview_table, previewMatrix(), and previewTable().
Referenced by changePreviewFile(), ImportASCIIDialog(), initAdvancedOptions(), and initPreview().
|
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().
|
private |
References boxEndLine, PreviewTable::clear(), columnSeparator(), d_comment_string, d_current_path, d_ignored_lines, d_import_mode, d_preview_lines_box, d_preview_table, d_simplify_spaces, d_strip_spaces, decimalSeparators(), PreviewTable::importASCII(), importComments(), importMode(), NewTables, Table::Overwrite, renameColumns(), and PreviewTable::resetHeader().
Referenced by preview().
|
inline |
Whether the user wants the import options to be saved.
References d_read_only.
Referenced by ApplicationWindow::importASCII().
|
inline |
Whether to rename columns based on the first (non-skipped) line.
References d_first_line_role, and d_rename_columns.
Referenced by ApplicationWindow::importASCII(), and previewTable().
|
slot |
Referenced by ApplicationWindow::importASCII(), and ImportASCIIDialog().
| void ImportASCIIDialog::setColumnSeparator | ( | const QString & | sep | ) |
Set the selected columns separator.
References d_column_separator.
Referenced by ImportASCIIDialog().
| void ImportASCIIDialog::setCurrentPath | ( | const QString & | path | ) |
References changePreviewFile(), and d_current_path.
Referenced by ApplicationWindow::importASCII().
|
private |
References d_import_mode, and d_preview_button.
Referenced by ImportASCIIDialog().
|
privateslot |
References d_preview_table, PreviewTable::setSelectedColumn(), and PreviewTable::showColTypeDialog().
Referenced by initAdvancedOptions().
|
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 initPreview(), and Overwrite.
Referenced by ImportASCIIDialog().
|
inline |
References d_rename_columns.
Referenced by ApplicationWindow::importASCII().
|
inline |
References d_import_comments.
Referenced by ApplicationWindow::importASCII().
|
private |
Referenced by decimalSeparators(), ImportASCIIDialog(), and initAdvancedOptions().
|
private |
Referenced by endLineChar(), ImportASCIIDialog(), initAdvancedOptions(), previewMatrix(), and previewTable().
|
private |
Container widget for all advanced options.
Referenced by ImportASCIIDialog(), and initAdvancedOptions().
|
private |
Referenced by enableTableOptions(), and initAdvancedOptions().
|
private |
Referenced by columnSeparator(), ImportASCIIDialog(), initAdvancedOptions(), and setColumnSeparator().
|
private |
Referenced by commentString(), ImportASCIIDialog(), initAdvancedOptions(), previewMatrix(), and previewTable().
|
private |
Referenced by changePreviewFile(), ImportASCIIDialog(), previewMatrix(), previewTable(), and setCurrentPath().
|
private |
Referenced by closeEvent(), enableComments(), ImportASCIIDialog(), importComments(), initAdvancedOptions(), and renameColumns().
|
private |
Referenced by initAdvancedOptions().
|
private |
Referenced by ignoredLines(), ImportASCIIDialog(), initAdvancedOptions(), previewMatrix(), and previewTable().
|
private |
Referenced by enableComments(), enableTableOptions(), ImportASCIIDialog(), importComments(), initAdvancedOptions(), and useSecondRow().
|
private |
Referenced by ImportASCIIDialog(), importMode(), initAdvancedOptions(), previewMatrix(), previewTable(), and setNewWindowsOnly().
|
private |
Referenced by decimalSeparators(), ImportASCIIDialog(), and initAdvancedOptions().
|
private |
Referenced by closeEvent(), ImportASCIIDialog(), initAdvancedOptions(), preview(), and setNewWindowsOnly().
|
private |
Referenced by closeEvent(), ImportASCIIDialog(), initAdvancedOptions(), previewMatrix(), and previewTable().
|
private |
Referenced by initAdvancedOptions(), initPreview(), preview(), and previewMatrix().
|
private |
Referenced by ImportASCIIDialog(), initAdvancedOptions(), initPreview(), and preview().
|
private |
Referenced by columnFormats(), columnTypes(), initAdvancedOptions(), initPreview(), preview(), previewTable(), and showColTypeDialog().
|
private |
Referenced by enableTableOptions(), ImportASCIIDialog(), initAdvancedOptions(), and readOnly().
|
private |
Referenced by enableComments(), enableTableOptions(), ImportASCIIDialog(), importComments(), initAdvancedOptions(), renameColumns(), and useFirstRow().
|
private |
Referenced by columnSeparator(), ImportASCIIDialog(), initAdvancedOptions(), previewMatrix(), previewTable(), and simplifySpaces().
|
private |
Referenced by ImportASCIIDialog(), initAdvancedOptions(), previewMatrix(), previewTable(), and stripSpaces().
1.8.6