scidavis  2.3.0
About: SciDAVis is a free application for Scientific Data Analysis and Visualization (a fork off of QtiPlot).
  Fossies Dox: scidavis-2.3.0.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

ImportASCIIDialog.h
Go to the documentation of this file.
1 
13 
31 #ifndef IMPORTFILESDIALOG_H
32 #define IMPORTFILESDIALOG_H
33 
34 #include "ExtensibleFileDialog.h"
35 
36 #include <QComboBox>
37 #include <QCheckBox>
38 #include <QSpinBox>
39 
40 class QGroupBox;
41 class QPushButton;
42 
45 {
46  Q_OBJECT
47 
48 public:
50 
53  enum ImportMode {
57  Overwrite
58  };
59 
61 
67  ImportASCIIDialog(bool importModeEnabled, QWidget * parent = 0, bool extended = true, Qt::WindowFlags flags = 0 );
68 
70 
73  ImportMode importMode() const { return (ImportMode) d_import_mode->currentIndex(); }
75  const QString columnSeparator() const;
77  int ignoredLines() const { return d_ignored_lines->value(); }
79  bool renameColumns() const { return d_rename_columns->isChecked(); }
81  bool simplifySpaces() const { return d_simplify_spaces->isChecked(); }
83  bool stripSpaces() const { return d_strip_spaces->isChecked(); }
85  bool rememberOptions() const { return d_remember_options->isChecked(); }
86 
88  void setColumnSeparator(const QString &sep);
89 
91  QLocale decimalSeparators();
93  bool convertToNumeric() const { return d_convert_to_numeric->isChecked(); };
94 
95 private slots:
97  void displayHelp();
99  void updateImportMode(int mode);
100 
101 private:
102  void closeEvent(QCloseEvent*);
104  void initAdvancedOptions();
105 
107  QGroupBox *d_advanced_options;
109  QPushButton *d_help_button;
110  // the actual options
112  QSpinBox *d_ignored_lines;
114 };
115 
116 
117 #endif
ImportASCIIDialog::d_ignored_lines
QSpinBox * d_ignored_lines
Definition: ImportASCIIDialog.h:112
ImportASCIIDialog::convertToNumeric
bool convertToNumeric() const
Returns whether imported data should be interpreted as numbers.
Definition: ImportASCIIDialog.h:93
ImportASCIIDialog::updateImportMode
void updateImportMode(int mode)
For Overwrite mode, allow only one file to be selected.
Definition: ImportASCIIDialog.cpp:235
ImportASCIIDialog
Import ASCII file(s) dialog.
Definition: ImportASCIIDialog.h:45
ImportASCIIDialog::d_rename_columns
QCheckBox * d_rename_columns
Definition: ImportASCIIDialog.h:113
ImportASCIIDialog::d_simplify_spaces
QCheckBox * d_simplify_spaces
Definition: ImportASCIIDialog.h:113
ImportASCIIDialog::columnSeparator
const QString columnSeparator() const
Return the selected column separator.
Definition: ImportASCIIDialog.cpp:197
ImportASCIIDialog::renameColumns
bool renameColumns() const
Whether to rename columns based on the first (non-skipped) line.
Definition: ImportASCIIDialog.h:79
ImportASCIIDialog::d_import_mode
QComboBox * d_import_mode
Definition: ImportASCIIDialog.h:111
ImportASCIIDialog::importMode
ImportMode importMode() const
Return the selected import mode.
Definition: ImportASCIIDialog.h:73
ImportASCIIDialog::ignoredLines
int ignoredLines() const
Return the number of lines to be skipped at the start of each file.
Definition: ImportASCIIDialog.h:77
ImportASCIIDialog::d_help_button
QPushButton * d_help_button
Definition: ImportASCIIDialog.h:109
ImportASCIIDialog::ImportMode
ImportMode
Possible destinations for the imported data.
Definition: ImportASCIIDialog.h:53
python-sipcmd.flags
list flags
Definition: python-sipcmd.py:61
ExtensibleFileDialog
QFileDialog plus generic extension support.
Definition: ExtensibleFileDialog.h:45
ImportASCIIDialog::stripSpaces
bool stripSpaces() const
Whether to remove whitespace from beginning and end of lines.
Definition: ImportASCIIDialog.h:83
ImportASCIIDialog::d_advanced_options
QGroupBox * d_advanced_options
Container widget for all advanced options.
Definition: ImportASCIIDialog.h:107
ImportASCIIDialog::boxDecimalSeparator
QComboBox * boxDecimalSeparator
Definition: ImportASCIIDialog.h:111
ImportASCIIDialog::rememberOptions
bool rememberOptions() const
Whether the user wants the import options to be saved.
Definition: ImportASCIIDialog.h:85
ImportASCIIDialog::d_remember_options
QCheckBox * d_remember_options
Definition: ImportASCIIDialog.h:108
ImportASCIIDialog::d_column_separator
QComboBox * d_column_separator
Definition: ImportASCIIDialog.h:111
ImportASCIIDialog::NewColumns
@ NewColumns
add each file as new columns to the current table
Definition: ImportASCIIDialog.h:55
ImportASCIIDialog::decimalSeparators
QLocale decimalSeparators()
Returns the locale chosen for conversion to numeric format.
Definition: ImportASCIIDialog.cpp:254
ImportASCIIDialog::displayHelp
void displayHelp()
Display help for advanced options.
Definition: ImportASCIIDialog.cpp:219
ImportASCIIDialog::initAdvancedOptions
void initAdvancedOptions()
Initialise d_advanced_options and everything it contains.
Definition: ImportASCIIDialog.cpp:83
ImportASCIIDialog::simplifySpaces
bool simplifySpaces() const
Whether to replace sequences of whitespace charecters with a single space.
Definition: ImportASCIIDialog.h:81
ExtensibleFileDialog.h
ImportASCIIDialog::NewTables
@ NewTables
create a new table for each file (default)
Definition: ImportASCIIDialog.h:54
ImportASCIIDialog::setColumnSeparator
void setColumnSeparator(const QString &sep)
Set the selected columns separator.
Definition: ImportASCIIDialog.cpp:172
ImportASCIIDialog::ImportASCIIDialog
ImportASCIIDialog(bool importModeEnabled, QWidget *parent=0, bool extended=true, Qt::WindowFlags flags=0)
Constructor.
Definition: ImportASCIIDialog.cpp:45
ImportASCIIDialog::closeEvent
void closeEvent(QCloseEvent *)
Definition: ImportASCIIDialog.cpp:243
ImportASCIIDialog::d_strip_spaces
QCheckBox * d_strip_spaces
Definition: ImportASCIIDialog.h:113
ImportASCIIDialog::d_convert_to_numeric
QCheckBox * d_convert_to_numeric
Definition: ImportASCIIDialog.h:108
ImportASCIIDialog::Overwrite
@ Overwrite
replace content of current table with the selected file (like importing a single file in previous ver...
Definition: ImportASCIIDialog.h:57
ImportASCIIDialog::NewRows
@ NewRows
add each file as new rows to the current table
Definition: ImportASCIIDialog.h:56