|
SciDAVis
1.D4
|
View class for Matrix. More...
#include <MatrixView.h>
Public Slots | |
| void | applyCoordinates () |
| void | applyFormat () |
| void | applyFormula () |
| void | goToCell (int row, int col) |
| void | handleHorizontalSectionResized (int logicalIndex, int oldSize, int newSize) |
| void | handleVerticalSectionResized (int logicalIndex, int oldSize, int newSize) |
| void | rereadSectionSizes () |
| void | selectAll () |
| void | showControlCoordinatesTab () |
| void | showControlFormatTab () |
| void | showControlFormulaTab () |
| void | toggleControlTabBar () |
| void | updateCoordinatesTab () |
| void | updateFormatTab () |
| void | updateFormulaTab () |
Signals | |
| void | controlTabBarStatusChanged (bool visible) |
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. | |
Public Member Functions | |
| int | columnWidth (int col) const |
| bool | isControlTabBarVisible () |
| MatrixView (future::Matrix *matrix) | |
| Constructor. | |
| int | rowHeight (int row) const |
| void | setColumnWidth (int col, int width) |
| void | setRowHeight (int row, int height) |
| virtual | ~MatrixView () |
| Destructor. | |
selection related functions | |
| int | selectedColumnCount (bool full=false) |
| Return how many columns are selected. | |
| bool | isColumnSelected (int col, bool full=false) |
| Returns true if column 'col' is selected; otherwise false. | |
| 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. | |
| bool | isCellSelected (int row, int col) |
| Return whether a cell is selected. | |
| void | setCellSelected (int row, int col) |
| Select a cell. | |
| void | setCellsSelected (int first_row, int first_col, int last_row, int last_col) |
| Select 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 | 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 () |
Protected Attributes | |
| QWidget * | d_control_tabs |
| Widget that contains the control tabs UI from ui. | |
| QToolButton * | d_hide_button |
| Button to toogle the visibility of #d_tool_box. | |
| QHBoxLayout * | d_main_layout |
| future::Matrix * | d_matrix |
| MatrixModel * | d_model |
| Pointer to the current underlying model. | |
| MatrixViewWidget * | d_view_widget |
| The matrix view (first part of the UI) | |
| Ui::MatrixControlTabs | ui |
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 } |
View class for Matrix.
| MatrixView::MatrixView | ( | future::Matrix * | matrix | ) |
|
virtual |
Destructor.
References d_model.
|
protectedslot |
Advance current cell after [Return] or [Enter] was pressed.
References d_matrix, d_view_widget, and future::Matrix::rowCount().
Referenced by init().
|
slot |
References d_matrix, future::Matrix::setCoordinates(), and ui.
Referenced by init().
|
slot |
References d_matrix, future::Matrix::setDisplayedDigits(), future::Matrix::setNumericFormat(), and ui.
Referenced by init().
|
slot |
Reimplemented in Matrix.
References d_matrix, future::Matrix::setFormula(), and ui.
Referenced by init().
|
protectedvirtual |
Catches parent changes (in order to gain access to the title bar)
Reimplemented from MyWidget.
References retranslateStrings().
| int MatrixView::columnWidth | ( | int | col | ) | const |
References d_view_widget.
Referenced by Matrix::print(), Matrix::saveAsTemplate(), and Matrix::saveToString().
|
signal |
Referenced by showControlCoordinatesTab(), showControlFormatTab(), showControlFormulaTab(), and toggleControlTabBar().
|
protected |
Filters other object's events (customizes title bar's context menu)
Reimplemented from MyWidget.
References d_matrix, d_view_widget, future::Matrix::showMatrixViewColumnContextMenu(), future::Matrix::showMatrixViewContextMenu(), and future::Matrix::showMatrixViewRowContextMenu().
| int MatrixView::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::Matrix::columnCount(), d_matrix, and isColumnSelected().
Referenced by future::Matrix::clearSelectedCells(), future::Matrix::copySelection(), future::Matrix::insertEmptyColumns(), future::Matrix::pasteIntoSelection(), Matrix::recalculate(), and future::Matrix::removeSelectedColumns().
| int MatrixView::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_matrix, isRowSelected(), and future::Matrix::rowCount().
Referenced by future::Matrix::clearSelectedCells(), future::Matrix::clearSelectedRows(), future::Matrix::copySelection(), future::Matrix::cutSelection(), future::Matrix::insertEmptyRows(), future::Matrix::pasteIntoSelection(), Matrix::recalculate(), and future::Matrix::removeSelectedRows().
| void MatrixView::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::Matrix::pasteIntoSelection().
|
slot |
References d_model, d_view_widget, and MatrixModel::index().
Referenced by future::Matrix::goToCell().
|
slot |
References future::Matrix::columnCount(), d_matrix, d_view_widget, isColumnSelected(), and future::Matrix::setColumnWidth().
Referenced by rereadSectionSizes().
|
slot |
References d_matrix, d_view_widget, isRowSelected(), future::Matrix::rowCount(), and future::Matrix::setRowHeight().
Referenced by rereadSectionSizes().
|
protected |
Initialization.
References advanceCell(), applyCoordinates(), applyFormat(), applyFormula(), d_control_tabs, d_hide_button, d_main_layout, d_matrix, d_model, d_view_widget, future::Matrix::defaultColumnWidth(), future::Matrix::defaultRowHeight(), rereadSectionSizes(), retranslateStrings(), selectAll(), toggleControlTabBar(), ui, updateCoordinatesTab(), updateFormatTab(), updateFormulaTab(), and updateTypeInfo().
Referenced by Matrix::Matrix(), and MatrixView().
| bool MatrixView::isCellSelected | ( | int | row, |
| int | col | ||
| ) |
Return whether a cell is selected.
References future::Matrix::columnCount(), d_matrix, d_model, d_view_widget, MatrixModel::index(), and future::Matrix::rowCount().
Referenced by future::Matrix::clearSelectedCells(), future::Matrix::copySelection(), future::Matrix::pasteIntoSelection(), and Matrix::recalculate().
| bool MatrixView::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 future::Matrix::clearSelectedColumns(), Matrix::columnsSelected(), firstSelectedColumn(), handleHorizontalSectionResized(), lastSelectedColumn(), Matrix::numSelectedColumns(), future::Matrix::removeSelectedColumns(), and selectedColumnCount().
|
inline |
References d_control_tabs.
| bool MatrixView::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 future::Matrix::clearSelectedRows(), firstSelectedRow(), handleVerticalSectionResized(), lastSelectedRow(), Matrix::numSelectedRows(), future::Matrix::removeSelectedRows(), Matrix::rowsSelected(), and selectedRowCount().
| int MatrixView::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::Matrix::columnCount(), d_matrix, and isColumnSelected().
Referenced by future::Matrix::clearSelectedCells(), future::Matrix::copySelection(), future::Matrix::insertEmptyColumns(), future::Matrix::pasteIntoSelection(), Matrix::recalculate(), and future::Matrix::removeSelectedColumns().
| int MatrixView::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_matrix, isRowSelected(), and future::Matrix::rowCount().
Referenced by future::Matrix::clearSelectedCells(), future::Matrix::clearSelectedRows(), future::Matrix::copySelection(), future::Matrix::insertEmptyRows(), future::Matrix::pasteIntoSelection(), Matrix::recalculate(), and future::Matrix::removeSelectedRows().
|
slot |
|
protected |
References d_control_tabs, d_hide_button, and ui.
Referenced by changeEvent(), and init().
| int MatrixView::rowHeight | ( | int | row | ) | const |
References d_view_widget.
|
slot |
References d_view_widget, and MatrixViewWidget::selectAll().
Referenced by init(), and future::Matrix::selectAll().
| int MatrixView::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::Matrix::columnCount(), d_matrix, and isColumnSelected().
| int MatrixView::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_matrix, isRowSelected(), and future::Matrix::rowCount().
Referenced by future::Matrix::addColumns(), and future::Matrix::addRows().
| void MatrixView::setCellSelected | ( | int | row, |
| int | col | ||
| ) |
Select a cell.
References d_model, d_view_widget, and MatrixModel::index().
Referenced by future::Matrix::pasteIntoSelection().
| void MatrixView::setCellsSelected | ( | int | first_row, |
| int | first_col, | ||
| int | last_row, | ||
| int | last_col | ||
| ) |
Select a range of cells.
References d_model, d_view_widget, and MatrixModel::index().
Referenced by future::Matrix::pasteIntoSelection().
| void MatrixView::setColumnWidth | ( | int | col, |
| int | width | ||
| ) |
References d_view_widget.
Referenced by future::Matrix::readColumnWidthElement(), and Matrix::setColumnsWidth().
| void MatrixView::setRowHeight | ( | int | row, |
| int | height | ||
| ) |
References d_view_widget.
Referenced by future::Matrix::readRowHeightElement().
|
slot |
References controlTabBarStatusChanged(), d_control_tabs, d_hide_button, and ui.
Referenced by future::Matrix::editCoordinates().
|
slot |
References controlTabBarStatusChanged(), d_control_tabs, d_hide_button, and ui.
Referenced by future::Matrix::editFormat().
|
slot |
References controlTabBarStatusChanged(), d_control_tabs, d_hide_button, and ui.
Referenced by future::Matrix::editFormula().
|
slot |
References controlTabBarStatusChanged(), d_control_tabs, and d_hide_button.
Referenced by init().
|
slot |
References d_matrix, ui, future::Matrix::xEnd(), future::Matrix::xStart(), future::Matrix::yEnd(), and future::Matrix::yStart().
Referenced by init().
|
slot |
References d_matrix, future::Matrix::displayedDigits(), future::Matrix::numericFormat(), and ui.
Referenced by init().
|
slot |
References d_matrix, future::Matrix::formula(), and ui.
Referenced by init().
|
protected |
Widget that contains the control tabs UI from ui.
Referenced by init(), isControlTabBarVisible(), retranslateStrings(), showControlCoordinatesTab(), showControlFormatTab(), showControlFormulaTab(), and toggleControlTabBar().
|
protected |
Button to toogle the visibility of #d_tool_box.
Referenced by init(), retranslateStrings(), showControlCoordinatesTab(), showControlFormatTab(), showControlFormulaTab(), and toggleControlTabBar().
|
protected |
Referenced by init().
|
protected |
Referenced by advanceCell(), applyCoordinates(), applyFormat(), applyFormula(), eventFilter(), firstSelectedColumn(), firstSelectedRow(), handleHorizontalSectionResized(), handleVerticalSectionResized(), init(), isCellSelected(), lastSelectedColumn(), lastSelectedRow(), rereadSectionSizes(), selectedColumnCount(), selectedRowCount(), updateCoordinatesTab(), updateFormatTab(), and updateFormulaTab().
|
protected |
Pointer to the current underlying model.
Referenced by goToCell(), init(), isCellSelected(), MatrixView(), setCellSelected(), setCellsSelected(), and ~MatrixView().
|
protected |
The matrix view (first part of the UI)
Referenced by advanceCell(), columnWidth(), eventFilter(), getCurrentCell(), goToCell(), handleHorizontalSectionResized(), handleVerticalSectionResized(), init(), isCellSelected(), isColumnSelected(), isRowSelected(), Matrix::print(), rereadSectionSizes(), rowHeight(), selectAll(), setCellSelected(), setCellsSelected(), setColumnWidth(), and setRowHeight().
|
protected |
Referenced by Matrix::addCell(), Matrix::addFunction(), applyCoordinates(), applyFormat(), applyFormula(), Matrix::applyFormula(), init(), Matrix::init(), retranslateStrings(), showControlCoordinatesTab(), showControlFormatTab(), showControlFormulaTab(), updateCoordinatesTab(), updateFormatTab(), updateFormulaTab(), Matrix::updateFunctionDoc(), and updateTypeInfo().
1.8.1