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)  

TableView.cpp
Go to the documentation of this file.
1 
11 
30 #include "table/future_Table.h"
31 #include "table/TableView.h"
32 #include "table/TableModel.h"
34 #include "table/tablecommands.h"
36 
37 #include "core/column/Column.h"
38 #include "core/AbstractFilter.h"
45 
46 #include <QKeyEvent>
47 #include <QtDebug>
48 #include <QHeaderView>
49 #include <QRect>
50 #include <QPoint>
51 #include <QSize>
52 #include <QFontMetrics>
53 #include <QFont>
54 #include <QItemSelectionModel>
55 #include <QItemSelection>
56 #include <QShortcut>
57 #include <QModelIndex>
58 #include <QGridLayout>
59 #include <QScrollArea>
60 #include <QMenu>
61 #include <QSettings>
62 
63 #ifndef LEGACY_CODE_0_2_x
65  : d_table(table)
66 #else
67 TableView::TableView(const QString& label, QWidget* parent, const QString name, Qt::WindowFlags f)
68  : MyWidget(label, parent, name, f)
69 #endif
70 {
71 #ifndef LEGACY_CODE_0_2_x
72  d_model = new TableModel(table);
73  init();
74 #else
75  d_model = NULL;
76 #endif
77 }
78 
80 {
81  delete d_model;
82 }
83 
84 void TableView::setTable(future::Table * table)
85 {
86  d_table = table;
87  d_model = new TableModel(table);
88  init();
89  d_table->setView(this);
90 }
91 
93 {
94  QWidget* d_main_widget = new QWidget();
95  d_main_layout = new QHBoxLayout();
96  d_main_widget->setLayout(d_main_layout);
97  d_main_layout->setSpacing(0);
98  d_main_layout->setContentsMargins(0, 0, 0, 0);
99 
100  d_view_widget = new TableViewWidget(this);
101 #ifdef Q_OS_MAC
102  QSettings settings(QSettings::IniFormat,QSettings::UserScope,
103  "SciDAVis", "SciDAVis");
104 #else
105  QSettings settings(QSettings::NativeFormat,QSettings::UserScope,
106  "SciDAVis", "SciDAVis");
107 #endif
108  settings.beginGroup("[Table]");
109  int defaultRowHeight = settings.value("DefaultRowHeight", 20).toInt();
110  settings.endGroup();
111  d_view_widget->verticalHeader()->setDefaultSectionSize(defaultRowHeight);
112  d_view_widget->setModel(d_model);
113  connect(d_view_widget, SIGNAL(advanceCell()), this, SLOT(advanceCell()));
114  d_main_layout->addWidget(d_view_widget);
115 
117 #if QT_VERSION >= 0x050000
118  d_horizontal_header->setSectionsClickable(true);
119 #else
120  d_horizontal_header->setClickable(true);
121 #endif
122  d_horizontal_header->setHighlightSections(true);
123  d_view_widget->setHorizontalHeader(d_horizontal_header);
124 
125  d_hide_button = new QToolButton();
126  d_hide_button->setArrowType(Qt::RightArrow);
127  d_hide_button->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding));
128  d_hide_button->setCheckable(false);
129  d_main_layout->addWidget(d_hide_button);
130  connect(d_hide_button, SIGNAL(pressed()), this, SLOT(toggleControlTabBar()));
131  d_control_tabs = new QWidget();
132  ui.setupUi(d_control_tabs);
133  d_main_layout->addWidget(d_control_tabs);
134 
136  d_view_widget->setItemDelegate(d_delegate);
137 
138  d_view_widget->setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding));
139  d_main_layout->setStretchFactor(d_view_widget, 1);
140 
141  setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding));
142 
143  d_view_widget->setFocusPolicy(Qt::StrongFocus);
144  setFocusPolicy(Qt::StrongFocus);
145  setFocus();
146 #if QT_VERSION >= 0x040300
147  d_view_widget->setCornerButtonEnabled(true);
148 #endif
149 
150  d_view_widget->setSelectionMode(QAbstractItemView::ExtendedSelection);
151 
152  QHeaderView * v_header = d_view_widget->verticalHeader();
153 #if QT_VERSION >= 0x050000
154  v_header->setSectionResizeMode(QHeaderView::Interactive);
155  v_header->setSectionsMovable(false);
156  d_horizontal_header->setSectionResizeMode(QHeaderView::Interactive);
157  d_horizontal_header->setSectionsMovable(true);
158 #else
159  v_header->setResizeMode(QHeaderView::Interactive);
160  v_header->setMovable(false);
161  d_horizontal_header->setResizeMode(QHeaderView::Interactive);
162  d_horizontal_header->setMovable(true);
163 #endif
164  connect(d_horizontal_header, SIGNAL(sectionMoved(int,int,int)), this, SLOT(handleHorizontalSectionMoved(int,int,int)));
165  connect(d_horizontal_header, SIGNAL(sectionDoubleClicked(int)), this, SLOT(handleHorizontalHeaderDoubleClicked(int)));
166 
167  d_horizontal_header->setDefaultSectionSize(future::Table::defaultColumnWidth());
168 
169  v_header->installEventFilter(this);
170  d_horizontal_header->installEventFilter(this);
171  d_view_widget->installEventFilter(this);
172 
173  connect(d_model, SIGNAL(headerDataChanged(Qt::Orientation,int,int)), d_view_widget,
174  SLOT(updateHeaderGeometry(Qt::Orientation,int,int)) );
175  connect(d_model, SIGNAL(headerDataChanged(Qt::Orientation,int,int)), this,
176  SLOT(handleHeaderDataChanged(Qt::Orientation,int,int)) );
177  connect(d_table, SIGNAL(aspectDescriptionChanged(const AbstractAspect*)),
178  this, SLOT(handleAspectDescriptionChanged(const AbstractAspect*)));
179  connect(d_table, SIGNAL(aspectAdded(const AbstractAspect*)),
180  this, SLOT(handleAspectAdded(const AbstractAspect*)));
181  connect(d_table, SIGNAL(aspectAboutToBeRemoved(const AbstractAspect*,int)),
182  this, SLOT(handleAspectAboutToBeRemoved(const AbstractAspect*,int)));
183 
184  this->setWidget(d_main_widget);
186 
187  // keyboard shortcuts
188  QShortcut * sel_all = new QShortcut(QKeySequence(tr("Ctrl+A", "Table: select all")), d_view_widget);
189  connect(sel_all, SIGNAL(activated()), d_view_widget, SLOT(selectAll()));
190 
191  connect(ui.type_box, SIGNAL(currentIndexChanged(int)), this, SLOT(updateFormatBox()));
192  connect(ui.format_box, SIGNAL(currentIndexChanged(int)), this, SLOT(updateTypeInfo()));
193  connect(ui.formatLineEdit, SIGNAL(textEdited(const QString)), this, SLOT(handleFormatLineEditChange()));
194  connect(ui.digits_box, SIGNAL(valueChanged(int)), this, SLOT(updateTypeInfo()));
195  connect(ui.previous_column_button, SIGNAL(clicked()), this, SLOT(goToPreviousColumn()));
196  connect(ui.next_column_button, SIGNAL(clicked()), this, SLOT(goToNextColumn()));
198 
199  QItemSelectionModel * sel_model = d_view_widget->selectionModel();
200 
201  connect(sel_model, SIGNAL(currentColumnChanged(const QModelIndex&, const QModelIndex&)),
202  this, SLOT(currentColumnChanged(const QModelIndex&, const QModelIndex&)));
203  connect(sel_model, SIGNAL(selectionChanged(const QItemSelection&,const QItemSelection&)),
204  this, SLOT(selectionChanged(const QItemSelection&,const QItemSelection&)));
205  connect(ui.button_set_description, SIGNAL(pressed()),
206  this, SLOT(applyDescription()));
207  connect(ui.button_set_type, SIGNAL(pressed()),
208  this, SLOT(applyType()));
209 }
210 
212 {
213  disconnect(d_horizontal_header, SIGNAL(sectionResized(int, int, int)), this, SLOT(handleHorizontalSectionResized(int, int, int)));
214 
215  if (d_table)
216  {
217  int cols = d_table->columnCount();
218  for (int i=0; i<cols; i++)
219  d_horizontal_header->resizeSection(i, d_table->columnWidth(i));
220  }
221 
222  connect(d_horizontal_header, SIGNAL(sectionResized(int, int, int)), this, SLOT(handleHorizontalSectionResized(int, int, int)));
223 }
224 
225 void TableView::setColumnWidth(int col, int width)
226 {
227  d_horizontal_header->resizeSection(col, width);
228 }
229 
230 int TableView::columnWidth(int col) const
231 {
232  return d_horizontal_header->sectionSize(col);
233 }
234 
235 void TableView::handleHorizontalSectionResized(int logicalIndex, int, int newSize)
236 {
237  static bool inside = false;
238  if (d_table)
239  {
240  d_table->setColumnWidth(logicalIndex, newSize);
241  if (inside) return;
242  inside = true;
243 
244  int cols = d_table->columnCount();
245  for (int i=0; i<cols; i++)
246  if(isColumnSelected(i, true))
247  d_horizontal_header->resizeSection(i, newSize);
248  }
249 
250  inside = false;
251 }
252 
253 void TableView::changeEvent(QEvent * event)
254 {
255  if (event->type() == QEvent::LanguageChange)
257  MyWidget::changeEvent(event);
258 }
259 
261 {
262  d_hide_button->setToolTip(tr("Show/hide control tabs"));
263  ui.retranslateUi(d_control_tabs);
264 
265  ui.type_box->clear();
266  ui.type_box->addItem(tr("Numeric"), QVariant(int(SciDAVis::Numeric)));
267  ui.type_box->addItem(tr("Text"), QVariant(int(SciDAVis::Text)));
268  ui.type_box->addItem(tr("Month names"), QVariant(int(SciDAVis::Month)));
269  ui.type_box->addItem(tr("Day names"), QVariant(int(SciDAVis::Day)));
270  ui.type_box->addItem(tr("Date and time"), QVariant(int(SciDAVis::DateTime)));
271  ui.type_box->setCurrentIndex(0);
272 
273  ui.date_time_interval->clear();
274  ui.date_time_interval->addItem(tr("years"), int(Double2DateTimeFilter::Year));
275  ui.date_time_interval->addItem(tr("months"), int(Double2DateTimeFilter::Month));
276  ui.date_time_interval->addItem(tr("days"), int(Double2DateTimeFilter::Day));
277  ui.date_time_interval->addItem(tr("hours"), int(Double2DateTimeFilter::Hour));
278  ui.date_time_interval->addItem(tr("minutes"), int(Double2DateTimeFilter::Minute));
279  ui.date_time_interval->addItem(tr("seconds"), int(Double2DateTimeFilter::Second));
280  ui.date_time_interval->addItem(tr("milliseconds"), int(Double2DateTimeFilter::Millisecond));
281  ui.date_time_interval->setCurrentIndex(0);
282 
283  // TODO: implement formula stuff
284  //ui.formula_info->document()->setPlainText("not implemented yet");
285 }
286 
288 {
289  if (d_table)
290  {
291  QModelIndex idx = d_view_widget->currentIndex();
292  if(idx.row()+1 >= d_table->rowCount())
293  {
294  int new_size = d_table->rowCount()+1;
295  d_table->setRowCount(new_size);
296  }
297  d_view_widget->setCurrentIndex(idx.sibling(idx.row()+1, idx.column()));
298  }
299 }
300 
301 void TableView::goToCell(int row, int col)
302 {
303  QModelIndex index = d_model->index(row, col);
304  d_view_widget->scrollTo(index);
305  d_view_widget->setCurrentIndex(index);
306 }
307 
309 {
311 }
312 
314 {
315  d_view_widget->clearSelection();
316 }
317 
319 {
320  d_control_tabs->setVisible(!d_control_tabs->isVisible());
321  if(d_control_tabs->isVisible())
322  d_hide_button->setArrowType(Qt::RightArrow);
323  else
324  d_hide_button->setArrowType(Qt::LeftArrow);
325 }
326 
327 void TableView::handleHorizontalSectionMoved(int, int from, int to)
328 {
329  static bool inside = false;
330  if(inside) return;
331 
332  inside = true;
333  d_view_widget->horizontalHeader()->moveSection(to, from);
334  inside = false;
335  if (d_table)
336  d_table->moveColumn(from, to);
337 }
338 
340 {
341  Q_UNUSED(index);
343 }
344 
346 {
348 }
349 
351 {
353 }
354 
356 {
358  update();
359 }
360 
361 void TableView::currentColumnChanged(const QModelIndex & current, const QModelIndex & previous)
362 {
363  Q_UNUSED(previous);
364  int col = current.column();
365  if(col < 0 || (d_table && col >= d_table->columnCount())) return;
367 }
368 
370 {
371  if (d_table)
372  {
373  if(col < 0 || col >= d_table->columnCount()) return;
374  Column *col_ptr = d_table->column(col);
375 
376  QString str = tr("Current column:\nName: %1\nPosition: %2")\
377  .arg(col_ptr->name()).arg(col+1);
378 
379  ui.name_edit->setText(col_ptr->name());
380  ui.comment_box->document()->setPlainText(col_ptr->comment());
381  ui.type_box->setCurrentIndex(ui.type_box->findData((int)col_ptr->columnMode()));
382  switch(col_ptr->columnMode()) {
383  case SciDAVis::Numeric:
384  {
385  Double2StringFilter * filter = static_cast<Double2StringFilter*>(col_ptr->outputFilter());
386  ui.format_box->setCurrentIndex(ui.format_box->findData(filter->numericFormat()));
387  ui.digits_box->setValue(filter->numDigits());
388  ui.date_time_interval->setVisible(false);
389  ui.date_time_interval_label->setVisible(false);
390  ui.date_time_0->setVisible(false);
391  ui.date_time_0_label->setVisible(false);
392  break;
393  }
394  case SciDAVis::Month:
395  case SciDAVis::Day:
396  case SciDAVis::DateTime:
397  {
398  DateTime2StringFilter * filter = static_cast<DateTime2StringFilter*>(col_ptr->outputFilter());
399  ui.formatLineEdit->setText(filter->format());
400  ui.format_box->setCurrentIndex(ui.format_box->findData(filter->format()));
401  break;
402  }
403  default:
404  ui.date_time_interval->setVisible(false);
405  ui.date_time_interval_label->setVisible(false);
406  ui.date_time_0->setVisible(false);
407  ui.date_time_0_label->setVisible(false);
408  break;
409  }
410  ui.formula_box->setText(col_ptr->formula(0));
411 
412  }
413 }
414 
416 {
417  if (d_table)
418  {
419  const Column * col = qobject_cast<const Column*>(aspect);
420  if (!col || col->parentAspect() != static_cast<AbstractAspect*>(d_table))
421  return;
422  ui.add_reference_combobox->setItemText(d_table->columnIndex(col), "col(\"" + col->name() + "\")");
423  }
424 }
425 
427  if (d_table)
428  {
429  const Column * col = qobject_cast<const Column*>(aspect);
430  if (!col || col->parentAspect() != static_cast<AbstractAspect*>(d_table))
431  return;
432  ui.add_reference_combobox->insertItem(d_table->indexOfChild(aspect), "col(\"" + col->name() + "\")");
433  }
434 }
435 
437  if (parent != d_table)
438  return;
439  ui.add_reference_combobox->removeItem(index);
440 }
441 
442 void TableView::selectionChanged(const QItemSelection & selected, const QItemSelection & deselected)
443 {
444  Q_UNUSED(selected);
445  Q_UNUSED(deselected);
446 }
447 
449 {
450  int type_index = ui.type_box->currentIndex();
451  if(type_index < 0) return; // should never happen
452  ui.format_box->clear();
453  ui.digits_box->setEnabled(false);
454  ui.formatLineEdit->setEnabled(false);
455  ui.date_time_interval->setEnabled(false);
456  ui.date_time_0->setEnabled(false);
457  switch(ui.type_box->itemData(type_index).toInt())
458  {
459  case SciDAVis::Numeric:
460  ui.digits_box->setEnabled(true);
461  ui.format_box->addItem(tr("Decimal"), QVariant('f'));
462  ui.format_box->addItem(tr("Scientific (e)"), QVariant('e'));
463  ui.format_box->addItem(tr("Scientific (E)"), QVariant('E'));
464  ui.format_box->addItem(tr("Automatic (e)"), QVariant('g'));
465  ui.format_box->addItem(tr("Automatic (E)"), QVariant('G'));
466  break;
467  case SciDAVis::Text:
468  ui.format_box->addItem(tr("Text"), QVariant());
469  break;
470  case SciDAVis::Month:
471  ui.format_box->addItem(tr("Number without leading zero"), QVariant("M"));
472  ui.format_box->addItem(tr("Number with leading zero"), QVariant("MM"));
473  ui.format_box->addItem(tr("Abbreviated month name"), QVariant("MMM"));
474  ui.format_box->addItem(tr("Full month name"), QVariant("MMMM"));
475  break;
476  case SciDAVis::Day:
477  ui.format_box->addItem(tr("Number without leading zero"), QVariant("d"));
478  ui.format_box->addItem(tr("Number with leading zero"), QVariant("dd"));
479  ui.format_box->addItem(tr("Abbreviated day name"), QVariant("ddd"));
480  ui.format_box->addItem(tr("Full day name"), QVariant("dddd"));
481  break;
482  case SciDAVis::DateTime:
483  {
484  // TODO: allow adding of the combo box entries here
485  const char * date_strings[] = {
486  "yyyy-MM-dd",
487  "yyyy/MM/dd",
488  "dd/MM/yyyy",
489  "dd/MM/yy",
490  "dd.MM.yyyy",
491  "dd.MM.yy",
492  "MM/yyyy",
493  "dd.MM.",
494  "yyyyMMdd",
495  0
496  };
497 
498  const char * time_strings[] = {
499  "hh",
500  "hh ap",
501  "hh:mm",
502  "hh:mm ap",
503  "hh:mm:ss",
504  "hh:mm:ss.zzz",
505  "hh:mm:ss:zzz",
506  "mm:ss.zzz",
507  "hhmmss",
508  0
509  };
510  int j,i;
511  for (i=0; date_strings[i] != 0; i++)
512  ui.format_box->addItem(QString(date_strings[i]), QVariant(date_strings[i]));
513  for (j=0; time_strings[j] != 0; j++)
514  ui.format_box->addItem(QString(time_strings[j]), QVariant(time_strings[j]));
515  for (i=0; date_strings[i] != 0; i++)
516  for (j=0; time_strings[j] != 0; j++)
517  ui.format_box->addItem(QString("%1 %2").arg(date_strings[i]).arg(time_strings[j]),
518  QVariant(QString(date_strings[i]) + " " + QString(time_strings[j])));
519  ui.formatLineEdit->setEnabled(true);
520  ui.date_time_interval->setEnabled(true);
521  ui.date_time_0->setEnabled(true);
522  break;
523  }
524  default:
525  ui.format_box->addItem(QString()); // just for savety to have at least one item in any case
526  }
527  ui.format_box->setCurrentIndex(0);
528  ui.digits_box->setVisible(ui.digits_box->isEnabled());
529  ui.digits_label->setVisible(ui.digits_box->isEnabled());
530  ui.formatLineEdit->setVisible(ui.formatLineEdit->isEnabled());
531  ui.format_label2->setVisible(ui.formatLineEdit->isEnabled());
532  if (ui.format_label2->isVisible())
533  ui.format_label->setText(tr("Predefined:"));
534  else
535  ui.format_label->setText(tr("Format:"));
536  ui.date_time_interval->setVisible(ui.date_time_interval->isEnabled());
537  ui.date_time_interval_label->setVisible(ui.date_time_interval->isEnabled());
538  ui.date_time_0->setVisible(ui.date_time_0->isEnabled());
539  ui.date_time_0_label->setVisible(ui.date_time_0->isEnabled());
540 }
541 
543 {
544  int format_index = ui.format_box->currentIndex();
545  int type_index = ui.type_box->currentIndex();
546 
547  QString str = tr("Selected column type:\n");
548  if(format_index >= 0 && type_index >= 0)
549  {
550  int type = ui.type_box->itemData(type_index).toInt();
551  switch(type)
552  {
553  case SciDAVis::Numeric:
554  str += tr("Double precision\nfloating point values\n");
555  ui.digits_box->setEnabled(true);
556  break;
557  case SciDAVis::Text:
558  str += tr("Text\n");
559  break;
560  case SciDAVis::Month:
561  str += tr("Month names\n");
562  break;
563  case SciDAVis::Day:
564  str += tr("Days of the week\n");
565  break;
566  case SciDAVis::DateTime:
567  str += tr("Dates and/or times\n");
568  ui.formatLineEdit->setEnabled(true);
569  break;
570  }
571  str += tr("Example: ");
572  switch(type)
573  {
574  case SciDAVis::Numeric:
575  str += QString::number(123.1234567890123456, ui.format_box->itemData(format_index).toChar().toLatin1(), ui.digits_box->value());
576  break;
577  case SciDAVis::Text:
578  str += tr("Hello world!\n");
579  break;
580  case SciDAVis::Month:
581  str += QLocale().toString(QDate(1900,1,1), ui.format_box->itemData(format_index).toString());
582  break;
583  case SciDAVis::Day:
584  str += QLocale().toString(QDate(1900,1,1), ui.format_box->itemData(format_index).toString());
585  break;
586  case SciDAVis::DateTime:
587  ui.formatLineEdit->setText(ui.format_box->itemData(format_index).toString());
588  ui.date_time_0->setDisplayFormat(ui.format_box->itemData(format_index).toString());
589  str += QDateTime(QDate(1900,1,1), QTime(23,59,59,999)).toString(ui.formatLineEdit->text());
590  break;
591  }
592  } else if (format_index == -1 && type_index >= 0 && ui.type_box->itemData(type_index).toInt() == SciDAVis::DateTime) {
593  str += tr("Dates and/or times\n");
594  ui.formatLineEdit->setEnabled(true);
595  str += tr("Example: ");
596  str += QDateTime(QDate(1900,1,1), QTime(23,59,59,999)).toString(ui.formatLineEdit->text());
597  }
598 
599 
600  ui.type_info->setText(str);
601  ui.digits_box->setVisible(ui.digits_box->isEnabled());
602  ui.digits_label->setVisible(ui.digits_box->isEnabled());
603  ui.formatLineEdit->setVisible(ui.formatLineEdit->isEnabled());
604  ui.format_label2->setVisible(ui.formatLineEdit->isEnabled());
605  if (ui.format_label2->isVisible())
606  ui.format_label->setText(tr("Predefined:"));
607  else
608  ui.format_label->setText(tr("Format:"));
609  }
610 
612  int type_index = ui.type_box->currentIndex();
613 
614  if (type_index >= 0) {
615  int type = ui.type_box->itemData(type_index).toInt();
616  if (type == SciDAVis::DateTime) {
617  QString str = tr("Selected column type:\n");
618  str += tr("Dates and/or times\n");
619  str += tr("Example: ");
620  str += QDateTime(QDate(1900,1,1), QTime(23,59,59,999)).toString(ui.formatLineEdit->text());
621  ui.type_info->setText(str);
622  ui.date_time_0->setDisplayFormat(ui.formatLineEdit->text());
623  }
624  }
625 }
626 
628 {
629  d_control_tabs->setVisible(true);
630  d_hide_button->setArrowType(Qt::RightArrow);
631  ui.tab_widget->setCurrentIndex(0);
632  ui.tab_widget->setFocus();
633 }
634 
636 {
637  d_control_tabs->setVisible(true);
638  d_hide_button->setArrowType(Qt::RightArrow);
639  ui.tab_widget->setCurrentIndex(1);
640  ui.tab_widget->setFocus();
641 }
642 
644 {
645  d_control_tabs->setVisible(true);
646  d_hide_button->setArrowType(Qt::RightArrow);
647  ui.tab_widget->setCurrentIndex(2);
648  ui.tab_widget->setFocus();
649 }
650 
652 {
653  QItemSelectionModel * sel_model = d_view_widget->selectionModel();
654  int index = sel_model->currentIndex().column();
655  if(d_table && index >= 0)
656  {
657  // changing the name triggers an update of the UI, which also resets the content of the
658  // comment box => need to cache it so name and comment can be changed simultaneously
659  QString comment = ui.comment_box->document()->toPlainText();
660  d_table->column(index)->setName(ui.name_edit->text());
661  d_table->column(index)->setComment(comment);
662  }
663 }
664 
666 {
667  int format_index = ui.format_box->currentIndex();
668  int type_index = ui.type_box->currentIndex();
669  if(format_index < 0 && type_index < 0) return;
670 
671  SciDAVis::ColumnMode new_mode = (SciDAVis::ColumnMode)ui.type_box->itemData(type_index).toInt();
672  QList<Column*> list = selectedColumns();
673  switch(new_mode) {
674  case SciDAVis::Numeric:
675  foreach(Column* col, list) {
676  col->beginMacro(QObject::tr("%1: change column type").arg(col->name()));
677  col->setColumnMode(new_mode);
678  Double2StringFilter * filter = static_cast<Double2StringFilter*>(col->outputFilter());
679  int digits = ui.digits_box->value(); // setNumericFormat causes digits_box to be modified...
680  filter->setNumericFormat(ui.format_box->itemData(format_index).toChar().toLatin1());
681  filter->setNumDigits(digits);
682  col->endMacro();
683  }
684  break;
685  case SciDAVis::Text:
686  foreach(Column* col, list)
687  col->setColumnMode(new_mode);
688  break;
689  case SciDAVis::Month:
690  case SciDAVis::Day:
691  case SciDAVis::DateTime:
692  QString format;
693  if (ui.formatLineEdit->isEnabled())
694  format = ui.formatLineEdit->text();
695  else
696  format = ui.format_box->itemData(format_index).toString();
697  foreach(Column* col, list) {
698  col->beginMacro(QObject::tr("%1: change column type").arg(col->name()));
699  SciDAVis::ColumnMode old_mode = col->columnMode();
700  AbstractFilter *converter = 0;
701  switch (old_mode) {
702  case SciDAVis::Numeric:
703  if (ui.date_time_interval->isVisible()) {
705  ui.date_time_interval->itemData(ui.date_time_interval->currentIndex()).toInt();
706  QDateTime date_time_0 = ui.date_time_0->dateTime();
707  if (!date_time_0.date().isValid())
708  date_time_0.setDate(QDate(-1,12,31));
709  converter = new Double2DateTimeFilter(unit, date_time_0);
710  }
711  break;
712  case SciDAVis::Text:
713  converter = new String2DateTimeFilter(format);
714  break;
715  default:
716  break;
717  }
718  col->setColumnMode(new_mode, converter);
719  DateTime2StringFilter * filter = static_cast<DateTime2StringFilter*>(col->outputFilter());
720  filter->setFormat(format);
721  col->endMacro();
722  }
723  break;
724  }
725 }
726 
727 void TableView::handleHeaderDataChanged(Qt::Orientation orientation, int first, int last)
728 {
729  if(orientation != Qt::Horizontal) return;
730 
731  QItemSelectionModel * sel_model = d_view_widget->selectionModel();
732 
733  int col = sel_model->currentIndex().column();
734  if(col < first || col > last) return;
736 }
737 
739 {
740  int count = 0;
741  if (d_table)
742  {
743  int cols = d_table->columnCount();
744  for (int i=0; i<cols; i++)
745  if(isColumnSelected(i, full)) count++;
746  }
747  return count;
748 }
749 
751 {
752  int count = 0;
753  if (d_table)
754  {
755  int cols = d_table->columnCount();
756  for(int i=0; i<cols; i++)
757  if( isColumnSelected(i, false) && (d_table->column(i)->plotDesignation() == pd) ) count++;
758  }
759  return count;
760 }
761 
762 bool TableView::isColumnSelected(int col, bool full)
763 {
764  if(full)
765  return d_view_widget->selectionModel()->isColumnSelected(col, QModelIndex());
766  else
767  return d_view_widget->selectionModel()->columnIntersectsSelection(col, QModelIndex());
768 }
769 
770 QList<Column*> TableView::selectedColumns(bool full)
771 {
772  QList<Column*> list;
773  if (d_table)
774  {
775  int cols = d_table->columnCount();
776  for (int i=0; i<cols; i++)
777  if(isColumnSelected(i, full)) list << d_table->column(i);
778  }
779  return list;
780 }
781 
783 {
784  int count = 0;
785  if (d_table)
786  {
787  int rows = d_table->rowCount();
788  for (int i=0; i<rows; i++)
789  if(isRowSelected(i, full)) count++;
790  }
791  return count;
792 }
793 
794 bool TableView::isRowSelected(int row, bool full)
795 {
796  if(full)
797  return d_view_widget->selectionModel()->isRowSelected(row, QModelIndex());
798  else
799  return d_view_widget->selectionModel()->rowIntersectsSelection(row, QModelIndex());
800 }
801 
803 {
804  if (d_table)
805  {
806  int cols = d_table->columnCount();
807  for (int i=0; i<cols; i++)
808  {
809  if(isColumnSelected(i, full))
810  return i;
811  }
812  }
813  return -1;
814 }
815 
817 {
818  if (d_table)
819  {
820  int cols = d_table->columnCount();
821  for(int i=cols-1; i>=0; i--)
822  if(isColumnSelected(i, full)) return i;
823  }
824  return -2;
825 }
826 
828 {
829  if (d_table)
830  {
831  int rows = d_table->rowCount();
832  for (int i=0; i<rows; i++)
833  {
834  if(isRowSelected(i, full))
835  return i;
836  }
837  }
838  return -1;
839 }
840 
842 {
843  if (d_table)
844  {
845  int rows = d_table->rowCount();
846  for(int i=rows-1; i>=0; i--)
847  if(isRowSelected(i, full)) return i;
848  }
849  return -2;
850 }
851 
854  if (d_table)
855  {
856  int rows = d_table->rowCount();
857  for (int i=0; i<rows; i++)
858  if (isRowSelected(i, full))
859  result.setValue(i, true);
860  }
861  return result;
862 }
863 
865 {
866  QModelIndexList indexes = d_view_widget->selectionModel()->selectedIndexes();
867  if (indexes.size() < 2)
868  return false;
869 
870  QModelIndex index;
871  int minrow = indexes.at(0).row();
872  int maxrow = minrow;
873  int mincol = indexes.at(0).column();
874  int maxcol = mincol;
875  foreach (index, indexes)
876  {
877  minrow = std::min(minrow, index.row());
878  maxrow = std::max(maxrow, index.row());
879  mincol = std::min(mincol, index.column());
880  maxcol = std::max(maxcol, index.column());
881  }
882  int spanned = (maxrow-minrow+1)*(maxcol-mincol+1);
883  return (spanned > d_view_widget->selectionModel()->selectedIndexes().size());
884 }
885 
886 bool TableView::isCellSelected(int row, int col)
887 {
888  if(!d_table || row < 0 || col < 0 || row >= d_table->rowCount() || col >= d_table->columnCount()) return false;
889 
890  return d_view_widget->selectionModel()->isSelected(d_model->index(row, col));
891 }
892 
893 void TableView::setCellSelected(int row, int col, bool select)
894 {
895  d_view_widget->selectionModel()->select(d_model->index(row, col),
896  select ? QItemSelectionModel::Select : QItemSelectionModel::Deselect);
897 }
898 
899 void TableView::setCellsSelected(int first_row, int first_col, int last_row, int last_col, bool select)
900 {
901  QModelIndex top_left = d_model->index(first_row, first_col);
902  QModelIndex bottom_right = d_model->index(last_row, last_col);
903  d_view_widget->selectionModel()->select(QItemSelection(top_left, bottom_right),
904  select ? QItemSelectionModel::SelectCurrent : QItemSelectionModel::Deselect);
905 }
906 
907 void TableView::getCurrentCell(int * row, int * col)
908 {
909  QModelIndex index = d_view_widget->selectionModel()->currentIndex();
910  if(index.isValid())
911  {
912  *row = index.row();
913  *col = index.column();
914  }
915  else
916  {
917  *row = -1;
918  *col = -1;
919  }
920 }
921 
922 bool TableView::eventFilter(QObject * watched, QEvent * event)
923 {
924  QHeaderView * v_header = d_view_widget->verticalHeader();
925 
926  if (d_table && event->type() == QEvent::ContextMenu)
927  {
928  QContextMenuEvent *cm_event = static_cast<QContextMenuEvent *>(event);
929  QPoint global_pos = cm_event->globalPos();
930  if(watched == v_header)
931  d_table->showTableViewRowContextMenu(global_pos);
932  else if(watched == d_horizontal_header) {
933  int col = d_horizontal_header->logicalIndexAt(cm_event->pos());
934  if (!isColumnSelected(col, true)) {
935  QItemSelectionModel * sel_model = d_view_widget->selectionModel();
936  sel_model->clearSelection();
937  sel_model->select(QItemSelection(d_model->index(0, col, QModelIndex()),
938  d_model->index(d_model->rowCount()-1, col, QModelIndex())),
939  QItemSelectionModel::Select);
940  }
941  d_table->showTableViewColumnContextMenu(global_pos);
942  } else if(watched == d_view_widget)
943  d_table->showTableViewContextMenu(global_pos);
944  else
945  return MyWidget::eventFilter(watched, event);
946 
947  return true;
948  }
949  else
950  return MyWidget::eventFilter(watched, event);
951 }
952 
954 {
955  return d_model->formulaModeActive();
956 }
957 
959 {
961 }
962 
964 {
965  if (!d_table || d_table->columnCount() == 0) return;
966 
967  QModelIndex idx = d_view_widget->currentIndex();
968  int col = idx.column()+1;
969  if (col >= d_table->columnCount())
970  col = 0;
971  d_view_widget->setCurrentIndex(idx.sibling(idx.row(), col));
972 }
973 
975 {
976  if (!d_table || d_table->columnCount() == 0) return;
977 
978  QModelIndex idx = d_view_widget->currentIndex();
979  int col = idx.column()-1;
980  if (col < 0)
981  col = d_table->columnCount()-1;
982  d_view_widget->setCurrentIndex(idx.sibling(idx.row(), col));
983 }
984 
985 
986 /* ================== TableViewWidget ================ */
987 
989 {
990  // the original QTableView::selectAll() toggles all cells which is strange behavior IMHO - thzs
991  QItemSelectionModel * sel_model = selectionModel();
992  QItemSelection sel(model()->index(0, 0, QModelIndex()), model()->index(model()->rowCount()-1,
993  model()->columnCount()-1, QModelIndex()));
994  sel_model->select(sel, QItemSelectionModel::Select);
995 }
996 
997 void TableViewWidget::updateHeaderGeometry(Qt::Orientation o, int first, int last)
998 {
999  Q_UNUSED(first)
1000  Q_UNUSED(last)
1001  if(o != Qt::Horizontal) return;
1002  horizontalHeader()->setStretchLastSection(true); // ugly hack (flaw in Qt? Does anyone know a better way?)
1003  horizontalHeader()->updateGeometry();
1004  horizontalHeader()->setStretchLastSection(false); // ugly hack part 2
1005 }
1006 
1007 void TableViewWidget::keyPressEvent(QKeyEvent * event)
1008 {
1009  if(event->key() == Qt::Key_Return || event->key() == Qt::Key_Enter)
1010  emit advanceCell();
1011  QTableView::keyPressEvent(event);
1012 }
1013 
TableModel
Model for the access to a Table.
Definition: TableModel.h:54
AbstractFilter.h
TableView::toggleComments
void toggleComments()
Definition: TableView.cpp:350
Double2DateTimeFilter.h
TableViewWidget
Helper class for TableView.
Definition: TableView.h:66
TableView::d_hide_button
QToolButton * d_hide_button
Button to toogle the visibility of #d_tool_box.
Definition: TableView.h:235
Column::outputFilter
AbstractSimpleFilter * outputFilter() const
Return the output filter (for data type -> string conversion)
Definition: Column.cpp:593
TableView::d_main_layout
QHBoxLayout * d_main_layout
Definition: TableView.h:236
TableView::handleAspectAboutToBeRemoved
void handleAspectAboutToBeRemoved(const AbstractAspect *aspect, int index)
Definition: TableView.cpp:436
TableView::firstSelectedColumn
int firstSelectedColumn(bool full=false)
Return the index of the first selected column.
Definition: TableView.cpp:802
Column.h
TableView::goToNextColumn
void goToNextColumn()
Definition: TableView.cpp:963
TableModel::rowCount
int rowCount(const QModelIndex &parent=QModelIndex()) const
Definition: TableModel.cpp:143
DateTime2StringFilter::setFormat
void setFormat(const QString &format)
Set the format string to be used for conversion.
Definition: DateTime2StringFilter.cpp:35
tablecommands.h
str
#define str(x)
Definition: PythonScripting.cpp:41
AbstractFilter
Base class for all analysis operations.
Definition: AbstractFilter.h:77
TableView::d_horizontal_header
TableDoubleHeaderView * d_horizontal_header
Definition: TableView.h:237
TableView::getCurrentCell
void getCurrentCell(int *row, int *col)
Determine the current cell (-1 if no cell is designated as the current)
Definition: TableView.cpp:907
TableDoubleHeaderView
Horizontal header for TableView displaying comments in a second header.
Definition: TableDoubleHeaderView.h:71
Double2StringFilter::numericFormat
char numericFormat() const
Get format character as in QString::number.
Definition: Double2StringFilter.h:50
future::Table
Aspect providing a spreadsheet table with column logic.
Definition: future_Table.h:86
TableView::lastSelectedColumn
int lastSelectedColumn(bool full=false)
Return the index of the last selected column.
Definition: TableView.cpp:816
TableModel::index
QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const
Definition: TableModel.cpp:187
Column
Aspect that manages a column.
Definition: Column.h:59
IntervalAttribute< bool >
A class representing an interval-based attribute (bool version)
Definition: IntervalAttribute.h:198
TableView::showComments
void showComments(bool on=true)
Show or hide (if on = false) the column comments.
Definition: TableView.cpp:355
MyWidget
Base class of all MDI client windows.
Definition: MyWidget.h:52
TableView::handleAspectAdded
void handleAspectAdded(const AbstractAspect *aspect)
Definition: TableView.cpp:426
Double2StringFilter.h
Double2DateTimeFilter
Conversion filter double -> QDateTime.
Definition: Double2DateTimeFilter.h:46
TableView::~TableView
virtual ~TableView()
Destructor.
Definition: TableView.cpp:79
DateTime2StringFilter
Conversion filter QDateTime -> QString.
Definition: DateTime2StringFilter.h:41
TableModel.h
future::Table::defaultColumnWidth
static int defaultColumnWidth()
Definition: future_Table.h:232
DateTime2StringFilter.h
TableView::deselectAll
void deselectAll()
Definition: TableView.cpp:313
TableView.h
TableView::eventFilter
bool eventFilter(QObject *watched, QEvent *event)
Definition: TableView.cpp:922
future_Table.h
TableView::handleHorizontalHeaderDoubleClicked
void handleHorizontalHeaderDoubleClicked(int index)
Definition: TableView.cpp:339
Double2StringFilter::setNumDigits
void setNumDigits(int digits)
Set number of displayed digits.
Definition: Double2StringFilter.cpp:69
Double2DateTimeFilter::Minute
@ Minute
Definition: Double2DateTimeFilter.h:50
Column::setColumnMode
void setColumnMode(SciDAVis::ColumnMode mode, AbstractFilter *conversion_filter=0) override
Set the column mode.
Definition: Column.cpp:85
Double2DateTimeFilter::Month
@ Month
Definition: Double2DateTimeFilter.h:50
Double2DateTimeFilter::Hour
@ Hour
Definition: Double2DateTimeFilter.h:50
SciDAVis::ColumnMode
ColumnMode
The column mode (defines output and input filter for table columns)
Definition: globals.h:66
TableDoubleHeaderView.h
TableView::d_control_tabs
QWidget * d_control_tabs
Widget that contains the control tabs UI from ui.
Definition: TableView.h:233
TableView::d_table
QPointer< future::Table > d_table
Definition: TableView.h:238
TableView
View class for Table.
Definition: TableView.h:89
TableView::changeEvent
virtual void changeEvent(QEvent *event)
Definition: TableView.cpp:253
AbstractAspect::endMacro
void endMacro()
End the undo stack macro.
Definition: AbstractAspect.cpp:222
TableDoubleHeaderView::areCommentsShown
bool areCommentsShown() const
Return whether comments are show currently.
Definition: TableDoubleHeaderView.cpp:102
TableView::updateTypeInfo
void updateTypeInfo()
Definition: TableView.cpp:542
TableView::toggleControlTabBar
void toggleControlTabBar()
Definition: TableView.cpp:318
TableView::selectAll
void selectAll()
Definition: TableView.cpp:308
AbstractAspect::beginMacro
void beginMacro(const QString &text)
Begin an undo stack macro (series of commands)
Definition: AbstractAspect.cpp:215
TableView::selectedRowCount
int selectedRowCount(bool full=false)
Return how many rows are (at least partly) selected.
Definition: TableView.cpp:782
TableView::TableView
TableView(future::Table *table)
Constructor.
Definition: TableView.cpp:64
TableView::setCellsSelected
void setCellsSelected(int first_row, int first_col, int last_row, int last_col, bool select=true)
Select/Deselect a range of cells.
Definition: TableView.cpp:899
TableView::isRowSelected
bool isRowSelected(int row, bool full=false)
Returns true if row 'row' is selected; otherwise false.
Definition: TableView.cpp:794
IntervalAttribute< bool >::setValue
void setValue(Interval< int > i, bool value=true)
Definition: IntervalAttribute.h:210
TableView::selectedColumnCount
int selectedColumnCount(bool full=false)
Return how many columns are selected.
Definition: TableView.cpp:738
Double2StringFilter::setNumericFormat
void setNumericFormat(char format)
Set format character as in QString::number.
Definition: Double2StringFilter.cpp:64
TableViewWidget::keyPressEvent
virtual void keyPressEvent(QKeyEvent *event)
Overloaded function (cf. Qt documentation)
Definition: TableView.cpp:1007
TableView::applyDescription
void applyDescription()
Definition: TableView.cpp:651
TableView::goToPreviousColumn
void goToPreviousColumn()
Definition: TableView.cpp:974
SciDAVis::Month
@ Month
column contains month names
Definition: globals.h:69
TableViewWidget::advanceCell
void advanceCell()
TableView::isColumnSelected
bool isColumnSelected(int col, bool full=false)
Returns true if column 'col' is selected; otherwise false.
Definition: TableView.cpp:762
Double2DateTimeFilter::Second
@ Second
Definition: Double2DateTimeFilter.h:50
TableView::handleHeaderDataChanged
void handleHeaderDataChanged(Qt::Orientation orientation, int first, int last)
Definition: TableView.cpp:727
TableDoubleHeaderView::showComments
void showComments(bool on=true)
Show or hide (if on = false) the column comments.
Definition: TableDoubleHeaderView.cpp:107
AbstractAspect::name
QString name() const
Definition: AbstractAspect.cpp:229
Column::columnMode
SciDAVis::ColumnMode columnMode() const override
Return the column mode.
Definition: Column.cpp:579
TableView::goToCell
void goToCell(int row, int col)
Definition: TableView.cpp:301
TableView::d_delegate
TableItemDelegate * d_delegate
Pointer to the item delegate.
Definition: TableView.h:218
TableView::retranslateStrings
void retranslateStrings()
Definition: TableView.cpp:260
TableView::selectionChanged
void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
Definition: TableView.cpp:442
TableView::setColumnWidth
void setColumnWidth(int col, int width)
Definition: TableView.cpp:225
TableView::currentColumnChanged
void currentColumnChanged(const QModelIndex &current, const QModelIndex &previous)
Definition: TableView.cpp:361
TableView::formulaModeActive
bool formulaModeActive() const
Definition: TableView.cpp:953
TableModel::activateFormulaMode
void activateFormulaMode(bool on)
Definition: TableModel.h:90
SciDAVis::Text
@ Text
column contains strings
Definition: globals.h:68
TableViewWidget::updateHeaderGeometry
void updateHeaderGeometry(Qt::Orientation o, int first, int last)
Cause a repaint of the header.
Definition: TableView.cpp:997
AbstractAspect::parentAspect
AbstractAspect * parentAspect() const
Return my parent Aspect or 0 if I currently don't have one.
Definition: AbstractAspect.cpp:109
TableView::showControlFormulaTab
void showControlFormulaTab()
Definition: TableView.cpp:643
String2DateTimeFilter.h
SciDAVis::DateTime
@ DateTime
column contains dates and/or times
Definition: globals.h:71
TableView::handleFormatLineEditChange
void handleFormatLineEditChange()
Definition: TableView.cpp:611
Column::formula
QString formula(int row) const override
Return the formula associated with row 'row'
Definition: Column.cpp:628
DateTime2StringFilter::format
QString format() const
Return the format string.
Definition: DateTime2StringFilter.h:55
TableView::updateFormatBox
void updateFormatBox()
Definition: TableView.cpp:448
Double2StringFilter::numDigits
int numDigits() const
Get number of displayed digits.
Definition: Double2StringFilter.h:52
Double2DateTimeFilter::Millisecond
@ Millisecond
Definition: Double2DateTimeFilter.h:50
TableView::areCommentsShown
bool areCommentsShown() const
Return whether comments are show currently.
Definition: TableView.cpp:345
String2DoubleFilter.h
name
char * name()
Definition: exp_saturation.c:45
TableView::selectedColumns
QList< Column * > selectedColumns(bool full=false)
Return all selected columns.
Definition: TableView.cpp:770
TableView::handleAspectDescriptionChanged
void handleAspectDescriptionChanged(const AbstractAspect *aspect)
Definition: TableView.cpp:415
AbstractAspect::comment
QString comment() const
Definition: AbstractAspect.cpp:260
TableView::columnWidth
int columnWidth(int col) const
Definition: TableView.cpp:230
TableItemDelegate.h
TableView::firstSelectedRow
int firstSelectedRow(bool full=false)
Return the index of the first selected row.
Definition: TableView.cpp:827
TableView::lastSelectedRow
int lastSelectedRow(bool full=false)
Return the index of the last selected row.
Definition: TableView.cpp:841
TableView::rereadSectionSizes
void rereadSectionSizes()
Definition: TableView.cpp:211
TableView::applyType
void applyType()
Definition: TableView.cpp:665
SciDAVis::PlotDesignation
PlotDesignation
Types of plot designations.
Definition: globals.h:55
Double2DateTimeFilter::UnitInterval
UnitInterval
Definition: Double2DateTimeFilter.h:50
TableView::showControlTypeTab
void showControlTypeTab()
Definition: TableView.cpp:635
TableView::isCellSelected
bool isCellSelected(int row, int col)
Return whether a cell is selected.
Definition: TableView.cpp:886
TableView::activateFormulaMode
void activateFormulaMode(bool on)
Definition: TableView.cpp:958
TableView::setCellSelected
void setCellSelected(int row, int col, bool select=true)
Select/Deselect a cell.
Definition: TableView.cpp:893
TableViewWidget::selectAll
void selectAll()
Definition: TableView.cpp:988
TableModel::formulaModeActive
bool formulaModeActive() const
Definition: TableModel.h:91
TableView::showControlDescriptionTab
void showControlDescriptionTab()
Definition: TableView.cpp:627
SciDAVis::Day
@ Day
column containts day of week names
Definition: globals.h:70
TableItemDelegate
Item delegate for TableView.
Definition: TableItemDelegate.h:37
SciDAVis::Numeric
@ Numeric
column contains doubles
Definition: globals.h:67
TableView::handleHorizontalSectionResized
void handleHorizontalSectionResized(int logicalIndex, int oldSize, int newSize)
Definition: TableView.cpp:235
String2DateTimeFilter
Conversion filter QString -> QDateTime.
Definition: String2DateTimeFilter.h:48
TableView::advanceCell
void advanceCell()
Advance current cell after [Return] or [Enter] was pressed.
Definition: TableView.cpp:287
Double2DateTimeFilter::Day
@ Day
Definition: Double2DateTimeFilter.h:50
TableView::selectedRows
IntervalAttribute< bool > selectedRows(bool full=false)
Get the complete set of selected rows.
Definition: TableView.cpp:852
Double2StringFilter
Locale-aware conversion filter double -> QString.
Definition: Double2StringFilter.h:39
TableView::handleHorizontalSectionMoved
void handleHorizontalSectionMoved(int index, int from, int to)
Definition: TableView.cpp:327
MyWidget::changeEvent
virtual void changeEvent(QEvent *event)
Definition: MyWidget.cpp:129
MyWidget::aspect
QString aspect()
Return the window status as a string.
Definition: MyWidget.cpp:106
TableView::d_model
TableModel * d_model
Pointer to the current underlying model.
Definition: TableView.h:220
SimpleCopyThroughFilter.h
TableView::init
void init()
Initialization.
Definition: TableView.cpp:92
AbstractAspect
Base class of all persistent objects in a Project.
Definition: AbstractAspect.h:86
TableView::hasMultiSelection
bool hasMultiSelection()
Return whether multiple regions are selected.
Definition: TableView.cpp:864
Double2DateTimeFilter::Year
@ Year
Definition: Double2DateTimeFilter.h:50
TableView::ui
Ui::ControlTabs ui
UI with options tabs (description, format, formula etc.)
Definition: TableView.h:229
TableView::d_view_widget
TableViewWidget * d_view_widget
The table view (first part of the UI)
Definition: TableView.h:231
TableView::setColumnForControlTabs
void setColumnForControlTabs(int col)
Definition: TableView.cpp:369