SciDAVis
1.D4
|
Aspect providing a spreadsheet to manage MxN matrix data. More...
#include <future_Matrix.h>
Classes | |
class | Private |
Public Slots | |
void | addColumns () |
Append as many columns as are selected. | |
void | addRows () |
Append as many rows as are selected. | |
void | clear () |
Clear the whole matrix (i.e. set all cells to 0.0) | |
void | clearSelectedCells () |
void | clearSelectedColumns () |
void | clearSelectedRows () |
void | copySelection () |
void | cutSelection () |
void | dimensionsDialog () |
void | duplicate () |
Duplicate the matrix inside its folder. | |
void | editCoordinates () |
void | editFormat () |
void | editFormula () |
void | goToCell () |
void | importImageDialog () |
void | insertEmptyColumns () |
Insert columns depending on the selection. | |
void | insertEmptyRows () |
Insert rows depending on the selection. | |
void | mirrorHorizontally () |
void | mirrorVertically () |
void | pasteIntoSelection () |
void | removeSelectedColumns () |
void | removeSelectedRows () |
void | selectAll () |
void | showMatrixViewColumnContextMenu (const QPoint &pos) |
Show a context menu for the selected columns. | |
void | showMatrixViewContextMenu (const QPoint &pos) |
Show a context menu for the selected cells. | |
void | showMatrixViewRowContextMenu (const QPoint &pos) |
Show a context menu for the selected rows. | |
void | transpose () |
Public Slots inherited from AbstractPart | |
virtual void | copy () |
Copy current selection. | |
virtual void | cut () |
Cut current selection. | |
virtual void | paste () |
Paste at the current location or into the current selection. | |
Public Slots inherited from AbstractAspect | |
virtual void | remove () |
Remove me from my parent's list of children. | |
void | setCaptionSpec (const QString &value) |
Set the specification string used for constructing the caption(). | |
void | setComment (const QString &value) |
void | setName (const QString &value) |
QString | uniqueNameFor (const QString ¤t_name) const |
Make the specified name unique among my children by incrementing a trailing number. |
Signals | |
void | columnsAboutToBeInserted (int before, int count) |
void | columnsAboutToBeRemoved (int first, int count) |
void | columnsInserted (int first, int count) |
void | columnsRemoved (int first, int count) |
void | coordinatesChanged () |
void | dataChanged (int top, int left, int bottom, int right) |
void | formatChanged () |
void | formulaChanged () |
void | rowsAboutToBeInserted (int before, int count) |
void | rowsAboutToBeRemoved (int first, int count) |
void | rowsInserted (int first, int count) |
void | rowsRemoved (int first, int count) |
Public Member Functions | |
void | appendColumns (int count) |
void | appendRows (int count) |
double | cell (int row, int col) const |
Return the value in the given cell. | |
QVector< qreal > | columnCells (int col, int first_row, int last_row) |
Return the values in the given cells as double vector. | |
int | columnCount () const |
Return the total number of columns. | |
int | columnWidth (int col) const |
void | copy (Matrix *other) |
QMenu * | createColumnMenu (QMenu *append_to=0) |
Create a menu with column related operations. | |
virtual QMenu * | createContextMenu () const |
Return a new context menu. | |
QMenu * | createMatrixMenu (QMenu *append_to=0) |
Create a menu with table related operations. | |
QMenu * | createRowMenu (QMenu *append_to=0) |
Create a menu with row related operations. | |
QMenu * | createSelectionMenu (QMenu *append_to=0) |
Create a menu with selection related operations. | |
int | displayedDigits () const |
virtual bool | fillProjectMenu (QMenu *menu) |
Fill the part specific menu for the main window including setting the title. | |
QString | formula () const |
virtual QIcon | icon () const |
Return an icon to be used for decorating my views. | |
void | insertColumns (int before, int count) |
void | insertRows (int before, int count) |
Matrix (AbstractScriptingEngine *engine, int rows, int cols, const QString &name) | |
Constructor. | |
char | numericFormat () const |
void | removeColumns (int first, int count) |
void | removeRows (int first, int count) |
QVector< qreal > | rowCells (int row, int first_column, int last_column) |
Return the values in the given cells as double vector. | |
int | rowCount () const |
Return the total number of rows. | |
int | rowHeight (int row) const |
void | setCell (int row, int col, double value) |
Set the value of the cell. | |
void | setColumnCells (int col, int first_row, int last_row, const QVector< qreal > &values) |
Set the values in the given cells from a double vector. | |
void | setColumnWidth (int col, int width) |
This method should only be called by the view. | |
void | setCoordinates (double x1, double x2, double y1, double y2) |
void | setDimensions (int rows, int cols) |
Set the number of rows and columns. | |
void | setDisplayedDigits (int digits) |
void | setFormula (const QString &formula) |
void | setNumericFormat (char format) |
void | setPlotMenu (QMenu *menu) |
Set a plot menu. | |
void | setRowCells (int row, int first_column, int last_column, const QVector< qreal > &values) |
Set the values in the given cells from a double vector. | |
void | setRowHeight (int row, int height) |
This method should only be called by the view. | |
void | setXEnd (double x) |
void | setXStart (double x) |
void | setYEnd (double y) |
void | setYStart (double y) |
QString | text (int row, int col) |
Return the text displayed in the given cell. | |
virtual QWidget * | view () |
Construct a primary view on me. | |
double | xEnd () const |
double | xStart () const |
double | yEnd () const |
double | yStart () const |
~Matrix () | |
serialize/deserialize | |
virtual void | save (QXmlStreamWriter *) const |
Save as XML. | |
virtual bool | load (XmlStreamReader *) |
Load from XML. | |
Public Member Functions inherited from AbstractPart | |
AbstractPart (const QString &name) | |
Constructor. | |
virtual bool | fillProjectToolBar (QToolBar *bar) |
Fill the part specific tool bar for the main window including setting the title. | |
PartMdiView * | mdiSubWindow () |
Wrap the view() into a PartMdiView. | |
Public Member Functions inherited from AbstractAspect | |
AbstractAspect (const QString &name) | |
void | addChild (AbstractAspect *child) |
Add the given Aspect to my list of children. | |
QString | caption () const |
QString | captionSpec () const |
Return the specification string used for constructing the caption(). | |
AbstractAspect * | child (int index) const |
Get a child by its position in my list of children. | |
int | childCount () const |
Return the number of child Aspects. | |
QString | comment () const |
QDateTime | creationTime () const |
QList< AbstractAspect * > | descendantsThatInherit (const char *class_name) |
Get all descendents that inherit the given class. | |
future::Folder * | folder () |
Return the folder the Aspect is contained in or 0 if not. | |
void | importV0x0001XXCreationTime (const QString &str) |
int | index () const |
Return my position in my parent's list of children. | |
int | indexOfChild (const AbstractAspect *child) const |
Return the position of child in my list of children. | |
void | insertChild (AbstractAspect *child, int index) |
Insert the given Aspect at a specific position in my list of children. | |
bool | isDescendantOf (AbstractAspect *other) |
Return whether the there is a path upwards to the given aspect. | |
void | moveChild (int from, int to) |
Change the positon of a child in my list of children. | |
QString | name () const |
AbstractAspect * | parentAspect () const |
Return my parent Aspect or 0 if I currently don't have one. | |
virtual QString | path () const |
Return the path that leads from the top-most Aspect (usually a Project) to me. | |
virtual const Project * | project () const |
Return the Project this Aspect belongs to, or 0 if it is currently not part of one. | |
virtual Project * | project () |
Return the Project this Aspect belongs to, or 0 if it is currently not part of one. | |
virtual void | removeAllChildAspects () |
Remove all child aspects. | |
void | removeChild (AbstractAspect *child, bool detach=false) |
Remove the given Aspect from my list of children. | |
void | removeChild (int index) |
Remove the Aspect at the given index from my list of children. | |
void | reparentChild (AbstractAspect *new_parent, AbstractAspect *child, int d_new_index) |
Move a child to another aspect and transfer ownership. | |
void | reparentChild (AbstractAspect *new_parent, AbstractAspect *child) |
Move a child to another aspect and transfer ownership. | |
virtual | ~AbstractAspect () |
virtual QUndoStack * | undoStack () const |
Return the undo stack of the Project, or 0 if this Aspect is not part of a Project. | |
void | exec (QUndoCommand *command) |
Execute the given command, pushing it on the undoStack() if available. | |
void | beginMacro (const QString &text) |
Begin an undo stack macro (series of commands) | |
void | endMacro () |
End the undo stack macro. | |
Public Member Functions inherited from scripted | |
scripted (ScriptingEnv *env) | |
void | scriptingChangeEvent (ScriptingChangeEvent *) |
~scripted () |
Static Public Member Functions | |
static ActionManager * | actionManager () |
static int | defaultColumnWidth () |
static int | defaultRowHeight () |
static Matrix * | fromImage (const QImage &image) |
static void | initActionManager () |
static void | setDefaultColumnWidth (int width) |
static void | setDefaultRowHeight (int height) |
Private Slots | |
void | adjustTabBarAction (bool visible) |
Private Member Functions | |
void | addActionsToView () |
void | connectActions () |
void | createActions () |
Matrix () | |
Private ctor for initActionManager() only. | |
bool | readCellElement (XmlStreamReader *reader) |
Read XML cell element. | |
bool | readColumnWidthElement (XmlStreamReader *reader) |
bool | readCoordinatesElement (XmlStreamReader *reader) |
Read XML coodinates element. | |
bool | readDisplayElement (XmlStreamReader *reader) |
Read XML display element. | |
bool | readFormulaElement (XmlStreamReader *reader) |
Read XML formula element. | |
bool | readRowHeightElement (XmlStreamReader *reader) |
Private Attributes | |
Private * | d_matrix_private |
QMenu * | d_plot_menu |
MatrixView * | d_view |
selection related actions | |
QAction * | action_cut_selection |
QAction * | action_copy_selection |
QAction * | action_paste_into_selection |
QAction * | action_clear_selection |
matrix related actions | |
QAction * | action_toggle_tabbar |
QAction * | action_select_all |
QAction * | action_clear_matrix |
QAction * | action_go_to_cell |
QAction * | action_dimensions_dialog |
QAction * | action_edit_format |
QAction * | action_edit_coordinates |
QAction * | action_set_formula |
QAction * | action_recalculate |
QAction * | action_import_image |
QAction * | action_duplicate |
QAction * | action_transpose |
QAction * | action_mirror_vertically |
QAction * | action_mirror_horizontally |
column related actions | |
QAction * | action_insert_columns |
QAction * | action_remove_columns |
QAction * | action_clear_columns |
QAction * | action_add_columns |
row related actions | |
QAction * | action_insert_rows |
QAction * | action_remove_rows |
QAction * | action_clear_rows |
QAction * | action_add_rows |
Static Private Attributes | |
static ActionManager * | action_manager = 0 |
static int | default_column_width = 120 |
static int | default_row_height = 20 |
Friends | |
class | Private |
Additional Inherited Members | |
Protected Attributes inherited from scripted | |
ScriptingEnv * | scriptEnv |
Aspect providing a spreadsheet to manage MxN matrix data.
Matrix::Matrix | ( | AbstractScriptingEngine * | engine, |
int | rows, | ||
int | cols, | ||
const QString & | name | ||
) |
Constructor.
engine | scripting engine |
rows | initial number of rows |
cols | initial number of columns |
name | object name |
References appendColumns(), appendRows(), connectActions(), createActions(), d_matrix_private, d_view, and Private.
Matrix::~Matrix | ( | ) |
References d_view.
|
private |
Private ctor for initActionManager() only.
References createActions(), and d_view.
Referenced by duplicate(), fromImage(), and initActionManager().
|
static |
References action_manager, and initActionManager().
Referenced by createActions().
|
private |
References action_add_columns, action_add_rows, action_clear_columns, action_clear_matrix, action_clear_rows, action_clear_selection, action_copy_selection, action_cut_selection, action_dimensions_dialog, action_duplicate, action_edit_coordinates, action_edit_format, action_go_to_cell, action_import_image, action_insert_columns, action_insert_rows, action_mirror_horizontally, action_mirror_vertically, action_paste_into_selection, action_recalculate, action_remove_columns, action_remove_rows, action_select_all, action_set_formula, action_toggle_tabbar, action_transpose, and d_view.
Referenced by view().
|
slot |
Append as many columns as are selected.
References AbstractAspect::beginMacro(), columnCount(), d_matrix_private, d_view, AbstractAspect::endMacro(), AbstractAspect::exec(), AbstractAspect::name(), RESET_CURSOR, MatrixView::selectedRowCount(), and WAIT_CURSOR.
Referenced by connectActions().
|
slot |
Append as many rows as are selected.
References AbstractAspect::beginMacro(), d_matrix_private, d_view, AbstractAspect::endMacro(), AbstractAspect::exec(), AbstractAspect::name(), RESET_CURSOR, rowCount(), MatrixView::selectedRowCount(), and WAIT_CURSOR.
Referenced by connectActions().
|
privateslot |
References action_toggle_tabbar.
Referenced by view().
|
inline |
References columnCount(), and insertColumns().
Referenced by Matrix(), and pasteIntoSelection().
|
inline |
References insertRows(), and rowCount().
Referenced by Matrix(), and pasteIntoSelection().
double Matrix::cell | ( | int | row, |
int | col | ||
) | const |
Return the value in the given cell.
References future::Matrix::Private::cell(), columnCount(), d_matrix_private, and rowCount().
Referenced by Matrix::cell(), copySelection(), save(), Matrix::saveCellsToMemory(), and text().
|
slot |
Clear the whole matrix (i.e. set all cells to 0.0)
References AbstractAspect::beginMacro(), d_matrix_private, AbstractAspect::endMacro(), AbstractAspect::exec(), AbstractAspect::name(), RESET_CURSOR, and WAIT_CURSOR.
Referenced by connectActions().
|
slot |
References AbstractAspect::beginMacro(), d_matrix_private, d_view, AbstractAspect::endMacro(), AbstractAspect::exec(), MatrixView::firstSelectedColumn(), MatrixView::firstSelectedRow(), MatrixView::isCellSelected(), MatrixView::lastSelectedColumn(), MatrixView::lastSelectedRow(), AbstractAspect::name(), RESET_CURSOR, and WAIT_CURSOR.
Referenced by Matrix::clearSelection(), connectActions(), and cutSelection().
|
slot |
|
slot |
References AbstractAspect::beginMacro(), columnCount(), d_matrix_private, d_view, AbstractAspect::endMacro(), AbstractAspect::exec(), MatrixView::firstSelectedRow(), MatrixView::isRowSelected(), MatrixView::lastSelectedRow(), AbstractAspect::name(), RESET_CURSOR, and WAIT_CURSOR.
Referenced by connectActions().
QVector< qreal > Matrix::columnCells | ( | int | col, |
int | first_row, | ||
int | last_row | ||
) |
Return the values in the given cells as double vector.
References future::Matrix::Private::columnCells(), and d_matrix_private.
Referenced by copy().
int Matrix::columnCount | ( | ) | const |
Return the total number of columns.
References future::Matrix::Private::columnCount(), and d_matrix_private.
Referenced by addColumns(), appendColumns(), cell(), clearSelectedColumns(), clearSelectedRows(), MatrixModel::columnCount(), copy(), dimensionsDialog(), duplicate(), MatrixView::firstSelectedColumn(), goToCell(), MatrixView::handleHorizontalSectionResized(), MatrixModel::headerData(), insertColumns(), MatrixView::isCellSelected(), MatrixView::lastSelectedColumn(), Matrix::numCols(), pasteIntoSelection(), removeColumns(), MatrixView::rereadSectionSizes(), save(), Matrix::saveText(), MatrixView::selectedColumnCount(), setCell(), Matrix::setColumnsWidth(), setDimensions(), and Matrix::setNumRows().
|
signal |
|
signal |
|
signal |
|
signal |
int Matrix::columnWidth | ( | int | col | ) | const |
References future::Matrix::Private::columnWidth(), and d_matrix_private.
Referenced by copy(), MatrixView::rereadSectionSizes(), and save().
|
private |
References action_add_columns, action_add_rows, action_clear_columns, action_clear_matrix, action_clear_rows, action_clear_selection, action_copy_selection, action_cut_selection, action_dimensions_dialog, action_duplicate, action_edit_coordinates, action_edit_format, action_go_to_cell, action_import_image, action_insert_columns, action_insert_rows, action_mirror_horizontally, action_mirror_vertically, action_paste_into_selection, action_recalculate, action_remove_columns, action_remove_rows, action_select_all, action_set_formula, action_transpose, addColumns(), addRows(), clear(), clearSelectedCells(), clearSelectedColumns(), clearSelectedRows(), copySelection(), cutSelection(), dimensionsDialog(), duplicate(), editCoordinates(), editFormat(), editFormula(), goToCell(), importImageDialog(), insertEmptyColumns(), insertEmptyRows(), mirrorHorizontally(), mirrorVertically(), pasteIntoSelection(), removeSelectedColumns(), removeSelectedRows(), selectAll(), and transpose().
Referenced by Matrix().
|
signal |
void Matrix::copy | ( | Matrix * | other | ) |
References AbstractAspect::beginMacro(), future::Matrix::Private::blockChangeSignals(), columnCells(), columnCount(), columnWidth(), d_matrix_private, d_view, dataChanged(), displayedDigits(), AbstractAspect::endMacro(), formula(), AbstractAspect::name(), numericFormat(), MatrixView::rereadSectionSizes(), RESET_CURSOR, rowCount(), rowHeight(), setColumnCells(), setColumnWidth(), setCoordinates(), setDimensions(), setDisplayedDigits(), setFormula(), setNumericFormat(), setRowHeight(), WAIT_CURSOR, xEnd(), xStart(), yEnd(), and yStart().
Referenced by Matrix::copy(), and duplicate().
|
slot |
References cell(), d_matrix_private, d_view, MatrixView::firstSelectedColumn(), MatrixView::firstSelectedRow(), MatrixView::isCellSelected(), MatrixView::lastSelectedColumn(), MatrixView::lastSelectedRow(), future::Matrix::Private::numericFormat(), RESET_CURSOR, and WAIT_CURSOR.
Referenced by connectActions(), Matrix::copySelection(), and cutSelection().
|
private |
References action_add_columns, action_add_rows, action_clear_columns, action_clear_matrix, action_clear_rows, action_clear_selection, action_copy_selection, action_cut_selection, action_dimensions_dialog, action_duplicate, action_edit_coordinates, action_edit_format, action_go_to_cell, action_import_image, action_insert_columns, action_insert_rows, action_mirror_horizontally, action_mirror_vertically, action_paste_into_selection, action_recalculate, action_remove_columns, action_remove_rows, action_select_all, action_set_formula, action_toggle_tabbar, action_transpose, actionManager(), and ActionManager::addAction().
Referenced by Matrix().
QMenu * Matrix::createColumnMenu | ( | QMenu * | append_to = 0 | ) |
Create a menu with column related operations.
append_to | if a pointer to a QMenu is passed to the function, the actions are appended to it instead of the creation of a new menu. |
References action_clear_columns, action_edit_coordinates, action_insert_columns, and action_remove_columns.
Referenced by showMatrixViewColumnContextMenu().
|
virtual |
Return a new context menu.
The caller takes ownership of the menu.
Reimplemented from AbstractPart.
References action_duplicate.
QMenu * Matrix::createMatrixMenu | ( | QMenu * | append_to = 0 | ) |
Create a menu with table related operations.
append_to | if a pointer to a QMenu is passed to the function, the actions are appended to it instead of the creation of a new menu. |
References action_clear_matrix, action_edit_format, action_go_to_cell, action_recalculate, action_select_all, action_set_formula, and action_toggle_tabbar.
Referenced by showMatrixViewContextMenu().
QMenu * Matrix::createRowMenu | ( | QMenu * | append_to = 0 | ) |
Create a menu with row related operations.
append_to | if a pointer to a QMenu is passed to the function, the actions are appended to it instead of the creation of a new menu. |
References action_clear_rows, action_edit_coordinates, action_insert_rows, and action_remove_rows.
Referenced by showMatrixViewRowContextMenu().
QMenu * Matrix::createSelectionMenu | ( | QMenu * | append_to = 0 | ) |
Create a menu with selection related operations.
append_to | if a pointer to a QMenu is passed to the function, the actions are appended to it instead of the creation of a new menu. |
References action_clear_selection, action_copy_selection, action_cut_selection, and action_paste_into_selection.
Referenced by showMatrixViewContextMenu().
|
slot |
References AbstractAspect::beginMacro(), clearSelectedCells(), copySelection(), d_view, AbstractAspect::endMacro(), MatrixView::firstSelectedRow(), AbstractAspect::name(), RESET_CURSOR, and WAIT_CURSOR.
Referenced by connectActions().
|
signal |
Referenced by copy(), and future::Matrix::Private::emitDataChanged().
|
inlinestatic |
References default_column_width.
Referenced by MatrixView::init(), and future::Matrix::Private::insertColumns().
|
inlinestatic |
References default_row_height.
Referenced by MatrixView::init(), and future::Matrix::Private::insertRows().
|
slot |
References columnCount(), rowCount(), and setDimensions().
Referenced by connectActions().
int Matrix::displayedDigits | ( | ) | const |
|
slot |
Duplicate the matrix inside its folder.
References AbstractAspect::addChild(), columnCount(), copy(), AbstractAspect::folder(), Matrix(), AbstractAspect::name(), and rowCount().
Referenced by connectActions().
|
slot |
References d_view, and MatrixView::showControlCoordinatesTab().
Referenced by connectActions().
|
slot |
References d_view, and MatrixView::showControlFormatTab().
Referenced by connectActions().
|
slot |
References d_view, and MatrixView::showControlFormulaTab().
Referenced by connectActions().
|
virtual |
Fill the part specific menu for the main window including setting the title.
Reimplemented from AbstractPart.
References action_clear_matrix, action_dimensions_dialog, action_duplicate, action_edit_coordinates, action_edit_format, action_go_to_cell, action_import_image, action_mirror_horizontally, action_mirror_vertically, action_recalculate, action_set_formula, action_toggle_tabbar, and action_transpose.
|
signal |
QString Matrix::formula | ( | ) | const |
References d_matrix_private, and future::Matrix::Private::formula().
Referenced by copy(), Matrix::formula(), save(), future::Matrix::Private::setFormula(), and MatrixView::updateFormulaTab().
|
signal |
|
static |
References Matrix(), and setColumnCells().
Referenced by importImageDialog().
|
slot |
References columnCount(), d_view, MatrixView::goToCell(), and rowCount().
Referenced by connectActions().
|
virtual |
Return an icon to be used for decorating my views.
Reimplemented from AbstractAspect.
|
slot |
References AbstractPart::copy(), fromImage(), AbstractAspect::global(), and AbstractAspect::setGlobal().
Referenced by connectActions().
|
static |
References action_manager, and Matrix().
Referenced by actionManager().
void Matrix::insertColumns | ( | int | before, |
int | count | ||
) |
References AbstractAspect::beginMacro(), columnCount(), d_matrix_private, AbstractAspect::endMacro(), AbstractAspect::exec(), AbstractAspect::name(), RESET_CURSOR, and WAIT_CURSOR.
Referenced by appendColumns(), and insertEmptyColumns().
|
slot |
Insert columns depending on the selection.
References AbstractAspect::beginMacro(), d_view, AbstractAspect::endMacro(), MatrixView::firstSelectedColumn(), insertColumns(), MatrixView::lastSelectedColumn(), AbstractAspect::name(), RESET_CURSOR, and WAIT_CURSOR.
Referenced by connectActions(), and Matrix::insertColumn().
|
slot |
Insert rows depending on the selection.
References AbstractAspect::beginMacro(), d_view, AbstractAspect::endMacro(), MatrixView::firstSelectedRow(), insertRows(), MatrixView::lastSelectedRow(), AbstractAspect::name(), RESET_CURSOR, and WAIT_CURSOR.
Referenced by connectActions(), and Matrix::insertRow().
void Matrix::insertRows | ( | int | before, |
int | count | ||
) |
References AbstractAspect::beginMacro(), d_matrix_private, AbstractAspect::endMacro(), AbstractAspect::exec(), AbstractAspect::name(), RESET_CURSOR, rowCount(), and WAIT_CURSOR.
Referenced by appendRows(), and insertEmptyRows().
|
virtual |
Load from XML.
Reimplemented from AbstractAspect.
References future::Matrix::Private::blockChangeSignals(), d_matrix_private, XmlStreamReader::raiseError(), XmlStreamReader::raiseWarning(), XmlStreamReader::readAttributeInt(), AbstractAspect::readBasicAttributes(), readCellElement(), readColumnWidthElement(), AbstractAspect::readCommentElement(), readCoordinatesElement(), readDisplayElement(), readFormulaElement(), readRowHeightElement(), AbstractAspect::setComment(), setCoordinates(), setDimensions(), setDisplayedDigits(), setFormula(), setNumericFormat(), and XmlStreamReader::skipToEndElement().
Referenced by ApplicationWindow::openMatrix().
|
slot |
References d_matrix_private, AbstractAspect::exec(), RESET_CURSOR, and WAIT_CURSOR.
Referenced by connectActions().
|
slot |
References d_matrix_private, AbstractAspect::exec(), RESET_CURSOR, and WAIT_CURSOR.
Referenced by connectActions().
char Matrix::numericFormat | ( | ) | const |
|
slot |
References appendColumns(), appendRows(), AbstractAspect::beginMacro(), columnCount(), d_view, AbstractAspect::endMacro(), MatrixView::firstSelectedColumn(), MatrixView::firstSelectedRow(), MatrixView::getCurrentCell(), MatrixView::isCellSelected(), MatrixView::lastSelectedColumn(), MatrixView::lastSelectedRow(), AbstractAspect::name(), RESET_CURSOR, rowCount(), setCell(), MatrixView::setCellSelected(), MatrixView::setCellsSelected(), and WAIT_CURSOR.
Referenced by connectActions(), and Matrix::pasteSelection().
|
private |
Read XML cell element.
References XmlStreamReader::raiseError(), XmlStreamReader::readAttributeInt(), and setCell().
Referenced by load().
|
private |
References d_view, XmlStreamReader::raiseError(), XmlStreamReader::readAttributeInt(), MatrixView::setColumnWidth(), and setColumnWidth().
Referenced by load().
|
private |
Read XML coodinates element.
References XmlStreamReader::raiseError(), XmlStreamReader::readAttributeInt(), setXEnd(), setXStart(), setYEnd(), setYStart(), and XmlStreamReader::skipToEndElement().
Referenced by load().
|
private |
Read XML display element.
References XmlStreamReader::raiseError(), XmlStreamReader::readAttributeInt(), setDisplayedDigits(), setNumericFormat(), and XmlStreamReader::skipToEndElement().
Referenced by load().
|
private |
|
private |
References d_view, XmlStreamReader::raiseError(), XmlStreamReader::readAttributeInt(), MatrixView::setRowHeight(), and setRowHeight().
Referenced by load().
void Matrix::removeColumns | ( | int | first, |
int | count | ||
) |
References AbstractAspect::beginMacro(), columnCount(), d_matrix_private, AbstractAspect::endMacro(), AbstractAspect::exec(), AbstractAspect::name(), RESET_CURSOR, and WAIT_CURSOR.
Referenced by removeSelectedColumns().
void Matrix::removeRows | ( | int | first, |
int | count | ||
) |
References AbstractAspect::beginMacro(), d_matrix_private, AbstractAspect::endMacro(), AbstractAspect::exec(), AbstractAspect::name(), RESET_CURSOR, rowCount(), and WAIT_CURSOR.
Referenced by removeSelectedRows().
|
slot |
References AbstractAspect::beginMacro(), d_view, AbstractAspect::endMacro(), MatrixView::firstSelectedColumn(), MatrixView::isColumnSelected(), MatrixView::lastSelectedColumn(), AbstractAspect::name(), removeColumns(), RESET_CURSOR, and WAIT_CURSOR.
Referenced by connectActions(), and Matrix::deleteSelectedColumns().
|
slot |
References AbstractAspect::beginMacro(), d_view, AbstractAspect::endMacro(), MatrixView::firstSelectedRow(), MatrixView::isRowSelected(), MatrixView::lastSelectedRow(), AbstractAspect::name(), removeRows(), RESET_CURSOR, and WAIT_CURSOR.
Referenced by connectActions(), and Matrix::deleteSelectedRows().
QVector< qreal > Matrix::rowCells | ( | int | row, |
int | first_column, | ||
int | last_column | ||
) |
Return the values in the given cells as double vector.
References d_matrix_private, and future::Matrix::Private::rowCells().
int Matrix::rowCount | ( | ) | const |
Return the total number of rows.
References d_matrix_private, and future::Matrix::Private::rowCount().
Referenced by addRows(), MatrixView::advanceCell(), appendRows(), cell(), copy(), dimensionsDialog(), duplicate(), MatrixView::firstSelectedRow(), goToCell(), MatrixView::handleVerticalSectionResized(), MatrixModel::headerData(), insertRows(), MatrixView::isCellSelected(), MatrixView::lastSelectedRow(), Matrix::numRows(), pasteIntoSelection(), removeRows(), MatrixView::rereadSectionSizes(), MatrixModel::rowCount(), save(), Matrix::saveText(), MatrixView::selectedRowCount(), setCell(), setDimensions(), and Matrix::setNumCols().
int Matrix::rowHeight | ( | int | row | ) | const |
References d_matrix_private, and future::Matrix::Private::rowHeight().
Referenced by copy(), MatrixView::rereadSectionSizes(), and save().
|
signal |
|
signal |
|
signal |
|
signal |
|
virtual |
Save as XML.
Reimplemented from AbstractAspect.
References cell(), columnCount(), columnWidth(), displayedDigits(), formula(), numericFormat(), rowCount(), rowHeight(), AbstractAspect::writeBasicAttributes(), AbstractAspect::writeCommentElement(), xEnd(), xStart(), yEnd(), and yStart().
Referenced by Matrix::saveToString().
|
slot |
References d_view, and MatrixView::selectAll().
Referenced by connectActions().
void Matrix::setCell | ( | int | row, |
int | col, | ||
double | value | ||
) |
Set the value of the cell.
References columnCount(), d_matrix_private, AbstractAspect::exec(), and rowCount().
Referenced by pasteIntoSelection(), readCellElement(), Matrix::setCell(), and Matrix::setText().
void Matrix::setColumnCells | ( | int | col, |
int | first_row, | ||
int | last_row, | ||
const QVector< qreal > & | values | ||
) |
Set the values in the given cells from a double vector.
References d_matrix_private, AbstractAspect::exec(), RESET_CURSOR, and WAIT_CURSOR.
Referenced by copy(), and fromImage().
void Matrix::setColumnWidth | ( | int | col, |
int | width | ||
) |
This method should only be called by the view.
This method does not change the view, it only changes the values that are saved when the matrix is saved. The view has to take care of reading and applying these values
References d_matrix_private, and future::Matrix::Private::setColumnWidth().
Referenced by copy(), MatrixView::handleHorizontalSectionResized(), and readColumnWidthElement().
void Matrix::setCoordinates | ( | double | x1, |
double | x2, | ||
double | y1, | ||
double | y2 | ||
) |
References d_matrix_private, AbstractAspect::exec(), RESET_CURSOR, and WAIT_CURSOR.
Referenced by MatrixView::applyCoordinates(), copy(), Matrix::init(), load(), and Matrix::setCoordinates().
|
inlinestatic |
References default_column_width.
|
inlinestatic |
References default_row_height.
void Matrix::setDimensions | ( | int | rows, |
int | cols | ||
) |
Set the number of rows and columns.
References AbstractAspect::beginMacro(), columnCount(), d_matrix_private, AbstractAspect::endMacro(), AbstractAspect::exec(), AbstractAspect::name(), RESET_CURSOR, rowCount(), and WAIT_CURSOR.
Referenced by copy(), dimensionsDialog(), load(), Matrix::setDimensions(), Matrix::setNumCols(), and Matrix::setNumRows().
void Matrix::setDisplayedDigits | ( | int | digits | ) |
References d_matrix_private, displayedDigits(), AbstractAspect::exec(), RESET_CURSOR, and WAIT_CURSOR.
Referenced by MatrixView::applyFormat(), copy(), Matrix::init(), load(), readDisplayElement(), Matrix::setNumericFormat(), Matrix::setNumericPrecision(), and Matrix::setTextFormat().
void Matrix::setFormula | ( | const QString & | formula | ) |
References d_matrix_private, AbstractAspect::exec(), RESET_CURSOR, and WAIT_CURSOR.
Referenced by MatrixView::applyFormula(), copy(), load(), readFormulaElement(), and Matrix::setFormula().
void Matrix::setNumericFormat | ( | char | format | ) |
References d_matrix_private, AbstractAspect::exec(), numericFormat(), RESET_CURSOR, and WAIT_CURSOR.
Referenced by MatrixView::applyFormat(), copy(), Matrix::init(), load(), readDisplayElement(), Matrix::setNumericFormat(), and Matrix::setTextFormat().
void Matrix::setPlotMenu | ( | QMenu * | menu | ) |
void Matrix::setRowCells | ( | int | row, |
int | first_column, | ||
int | last_column, | ||
const QVector< qreal > & | values | ||
) |
Set the values in the given cells from a double vector.
References d_matrix_private, AbstractAspect::exec(), RESET_CURSOR, and WAIT_CURSOR.
void Matrix::setRowHeight | ( | int | row, |
int | height | ||
) |
This method should only be called by the view.
This method does not change the view, it only changes the values that are saved when the matrix is saved. The view has to take care of reading and applying these values
References d_matrix_private, and future::Matrix::Private::setRowHeight().
Referenced by copy(), MatrixView::handleVerticalSectionResized(), and readRowHeightElement().
void Matrix::setXEnd | ( | double | x | ) |
References d_matrix_private, AbstractAspect::exec(), RESET_CURSOR, WAIT_CURSOR, xStart(), yEnd(), and yStart().
Referenced by readCoordinatesElement().
void Matrix::setXStart | ( | double | x | ) |
References d_matrix_private, AbstractAspect::exec(), RESET_CURSOR, WAIT_CURSOR, xEnd(), yEnd(), and yStart().
Referenced by readCoordinatesElement().
void Matrix::setYEnd | ( | double | y | ) |
References d_matrix_private, AbstractAspect::exec(), RESET_CURSOR, WAIT_CURSOR, xEnd(), xStart(), and yStart().
Referenced by readCoordinatesElement().
void Matrix::setYStart | ( | double | y | ) |
References d_matrix_private, AbstractAspect::exec(), RESET_CURSOR, WAIT_CURSOR, xEnd(), xStart(), and yEnd().
Referenced by readCoordinatesElement().
|
slot |
Show a context menu for the selected columns.
pos | global position of the event |
References createColumnMenu().
Referenced by MatrixView::eventFilter().
|
slot |
Show a context menu for the selected cells.
pos | global position of the event |
References createMatrixMenu(), createSelectionMenu(), and d_view.
Referenced by MatrixView::eventFilter().
|
slot |
Show a context menu for the selected rows.
pos | global position of the event |
References createRowMenu().
Referenced by MatrixView::eventFilter().
QString Matrix::text | ( | int | row, |
int | col | ||
) |
Return the text displayed in the given cell.
References cell(), d_matrix_private, future::Matrix::Private::displayedDigits(), and future::Matrix::Private::numericFormat().
Referenced by MatrixModel::data(), and Matrix::text().
|
slot |
References d_matrix_private, AbstractAspect::exec(), RESET_CURSOR, and WAIT_CURSOR.
Referenced by connectActions(), and Matrix::transpose().
|
virtual |
Construct a primary view on me.
This method may be called multiple times during the life time of an Aspect, or it might not get called at all. Aspects must not depend on the existence of a view for their operation.
Implements AbstractPart.
References addActionsToView(), adjustTabBarAction(), and d_view.
Referenced by ApplicationWindow::handleAspectAboutToBeRemoved(), ApplicationWindow::handleAspectAdded(), MatrixModel::setData(), and Matrix::view().
double Matrix::xEnd | ( | ) | const |
References d_matrix_private, and future::Matrix::Private::xEnd().
Referenced by copy(), MatrixModel::headerData(), save(), setXStart(), setYEnd(), setYStart(), MatrixView::updateCoordinatesTab(), and Matrix::xEnd().
double Matrix::xStart | ( | ) | const |
References d_matrix_private, and future::Matrix::Private::xStart().
Referenced by copy(), MatrixModel::headerData(), save(), setXEnd(), setYEnd(), setYStart(), MatrixView::updateCoordinatesTab(), and Matrix::xStart().
double Matrix::yEnd | ( | ) | const |
References d_matrix_private, and future::Matrix::Private::yEnd().
Referenced by copy(), MatrixModel::headerData(), save(), setXEnd(), setXStart(), setYStart(), MatrixView::updateCoordinatesTab(), and Matrix::yEnd().
double Matrix::yStart | ( | ) | const |
References d_matrix_private, and future::Matrix::Private::yStart().
Referenced by copy(), MatrixModel::headerData(), save(), setXEnd(), setXStart(), setYEnd(), MatrixView::updateCoordinatesTab(), and Matrix::yStart().
|
friend |
Reimplemented from AbstractAspect.
Referenced by Matrix().
|
private |
Referenced by addActionsToView(), connectActions(), and createActions().
|
private |
Referenced by addActionsToView(), connectActions(), and createActions().
|
private |
Referenced by addActionsToView(), connectActions(), createActions(), and createColumnMenu().
|
private |
Referenced by addActionsToView(), connectActions(), createActions(), createMatrixMenu(), and fillProjectMenu().
|
private |
Referenced by addActionsToView(), connectActions(), createActions(), and createRowMenu().
|
private |
Referenced by addActionsToView(), connectActions(), createActions(), and createSelectionMenu().
|
private |
Referenced by addActionsToView(), connectActions(), createActions(), and createSelectionMenu().
|
private |
Referenced by addActionsToView(), connectActions(), createActions(), and createSelectionMenu().
|
private |
Referenced by addActionsToView(), connectActions(), createActions(), and fillProjectMenu().
|
private |
Referenced by addActionsToView(), connectActions(), createActions(), createContextMenu(), and fillProjectMenu().
|
private |
Referenced by addActionsToView(), connectActions(), createActions(), createColumnMenu(), createRowMenu(), and fillProjectMenu().
|
private |
Referenced by addActionsToView(), connectActions(), createActions(), createMatrixMenu(), and fillProjectMenu().
|
private |
Referenced by addActionsToView(), connectActions(), createActions(), createMatrixMenu(), and fillProjectMenu().
|
private |
Referenced by addActionsToView(), connectActions(), createActions(), and fillProjectMenu().
|
private |
Referenced by addActionsToView(), connectActions(), createActions(), and createColumnMenu().
|
private |
Referenced by addActionsToView(), connectActions(), createActions(), and createRowMenu().
|
staticprivate |
Referenced by actionManager(), and initActionManager().
|
private |
Referenced by addActionsToView(), connectActions(), createActions(), and fillProjectMenu().
|
private |
Referenced by addActionsToView(), connectActions(), createActions(), and fillProjectMenu().
|
private |
Referenced by addActionsToView(), connectActions(), createActions(), and createSelectionMenu().
|
private |
Referenced by addActionsToView(), connectActions(), createActions(), createMatrixMenu(), and fillProjectMenu().
|
private |
Referenced by addActionsToView(), connectActions(), createActions(), and createColumnMenu().
|
private |
Referenced by addActionsToView(), connectActions(), createActions(), and createRowMenu().
|
private |
Referenced by addActionsToView(), connectActions(), createActions(), and createMatrixMenu().
|
private |
Referenced by addActionsToView(), connectActions(), createActions(), createMatrixMenu(), and fillProjectMenu().
|
private |
Referenced by addActionsToView(), adjustTabBarAction(), createActions(), createMatrixMenu(), and fillProjectMenu().
|
private |
Referenced by addActionsToView(), connectActions(), createActions(), and fillProjectMenu().
|
private |
Referenced by addColumns(), addRows(), cell(), clear(), clearSelectedCells(), clearSelectedColumns(), clearSelectedRows(), columnCells(), columnCount(), columnWidth(), copy(), copySelection(), displayedDigits(), formula(), insertColumns(), insertRows(), load(), Matrix(), mirrorHorizontally(), mirrorVertically(), numericFormat(), removeColumns(), removeRows(), rowCells(), rowCount(), rowHeight(), setCell(), setColumnCells(), setColumnWidth(), setCoordinates(), setDimensions(), setDisplayedDigits(), setFormula(), setNumericFormat(), setRowCells(), setRowHeight(), setXEnd(), setXStart(), setYEnd(), setYStart(), text(), transpose(), xEnd(), xStart(), yEnd(), and yStart().
|
private |
Referenced by setPlotMenu().
|
private |
Referenced by addActionsToView(), addColumns(), addRows(), clearSelectedCells(), clearSelectedColumns(), clearSelectedRows(), copy(), copySelection(), cutSelection(), editCoordinates(), editFormat(), editFormula(), goToCell(), insertEmptyColumns(), insertEmptyRows(), Matrix(), pasteIntoSelection(), readColumnWidthElement(), readRowHeightElement(), removeSelectedColumns(), removeSelectedRows(), selectAll(), showMatrixViewContextMenu(), view(), and ~Matrix().
|
staticprivate |
Referenced by defaultColumnWidth(), and setDefaultColumnWidth().
|
staticprivate |
Referenced by defaultRowHeight(), and setDefaultRowHeight().