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 Class Reference

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

#include <ImportASCIIDialog.h>

Inheritance diagram for ImportASCIIDialog:
[legend]
Collaboration diagram for ImportASCIIDialog:
[legend]

Public Types

enum  ImportMode { NewTables, NewColumns, NewRows, Overwrite }
 Possible destinations for the imported data. More...
 

Public Member Functions

 ImportASCIIDialog (bool importModeEnabled, QWidget *parent=0, bool extended=true, Qt::WindowFlags flags=0)
 Constructor. More...
 
ImportMode importMode () const
 Return the selected import mode. More...
 
const QString columnSeparator () const
 Return the selected column separator. More...
 
int ignoredLines () const
 Return the number of lines to be skipped at the start of each file. More...
 
bool renameColumns () const
 Whether to rename columns based on the first (non-skipped) line. More...
 
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 rememberOptions () const
 Whether the user wants the import options to be saved. More...
 
void setColumnSeparator (const QString &sep)
 Set the selected columns separator. More...
 
QLocale decimalSeparators ()
 Returns the locale chosen for conversion to numeric format. More...
 
bool convertToNumeric () const
 Returns whether imported data should be interpreted as numbers. More...
 
void setExtensionWidget (QWidget *extension)
 Set the extension widget to be displayed when the user presses the toggle button. More...
 
bool isExtendable ()
 Tells weather the dialog has a valid extension widget. More...
 
bool isExtended ()
 
void setExtended (bool extended)
 

Protected Attributes

QPushButton * d_extension_toggle
 Button for toggling display of extension on/off. More...
 

Private Slots

void displayHelp ()
 Display help for advanced options. More...
 
void updateImportMode (int mode)
 For Overwrite mode, allow only one file to be selected. More...
 
void resize (bool extension_on)
 Resize to make/take space for the extension widget. More...
 

Private Member Functions

void closeEvent (QCloseEvent *)
 
void initAdvancedOptions ()
 Initialise d_advanced_options and everything it contains. More...
 

Private Attributes

QGroupBox * d_advanced_options
 Container widget for all advanced options. More...
 
QCheckBox * d_remember_options
 
QCheckBox * d_convert_to_numeric
 
QPushButton * d_help_button
 
QComboBox * d_import_mode
 
QComboBox * d_column_separator
 
QComboBox * boxDecimalSeparator
 
QSpinBox * d_ignored_lines
 
QCheckBox * d_rename_columns
 
QCheckBox * d_simplify_spaces
 
QCheckBox * d_strip_spaces
 
QWidget * d_extension
 The extension widget. More...
 
int d_extension_row
 The layout row (of the assumed QGridLayout) used for extensions. More...
 

Detailed Description

Import ASCII file(s) dialog.

Definition at line 44 of file ImportASCIIDialog.h.

Member Enumeration Documentation

◆ ImportMode

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)

Definition at line 53 of file ImportASCIIDialog.h.

53  {
54  NewTables,
55  NewColumns,
56  NewRows,
57  Overwrite
58  };

Constructor & Destructor Documentation

◆ ImportASCIIDialog()

ImportASCIIDialog::ImportASCIIDialog ( bool  import_mode_enabled,
QWidget *  parent = 0,
bool  extended = true,
Qt::WindowFlags  flags = 0 
)

Constructor.

Parameters
importModeEnabledflag: enable/disable import mode combo box
parentparent widget (only affects placement of the dialog)
extendedflag: show/hide the advanced options on start-up
flagswindow flags

File : ImportASCIIDialog.cpp

Project : SciDAVis

Copyright : (C) 2006,2007 by Ion Vasilief, Tilman Benkert, Knut Franke Email (use @ for *) : ion_vasilief*yahoo.fr, thzs*gmx.net, knut.franke*gmx.de Description : Import ASCII file(s) dialog

  • This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. *
    • This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. *
    • You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA *

Definition at line 45 of file ImportASCIIDialog.cpp.

46 : ExtensibleFileDialog(parent, extended, flags )
47 {
48  setWindowTitle(tr("Import ASCII File(s)"));
49 
50  QStringList filters;
51  filters << tr("All files") + " (*)";
52  filters << tr("Text files") + " (*.TXT *.txt)";
53  filters << tr("Data files") + " (*.DAT *.dat)";
54  filters << tr("Comma Separated Values") + " (*.CSV *.csv)";
55  setNameFilters( filters );
56 
57  setFileMode( QFileDialog::ExistingFiles );
58 
60  d_import_mode->setEnabled(import_mode_enabled);
62 
63  // get rembered option values
64  ApplicationWindow *app = (ApplicationWindow *)parent;
65  d_strip_spaces->setChecked(app->strip_spaces);
66  d_simplify_spaces->setChecked(app->simplify_spaces);
67  d_ignored_lines->setValue(app->ignoredLines);
68  d_rename_columns->setChecked(app->renameColumns);
70 
71  if (app->d_ASCII_import_locale.name() == QLocale::c().name())
72  boxDecimalSeparator->setCurrentIndex(1);
73  else if (app->d_ASCII_import_locale.name() == QLocale(QLocale::German).name())
74  boxDecimalSeparator->setCurrentIndex(2);
75  else if (app->d_ASCII_import_locale.name() == QLocale(QLocale::French).name())
76  boxDecimalSeparator->setCurrentIndex(3);
77  boxDecimalSeparator->setEnabled(app->d_convert_to_numeric);
79 
80  connect(d_import_mode, SIGNAL(currentIndexChanged(int)), this, SLOT(updateImportMode(int)));
81 }

References boxDecimalSeparator, ApplicationWindow::columnSeparator, d_advanced_options, ApplicationWindow::d_ASCII_import_locale, ApplicationWindow::d_convert_to_numeric, d_convert_to_numeric, d_ignored_lines, d_import_mode, d_rename_columns, d_simplify_spaces, d_strip_spaces, ApplicationWindow::ignoredLines, initAdvancedOptions(), name(), ApplicationWindow::renameColumns, setColumnSeparator(), ExtensibleFileDialog::setExtensionWidget(), ApplicationWindow::simplify_spaces, ApplicationWindow::strip_spaces, and updateImportMode().

Here is the call graph for this function:

Member Function Documentation

◆ closeEvent()

void ImportASCIIDialog::closeEvent ( QCloseEvent *  e)
private

Definition at line 243 of file ImportASCIIDialog.cpp.

244 {
245  ApplicationWindow *app = (ApplicationWindow *)this->parent();
246  if (app){
248  app->d_ASCII_file_filter = this->selectedNameFilter();
249  }
250 
251  e->accept();
252 }

References ApplicationWindow::d_ASCII_file_filter, ApplicationWindow::d_extended_import_ASCII_dialog, and ExtensibleFileDialog::isExtended().

Here is the call graph for this function:

◆ columnSeparator()

const QString ImportASCIIDialog::columnSeparator ( ) const

Return the selected column separator.

Definition at line 197 of file ImportASCIIDialog.cpp.

198 {
199  QString sep = d_column_separator->currentText();
200 
201  if (d_simplify_spaces->isChecked())
202  sep.replace(tr("TAB"), " ", Qt::CaseInsensitive);
203  else
204  sep.replace(tr("TAB"), "\t", Qt::CaseInsensitive);
205 
206  sep.replace(tr("SPACE"), " ", Qt::CaseInsensitive);
207  sep.replace("\\s", " ");
208  sep.replace("\\t", "\t");
209 
210  /* TODO
211  if (sep.contains(QRegExp("[0-9.eE+-]")))
212  QMessageBox::warning(this, tr("Import options error"),
213  tr("The separator must not contain the following characters: 0-9eE.+-"));
214  */
215 
216  return sep;
217 }

References d_column_separator, and d_simplify_spaces.

Referenced by ApplicationWindow::importASCII().

Here is the caller graph for this function:

◆ convertToNumeric()

bool ImportASCIIDialog::convertToNumeric ( ) const
inline

Returns whether imported data should be interpreted as numbers.

Definition at line 93 of file ImportASCIIDialog.h.

93 { return d_convert_to_numeric->isChecked(); };

References d_convert_to_numeric.

Referenced by ApplicationWindow::importASCII().

Here is the caller graph for this function:

◆ decimalSeparators()

QLocale ImportASCIIDialog::decimalSeparators ( )

Returns the locale chosen for conversion to numeric format.

Definition at line 254 of file ImportASCIIDialog.cpp.

255 {
256  QLocale locale;
257  switch (boxDecimalSeparator->currentIndex()){
258  case 0:
259  locale = QLocale::system();
260  break;
261  case 1:
262  locale = QLocale::c();
263  break;
264  case 2:
265  locale = QLocale(QLocale::German);
266  break;
267  case 3:
268  locale = QLocale(QLocale::French);
269  break;
270  }
271  return locale;
272 }

References boxDecimalSeparator.

Referenced by ApplicationWindow::importASCII().

Here is the caller graph for this function:

◆ displayHelp

void ImportASCIIDialog::displayHelp ( )
privateslot

Display help for advanced options.

Definition at line 219 of file ImportASCIIDialog.cpp.

220 {
221  QString s = tr("The column separator can be customized. The following special codes can be used:\n\\t for a TAB character \n\\s for a SPACE");
222  s += "\n"+tr("The separator must not contain the following characters: 0-9eE.+-") + "\n\n";
223  s += tr( "Remove white spaces from line ends" )+ ":\n";
224  s += tr("By checking this option all white spaces will be removed from the beginning and the end of the lines in the ASCII file.") + "\n\n";
225  s += tr( "Simplify white spaces" )+ ":\n";
226  s += tr("By checking this option each sequence of internal whitespaces (including the TAB character) will be replaced with a single space.");
227  s += tr("By checking this option all white spaces will be removed from the beginning and the end of the lines and each sequence of internal whitespaces (including the TAB character) will be replaced with a single space.");
228 
229  s +="\n\n"+tr("Warning: using these two last options leads to column overlaping if the columns in the ASCII file don't have the same number of rows.");
230  s +="\n"+tr("To avoid this problem you should precisely define the column separator using TAB and SPACE characters.");
231 
232  QMessageBox::about(this, tr("Help"), s);
233 }

Referenced by initAdvancedOptions().

Here is the caller graph for this function:

◆ ignoredLines()

int ImportASCIIDialog::ignoredLines ( ) const
inline

Return the number of lines to be skipped at the start of each file.

Definition at line 77 of file ImportASCIIDialog.h.

77 { return d_ignored_lines->value(); }

References d_ignored_lines.

Referenced by ApplicationWindow::importASCII().

Here is the caller graph for this function:

◆ importMode()

ImportMode ImportASCIIDialog::importMode ( ) const
inline

Return the selected import mode.

See also
ImportMode

Definition at line 73 of file ImportASCIIDialog.h.

73 { return (ImportMode) d_import_mode->currentIndex(); }

References d_import_mode.

Referenced by ApplicationWindow::importASCII().

Here is the caller graph for this function:

◆ initAdvancedOptions()

void ImportASCIIDialog::initAdvancedOptions ( )
private

Initialise d_advanced_options and everything it contains.

Definition at line 83 of file ImportASCIIDialog.cpp.

84 {
85  d_advanced_options = new QGroupBox();
86  QVBoxLayout *main_layout = new QVBoxLayout(d_advanced_options);
87  QGridLayout *advanced_layout = new QGridLayout();
88  main_layout->addLayout(advanced_layout);
89 
90  advanced_layout->addWidget(new QLabel(tr("Import each file as: ")), 0, 0);
91  d_import_mode = new QComboBox();
92  // Important: Keep this in sync with the ImportMode enum.
93  d_import_mode->addItem(tr("New Table"));
94  d_import_mode->addItem(tr("New Columns"));
95  d_import_mode->addItem(tr("New Rows"));
96  d_import_mode->addItem(tr("Overwrite Current Table"));
97  advanced_layout->addWidget(d_import_mode, 0, 1);
98 
99  QLabel *label_column_separator = new QLabel(tr("Separator:"));
100  advanced_layout->addWidget(label_column_separator, 1, 0);
101  d_column_separator = new QComboBox();
102  d_column_separator->addItem(tr("TAB"));
103  d_column_separator->addItem(tr("SPACE"));
104  d_column_separator->addItem(";" + tr("TAB"));
105  d_column_separator->addItem("," + tr("TAB"));
106  d_column_separator->addItem(";" + tr("SPACE"));
107  d_column_separator->addItem("," + tr("SPACE"));
108  d_column_separator->addItem(";");
109  d_column_separator->addItem(",");
110  d_column_separator->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
111  d_column_separator->setEditable( true );
112  advanced_layout->addWidget(d_column_separator, 1, 1);
113  // context-sensitive help
114  QString help_column_separator = tr("The column separator can be customized. \nThe following special codes can be used:\n\\t for a TAB character \n\\s for a SPACE");
115  help_column_separator += "\n"+tr("The separator must not contain the following characters: \n0-9eE.+-");
116  d_column_separator->setWhatsThis(help_column_separator);
117  label_column_separator->setToolTip(help_column_separator);
118  d_column_separator->setToolTip(help_column_separator);
119  label_column_separator->setWhatsThis(help_column_separator);
120 
121  QLabel *label_ignore_lines = new QLabel(tr( "Ignore first" ));
122  advanced_layout->addWidget(label_ignore_lines, 2, 0);
123  d_ignored_lines = new QSpinBox();
124  d_ignored_lines->setRange( 0, 10000 );
125  d_ignored_lines->setSuffix(" " + tr("lines"));
126  d_ignored_lines->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
127  advanced_layout->addWidget(d_ignored_lines, 2, 1);
128 
129  d_rename_columns = new QCheckBox(tr("Use first row to &name columns"));
130  advanced_layout->addWidget(d_rename_columns, 0, 2, 1, 2);
131 
132  d_strip_spaces = new QCheckBox(tr("&Remove white spaces from line ends"));
133  advanced_layout->addWidget(d_strip_spaces, 1, 2, 1, 2);
134  // context-sensitive help
135  QString help_strip_spaces = tr("By checking this option all white spaces will be \nremoved from the beginning and the end of \nthe lines in the ASCII file.","when translating this check the what's this functions and tool tips to place the '\\n's correctly");
136  help_strip_spaces +="\n\n"+tr("Warning: checking this option leads to column \noverlaping if the columns in the ASCII file don't \nhave the same number of rows.");
137  help_strip_spaces +="\n"+tr("To avoid this problem you should precisely \ndefine the column separator using TAB and \nSPACE characters.","when translating this check the what's this functions and tool tips to place the '\\n's correctly");
138  d_strip_spaces->setWhatsThis(help_strip_spaces);
139  d_strip_spaces->setToolTip(help_strip_spaces);
140 
141  d_simplify_spaces = new QCheckBox(tr("&Simplify white spaces" ));
142  advanced_layout->addWidget(d_simplify_spaces, 2, 2, 1, 2);
143  // context-sensitive help
144  QString help_simplify_spaces = tr("By checking this option all white spaces will be \nremoved from the beginning and the end of the \nlines and each sequence of internal \nwhitespaces (including the TAB character) will \nbe replaced with a single space.","when translating this check the what's this functions and tool tips to place the '\\n's correctly");
145  help_simplify_spaces +="\n\n"+tr("Warning: checking this option leads to column \noverlaping if the columns in the ASCII file don't \nhave the same number of rows.","when translating this check the what's this functions and tool tips to place the '\\n's correctly");
146  help_simplify_spaces +="\n"+tr("To avoid this problem you should precisely \ndefine the column separator using TAB and \nSPACE characters.","when translating this check the what's this functions and tool tips to place the '\\n's correctly");
147  d_simplify_spaces->setWhatsThis(help_simplify_spaces);
148  d_simplify_spaces->setToolTip(help_simplify_spaces);
149 
150  d_convert_to_numeric = new QCheckBox(tr("&Numeric data"));
151  advanced_layout->addWidget(d_convert_to_numeric, 3, 0, 1, 2);
152 
153  advanced_layout->addWidget(new QLabel(tr("Decimal Separators")), 3, 1);
154  boxDecimalSeparator = new QComboBox();
155  boxDecimalSeparator->addItem(tr("default") + " (" + QLocale::system().toString(1000.0, 'f', 1) +")");
156  boxDecimalSeparator->addItem(QLocale::c().toString(1000.0, 'f', 1));
157  boxDecimalSeparator->addItem(QLocale(QLocale::German).toString(1000.0, 'f', 1));
158  boxDecimalSeparator->addItem(QLocale(QLocale::French).toString(1000.0, 'f', 1));
159  connect(d_convert_to_numeric, SIGNAL(toggled(bool)), boxDecimalSeparator, SLOT(setEnabled(bool)));
160  advanced_layout->addWidget(boxDecimalSeparator, 3, 2);
161 
162  QHBoxLayout *meta_options_layout = new QHBoxLayout();
163  d_remember_options = new QCheckBox(tr("Re&member the above options"));
164  meta_options_layout->addWidget(d_remember_options);
165  d_help_button = new QPushButton(tr("&Help"));
166  connect(d_help_button, SIGNAL(clicked()), this, SLOT(displayHelp()));
167  meta_options_layout->addStretch();
168  meta_options_layout->addWidget(d_help_button);
169  main_layout->addLayout(meta_options_layout);
170 }

References boxDecimalSeparator, d_advanced_options, d_column_separator, d_convert_to_numeric, d_help_button, d_ignored_lines, d_import_mode, d_remember_options, d_rename_columns, d_simplify_spaces, d_strip_spaces, displayHelp(), and toString().

Referenced by ImportASCIIDialog().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isExtendable()

bool ExtensibleFileDialog::isExtendable ( )
inlineinherited

Tells weather the dialog has a valid extension widget.

Definition at line 60 of file ExtensibleFileDialog.h.

60 {return d_extension != NULL;};

References ExtensibleFileDialog::d_extension.

Referenced by OpenProjectDialog::closeEvent().

Here is the caller graph for this function:

◆ isExtended()

bool ExtensibleFileDialog::isExtended ( )
inlineinherited

Definition at line 61 of file ExtensibleFileDialog.h.

61 {return d_extension_toggle->isChecked();};

References ExtensibleFileDialog::d_extension_toggle.

Referenced by ImageExportDialog::closeEvent(), closeEvent(), and OpenProjectDialog::closeEvent().

Here is the caller graph for this function:

◆ rememberOptions()

bool ImportASCIIDialog::rememberOptions ( ) const
inline

Whether the user wants the import options to be saved.

Definition at line 85 of file ImportASCIIDialog.h.

85 { return d_remember_options->isChecked(); }

References d_remember_options.

Referenced by ApplicationWindow::importASCII().

Here is the caller graph for this function:

◆ renameColumns()

bool ImportASCIIDialog::renameColumns ( ) const
inline

Whether to rename columns based on the first (non-skipped) line.

Definition at line 79 of file ImportASCIIDialog.h.

79 { return d_rename_columns->isChecked(); }

References d_rename_columns.

Referenced by ApplicationWindow::importASCII().

Here is the caller graph for this function:

◆ resize

void ExtensibleFileDialog::resize ( bool  extension_on)
privateslotinherited

Resize to make/take space for the extension widget.

Definition at line 91 of file ExtensibleFileDialog.cpp.

92 {
93  QSize geo = size();
94  geo.setHeight(geo.height() + (extension_on ? 1 : -1) * (d_extension->sizeHint().height()-44));
95  setGeometry(QRect(geometry().topLeft(), geo));
96 }

References ExtensibleFileDialog::d_extension.

Referenced by ExtensibleFileDialog::ExtensibleFileDialog().

Here is the caller graph for this function:

◆ setColumnSeparator()

void ImportASCIIDialog::setColumnSeparator ( const QString &  sep)

Set the selected columns separator.

Definition at line 172 of file ImportASCIIDialog.cpp.

173 {
174  if (sep=="\t")
175  d_column_separator->setCurrentIndex(0);
176  else if (sep==" ")
177  d_column_separator->setCurrentIndex(1);
178  else if (sep==";\t")
179  d_column_separator->setCurrentIndex(2);
180  else if (sep==",\t")
181  d_column_separator->setCurrentIndex(3);
182  else if (sep=="; ")
183  d_column_separator->setCurrentIndex(4);
184  else if (sep==", ")
185  d_column_separator->setCurrentIndex(5);
186  else if (sep==";")
187  d_column_separator->setCurrentIndex(6);
188  else if (sep==",")
189  d_column_separator->setCurrentIndex(7);
190  else
191  {
192  QString separator = sep;
193  d_column_separator->setEditText(separator.replace(" ","\\s").replace("\t","\\t"));
194  }
195 }

References d_column_separator.

Referenced by ImportASCIIDialog().

Here is the caller graph for this function:

◆ setExtended()

void ExtensibleFileDialog::setExtended ( bool  extended)
inlineinherited

Definition at line 62 of file ExtensibleFileDialog.h.

62 { d_extension_toggle->setChecked(extended);};

References ExtensibleFileDialog::d_extension_toggle.

◆ setExtensionWidget()

void ExtensibleFileDialog::setExtensionWidget ( QWidget *  extension)
inherited

Set the extension widget to be displayed when the user presses the toggle button.

Definition at line 66 of file ExtensibleFileDialog.cpp.

67 {
68  if (d_extension == extension)
69  return;
70  if (d_extension) {
71  d_extension->hide();
72  disconnect(d_extension_toggle, SIGNAL(toggled(bool)));
73  }
74  d_extension = extension;
75  if (!d_extension) {
76  d_extension_toggle->hide();
77  return;
78  }
79  d_extension_toggle->show();
80 
81  QGridLayout *main_layout = qobject_cast<QGridLayout*>(layout());
82  if (main_layout)
83  main_layout->addWidget(d_extension, d_extension_row, 0, 2, main_layout->columnCount()-1);
84  else
85  layout()->addWidget(d_extension);
86 
87  d_extension->setVisible(d_extension_toggle->isChecked());
88  connect(d_extension_toggle, SIGNAL(toggled(bool)), d_extension, SLOT(setVisible(bool)));
89 }

References ExtensibleFileDialog::d_extension, ExtensibleFileDialog::d_extension_row, and ExtensibleFileDialog::d_extension_toggle.

Referenced by ApplicationWindow::appendProject(), ImageExportDialog::ImageExportDialog(), ImportASCIIDialog(), OpenProjectDialog::OpenProjectDialog(), and TeXTableExportDialog::TeXTableExportDialog().

Here is the caller graph for this function:

◆ simplifySpaces()

bool ImportASCIIDialog::simplifySpaces ( ) const
inline

Whether to replace sequences of whitespace charecters with a single space.

Definition at line 81 of file ImportASCIIDialog.h.

81 { return d_simplify_spaces->isChecked(); }

References d_simplify_spaces.

Referenced by ApplicationWindow::importASCII().

Here is the caller graph for this function:

◆ stripSpaces()

bool ImportASCIIDialog::stripSpaces ( ) const
inline

Whether to remove whitespace from beginning and end of lines.

Definition at line 83 of file ImportASCIIDialog.h.

83 { return d_strip_spaces->isChecked(); }

References d_strip_spaces.

Referenced by ApplicationWindow::importASCII().

Here is the caller graph for this function:

◆ updateImportMode

void ImportASCIIDialog::updateImportMode ( int  mode)
privateslot

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

Definition at line 235 of file ImportASCIIDialog.cpp.

236 {
237  if (mode == Overwrite)
238  setFileMode( QFileDialog::ExistingFile );
239  else
240  setFileMode( QFileDialog::ExistingFiles );
241 }

References Overwrite.

Referenced by ImportASCIIDialog().

Here is the caller graph for this function:

Member Data Documentation

◆ boxDecimalSeparator

QComboBox * ImportASCIIDialog::boxDecimalSeparator
private

Definition at line 111 of file ImportASCIIDialog.h.

Referenced by decimalSeparators(), ImportASCIIDialog(), and initAdvancedOptions().

◆ d_advanced_options

QGroupBox* ImportASCIIDialog::d_advanced_options
private

Container widget for all advanced options.

Definition at line 107 of file ImportASCIIDialog.h.

Referenced by ImportASCIIDialog(), and initAdvancedOptions().

◆ d_column_separator

QComboBox * ImportASCIIDialog::d_column_separator
private

Definition at line 111 of file ImportASCIIDialog.h.

Referenced by columnSeparator(), initAdvancedOptions(), and setColumnSeparator().

◆ d_convert_to_numeric

QCheckBox * ImportASCIIDialog::d_convert_to_numeric
private

Definition at line 108 of file ImportASCIIDialog.h.

Referenced by convertToNumeric(), ImportASCIIDialog(), and initAdvancedOptions().

◆ d_extension

QWidget* ExtensibleFileDialog::d_extension
privateinherited

◆ d_extension_row

int ExtensibleFileDialog::d_extension_row
privateinherited

The layout row (of the assumed QGridLayout) used for extensions.

Definition at line 76 of file ExtensibleFileDialog.h.

Referenced by ExtensibleFileDialog::ExtensibleFileDialog(), and ExtensibleFileDialog::setExtensionWidget().

◆ d_extension_toggle

QPushButton* ExtensibleFileDialog::d_extension_toggle
protectedinherited

◆ d_help_button

QPushButton* ImportASCIIDialog::d_help_button
private

Definition at line 109 of file ImportASCIIDialog.h.

Referenced by initAdvancedOptions().

◆ d_ignored_lines

QSpinBox* ImportASCIIDialog::d_ignored_lines
private

Definition at line 112 of file ImportASCIIDialog.h.

Referenced by ignoredLines(), ImportASCIIDialog(), and initAdvancedOptions().

◆ d_import_mode

QComboBox* ImportASCIIDialog::d_import_mode
private

Definition at line 111 of file ImportASCIIDialog.h.

Referenced by ImportASCIIDialog(), importMode(), and initAdvancedOptions().

◆ d_remember_options

QCheckBox* ImportASCIIDialog::d_remember_options
private

Definition at line 108 of file ImportASCIIDialog.h.

Referenced by initAdvancedOptions(), and rememberOptions().

◆ d_rename_columns

QCheckBox* ImportASCIIDialog::d_rename_columns
private

Definition at line 113 of file ImportASCIIDialog.h.

Referenced by ImportASCIIDialog(), initAdvancedOptions(), and renameColumns().

◆ d_simplify_spaces

QCheckBox * ImportASCIIDialog::d_simplify_spaces
private

◆ d_strip_spaces

QCheckBox * ImportASCIIDialog::d_strip_spaces
private

Definition at line 113 of file ImportASCIIDialog.h.

Referenced by ImportASCIIDialog(), initAdvancedOptions(), and stripSpaces().


The documentation for this class was generated from the following files:
ImportASCIIDialog::d_ignored_lines
QSpinBox * d_ignored_lines
Definition: ImportASCIIDialog.h:112
ApplicationWindow::ignoredLines
int ignoredLines
Definition: ApplicationWindow.h:993
ApplicationWindow::d_ASCII_file_filter
QString d_ASCII_file_filter
Last selected filter in import ASCII dialog.
Definition: ApplicationWindow.h:922
ExtensibleFileDialog::d_extension_row
int d_extension_row
The layout row (of the assumed QGridLayout) used for extensions.
Definition: ExtensibleFileDialog.h:76
ImportASCIIDialog::updateImportMode
void updateImportMode(int mode)
For Overwrite mode, allow only one file to be selected.
Definition: ImportASCIIDialog.cpp:235
ApplicationWindow::d_convert_to_numeric
bool d_convert_to_numeric
Definition: ApplicationWindow.h:923
ImportASCIIDialog::d_rename_columns
QCheckBox * d_rename_columns
Definition: ImportASCIIDialog.h:113
ImportASCIIDialog::d_simplify_spaces
QCheckBox * d_simplify_spaces
Definition: ImportASCIIDialog.h:113
toString
S toString(const QString &x)
Deal with conversion between QString and std::string/std::wstring in a generic way.
ApplicationWindow::renameColumns
bool renameColumns
Definition: ApplicationWindow.h:994
ExtensibleFileDialog::setExtensionWidget
void setExtensionWidget(QWidget *extension)
Set the extension widget to be displayed when the user presses the toggle button.
Definition: ExtensibleFileDialog.cpp:66
ImportASCIIDialog::d_import_mode
QComboBox * d_import_mode
Definition: ImportASCIIDialog.h:111
ExtensibleFileDialog::d_extension
QWidget * d_extension
The extension widget.
Definition: ExtensibleFileDialog.h:74
ExtensibleFileDialog::ExtensibleFileDialog
ExtensibleFileDialog(QWidget *parent=0, bool extended=true, Qt::WindowFlags flags=0)
Constructor.
Definition: ExtensibleFileDialog.cpp:33
ExtensibleFileDialog::d_extension_toggle
QPushButton * d_extension_toggle
Button for toggling display of extension on/off.
Definition: ExtensibleFileDialog.h:62
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
ApplicationWindow
SciDAVis's main window.
Definition: ApplicationWindow.h:122
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
ApplicationWindow::d_extended_import_ASCII_dialog
bool d_extended_import_ASCII_dialog
Definition: ApplicationWindow.h:929
ImportASCIIDialog::d_remember_options
QCheckBox * d_remember_options
Definition: ImportASCIIDialog.h:108
ApplicationWindow::columnSeparator
QString columnSeparator
Definition: ApplicationWindow.h:991
ImportASCIIDialog::d_column_separator
QComboBox * d_column_separator
Definition: ImportASCIIDialog.h:111
ExtensibleFileDialog::isExtended
bool isExtended()
Definition: ExtensibleFileDialog.h:61
ApplicationWindow::simplify_spaces
bool simplify_spaces
Definition: ApplicationWindow.h:994
ImportASCIIDialog::NewColumns
@ NewColumns
add each file as new columns to the current table
Definition: ImportASCIIDialog.h:55
name
char * name()
Definition: exp_saturation.c:45
ApplicationWindow::d_ASCII_import_locale
QLocale d_ASCII_import_locale
Locale used to specify the decimal separators in imported ASCII files.
Definition: ApplicationWindow.h:920
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::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::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
ApplicationWindow::strip_spaces
bool strip_spaces
Definition: ApplicationWindow.h:994
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