ImportASCIIDialog Class Reference

#include <ImportASCIIDialog.h>

Inheritance diagram for ImportASCIIDialog:

ExtensibleFileDialog

List of all members.


Detailed Description

Import ASCII file(s) dialog.

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
PreviewMatrixd_preview_matrix
QStackedWidget * d_preview_stack
PreviewTabled_preview_table
QCheckBox * d_read_only
QCheckBox * d_rename_columns
QCheckBox * d_simplify_spaces
QCheckBox * d_strip_spaces

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)
NewMatrices  create a new matrix for each file
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 QtiPlot)


Constructor & Destructor Documentation

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


Member Function Documentation

void ImportASCIIDialog::changePreviewFile ( const QString &  path  )  [private, slot]

References d_current_path, and preview().

Referenced by ImportASCIIDialog().

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]

Display help for advanced options.

Referenced by initAdvancedOptions().

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.

See also:
ImportMode

References d_import_mode.

Referenced by ApplicationWindow::importASCII(), previewMatrix(), and previewTable().

void ImportASCIIDialog::initAdvancedOptions (  )  [private]

void ImportASCIIDialog::initPreview ( int  previewMode  )  [private]

void ImportASCIIDialog::preview (  )  [private, slot]

void ImportASCIIDialog::previewMatrix (  )  [private]

void ImportASCIIDialog::previewTable (  )  [private]

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]

References d_import_mode, and d_preview_button.

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  )  [private, slot]

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

References initPreview(), and Overwrite.

Referenced by ImportASCIIDialog().


Member Data Documentation

QComboBox * ImportASCIIDialog::boxEndLine [private]

Container widget for all advanced options.

Referenced by ImportASCIIDialog(), and initAdvancedOptions().

QPushButton* ImportASCIIDialog::d_help_button [private]

Referenced by initAdvancedOptions().

QCheckBox * ImportASCIIDialog::d_import_comments [private]

QComboBox* ImportASCIIDialog::d_import_mode [private]

QStackedWidget* ImportASCIIDialog::d_preview_stack [private]

QCheckBox* ImportASCIIDialog::d_read_only [private]

QCheckBox * ImportASCIIDialog::d_simplify_spaces [private]

QCheckBox * ImportASCIIDialog::d_strip_spaces [private]


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

Generated on Tue Jun 17 08:36:16 2008 for QtiPlot by  doxygen 1.5.5