SciDAVis
1.D4
|
#include <TableView.h>
Public Slots | |
void | activateFormulaMode (bool on) |
void | deselectAll () |
void | goToCell (int row, int col) |
void | goToNextColumn () |
void | goToPreviousColumn () |
void | handleHorizontalSectionResized (int logicalIndex, int oldSize, int newSize) |
void | rereadSectionSizes () |
void | selectAll () |
void | showControlDescriptionTab () |
void | showControlFormulaTab () |
void | showControlTypeTab () |
void | toggleComments () |
void | toggleControlTabBar () |
Public Member Functions | |
bool | areCommentsShown () const |
Return whether comments are show currently. | |
int | columnWidth (int col) const |
bool | formulaModeActive () const |
bool | isControlTabBarVisible () |
void | setColumnWidth (int col, int width) |
void | showComments (bool on=true) |
Show or hide (if on = false) the column comments. | |
TableView (future::Table *table) | |
Constructor. | |
virtual | ~TableView () |
Destructor. | |
selection related functions | |
int | selectedColumnCount (bool full=false) |
Return how many columns are selected. | |
int | selectedColumnCount (SciDAVis::PlotDesignation pd) |
Return how many columns with the given plot designation are (at least partly) selected. | |
bool | isColumnSelected (int col, bool full=false) |
Returns true if column 'col' is selected; otherwise false. | |
QList< Column * > | selectedColumns (bool full=false) |
Return all selected columns. | |
int | selectedRowCount (bool full=false) |
Return how many rows are (at least partly) selected. | |
bool | isRowSelected (int row, bool full=false) |
Returns true if row 'row' is selected; otherwise false. | |
int | firstSelectedColumn (bool full=false) |
Return the index of the first selected column. | |
int | lastSelectedColumn (bool full=false) |
Return the index of the last selected column. | |
int | firstSelectedRow (bool full=false) |
Return the index of the first selected row. | |
int | lastSelectedRow (bool full=false) |
Return the index of the last selected row. | |
IntervalAttribute< bool > | selectedRows (bool full=false) |
Get the complete set of selected rows. | |
bool | isCellSelected (int row, int col) |
Return whether a cell is selected. | |
void | setCellSelected (int row, int col, bool select=true) |
Select/Deselect a cell. | |
void | setCellsSelected (int first_row, int first_col, int last_row, int last_col, bool select=true) |
Select/Deselect a range of cells. | |
void | getCurrentCell (int *row, int *col) |
Determine the current cell (-1 if no cell is designated as the current) | |
Public Member Functions inherited from MyWidget | |
void | askOnCloseEvent (bool ask) |
Toggle the "ask on close" flag. | |
QString | aspect () |
Return the window status as a string. | |
virtual QString | birthDate () |
Return the creation date. | |
virtual CaptionPolicy | captionPolicy () |
Return the caption policy. | |
void | closeEvent (QCloseEvent *) |
Close event handler. | |
virtual void | exportPDF (const QString &) |
Folder * | folder () |
Returns the pointer to the parent folder of the window. | |
MyWidget (const QString &label=QString(), QWidget *parent=0, const QString name=0, Qt::WFlags f=0) | |
Constructor. | |
virtual QString | name () |
Return the window name. | |
void | notifyChanges () |
Notifies the main application that the window has been modified. | |
virtual void | print () |
virtual void | restore (const QStringList &) |
Not implemented yet. | |
virtual QString | saveAsTemplate (const QString &) |
virtual QString | saveToString (const QString &) |
virtual void | setBirthDate (const QString &s) |
Set the creation date. | |
virtual void | setCaptionPolicy (CaptionPolicy policy) |
Set the caption policy. | |
void | setFolder (Folder *f) |
Initializes the pointer to the parent folder of the window. | |
virtual void | setHidden () |
Notifies that a window was hidden by a direct user action. | |
void | setMaximized () |
void | setMinimized () |
virtual void | setName (const QString &s) |
Set the window name. | |
void | setNormal () |
void | setStatus (Status s) |
Set the window status flag (hidden, normal, minimized or maximized) | |
virtual void | setWindowLabel (const QString &s) |
Set the window label. | |
Status | status () |
Return the window status flag (hidden, normal, minimized or maximized) | |
virtual QString | windowLabel () |
Return the window label. |
Protected Slots | |
void | advanceCell () |
Advance current cell after [Return] or [Enter] was pressed. | |
void | applyDescription () |
void | applyType () |
void | currentColumnChanged (const QModelIndex ¤t, const QModelIndex &previous) |
void | handleAspectAboutToBeRemoved (const AbstractAspect *aspect, int index) |
void | handleAspectAdded (const AbstractAspect *aspect) |
void | handleAspectDescriptionChanged (const AbstractAspect *aspect) |
void | handleFormatLineEditChange () |
void | handleHeaderDataChanged (Qt::Orientation orientation, int first, int last) |
void | handleHorizontalHeaderDoubleClicked (int index) |
void | handleHorizontalSectionMoved (int index, int from, int to) |
void | selectionChanged (const QItemSelection &selected, const QItemSelection &deselected) |
void | updateFormatBox () |
void | updateTypeInfo () |
Protected Slots inherited from MyWidget | |
void | updateCaption () |
Set caption according to current CaptionPolicy, name and label. |
Protected Member Functions | |
virtual void | changeEvent (QEvent *event) |
Catches parent changes (in order to gain access to the title bar) | |
bool | eventFilter (QObject *watched, QEvent *event) |
Filters other object's events (customizes title bar's context menu) | |
void | init () |
Initialization. | |
void | retranslateStrings () |
void | setColumnForControlTabs (int col) |
Protected Attributes | |
QWidget * | d_control_tabs |
Widget that contains the control tabs UI from ui. | |
TableItemDelegate * | d_delegate |
Pointer to the item delegate. | |
QToolButton * | d_hide_button |
Button to toogle the visibility of #d_tool_box. | |
TableDoubleHeaderView * | d_horizontal_header |
QHBoxLayout * | d_main_layout |
TableModel * | d_model |
Pointer to the current underlying model. | |
future::Table * | d_table |
TableViewWidget * | d_view_widget |
The table view (first part of the UI) | |
Ui::ControlTabs | ui |
UI with options tabs (description, format, formula etc.) | |
Protected Attributes inherited from MyWidget | |
bool | askOnClose |
Toggle on/off: Ask the user "delete, hide, or cancel?" on a close event. | |
QString | birthdate |
The creation date. | |
CaptionPolicy | caption_policy |
The caption policy. | |
Folder * | parentFolder |
Pointer to the parent folder of the window. | |
QWidget * | titleBar |
Title bar of this MDI window if it currently belongs to a QWorkspace, NULL else. | |
QString | w_label |
The window label. | |
Status | w_status |
The window status. |
Additional Inherited Members | |
Public Types inherited from MyWidget | |
enum | CaptionPolicy { Name = 0, Label = 1, Both = 2 } |
Possible window captions. More... | |
enum | Status { Hidden = -1, Normal = 0, Minimized = 1, Maximized = 2 } |
Signals inherited from MyWidget | |
void | closedWindow (MyWidget *) |
Emitted when the window was closed. | |
void | hiddenWindow (MyWidget *) |
Emitted when the window was hidden. | |
void | modifiedWindow (QWidget *) |
void | resizedWindow (QWidget *) |
void | showTitleBarMenu () |
Emitted when the title bar recieves a QContextMenuEvent. | |
void | statusChanged (MyWidget *) |
Emitted when the window status changed. |
View class for Table.
TableView::TableView | ( | future::Table * | table | ) |
|
virtual |
Destructor.
References d_model.
|
slot |
References TableModel::activateFormulaMode(), and d_model.
|
protectedslot |
Advance current cell after [Return] or [Enter] was pressed.
References d_table, d_view_widget, future::Table::rowCount(), and future::Table::setRowCount().
Referenced by init().
|
protectedslot |
References future::Table::column(), d_table, d_view_widget, AbstractAspect::setComment(), AbstractAspect::setName(), and ui.
Referenced by init().
|
protectedslot |
References AbstractAspect::beginMacro(), Column::columnMode(), SciDAVis::DateTime, SciDAVis::Day, AbstractAspect::endMacro(), SciDAVis::Month, AbstractAspect::name(), SciDAVis::Numeric, Column::outputFilter(), selectedColumns(), Column::setColumnMode(), DateTime2StringFilter::setFormat(), Double2StringFilter::setNumDigits(), Double2StringFilter::setNumericFormat(), SciDAVis::Text, and ui.
Referenced by init().
bool TableView::areCommentsShown | ( | ) | const |
Return whether comments are show currently.
References TableDoubleHeaderView::areCommentsShown(), and d_horizontal_header.
Referenced by future::Table::adjustActionNames(), Table::commentsEnabled(), and toggleComments().
|
protectedvirtual |
Catches parent changes (in order to gain access to the title bar)
Reimplemented from MyWidget.
References retranslateStrings().
int TableView::columnWidth | ( | int | col | ) | const |
References d_horizontal_header.
|
protectedslot |
References future::Table::columnCount(), d_table, and setColumnForControlTabs().
Referenced by init().
|
slot |
References d_view_widget.
Referenced by ApplicationWindow::showTable().
|
protected |
Filters other object's events (customizes title bar's context menu)
Reimplemented from MyWidget.
Reimplemented in TableStatistics.
References d_horizontal_header, d_model, d_table, d_view_widget, TableModel::index(), isColumnSelected(), TableModel::rowCount(), future::Table::showTableViewColumnContextMenu(), future::Table::showTableViewContextMenu(), and future::Table::showTableViewRowContextMenu().
int TableView::firstSelectedColumn | ( | bool | full = false | ) |
Return the index of the first selected column.
If full is true, this function only looks for fully selected columns.
References future::Table::columnCount(), d_table, and isColumnSelected().
Referenced by Table::applyFormula(), future::Table::copySelection(), future::Table::insertEmptyColumns(), future::Table::pasteIntoSelection(), ApplicationWindow::plot3DBars(), ApplicationWindow::plot3DRibbon(), ApplicationWindow::plot3DScatter(), ApplicationWindow::plot3DTrajectory(), Table::recalculate(), and ApplicationWindow::validFor3DPlot().
int TableView::firstSelectedRow | ( | bool | full = false | ) |
Return the index of the first selected row.
If full is true, this function only looks for fully selected rows.
References d_table, isRowSelected(), and future::Table::rowCount().
Referenced by future::Table::clearSelectedCells(), future::Table::copySelection(), future::Table::cutSelection(), future::Table::export_to_TeX(), Table::exportASCII(), future::Table::fillSelectedCellsWithRandomNumbers(), future::Table::fillSelectedCellsWithRowNumbers(), future::Table::insertEmptyRows(), future::Table::maskSelection(), future::Table::pasteIntoSelection(), ApplicationWindow::plotPie(), ApplicationWindow::plotVectXYAM(), ApplicationWindow::plotVectXYXY(), ApplicationWindow::selectPlotType(), and future::Table::unmaskSelection().
bool TableView::formulaModeActive | ( | ) | const |
References d_model, and TableModel::formulaModeActive().
Referenced by future::Table::clearSelectedCells(), future::Table::clearSelectedColumns(), future::Table::copySelection(), and future::Table::pasteIntoSelection().
void TableView::getCurrentCell | ( | int * | row, |
int * | col | ||
) |
Determine the current cell (-1 if no cell is designated as the current)
References d_view_widget.
Referenced by future::Table::pasteIntoSelection().
|
slot |
References d_model, d_view_widget, and TableModel::index().
Referenced by future::Table::goToCell().
|
slot |
References future::Table::columnCount(), d_table, and d_view_widget.
Referenced by init().
|
slot |
References future::Table::columnCount(), d_table, and d_view_widget.
Referenced by init().
|
protectedslot |
|
protectedslot |
References MyWidget::aspect(), d_table, AbstractAspect::indexOfChild(), AbstractAspect::name(), AbstractAspect::parentAspect(), and ui.
Referenced by init().
|
protectedslot |
References MyWidget::aspect(), future::Table::columnIndex(), d_table, AbstractAspect::name(), AbstractAspect::parentAspect(), and ui.
Referenced by init().
|
protectedslot |
References SciDAVis::DateTime, and ui.
Referenced by init().
|
protectedslot |
References d_view_widget, and setColumnForControlTabs().
Referenced by init().
|
protectedslot |
References showControlDescriptionTab().
Referenced by init().
|
protectedslot |
References d_table, d_view_widget, and future::Table::moveColumn().
Referenced by init().
|
slot |
References future::Table::columnCount(), d_horizontal_header, d_table, isColumnSelected(), and future::Table::setColumnWidth().
Referenced by rereadSectionSizes().
|
protected |
Initialization.
Reimplemented in Table.
References advanceCell(), applyDescription(), applyType(), currentColumnChanged(), d_control_tabs, d_delegate, d_hide_button, d_horizontal_header, d_main_layout, d_model, d_table, d_view_widget, future::Table::defaultColumnWidth(), goToNextColumn(), goToPreviousColumn(), handleAspectAboutToBeRemoved(), handleAspectAdded(), handleAspectDescriptionChanged(), handleFormatLineEditChange(), handleHeaderDataChanged(), handleHorizontalHeaderDoubleClicked(), handleHorizontalSectionMoved(), rereadSectionSizes(), retranslateStrings(), selectAll(), selectionChanged(), toggleControlTabBar(), ui, updateFormatBox(), and updateTypeInfo().
Referenced by TableView().
bool TableView::isCellSelected | ( | int | row, |
int | col | ||
) |
Return whether a cell is selected.
References future::Table::columnCount(), d_model, d_table, d_view_widget, TableModel::index(), and future::Table::rowCount().
Referenced by future::Table::copySelection(), future::Table::fillSelectedCellsWithRandomNumbers(), future::Table::fillSelectedCellsWithRowNumbers(), future::Table::maskSelection(), future::Table::normalizeSelection(), future::Table::pasteIntoSelection(), and future::Table::unmaskSelection().
bool TableView::isColumnSelected | ( | int | col, |
bool | full = false |
||
) |
Returns true if column 'col' is selected; otherwise false.
If full is true, this function only returns true if the whole column is selected.
References d_view_widget.
Referenced by Table::drawableColumnSelection(), eventFilter(), future::Table::export_to_TeX(), Table::exportASCII(), firstSelectedColumn(), handleHorizontalSectionResized(), lastSelectedColumn(), selectedColumnCount(), selectedColumns(), Table::selectedColumns(), Table::selectedErrColumns(), Table::selectedYColumns(), Table::selectedYLabels(), and ApplicationWindow::showColStatistics().
|
inline |
References d_control_tabs.
Referenced by future::Table::adjustActionNames().
bool TableView::isRowSelected | ( | int | row, |
bool | full = false |
||
) |
Returns true if row 'row' is selected; otherwise false.
If full is true, this function only returns true if the whole row is selected.
References d_view_widget.
Referenced by firstSelectedRow(), lastSelectedRow(), selectedRowCount(), selectedRows(), and ApplicationWindow::showRowStatistics().
int TableView::lastSelectedColumn | ( | bool | full = false | ) |
Return the index of the last selected column.
If full is true, this function only looks for fully selected columns.
References future::Table::columnCount(), d_table, and isColumnSelected().
Referenced by Table::applyFormula(), future::Table::copySelection(), future::Table::insertEmptyColumns(), future::Table::pasteIntoSelection(), and Table::recalculate().
int TableView::lastSelectedRow | ( | bool | full = false | ) |
Return the index of the last selected row.
If full is true, this function only looks for fully selected rows.
References d_table, isRowSelected(), and future::Table::rowCount().
Referenced by future::Table::clearSelectedCells(), future::Table::copySelection(), future::Table::export_to_TeX(), Table::exportASCII(), future::Table::fillSelectedCellsWithRandomNumbers(), future::Table::fillSelectedCellsWithRowNumbers(), future::Table::insertEmptyRows(), future::Table::maskSelection(), future::Table::pasteIntoSelection(), ApplicationWindow::plotPie(), ApplicationWindow::plotVectXYAM(), ApplicationWindow::plotVectXYXY(), ApplicationWindow::selectPlotType(), and future::Table::unmaskSelection().
|
slot |
References future::Table::columnCount(), future::Table::columnWidth(), d_horizontal_header, d_table, and handleHorizontalSectionResized().
Referenced by future::Table::copy(), and init().
|
protected |
References d_control_tabs, d_hide_button, SciDAVis::DateTime, Double2DateTimeFilter::Day, SciDAVis::Day, Double2DateTimeFilter::Hour, Double2DateTimeFilter::Millisecond, Double2DateTimeFilter::Minute, Double2DateTimeFilter::Month, SciDAVis::Month, SciDAVis::Numeric, Double2DateTimeFilter::Second, SciDAVis::Text, ui, and Double2DateTimeFilter::Year.
Referenced by changeEvent(), and init().
|
slot |
References d_view_widget, and TableViewWidget::selectAll().
Referenced by init(), future::Table::selectAll(), and Table::selectAllTable().
int TableView::selectedColumnCount | ( | bool | full = false | ) |
Return how many columns are selected.
If full is true, this function only returns the number of fully selected columns.
References future::Table::columnCount(), d_table, and isColumnSelected().
Referenced by future::Table::addColumns(), future::Table::export_to_TeX(), future::Table::fillSelectedCellsWithRandomNumbers(), future::Table::fillSelectedCellsWithRowNumbers(), Table::selectedColsNumber(), and ApplicationWindow::validFor2DPlot().
int TableView::selectedColumnCount | ( | SciDAVis::PlotDesignation | pd | ) |
Return how many columns with the given plot designation are (at least partly) selected.
References future::Table::column(), future::Table::columnCount(), d_table, isColumnSelected(), and Column::plotDesignation().
QList< Column * > TableView::selectedColumns | ( | bool | full = false | ) |
Return all selected columns.
If full is true, this function only returns a column if the whole column is selected.
References future::Table::column(), future::Table::columnCount(), d_table, and isColumnSelected().
Referenced by applyType(), future::Table::clearSelectedCells(), future::Table::clearSelectedColumns(), future::Table::fillSelectedCellsWithRandomNumbers(), future::Table::fillSelectedCellsWithRowNumbers(), future::Table::maskSelection(), future::Table::normalizeSelectedColumns(), future::Table::normalizeSelection(), future::Table::removeSelectedColumns(), future::Table::setSelectionAs(), future::Table::sortSelectedColumns(), and future::Table::unmaskSelection().
int TableView::selectedRowCount | ( | bool | full = false | ) |
Return how many rows are (at least partly) selected.
If full is true, this function only returns the number of fully selected rows.
References d_table, isRowSelected(), and future::Table::rowCount().
Referenced by future::Table::addRows(), and Table::numSelectedRows().
IntervalAttribute< bool > TableView::selectedRows | ( | bool | full = false | ) |
Get the complete set of selected rows.
References d_table, isRowSelected(), future::Table::rowCount(), and IntervalAttribute< bool >::setValue().
Referenced by future::Table::clearSelectedCells(), Table::recalculate(), and future::Table::removeSelectedRows().
|
protectedslot |
Referenced by init().
void TableView::setCellSelected | ( | int | row, |
int | col, | ||
bool | select = true |
||
) |
Select/Deselect a cell.
References d_model, d_view_widget, and TableModel::index().
Referenced by future::Table::pasteIntoSelection().
void TableView::setCellsSelected | ( | int | first_row, |
int | first_col, | ||
int | last_row, | ||
int | last_col, | ||
bool | select = true |
||
) |
Select/Deselect a range of cells.
References d_model, d_view_widget, and TableModel::index().
Referenced by future::Table::pasteIntoSelection(), and ApplicationWindow::showTable().
|
protected |
References future::Table::column(), future::Table::columnCount(), Column::columnMode(), AbstractAspect::comment(), d_table, SciDAVis::DateTime, SciDAVis::Day, DateTime2StringFilter::format(), Column::formula(), SciDAVis::Month, AbstractAspect::name(), Double2StringFilter::numDigits(), SciDAVis::Numeric, Double2StringFilter::numericFormat(), Column::outputFilter(), and ui.
Referenced by currentColumnChanged(), and handleHeaderDataChanged().
void TableView::setColumnWidth | ( | int | col, |
int | width | ||
) |
References d_horizontal_header.
Referenced by ImportOPJ::importTables(), and future::Table::readColumnWidthElement().
void TableView::showComments | ( | bool | on = true | ) |
Show or hide (if on = false) the column comments.
References d_horizontal_header, and TableDoubleHeaderView::showComments().
Referenced by ApplicationWindow::customTable(), toggleComments(), and future::Table::view().
|
slot |
References d_control_tabs, d_hide_button, and ui.
Referenced by future::Table::editDescriptionOfCurrentColumn(), and handleHorizontalHeaderDoubleClicked().
|
slot |
References d_control_tabs, d_hide_button, and ui.
Referenced by future::Table::setFormulaForSelection().
|
slot |
References d_control_tabs, d_hide_button, and ui.
Referenced by future::Table::editTypeAndFormatOfSelectedColumns().
|
slot |
References areCommentsShown(), and showComments().
|
slot |
References d_control_tabs, and d_hide_button.
Referenced by init().
|
protectedslot |
References SciDAVis::DateTime, SciDAVis::Day, SciDAVis::Month, SciDAVis::Numeric, SciDAVis::Text, and ui.
Referenced by init().
|
protectedslot |
References SciDAVis::DateTime, SciDAVis::Day, SciDAVis::Month, SciDAVis::Numeric, SciDAVis::Text, and ui.
Referenced by init().
|
protected |
Widget that contains the control tabs UI from ui.
Referenced by init(), isControlTabBarVisible(), retranslateStrings(), showControlDescriptionTab(), showControlFormulaTab(), showControlTypeTab(), TableStatistics::TableStatistics(), and toggleControlTabBar().
|
protected |
Pointer to the item delegate.
Referenced by init().
|
protected |
Button to toogle the visibility of #d_tool_box.
Referenced by init(), retranslateStrings(), showControlDescriptionTab(), showControlFormulaTab(), showControlTypeTab(), TableStatistics::TableStatistics(), and toggleControlTabBar().
|
protected |
Referenced by areCommentsShown(), columnWidth(), eventFilter(), handleHorizontalSectionResized(), init(), rereadSectionSizes(), setColumnWidth(), and showComments().
|
protected |
Referenced by init().
|
protected |
Pointer to the current underlying model.
Referenced by activateFormulaMode(), eventFilter(), formulaModeActive(), goToCell(), init(), isCellSelected(), setCellSelected(), setCellsSelected(), TableView(), and ~TableView().
|
protected |
Referenced by advanceCell(), applyDescription(), currentColumnChanged(), eventFilter(), firstSelectedColumn(), firstSelectedRow(), goToNextColumn(), goToPreviousColumn(), handleAspectAboutToBeRemoved(), handleAspectAdded(), handleAspectDescriptionChanged(), handleHorizontalSectionMoved(), handleHorizontalSectionResized(), init(), isCellSelected(), lastSelectedColumn(), lastSelectedRow(), rereadSectionSizes(), selectedColumnCount(), selectedColumns(), selectedRowCount(), selectedRows(), and setColumnForControlTabs().
|
protected |
The table view (first part of the UI)
Referenced by advanceCell(), applyDescription(), Table::columnWidth(), Table::deselect(), deselectAll(), eventFilter(), getCurrentCell(), goToCell(), goToNextColumn(), goToPreviousColumn(), handleHeaderDataChanged(), handleHorizontalSectionMoved(), init(), isCellSelected(), isColumnSelected(), isRowSelected(), Table::print(), selectAll(), Table::setBackgroundColor(), setCellSelected(), setCellsSelected(), Table::setColWidths(), Table::setHeaderColor(), Table::setHeaderFont(), Table::setTextColor(), Table::setTextFont(), TableStatistics::TableStatistics(), and Table::verticalHeaderWidth().
|
protected |
UI with options tabs (description, format, formula etc.)
Referenced by Table::addFunction(), Table::addReference(), applyDescription(), Table::applyFormula(), applyType(), handleAspectAboutToBeRemoved(), handleAspectAdded(), handleAspectDescriptionChanged(), handleFormatLineEditChange(), Table::init(), init(), retranslateStrings(), setColumnForControlTabs(), showControlDescriptionTab(), showControlFormulaTab(), showControlTypeTab(), updateFormatBox(), Table::updateFunctionDoc(), and updateTypeInfo().