SciDAVis  1.D4
Public Types | Public Member Functions | Private Slots | Private Member Functions | Private Attributes
ImportASCIIDialog Class Reference

Import ASCII file(s) dialog. More...

#include <ImportASCIIDialog.h>

Inheritance diagram for ImportASCIIDialog:
ExtensibleFileDialog

List of all members.

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.

Detailed Description

Import ASCII file(s) dialog.


Member Enumeration Documentation

Possible destinations for the imported data.

Important: Keep this in sync with the initialization of d_import_mode in initAdvancedOptions().

Enumerator:
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)


Constructor & Destructor Documentation

ImportASCIIDialog::ImportASCIIDialog ( bool  importModeEnabled,
QWidget *  parent = 0,
bool  extended = true,
Qt::WFlags  flags = 0 
)

Member Function Documentation

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().

bool ImportASCIIDialog::convertToNumeric ( ) const
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().

void ImportASCIIDialog::displayHelp ( )
privateslot

Display help for advanced options.

Referenced by initAdvancedOptions().

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().

ImportMode ImportASCIIDialog::importMode ( ) const
inline

Return the selected import mode.

See also:
ImportMode

References d_import_mode.

Referenced by ApplicationWindow::importASCII().

void ImportASCIIDialog::initAdvancedOptions ( )
private
bool ImportASCIIDialog::rememberOptions ( ) const
inline

Whether the user wants the import options to be saved.

References d_remember_options.

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().

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)
privateslot

For Overwrite mode, allow only one file to be selected.

References Overwrite.

Referenced by ImportASCIIDialog().


Member Data Documentation

QComboBox * ImportASCIIDialog::boxDecimalSeparator
private
QGroupBox* ImportASCIIDialog::d_advanced_options
private

Container widget for all advanced options.

Referenced by ImportASCIIDialog(), and initAdvancedOptions().

QComboBox * ImportASCIIDialog::d_column_separator
private
QCheckBox * ImportASCIIDialog::d_convert_to_numeric
private
QPushButton* ImportASCIIDialog::d_help_button
private

Referenced by initAdvancedOptions().

QSpinBox* ImportASCIIDialog::d_ignored_lines
private
QComboBox* ImportASCIIDialog::d_import_mode
private
QCheckBox* ImportASCIIDialog::d_remember_options
private
QCheckBox* ImportASCIIDialog::d_rename_columns
private
QCheckBox * ImportASCIIDialog::d_simplify_spaces
private
QCheckBox * ImportASCIIDialog::d_strip_spaces
private

The documentation for this class was generated from the following files: