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)  

future::Matrix Class Reference

Aspect providing a spreadsheet to manage MxN matrix data. More...

#include <future_Matrix.h>

Inheritance diagram for future::Matrix:
[legend]
Collaboration diagram for future::Matrix:
[legend]

Classes

class  Private
 

Public Slots

virtual void copy ()
 Copy current selection. More...
 

Public Member Functions

 Matrix (AbstractScriptingEngine *engine, int rows, int cols, const QString &name)
 Constructor. More...
 
 ~Matrix ()
 
virtual QIcon icon () const
 Return an icon to be used for decorating my views. More...
 
virtual QMenu * createContextMenu () const
 Return a new context menu. More...
 
virtual QWidget * view ()
 Construct a primary view on me. More...
 
QMenu * createSelectionMenu (QMenu *append_to=0)
 Create a menu with selection related operations. More...
 
QMenu * createColumnMenu (QMenu *append_to=0)
 Create a menu with column related operations. More...
 
QMenu * createRowMenu (QMenu *append_to=0)
 Create a menu with row related operations. More...
 
QMenu * createMatrixMenu (QMenu *append_to=0)
 Create a menu with table related operations. More...
 
virtual bool fillProjectMenu (QMenu *menu)
 Fill the part specific menu for the main window including setting the title. More...
 
void insertColumns (int before, int count)
 
void appendColumns (int count)
 
void removeColumns (int first, int count)
 
void insertRows (int before, int count)
 
void appendRows (int count)
 
void removeRows (int first, int count)
 
void setDimensions (int rows, int cols)
 Set the number of rows and columns. More...
 
int columnCount () const
 Return the total number of columns. More...
 
int rowCount () const
 Return the total number of rows. More...
 
void setPlotMenu (QMenu *menu)
 Set a plot menu. More...
 
double cell (int row, int col) const
 Return the value in the given cell. More...
 
void setCell (int row, int col, double value)
 Set the value of the cell. More...
 
void setCells (const QVector< qreal > &data)
 Set the value of all cells. More...
 
QVector< qreal > columnCells (int col, int first_row, int last_row)
 Return the values in the given cells as double vector. More...
 
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. More...
 
QVector< qreal > rowCells (int row, int first_column, int last_column)
 Return the values in the given cells as double vector. More...
 
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. More...
 
QString text (int row, int col)
 Return the text displayed in the given cell. More...
 
void copy (Matrix *other)
 
double xStart () const
 
double yStart () const
 
double xEnd () const
 
double yEnd () const
 
QString formula () const
 
void setFormula (const QString &formula)
 
void setXStart (double x)
 
void setXEnd (double x)
 
void setYStart (double y)
 
void setYEnd (double y)
 
void setCoordinates (double x1, double x2, double y1, double y2)
 
char numericFormat () const
 
int displayedDigits () const
 
void setNumericFormat (char format)
 
void setDisplayedDigits (int digits)
 
PartMdiViewmdiSubWindow ()
 Wrap the view() into a PartMdiView. More...
 
virtual bool fillProjectToolBar (QToolBar *bar)
 Fill the part specific tool bar for the main window including setting the title. More...
 
virtual void cut ()
 Cut current selection. More...
 
virtual void paste ()
 Paste at the current location or into the current selection. More...
 
AbstractAspectparentAspect () const
 Return my parent Aspect or 0 if I currently don't have one. More...
 
future::Folderfolder ()
 Return the folder the Aspect is contained in or 0 if not. More...
 
bool isDescendantOf (AbstractAspect *other)
 Return whether the there is a path upwards to the given aspect. More...
 
void addChild (AbstractAspect *child)
 Add the given Aspect to my list of children. More...
 
void insertChild (AbstractAspect *child, int index)
 Insert the given Aspect at a specific position in my list of children. More...
 
void removeChild (AbstractAspect *child, bool detach=false)
 Remove the given Aspect from my list of children. More...
 
void removeChild (int index)
 Remove the Aspect at the given index from my list of children. More...
 
AbstractAspectchild (int index) const
 Get a child by its position in my list of children. More...
 
int childCount () const
 Return the number of child Aspects. More...
 
int indexOfChild (const AbstractAspect *child) const
 Return the position of child in my list of children. More...
 
int index () const
 Return my position in my parent's list of children. More...
 
void moveChild (int from, int to)
 Change the positon of a child in my list of children. More...
 
void reparentChild (AbstractAspect *new_parent, AbstractAspect *child, int d_new_index)
 Move a child to another aspect and transfer ownership. More...
 
void reparentChild (AbstractAspect *new_parent, AbstractAspect *child)
 Move a child to another aspect and transfer ownership. More...
 
QList< AbstractAspect * > descendantsThatInherit (const char *class_name)
 Get all descendents that inherit the given class. More...
 
virtual void removeAllChildAspects ()
 Remove all child aspects. More...
 
virtual const Projectproject () const
 Return the Project this Aspect belongs to, or 0 if it is currently not part of one. More...
 
virtual Projectproject ()
 Return the Project this Aspect belongs to, or 0 if it is currently not part of one. More...
 
virtual QString path () const
 Return the path that leads from the top-most Aspect (usually a Project) to me. More...
 
QString name () const
 
QString comment () const
 
QString captionSpec () const
 Return the specification string used for constructing the caption(). More...
 
QDateTime creationTime () const
 
QString caption () const
 
void scriptingChangeEvent (ScriptingChangeEvent *)
 

Protected Attributes

ScriptingEnvscriptEnv
 

Private Attributes

PartMdiViewd_mdi_window
 The MDI sub-window that is wrapped around my primary view. More...
 
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
 
QPointer< MatrixViewd_view
 
Privated_matrix_private
 

Friends

class Private
 

undo related

virtual QUndoStack * undoStack () const
 Return the undo stack of the Project, or 0 if this Aspect is not part of a Project. More...
 
void exec (QUndoCommand *command)
 Execute the given command, pushing it on the undoStack() if available. More...
 
void beginMacro (const QString &text)
 Begin an undo stack macro (series of commands) More...
 
void endMacro ()
 End the undo stack macro. More...
 
static QVariant global (const QString &key)
 Retrieve a global setting. More...
 
static void setGlobal (const QString &key, const QVariant &value)
 Update a global setting. More...
 
static void setGlobalDefault (const QString &key, const QVariant &value)
 Set default value for a global setting. More...
 

serialize/deserialize

Privated_aspect_private
 
void importV0x0001XXCreationTime (const QString &str)
 
void setName (const QString &value)
 
void setComment (const QString &value)
 
void setCaptionSpec (const QString &value)
 Set the specification string used for constructing the caption(). More...
 
virtual void remove ()
 Remove me from my parent's list of children. More...
 
QString uniqueNameFor (const QString &current_name) const
 Make the specified name unique among my children by incrementing a trailing number. More...
 
void aspectDescriptionAboutToChange (const AbstractAspect *aspect)
 Emit this before the name, comment or caption spec is changed. More...
 
void aspectDescriptionChanged (const AbstractAspect *aspect)
 Emit this when the name, comment or caption spec changed. More...
 
void aspectAboutToBeAdded (const AbstractAspect *parent, int index)
 Emit this when a parent aspect is about to get a new child inserted. More...
 
void aspectAdded (const AbstractAspect *aspect)
 Emit this from a newly added aspect. More...
 
void aspectAdded (const AbstractAspect *parent, int index)
 Emit this from a parent after adding a new child to it. More...
 
void aspectAboutToBeRemoved (const AbstractAspect *aspect)
 Emit this from an aspect about to be removed from its parent's children. More...
 
void aspectAboutToBeRemoved (const AbstractAspect *parent, int index)
 Emit this from a parent before removing its child. More...
 
void aspectRemoved (const AbstractAspect *parent, int index)
 Emit this from the parent after removing a child. More...
 
void statusInfo (const QString &text)
 Emit this to give status information to the user. More...
 
bool readBasicAttributes (XmlStreamReader *reader)
 Load name, creation time and caption spec from XML. More...
 
void writeBasicAttributes (QXmlStreamWriter *writer) const
 Save name, creation time and caption spec to XML. More...
 
void writeCommentElement (QXmlStreamWriter *writer) const
 Save the comment to XML. More...
 
bool readCommentElement (XmlStreamReader *reader)
 Load comment from an XML element. More...
 
void setCreationTime (const QDateTime &time)
 Set the creation time. More...
 
virtual void completeAspectInsertion (AbstractAspect *aspect, int index)
 Called after a new child has been inserted or added. More...
 
virtual void prepareAspectRemoval (AbstractAspect *aspect)
 Called before a child is removed. More...
 
void info (const QString &text)
 Implementations should call this whenever status information should be given to the user. More...
 

serialize/deserialize

static ActionManageraction_manager = 0
 
static int default_column_width = 120
 
static int default_row_height = 20
 
QMenu * d_plot_menu
 
virtual void save (QXmlStreamWriter *) const
 Save as XML. More...
 
virtual bool load (XmlStreamReader *)
 Load from XML. More...
 
void setRowHeight (int row, int height)
 This method should only be called by the view. More...
 
void setColumnWidth (int col, int width)
 This method should only be called by the view. More...
 
int rowHeight (int row) const
 
int columnWidth (int col) const
 
static ActionManageractionManager ()
 
static void initActionManager ()
 
static int defaultColumnWidth ()
 
static int defaultRowHeight ()
 
static void setDefaultColumnWidth (int width)
 
static void setDefaultRowHeight (int height)
 
static MatrixfromImage (const QImage &image)
 
 Matrix ()
 Private ctor for initActionManager() only. More...
 
void createActions ()
 
void connectActions ()
 
void addActionsToView ()
 
void translateActionsStrings ()
 
bool readDisplayElement (XmlStreamReader *reader)
 Read XML display element. More...
 
bool readCoordinatesElement (XmlStreamReader *reader)
 Read XML coodinates element. More...
 
bool readFormulaElement (XmlStreamReader *reader)
 Read XML formula element. More...
 
bool readCellElement (XmlStreamReader *reader)
 Read XML cell element. More...
 
bool readRowHeightElement (XmlStreamReader *reader)
 
bool readColumnWidthElement (XmlStreamReader *reader)
 
void clear ()
 Clear the whole matrix (i.e. set all cells to 0.0) More...
 
void transpose ()
 
void mirrorVertically ()
 
void mirrorHorizontally ()
 
void cutSelection ()
 
void copySelection ()
 
void pasteIntoSelection ()
 
void clearSelectedCells ()
 
void dimensionsDialog ()
 
void goToCell ()
 
void insertEmptyColumns ()
 Insert columns depending on the selection. More...
 
void insertEmptyRows ()
 Insert rows depending on the selection. More...
 
void removeSelectedColumns ()
 
void removeSelectedRows ()
 
void clearSelectedColumns ()
 
void clearSelectedRows ()
 
void selectAll ()
 
void showMatrixViewContextMenu (const QPoint &pos)
 Show a context menu for the selected cells. More...
 
void showMatrixViewColumnContextMenu (const QPoint &pos)
 Show a context menu for the selected columns. More...
 
void showMatrixViewRowContextMenu (const QPoint &pos)
 Show a context menu for the selected rows. More...
 
void editFormat ()
 
void editCoordinates ()
 
void editFormula ()
 
void addColumns ()
 Append as many columns as are selected. More...
 
void addRows ()
 Append as many rows as are selected. More...
 
void importImageDialog ()
 
void duplicate ()
 Duplicate the matrix inside its folder. More...
 
void columnsAboutToBeInserted (int before, int count)
 
void columnsInserted (int first, int count)
 
void columnsAboutToBeRemoved (int first, int count)
 
void columnsRemoved (int first, int count)
 
void rowsAboutToBeInserted (int before, int count)
 
void rowsInserted (int first, int count)
 
void rowsAboutToBeRemoved (int first, int count)
 
void rowsRemoved (int first, int count)
 
void dataChanged (int top, int left, int bottom, int right)
 
void coordinatesChanged ()
 
void formulaChanged ()
 
void formatChanged ()
 
void adjustTabBarAction (bool visible)
 

Detailed Description

Aspect providing a spreadsheet to manage MxN matrix data.

Definition at line 56 of file future_Matrix.h.

Constructor & Destructor Documentation

◆ Matrix() [1/2]

Matrix::Matrix ( AbstractScriptingEngine *  engine,
int  rows,
int  cols,
const QString &  name 
)

Constructor.

Parameters
enginescripting engine
rowsinitial number of rows
colsinitial number of columns
nameobject name

Definition at line 62 of file future_Matrix.cpp.

63  : AbstractPart(name), d_plot_menu(0), scripted(engine)
64 #else
65 Matrix::Matrix(void *, int rows, int cols, const QString& name)
67 #endif
68 {
69  d_matrix_private = new Private(this);
70  // set initial number of rows and columns
71  appendColumns(cols);
72  appendRows(rows);
73 
74  d_view = NULL;
75  createActions();
76  connectActions();
77 }

References appendColumns(), appendRows(), connectActions(), createActions(), d_matrix_private, d_view, and Private.

Here is the call graph for this function:

◆ ~Matrix()

Matrix::~Matrix ( )

Definition at line 91 of file future_Matrix.cpp.

92 {
93  // delete d_view.data();
94 }

◆ Matrix() [2/2]

Matrix::Matrix ( )
private

Private ctor for initActionManager() only.

Definition at line 80 of file future_Matrix.cpp.

81  : AbstractPart("temp"), scripted(0)
82 #else
84  : AbstractPart("temp")
85 #endif
86 {
87  d_view = NULL;
88  createActions();
89 }

References createActions(), and d_view.

Referenced by duplicate(), fromImage(), and initActionManager().

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

Member Function Documentation

◆ actionManager()

ActionManager * Matrix::actionManager ( )
static

Definition at line 1480 of file future_Matrix.cpp.

1481 {
1482  if (!action_manager)
1484 
1485  return action_manager;
1486 }

References action_manager, and initActionManager().

Referenced by createActions().

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

◆ addActionsToView()

void Matrix::addActionsToView ( )
private

Definition at line 717 of file future_Matrix.cpp.

718 {
719  connect(action_toggle_tabbar, SIGNAL(triggered()), d_view, SLOT(toggleControlTabBar()));
720 
721  d_view->addAction(action_cut_selection);
722  d_view->addAction(action_copy_selection);
724  d_view->addAction(action_set_formula);
725  d_view->addAction(action_edit_coordinates);
726  d_view->addAction(action_edit_format);
727  d_view->addAction(action_clear_selection);
728  d_view->addAction(action_recalculate);
729  d_view->addAction(action_toggle_tabbar);
730  d_view->addAction(action_select_all);
731  d_view->addAction(action_clear_matrix);
732  d_view->addAction(action_transpose);
734  d_view->addAction(action_mirror_vertically);
735  d_view->addAction(action_go_to_cell);
736  d_view->addAction(action_dimensions_dialog);
737  d_view->addAction(action_import_image);
738 #ifndef LEGACY_CODE_0_2_x
739  d_view->addAction(action_duplicate);
740 #endif
741  d_view->addAction(action_insert_columns);
742  d_view->addAction(action_remove_columns);
743  d_view->addAction(action_clear_columns);
744  d_view->addAction(action_insert_rows);
745  d_view->addAction(action_remove_rows);
746  d_view->addAction(action_clear_rows);
747  d_view->addAction(action_add_columns);
748  d_view->addAction(action_add_rows);
749 }

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().

Here is the caller graph for this function:

◆ addChild()

void AbstractAspect::addChild ( AbstractAspect child)
inherited

Add the given Aspect to my list of children.

Definition at line 114 of file AbstractAspect.cpp.

115 {
116  Q_CHECK_PTR(child);
117  QString new_name = d_aspect_private->uniqueNameFor(child->name());
118  beginMacro(tr("%1: add %2.").arg(name()).arg(new_name));
119  if (new_name != child->name()) {
120  info(tr("Renaming \"%1\" to \"%2\" in order to avoid name collision.").arg(child->name()).arg(new_name));
121  child->setName(new_name);
122  }
125  endMacro();
126 }

References AbstractAspect::beginMacro(), AbstractAspect::child(), AbstractAspect::Private::childCount(), AbstractAspect::completeAspectInsertion(), AbstractAspect::d_aspect_private, AbstractAspect::endMacro(), AbstractAspect::exec(), AbstractAspect::info(), AbstractAspect::name(), AbstractAspect::setName(), and AbstractAspect::Private::uniqueNameFor().

Referenced by AbstractSimpleFilter::AbstractSimpleFilter(), Column::Column(), ApplicationWindow::convertMatrixToTable(), ApplicationWindow::convertTableToMatrix(), duplicate(), ApplicationWindow::importImage(), Column::init(), ApplicationWindow::newMatrix(), ApplicationWindow::newTable(), ApplicationWindow::newTableStatistics(), future::Folder::readChildAspectElement(), and Column::setColumnMode().

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

◆ addColumns

void Matrix::addColumns ( )
slot

Append as many columns as are selected.

Definition at line 1013 of file future_Matrix.cpp.

1014 {
1015  if (!d_view) return;
1016  WAIT_CURSOR;
1017  int count = d_view->selectedRowCount(false);
1018  beginMacro(QObject::tr("%1: add %2 column(s)").arg(name()).arg(count));
1020  endMacro();
1021  RESET_CURSOR;
1022 }

References AbstractAspect::beginMacro(), columnCount(), d_matrix_private, d_view, AbstractAspect::endMacro(), AbstractAspect::exec(), AbstractAspect::name(), RESET_CURSOR, and WAIT_CURSOR.

Referenced by connectActions().

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

◆ addRows

void Matrix::addRows ( )
slot

Append as many rows as are selected.

Definition at line 1002 of file future_Matrix.cpp.

1003 {
1004  if (!d_view) return;
1005  WAIT_CURSOR;
1006  int count = d_view->selectedRowCount(false);
1007  beginMacro(QObject::tr("%1: add %2 rows(s)").arg(name()).arg(count));
1009  endMacro();
1010  RESET_CURSOR;
1011 }

References AbstractAspect::beginMacro(), d_matrix_private, d_view, AbstractAspect::endMacro(), AbstractAspect::exec(), AbstractAspect::name(), RESET_CURSOR, rowCount(), and WAIT_CURSOR.

Referenced by connectActions().

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

◆ adjustTabBarAction

void Matrix::adjustTabBarAction ( bool  visible)
privateslot

Definition at line 1411 of file future_Matrix.cpp.

1412 {
1413  if(visible)
1414  action_toggle_tabbar->setText(tr("Hide Controls"));
1415  else
1416  action_toggle_tabbar->setText(tr("Show Controls"));
1417 }

References action_toggle_tabbar.

Referenced by fillProjectMenu(), and view().

Here is the caller graph for this function:

◆ appendColumns()

void future::Matrix::appendColumns ( int  count)
inline

Definition at line 131 of file future_Matrix.h.

131 { insertColumns(columnCount(), count); }

References columnCount(), and insertColumns().

Referenced by Matrix(), and pasteIntoSelection().

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

◆ appendRows()

void future::Matrix::appendRows ( int  count)
inline

Definition at line 134 of file future_Matrix.h.

134 { insertRows(rowCount(), count); }

References insertRows(), and rowCount().

Referenced by Matrix(), and pasteIntoSelection().

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

◆ aspectAboutToBeAdded

void AbstractAspect::aspectAboutToBeAdded ( const AbstractAspect parent,
int  index 
)
signalinherited

Emit this when a parent aspect is about to get a new child inserted.

Referenced by AbstractAspect::Private::insertChild().

Here is the caller graph for this function:

◆ aspectAboutToBeRemoved [1/2]

void AbstractAspect::aspectAboutToBeRemoved ( const AbstractAspect aspect)
signalinherited

Emit this from an aspect about to be removed from its parent's children.

Referenced by AbstractAspect::Private::insertChild(), and AbstractAspect::Private::removeChild().

Here is the caller graph for this function:

◆ aspectAboutToBeRemoved [2/2]

void AbstractAspect::aspectAboutToBeRemoved ( const AbstractAspect parent,
int  index 
)
signalinherited

Emit this from a parent before removing its child.

◆ aspectAdded [1/2]

void AbstractAspect::aspectAdded ( const AbstractAspect aspect)
signalinherited

Emit this from a newly added aspect.

Referenced by AbstractAspect::Private::insertChild().

Here is the caller graph for this function:

◆ aspectAdded [2/2]

void AbstractAspect::aspectAdded ( const AbstractAspect parent,
int  index 
)
signalinherited

Emit this from a parent after adding a new child to it.

◆ aspectDescriptionAboutToChange

void AbstractAspect::aspectDescriptionAboutToChange ( const AbstractAspect aspect)
signalinherited

Emit this before the name, comment or caption spec is changed.

Referenced by AbstractFilter::input(), and AbstractAspect::Private::insertChild().

Here is the caller graph for this function:

◆ aspectDescriptionChanged

void AbstractAspect::aspectDescriptionChanged ( const AbstractAspect aspect)
signalinherited

Emit this when the name, comment or caption spec changed.

Referenced by future::Table::connectColumn(), AbstractFilter::input(), AbstractAspect::Private::insertChild(), and Column::notifyDisplayChange().

Here is the caller graph for this function:

◆ aspectRemoved

void AbstractAspect::aspectRemoved ( const AbstractAspect parent,
int  index 
)
signalinherited

Emit this from the parent after removing a child.

Referenced by AbstractAspect::Private::insertChild(), and AbstractAspect::Private::removeChild().

Here is the caller graph for this function:

◆ beginMacro()

void AbstractAspect::beginMacro ( const QString &  text)
inherited

Begin an undo stack macro (series of commands)

Definition at line 215 of file AbstractAspect.cpp.

216 {
217  QUndoStack *stack = undoStack();
218  if (stack)
219  stack->beginMacro(text);
220 }

References AbstractAspect::undoStack().

Referenced by AbstractAspect::addChild(), future::Table::addColumn(), addColumns(), future::Table::addColumns(), addRows(), future::Table::addRows(), Matrix::applyFormula(), TableView::applyType(), clear(), future::Table::clear(), future::Table::clearMasks(), clearSelectedCells(), future::Table::clearSelectedCells(), clearSelectedColumns(), future::Table::clearSelectedColumns(), clearSelectedRows(), copy(), future::Table::copy(), cutSelection(), future::Table::cutSelection(), future::Table::fillSelectedCellsWithRandomNumbers(), future::Table::fillSelectedCellsWithRowNumbers(), AbstractAspect::insertChild(), insertColumns(), future::Table::insertColumns(), insertEmptyColumns(), future::Table::insertEmptyColumns(), insertEmptyRows(), future::Table::insertEmptyRows(), insertRows(), future::Table::insertRows(), future::Table::maskSelection(), future::Table::moveColumn(), future::Table::normalizeColumns(), future::Table::normalizeSelection(), pasteIntoSelection(), future::Table::pasteIntoSelection(), future::Table::recalculateSelectedCells(), AbstractAspect::removeAllChildAspects(), AbstractAspect::removeChild(), removeColumns(), future::Table::removeColumns(), removeRows(), future::Table::removeRows(), removeSelectedColumns(), future::Table::removeSelectedColumns(), removeSelectedRows(), future::Table::removeSelectedRows(), AbstractAspect::reparentChild(), Column::setColumnMode(), setDimensions(), future::Table::setRowCount(), future::Table::setSelectionAs(), future::Table::sortColumns(), and future::Table::unmaskSelection().

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

◆ caption()

QString AbstractAspect::caption ( ) const
inherited

Definition at line 293 of file AbstractAspect.cpp.

294 {
295  return d_aspect_private->caption();
296 }

References AbstractAspect::Private::caption(), and AbstractAspect::d_aspect_private.

Referenced by PartMdiView::handleAspectDescriptionChanged().

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

◆ captionSpec()

QString AbstractAspect::captionSpec ( ) const
inherited

Return the specification string used for constructing the caption().

See setCaptionSpec() for format.

Definition at line 271 of file AbstractAspect.cpp.

272 {
273  return d_aspect_private->captionSpec();
274 }

References AbstractAspect::Private::captionSpec(), and AbstractAspect::d_aspect_private.

Referenced by future::Table::copy(), and AbstractAspect::writeBasicAttributes().

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

◆ cell()

double Matrix::cell ( int  row,
int  col 
) const

Return the value in the given cell.

Definition at line 198 of file future_Matrix.cpp.

199 {
200  if(row < 0 || row >= rowCount() ||
201  col < 0 || col >= columnCount()) return 0.0;
202  return d_matrix_private->cell(row, col);
203 }

References future::Matrix::Private::cell(), columnCount(), d_matrix_private, and rowCount().

Referenced by Matrix::cell(), copySelection(), save(), Matrix::saveCellsToMemory(), and text().

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

◆ child()

AbstractAspect * AbstractAspect::child ( int  index) const
inherited

Get a child by its position in my list of children.

Definition at line 180 of file AbstractAspect.cpp.

181 {
182  Q_ASSERT(index >= 0 && index <= childCount());
183  return d_aspect_private->child(index);
184 }

References AbstractAspect::Private::child(), AbstractAspect::childCount(), AbstractAspect::d_aspect_private, and AbstractAspect::index().

Referenced by AbstractAspect::addChild(), AbstractAspect::Private::addChild(), AbstractAspect::descendantsThatInherit(), ApplicationWindow::handleAspectAboutToBeRemoved(), ApplicationWindow::handleAspectAdded(), AbstractAspect::indexOfChild(), AbstractAspect::Private::indexOfChild(), AbstractAspect::insertChild(), AbstractAspect::Private::insertChild(), AbstractAspect::Private::removeChild(), AbstractAspect::removeChild(), AbstractAspect::reparentChild(), future::Folder::save(), AbstractAspect::Private::uniqueNameFor(), and AbstractAspect::Private::~Private().

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

◆ childCount()

int AbstractAspect::childCount ( ) const
inherited

Return the number of child Aspects.

Definition at line 186 of file AbstractAspect.cpp.

187 {
188  return d_aspect_private->childCount();
189 }

References AbstractAspect::Private::childCount(), and AbstractAspect::d_aspect_private.

Referenced by AbstractAspect::Private::child(), AbstractAspect::child(), AbstractAspect::descendantsThatInherit(), AbstractAspect::moveChild(), AbstractAspect::removeAllChildAspects(), AbstractAspect::removeChild(), AbstractAspect::reparentChild(), and future::Folder::save().

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

◆ clear

void Matrix::clear ( )
slot

Clear the whole matrix (i.e. set all cells to 0.0)

Definition at line 189 of file future_Matrix.cpp.

190 {
191  WAIT_CURSOR;
192  beginMacro(QObject::tr("%1: clear").arg(name()));
194  endMacro();
195  RESET_CURSOR;
196 }

References AbstractAspect::beginMacro(), d_matrix_private, AbstractAspect::endMacro(), AbstractAspect::exec(), AbstractAspect::name(), RESET_CURSOR, and WAIT_CURSOR.

Referenced by connectActions().

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

◆ clearSelectedCells

void Matrix::clearSelectedCells ( )
slot

Definition at line 436 of file future_Matrix.cpp.

437 {
438  if (!d_view) return;
439  int first_row = d_view->firstSelectedRow();
440  int last_row = d_view->lastSelectedRow();
441  if( first_row < 0 ) return;
442  int first_col = d_view->firstSelectedColumn();
443  int last_col = d_view->lastSelectedColumn();
444  if( first_col < 0 ) return;
445 
446  WAIT_CURSOR;
447  beginMacro(tr("%1: clear selected cell(s)").arg(name()));
448  for(int i=first_row; i<=last_row; i++)
449  for(int j=first_col; j<=last_col; j++)
450  if(d_view->isCellSelected(i, j))
452  endMacro();
453  RESET_CURSOR;
454 }

References AbstractAspect::beginMacro(), d_matrix_private, d_view, AbstractAspect::endMacro(), AbstractAspect::exec(), AbstractAspect::name(), RESET_CURSOR, and WAIT_CURSOR.

Referenced by Matrix::clearSelection(), connectActions(), and cutSelection().

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

◆ clearSelectedColumns

void Matrix::clearSelectedColumns ( )
slot

Definition at line 364 of file future_Matrix.cpp.

365 {
366  if (!d_view) return;
367  WAIT_CURSOR;
368  beginMacro(QObject::tr("%1: clear selected column(s)").arg(name()));
369  for(int i=0; i<columnCount(); i++)
370  if(d_view->isColumnSelected(i, false))
372  endMacro();
373  RESET_CURSOR;
374 }

References AbstractAspect::beginMacro(), columnCount(), d_matrix_private, d_view, AbstractAspect::endMacro(), AbstractAspect::exec(), AbstractAspect::name(), RESET_CURSOR, and WAIT_CURSOR.

Referenced by connectActions().

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

◆ clearSelectedRows

void Matrix::clearSelectedRows ( )
slot

Definition at line 417 of file future_Matrix.cpp.

418 {
419  if (!d_view) return;
420  int first = d_view->firstSelectedRow();
421  int last = d_view->lastSelectedRow();
422  if( first < 0 ) return;
423 
424  WAIT_CURSOR;
425  beginMacro(QObject::tr("%1: clear selected rows(s)").arg(name()));
426  for(int i=first; i<=last; i++)
427  {
428  if(d_view->isRowSelected(i))
429  for(int j=0; j<columnCount(); j++)
431  }
432  endMacro();
433  RESET_CURSOR;
434 }

References AbstractAspect::beginMacro(), columnCount(), d_matrix_private, d_view, AbstractAspect::endMacro(), AbstractAspect::exec(), AbstractAspect::name(), RESET_CURSOR, and WAIT_CURSOR.

Referenced by connectActions().

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

◆ columnCells()

QVector< qreal > Matrix::columnCells ( int  col,
int  first_row,
int  last_row 
)

Return the values in the given cells as double vector.

Definition at line 1419 of file future_Matrix.cpp.

1420 {
1421  return d_matrix_private->columnCells(col, first_row, last_row);
1422 }

References future::Matrix::Private::columnCells(), and d_matrix_private.

Referenced by copy().

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

◆ columnCount()

int Matrix::columnCount ( ) const

Return the total number of columns.

Definition at line 179 of file future_Matrix.cpp.

180 {
181  return d_matrix_private->columnCount();
182 }

References future::Matrix::Private::columnCount(), and d_matrix_private.

Referenced by addColumns(), appendColumns(), cell(), clearSelectedColumns(), clearSelectedRows(), MatrixModel::columnCount(), copy(), dimensionsDialog(), duplicate(), goToCell(), MatrixModel::headerData(), insertColumns(), Matrix::numCols(), pasteIntoSelection(), removeColumns(), save(), Matrix::saveText(), setCell(), future::Matrix::Private::setCells(), Matrix::setColumnsWidth(), setDimensions(), and Matrix::setNumRows().

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

◆ columnsAboutToBeInserted

void future::Matrix::columnsAboutToBeInserted ( int  before,
int  count 
)
signal

◆ columnsAboutToBeRemoved

void future::Matrix::columnsAboutToBeRemoved ( int  first,
int  count 
)
signal

◆ columnsInserted

void future::Matrix::columnsInserted ( int  first,
int  count 
)
signal

◆ columnsRemoved

void future::Matrix::columnsRemoved ( int  first,
int  count 
)
signal

◆ columnWidth()

int Matrix::columnWidth ( int  col) const

Definition at line 1406 of file future_Matrix.cpp.

1407 {
1408  return d_matrix_private->columnWidth(col);
1409 }

References future::Matrix::Private::columnWidth(), and d_matrix_private.

Referenced by copy(), and save().

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

◆ comment()

QString AbstractAspect::comment ( ) const
inherited

Definition at line 260 of file AbstractAspect.cpp.

261 {
262  return d_aspect_private->comment();
263 }

References AbstractAspect::Private::comment(), and AbstractAspect::d_aspect_private.

Referenced by Table::colComment(), Table::colComments(), future::Table::copy(), Table::saveComments(), TableView::setColumnForControlTabs(), Matrix::windowLabel(), and AbstractAspect::writeCommentElement().

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

◆ completeAspectInsertion()

virtual void AbstractAspect::completeAspectInsertion ( AbstractAspect aspect,
int  index 
)
inlineprotectedvirtualinherited

Called after a new child has been inserted or added.

Unlike the aspectAdded() signals, this method does not get called inside undo/redo actions; allowing subclasses to execute undo commands of their own.

Reimplemented in future::Table.

Definition at line 294 of file AbstractAspect.h.

294 { Q_UNUSED(aspect); Q_UNUSED(index); }

References AbstractAspect::index().

Referenced by AbstractAspect::addChild(), AbstractAspect::insertChild(), and AbstractAspect::reparentChild().

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

◆ connectActions()

void Matrix::connectActions ( )
private

Definition at line 686 of file future_Matrix.cpp.

687 {
688  connect(action_cut_selection, SIGNAL(triggered()), this, SLOT(cutSelection()));
689  connect(action_copy_selection, SIGNAL(triggered()), this, SLOT(copySelection()));
690  connect(action_paste_into_selection, SIGNAL(triggered()), this, SLOT(pasteIntoSelection()));
691  connect(action_set_formula, SIGNAL(triggered()), this, SLOT(editFormula()));
692  connect(action_edit_coordinates, SIGNAL(triggered()), this, SLOT(editCoordinates()));
693  connect(action_edit_format, SIGNAL(triggered()), this, SLOT(editFormat()));
694  connect(action_clear_selection, SIGNAL(triggered()), this, SLOT(clearSelectedCells()));
695 #ifdef LEGACY_CODE_0_2_x
696  connect(action_recalculate, SIGNAL(triggered()), this, SLOT(recalculateSelectedCells()));
697 #endif
698  connect(action_select_all, SIGNAL(triggered()), this, SLOT(selectAll()));
699  connect(action_clear_matrix, SIGNAL(triggered()), this, SLOT(clear()));
700  connect(action_transpose, SIGNAL(triggered()), this, SLOT(transpose()));
701  connect(action_mirror_horizontally, SIGNAL(triggered()), this, SLOT(mirrorHorizontally()));
702  connect(action_mirror_vertically, SIGNAL(triggered()), this, SLOT(mirrorVertically()));
703  connect(action_go_to_cell, SIGNAL(triggered()), this, SLOT(goToCell()));
704  connect(action_dimensions_dialog, SIGNAL(triggered()), this, SLOT(dimensionsDialog()));
705  connect(action_import_image, SIGNAL(triggered()), this, SLOT(importImageDialog()));
706  connect(action_duplicate, SIGNAL(triggered()), this, SLOT(duplicate()));
707  connect(action_insert_columns, SIGNAL(triggered()), this, SLOT(insertEmptyColumns()));
708  connect(action_remove_columns, SIGNAL(triggered()), this, SLOT(removeSelectedColumns()));
709  connect(action_clear_columns, SIGNAL(triggered()), this, SLOT(clearSelectedColumns()));
710  connect(action_insert_rows, SIGNAL(triggered()), this, SLOT(insertEmptyRows()));
711  connect(action_remove_rows, SIGNAL(triggered()), this, SLOT(removeSelectedRows()));
712  connect(action_clear_rows, SIGNAL(triggered()), this, SLOT(clearSelectedRows()));
713  connect(action_add_columns, SIGNAL(triggered()), this, SLOT(addColumns()));
714  connect(action_add_rows, SIGNAL(triggered()), this, SLOT(addRows()));
715 }

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().

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

◆ coordinatesChanged

void future::Matrix::coordinatesChanged ( )
signal

◆ copy [1/2]

virtual void AbstractPart::copy
inlineslot

Copy current selection.

Definition at line 79 of file AbstractPart.h.

79 {};

Referenced by importImageDialog().

Here is the caller graph for this function:

◆ copy() [2/2]

void Matrix::copy ( Matrix other)

Definition at line 866 of file future_Matrix.cpp.

867 {
868  WAIT_CURSOR;
869  beginMacro(QObject::tr("%1: copy %2").arg(name()).arg(other->name()));
870  int rows = other->rowCount();
871  int columns = other->columnCount();
872  setDimensions(rows, columns);
873  for (int i=0; i<rows; i++)
874  setRowHeight(i, other->rowHeight(i));
875  for (int i=0; i<columns; i++)
876  setColumnWidth(i, other->columnWidth(i));
878  for (int i=0; i<columns; i++)
879  setColumnCells(i, 0, rows-1, other->columnCells(i, 0, rows-1));
880  setCoordinates(other->xStart(), other->xEnd(), other->yStart(), other->yEnd());
881  setNumericFormat(other->numericFormat());
882  setDisplayedDigits(other->displayedDigits());
883  setFormula(other->formula());
885  emit dataChanged(0, 0, rows-1, columns-1);
886  if (d_view) d_view->rereadSectionSizes();
887  endMacro();
888  RESET_CURSOR;
889 }

References AbstractAspect::beginMacro(), future::Matrix::Private::blockChangeSignals(), columnCells(), columnCount(), columnWidth(), d_matrix_private, d_view, dataChanged(), displayedDigits(), AbstractAspect::endMacro(), formula(), AbstractAspect::name(), numericFormat(), 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().

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

◆ copySelection

void Matrix::copySelection ( )
slot

Definition at line 219 of file future_Matrix.cpp.

220 {
221  if (!d_view) return;
222  int first_col = d_view->firstSelectedColumn(false);
223  if(first_col == -1) return;
224  int last_col = d_view->lastSelectedColumn(false);
225  if(last_col == -2) return;
226  int first_row = d_view->firstSelectedRow(false);
227  if(first_row == -1) return;
228  int last_row = d_view->lastSelectedRow(false);
229  if(last_row == -2) return;
230  int cols = last_col - first_col +1;
231  int rows = last_row - first_row +1;
232 
233  WAIT_CURSOR;
234  QString output_str;
235 
236  for(int r=0; r<rows; r++)
237  {
238  for(int c=0; c<cols; c++)
239  {
240  if(d_view->isCellSelected(first_row + r, first_col + c))
241  output_str += QLocale().toString(cell(first_row + r, first_col + c),
242  d_matrix_private->numericFormat(), 16); // copy with max. precision
243  if(c < cols-1)
244  output_str += "\t";
245  }
246  if(r < rows-1)
247  output_str += "\n";
248  }
249  QApplication::clipboard()->setText(output_str);
250  RESET_CURSOR;
251 }

References cell(), d_matrix_private, d_view, future::Matrix::Private::numericFormat(), RESET_CURSOR, and WAIT_CURSOR.

Referenced by connectActions(), Matrix::copySelection(), and cutSelection().

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

◆ createActions()

void Matrix::createActions ( )
private

Definition at line 535 of file future_Matrix.cpp.

536 {
537  QIcon * icon_temp;
538 
539  // selection related actions
540  action_cut_selection = new QAction(QIcon(QPixmap(":/cut.xpm")), tr("Cu&t"), this);
541  actionManager()->addAction(action_cut_selection, "cut_selection");
542 
543  action_copy_selection = new QAction(QIcon(QPixmap(":/copy.xpm")), tr("&Copy"), this);
544  actionManager()->addAction(action_copy_selection, "copy_selection");
545 
546  action_paste_into_selection = new QAction(QIcon(QPixmap(":/paste.xpm")), tr("Past&e"), this);
547  actionManager()->addAction(action_paste_into_selection, "paste_into_selection");
548 
549  icon_temp = new QIcon();
550  icon_temp->addPixmap(QPixmap(":/16x16/clear.png"));
551  icon_temp->addPixmap(QPixmap(":/32x32/clear.png"));
552  action_clear_selection = new QAction(*icon_temp, tr("Clea&r","clear selection"), this);
553  actionManager()->addAction(action_clear_selection, "clear_selection");
554  delete icon_temp;
555 
556  // matrix related actions
557  icon_temp = new QIcon();
558  icon_temp->addPixmap(QPixmap(":/16x16/fx.png"));
559  icon_temp->addPixmap(QPixmap(":/32x32/fx.png"));
560  action_set_formula = new QAction(*icon_temp, tr("Assign &Formula"), this);
561  action_set_formula->setShortcut(tr("Alt+Q"));
562  actionManager()->addAction(action_set_formula, "set_formula");
563  delete icon_temp;
564 
565  icon_temp = new QIcon();
566  icon_temp->addPixmap(QPixmap(":/16x16/recalculate.png"));
567  icon_temp->addPixmap(QPixmap(":/32x32/recalculate.png"));
568  action_recalculate = new QAction(*icon_temp, tr("Recalculate"), this);
569  action_recalculate->setShortcut(tr("Ctrl+Return"));
570  actionManager()->addAction(action_recalculate, "recalculate");
571  delete icon_temp;
572 
573  icon_temp = new QIcon();
574  icon_temp->addPixmap(QPixmap(":/16x16/table_options.png"));
575  icon_temp->addPixmap(QPixmap(":/32x32/table_options.png"));
576  action_toggle_tabbar = new QAction(*icon_temp, QString("Show/Hide Controls"), this); // show/hide control tabs
577  action_toggle_tabbar->setShortcut(tr("F12"));
578  actionManager()->addAction(action_toggle_tabbar, "toggle_tabbar");
579  delete icon_temp;
580 
581  icon_temp = new QIcon();
582  icon_temp->addPixmap(QPixmap(":/16x16/select_all.png"));
583  icon_temp->addPixmap(QPixmap(":/32x32/select_all.png"));
584  action_select_all = new QAction(*icon_temp, tr("Select All"), this);
585  actionManager()->addAction(action_select_all, "select_all");
586  delete icon_temp;
587 
588  icon_temp = new QIcon();
589  icon_temp->addPixmap(QPixmap(":/16x16/clear_table.png"));
590  icon_temp->addPixmap(QPixmap(":/32x32/clear_table.png"));
591  action_clear_matrix = new QAction(*icon_temp, tr("Clear Matrix"), this);
592  actionManager()->addAction(action_clear_matrix, "clear_matrix");
593  delete icon_temp;
594 
595  icon_temp = new QIcon();
596  icon_temp->addPixmap(QPixmap(":/16x16/go_to_cell.png"));
597  icon_temp->addPixmap(QPixmap(":/32x32/go_to_cell.png"));
598  action_go_to_cell = new QAction(*icon_temp, tr("&Go to Cell"), this);
599  action_go_to_cell->setShortcut(tr("Ctrl+Alt+G"));
600  actionManager()->addAction(action_go_to_cell, "go_to_cell");
601  delete icon_temp;
602 
603  action_transpose = new QAction(tr("&Transpose"), this);
604  actionManager()->addAction(action_transpose, "transpose");
605 
606  action_mirror_horizontally = new QAction(tr("Mirror &Horizontally"), this);
607  actionManager()->addAction(action_mirror_horizontally, "mirror_horizontally");
608 
609  action_mirror_vertically = new QAction(tr("Mirror &Vertically"), this);
610  actionManager()->addAction(action_mirror_vertically, "mirror_vertically");
611 
612  action_import_image = new QAction(tr("&Import Image", "import image as matrix"), this);
613  actionManager()->addAction(action_import_image, "import_image");
614 
615  action_duplicate = new QAction(QIcon(QPixmap(":/duplicate.xpm")), tr("&Duplicate", "duplicate matrix"), this);
616  actionManager()->addAction(action_duplicate, "duplicate");
617 
618  action_dimensions_dialog = new QAction(QIcon(QPixmap(":/resize.xpm")), tr("&Dimensions", "matrix size"), this);
619  actionManager()->addAction(action_dimensions_dialog, "dimensions_dialog");
620 
621  action_edit_coordinates = new QAction(tr("Set &Coordinates"), this);
622  actionManager()->addAction(action_edit_coordinates, "edit_coordinates");
623 
624  action_edit_format = new QAction(tr("Set Display &Format"), this);
625  actionManager()->addAction(action_edit_format, "edit_format");
626 
627  // column related actions
628  icon_temp = new QIcon();
629  icon_temp->addPixmap(QPixmap(":/16x16/insert_column.png"));
630  icon_temp->addPixmap(QPixmap(":/32x32/insert_column.png"));
631  action_insert_columns = new QAction(*icon_temp, tr("&Insert Empty Columns"), this);
632  actionManager()->addAction(action_insert_columns, "insert_columns");
633  delete icon_temp;
634 
635  icon_temp = new QIcon();
636  icon_temp->addPixmap(QPixmap(":/16x16/remove_column.png"));
637  icon_temp->addPixmap(QPixmap(":/32x32/remove_column.png"));
638  action_remove_columns = new QAction(*icon_temp, tr("Remo&ve Columns"), this);
639  actionManager()->addAction(action_remove_columns, "remove_columns");
640  delete icon_temp;
641 
642  icon_temp = new QIcon();
643  icon_temp->addPixmap(QPixmap(":/16x16/clear_column.png"));
644  icon_temp->addPixmap(QPixmap(":/32x32/clear_column.png"));
645  action_clear_columns = new QAction(*icon_temp, tr("Clea&r Columns"), this);
646  actionManager()->addAction(action_clear_columns, "clear_columns");
647  delete icon_temp;
648 
649  icon_temp = new QIcon();
650  icon_temp->addPixmap(QPixmap(":/16x16/add_columns.png"));
651  icon_temp->addPixmap(QPixmap(":/32x32/add_columns.png"));
652  action_add_columns = new QAction(*icon_temp, tr("&Add Columns"), this);
653  actionManager()->addAction(action_add_columns, "add_columns");
654  delete icon_temp;
655 
656  // row related actions
657  icon_temp = new QIcon();
658  icon_temp->addPixmap(QPixmap(":/16x16/insert_row.png"));
659  icon_temp->addPixmap(QPixmap(":/32x32/insert_row.png"));
660  action_insert_rows = new QAction(*icon_temp ,tr("&Insert Empty Rows"), this);;
661  actionManager()->addAction(action_insert_rows, "insert_rows");
662  delete icon_temp;
663 
664  icon_temp = new QIcon();
665  icon_temp->addPixmap(QPixmap(":/16x16/remove_row.png"));
666  icon_temp->addPixmap(QPixmap(":/32x32/remove_row.png"));
667  action_remove_rows = new QAction(*icon_temp, tr("Remo&ve Rows"), this);;
668  actionManager()->addAction(action_remove_rows, "remove_rows");
669  delete icon_temp;
670 
671  icon_temp = new QIcon();
672  icon_temp->addPixmap(QPixmap(":/16x16/clear_row.png"));
673  icon_temp->addPixmap(QPixmap(":/32x32/clear_row.png"));
674  action_clear_rows = new QAction(*icon_temp, tr("Clea&r Rows"), this);;
675  actionManager()->addAction(action_clear_rows, "clear_rows");
676  delete icon_temp;
677 
678  icon_temp = new QIcon();
679  icon_temp->addPixmap(QPixmap(":/16x16/add_rows.png"));
680  icon_temp->addPixmap(QPixmap(":/32x32/add_rows.png"));
681  action_add_rows = new QAction(*icon_temp, tr("&Add Rows"), this);;
682  actionManager()->addAction(action_add_rows, "add_rows");
683  delete icon_temp;
684 }

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().

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

◆ createColumnMenu()

QMenu * Matrix::createColumnMenu ( QMenu *  append_to = 0)

Create a menu with column related operations.

Parameters
append_toif a pointer to a QMenu is passed to the function, the actions are appended to it instead of the creation of a new menu.

Definition at line 483 of file future_Matrix.cpp.

484 {
485  QMenu * menu = append_to;
486  if(!menu)
487  menu = new QMenu();
488 
489  menu->addAction(action_insert_columns);
490  menu->addAction(action_remove_columns);
491  menu->addAction(action_clear_columns);
492  menu->addSeparator();
493  menu->addAction(action_edit_coordinates);
494 
495  return menu;
496 }

References action_clear_columns, action_edit_coordinates, action_insert_columns, and action_remove_columns.

Referenced by showMatrixViewColumnContextMenu().

Here is the caller graph for this function:

◆ createContextMenu()

QMenu * Matrix::createContextMenu ( ) const
virtual

Return a new context menu.

The caller takes ownership of the menu.

Reimplemented from AbstractPart.

Definition at line 456 of file future_Matrix.cpp.

457 {
458  QMenu *menu = AbstractPart::createContextMenu();
459  Q_ASSERT(menu);
460  menu->addSeparator();
461 
462  menu->addAction(action_duplicate);
463  // TODO menu->addAction( ....
464 
465  return menu;
466 }

References action_duplicate, and AbstractPart::createContextMenu().

Here is the call graph for this function:

◆ createMatrixMenu()

QMenu * Matrix::createMatrixMenu ( QMenu *  append_to = 0)

Create a menu with table related operations.

Parameters
append_toif a pointer to a QMenu is passed to the function, the actions are appended to it instead of the creation of a new menu.

Definition at line 498 of file future_Matrix.cpp.

499 {
500  QMenu * menu = append_to;
501  if(!menu)
502  menu = new QMenu();
503 
504  menu->addAction(action_toggle_tabbar);
505  menu->addSeparator();
506  menu->addAction(action_select_all);
507  menu->addAction(action_clear_matrix);
508  menu->addSeparator();
509  menu->addAction(action_set_formula);
510  menu->addAction(action_recalculate);
511  menu->addSeparator();
512  menu->addAction(action_edit_format);
513  menu->addSeparator();
514  menu->addAction(action_go_to_cell);
515 
516  return menu;
517 }

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().

Here is the caller graph for this function:

◆ createRowMenu()

QMenu * Matrix::createRowMenu ( QMenu *  append_to = 0)

Create a menu with row related operations.

Parameters
append_toif a pointer to a QMenu is passed to the function, the actions are appended to it instead of the creation of a new menu.

Definition at line 519 of file future_Matrix.cpp.

520 {
521  QMenu * menu = append_to;
522  if(!menu)
523  menu = new QMenu();
524 
525  menu->addAction(action_insert_rows);
526  menu->addAction(action_remove_rows);
527  menu->addAction(action_clear_rows);
528  menu->addSeparator();
529  menu->addAction(action_edit_coordinates);
530 
531  return menu;
532 }

References action_clear_rows, action_edit_coordinates, action_insert_rows, and action_remove_rows.

Referenced by showMatrixViewRowContextMenu().

Here is the caller graph for this function:

◆ createSelectionMenu()

QMenu * Matrix::createSelectionMenu ( QMenu *  append_to = 0)

Create a menu with selection related operations.

Parameters
append_toif a pointer to a QMenu is passed to the function, the actions are appended to it instead of the creation of a new menu.

Definition at line 468 of file future_Matrix.cpp.

469 {
470  QMenu * menu = append_to;
471  if(!menu)
472  menu = new QMenu();
473 
474  menu->addAction(action_cut_selection);
475  menu->addAction(action_copy_selection);
476  menu->addAction(action_paste_into_selection);
477  menu->addAction(action_clear_selection);
478 
479  return menu;
480 }

References action_clear_selection, action_copy_selection, action_cut_selection, and action_paste_into_selection.

Referenced by showMatrixViewContextMenu().

Here is the caller graph for this function:

◆ creationTime()

QDateTime AbstractAspect::creationTime ( ) const
inherited

Definition at line 288 of file AbstractAspect.cpp.

289 {
290  return d_aspect_private->creationTime();
291 }

References AbstractAspect::Private::creationTime(), and AbstractAspect::d_aspect_private.

Referenced by Matrix::birthDate(), Matrix::init(), and AbstractAspect::writeBasicAttributes().

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

◆ cut()

virtual void AbstractPart::cut ( )
inlinevirtualinherited

Cut current selection.

Definition at line 81 of file AbstractPart.h.

81 {};

◆ cutSelection

void Matrix::cutSelection ( )
slot

Definition at line 205 of file future_Matrix.cpp.

206 {
207  if (!d_view) return;
208  int first = d_view->firstSelectedRow();
209  if( first < 0 ) return;
210 
211  WAIT_CURSOR;
212  beginMacro(tr("%1: cut selected cell(s)").arg(name()));
213  copySelection();
215  endMacro();
216  RESET_CURSOR;
217 }

References AbstractAspect::beginMacro(), clearSelectedCells(), copySelection(), d_view, AbstractAspect::endMacro(), AbstractAspect::name(), RESET_CURSOR, and WAIT_CURSOR.

Referenced by connectActions().

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

◆ dataChanged

void future::Matrix::dataChanged ( int  top,
int  left,
int  bottom,
int  right 
)
signal

Referenced by copy(), and future::Matrix::Private::emitDataChanged().

Here is the caller graph for this function:

◆ defaultColumnWidth()

static int future::Matrix::defaultColumnWidth ( )
inlinestatic

Definition at line 206 of file future_Matrix.h.

206 { return default_column_width; }

References default_column_width.

Referenced by MatrixView::init(), and future::Matrix::Private::insertColumns().

Here is the caller graph for this function:

◆ defaultRowHeight()

static int future::Matrix::defaultRowHeight ( )
inlinestatic

Definition at line 207 of file future_Matrix.h.

207 { return default_row_height; }

References default_row_height.

Referenced by MatrixView::init(), and future::Matrix::Private::insertRows().

Here is the caller graph for this function:

◆ descendantsThatInherit()

QList< AbstractAspect * > AbstractAspect::descendantsThatInherit ( const char *  class_name)
inherited

Get all descendents that inherit the given class.

Definition at line 342 of file AbstractAspect.cpp.

343 {
344  QList<AbstractAspect *> list;
345  if (inherits(class_name))
346  list << this;
347  for (int i=0; i<childCount(); i++)
348  list << child(i)->descendantsThatInherit(class_name);
349  return list;
350 }

References AbstractAspect::child(), AbstractAspect::childCount(), and AbstractAspect::descendantsThatInherit().

Referenced by AbstractAspect::descendantsThatInherit(), and ApplicationWindow::tableWindows().

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

◆ dimensionsDialog

void Matrix::dimensionsDialog ( )
slot

Definition at line 928 of file future_Matrix.cpp.

929 {
930  bool ok;
931 
932  int cols = QInputDialog::getInt(0, tr("Set Matrix Dimensions"), tr("Enter number of columns"),
933  columnCount(), 1, 1e9, 1, &ok);
934  if ( !ok ) return;
935 
936  int rows = QInputDialog::getInt(0, tr("Set Matrix Dimensions"), tr("Enter number of rows"),
937  rowCount(), 1, 1e9, 1, &ok);
938  if ( !ok ) return;
939 
940  setDimensions(rows, cols);
941 }

References columnCount(), rowCount(), and setDimensions().

Referenced by connectActions().

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

◆ displayedDigits()

int Matrix::displayedDigits ( ) const

Definition at line 1112 of file future_Matrix.cpp.

1113 {
1114  return d_matrix_private->displayedDigits();
1115 }

References d_matrix_private, and future::Matrix::Private::displayedDigits().

Referenced by copy(), MatrixModel::headerData(), Matrix::precision(), save(), Matrix::saveAsTemplate(), Matrix::saveToString(), setDisplayedDigits(), and Matrix::setNumericFormat().

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

◆ duplicate

void Matrix::duplicate ( )
slot

Duplicate the matrix inside its folder.

Definition at line 974 of file future_Matrix.cpp.

975 {
976 #ifndef LEGACY_CODE_0_2_x
977  Matrix * matrix = new Matrix(0, rowCount(), columnCount(), name());
978  matrix->copy(this);
979  if (folder())
980  folder()->addChild(matrix);
981 #endif
982 }

References AbstractAspect::addChild(), columnCount(), copy(), AbstractAspect::folder(), Matrix(), AbstractAspect::name(), and rowCount().

Referenced by connectActions().

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

◆ editCoordinates

void Matrix::editCoordinates ( )
slot

Definition at line 990 of file future_Matrix.cpp.

991 {
992  if (!d_view) return;
993  d_view->showControlCoordinatesTab();
994 }

References d_view.

Referenced by connectActions().

Here is the caller graph for this function:

◆ editFormat

void Matrix::editFormat ( )
slot

Definition at line 984 of file future_Matrix.cpp.

985 {
986  if (!d_view) return;
987  d_view->showControlFormatTab();
988 }

References d_view.

Referenced by connectActions().

Here is the caller graph for this function:

◆ editFormula

void Matrix::editFormula ( )
slot

Definition at line 996 of file future_Matrix.cpp.

997 {
998  if (!d_view) return;
999  d_view->showControlFormulaTab();
1000 }

References d_view.

Referenced by connectActions().

Here is the caller graph for this function:

◆ endMacro()

void AbstractAspect::endMacro ( )
inherited

End the undo stack macro.

Definition at line 222 of file AbstractAspect.cpp.

223 {
224  QUndoStack *stack = undoStack();
225  if (stack)
226  stack->endMacro();
227 }

References AbstractAspect::undoStack().

Referenced by AbstractAspect::addChild(), future::Table::addColumn(), addColumns(), future::Table::addColumns(), addRows(), future::Table::addRows(), Matrix::applyFormula(), TableView::applyType(), clear(), future::Table::clear(), future::Table::clearMasks(), clearSelectedCells(), future::Table::clearSelectedCells(), clearSelectedColumns(), future::Table::clearSelectedColumns(), clearSelectedRows(), copy(), future::Table::copy(), cutSelection(), future::Table::cutSelection(), future::Table::fillSelectedCellsWithRandomNumbers(), future::Table::fillSelectedCellsWithRowNumbers(), AbstractAspect::insertChild(), insertColumns(), future::Table::insertColumns(), insertEmptyColumns(), future::Table::insertEmptyColumns(), insertEmptyRows(), future::Table::insertEmptyRows(), insertRows(), future::Table::insertRows(), future::Table::maskSelection(), future::Table::moveColumn(), future::Table::normalizeColumns(), future::Table::normalizeSelection(), pasteIntoSelection(), future::Table::pasteIntoSelection(), future::Table::recalculateSelectedCells(), AbstractAspect::removeAllChildAspects(), AbstractAspect::removeChild(), removeColumns(), future::Table::removeColumns(), removeRows(), future::Table::removeRows(), removeSelectedColumns(), future::Table::removeSelectedColumns(), removeSelectedRows(), future::Table::removeSelectedRows(), AbstractAspect::reparentChild(), Column::setColumnMode(), setDimensions(), future::Table::setRowCount(), future::Table::setSelectionAs(), future::Table::sortColumns(), and future::Table::unmaskSelection().

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

◆ exec()

void AbstractAspect::exec ( QUndoCommand *  command)
inherited

Execute the given command, pushing it on the undoStack() if available.

Definition at line 203 of file AbstractAspect.cpp.

204 {
205  Q_CHECK_PTR(cmd);
206  QUndoStack *stack = undoStack();
207  if (stack)
208  stack->push(cmd);
209  else {
210  cmd->redo();
211  delete cmd;
212  }
213 }

References AbstractAspect::undoStack().

Referenced by AbstractAspect::addChild(), addColumns(), addRows(), future::Table::addRows(), clear(), Column::clear(), Column::clearFormulas(), Column::clearMasks(), clearSelectedCells(), clearSelectedColumns(), clearSelectedRows(), Column::clearValidity(), future::Table::completeAspectInsertion(), Column::copy(), AbstractAspect::insertChild(), insertColumns(), insertRows(), Column::insertRows(), mirrorHorizontally(), mirrorVertically(), AbstractAspect::moveChild(), future::Table::moveColumn(), future::Table::prepareAspectRemoval(), AbstractAspect::removeChild(), removeColumns(), removeRows(), future::Table::removeRows(), Column::removeRows(), AbstractAspect::reparentChild(), Column::replaceDateTimes(), Column::replaceTexts(), Column::replaceValues(), AbstractAspect::setCaptionSpec(), setCell(), setColumnCells(), Column::setColumnMode(), AbstractAspect::setComment(), setCoordinates(), AbstractAspect::setCreationTime(), Column::setDateTimeAt(), setDimensions(), setDisplayedDigits(), DateTime2StringFilter::setFormat(), String2DateTimeFilter::setFormat(), setFormula(), Column::setFormula(), Column::setInvalid(), Column::setMasked(), AbstractAspect::setName(), Double2StringFilter::setNumDigits(), Double2StringFilter::setNumericFormat(), setNumericFormat(), Column::setPlotDesignation(), setRowCells(), future::Table::setRowCount(), Column::setTextAt(), Column::setValueAt(), setXEnd(), setXStart(), setYEnd(), setYStart(), and transpose().

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

◆ fillProjectMenu()

bool Matrix::fillProjectMenu ( QMenu *  menu)
virtual

Fill the part specific menu for the main window including setting the title.

Returns
true on success, otherwise false (e.g. part has no actions).

Reimplemented from AbstractPart.

Definition at line 782 of file future_Matrix.cpp.

783 {
784  menu->setTitle(tr("&Matrix"));
785 
786  menu->addAction(action_toggle_tabbar);
787  menu->addSeparator();
788  menu->addAction(action_edit_coordinates);
789  menu->addAction(action_dimensions_dialog);
790  menu->addAction(action_edit_format);
791  menu->addSeparator();
792  menu->addAction(action_set_formula);
793  menu->addAction(action_recalculate);
794  menu->addSeparator();
795  menu->addAction(action_clear_matrix);
796  menu->addAction(action_transpose);
797  menu->addAction(action_mirror_horizontally);
798  menu->addAction(action_mirror_vertically);
799  menu->addSeparator();
800 #ifndef LEGACY_CODE_0_2_x
801  menu->addAction(action_duplicate);
802 #endif
803  menu->addAction(action_import_image);
804  menu->addSeparator();
805  menu->addAction(action_go_to_cell);
806  if (action_clear_matrix->text() != tr("Clear Matrix"))
807  {
809  adjustTabBarAction(d_view->isControlTabBarVisible());
810  }
811 
812  return true;
813 
814  // TODO:
815  // Convert to Table
816  // Export
817 }

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, action_transpose, adjustTabBarAction(), d_view, and translateActionsStrings().

Here is the call graph for this function:

◆ fillProjectToolBar()

virtual bool AbstractPart::fillProjectToolBar ( QToolBar *  bar)
inlinevirtualinherited

Fill the part specific tool bar for the main window including setting the title.

Returns
true on success, otherwise false (e.g. part has no actions to be shown in a toolbar).

Reimplemented in future::Table.

Definition at line 75 of file AbstractPart.h.

75 { Q_UNUSED(bar); return false; }

◆ folder()

future::Folder * AbstractAspect::folder ( )
inherited

Return the folder the Aspect is contained in or 0 if not.

The returned folder may be the aspect itself if it inherits Folder.

Definition at line 316 of file AbstractAspect.cpp.

317 {
318  if(inherits("future::Folder")) return static_cast<future::Folder *>(this);
319  AbstractAspect * parent_aspect = parentAspect();
320  while(parent_aspect && !parent_aspect->inherits("future::Folder"))
321  parent_aspect = parent_aspect->parentAspect();
322  return static_cast<future::Folder *>(parent_aspect);
323 }

References AbstractAspect::parentAspect().

Referenced by Project::createFolderContextMenu(), duplicate(), and future::Folder::readChildAspectElement().

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

◆ formatChanged

void future::Matrix::formatChanged ( )
signal

Referenced by future::Matrix::Private::setDisplayedDigits(), and future::Matrix::Private::setNumericFormat().

Here is the caller graph for this function:

◆ formula()

QString Matrix::formula ( ) const

Definition at line 1095 of file future_Matrix.cpp.

1096 {
1097  return d_matrix_private->formula();
1098 }

References d_matrix_private, and future::Matrix::Private::formula().

Referenced by copy(), Matrix::formula(), save(), setFormula(), and future::Matrix::Private::setFormula().

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

◆ formulaChanged

void future::Matrix::formulaChanged ( )
signal

◆ fromImage()

Matrix * Matrix::fromImage ( const QImage &  image)
static

Definition at line 1498 of file future_Matrix.cpp.

1499 {
1500  int cols = image.width();
1501  int rows = image.height();
1502 
1503  QProgressDialog progress;
1504  progress.setRange(0, cols);
1505  progress.setWindowTitle(tr("SciDAVis") + " - " + tr("Import image..."));
1506  progress.raise();
1507 
1508  Matrix * matrix = new Matrix(0, rows, cols, tr("Matrix %1").arg(1));
1509 
1510  QVector<qreal> values;
1511  values.resize(rows);
1512 
1513  for (int i=0; i<cols; i++)
1514  {
1515  for (int j=0; j<rows; j++)
1516  values[j] = qGray(image.pixel(i, rows - 1 - j));
1517 
1518  matrix->setColumnCells(i, 0, rows-1, values);
1519 
1520  if (i%5 == 4)
1521  {
1522  progress.setValue(i);
1523  QApplication::processEvents();
1524  }
1525 
1526  if (progress.wasCanceled())
1527  break;
1528  }
1529 
1530  if (progress.wasCanceled())
1531  {
1532  delete matrix;
1533  return NULL;
1534  }
1535  return matrix;
1536 }

References Matrix(), and setColumnCells().

Referenced by Matrix::fromImage(), and importImageDialog().

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

◆ global()

QVariant AbstractAspect::global ( const QString &  key)
staticinherited

Retrieve a global setting.

Definition at line 360 of file AbstractAspect.cpp.

361 {
362  QString qualified_key = QString(staticMetaObject.className()) + "/" + key;
363  QVariant result = Private::g_settings->value(qualified_key);
364  if (result.isValid())
365  return result;
366  else
367  return Private::g_defaults[qualified_key];
368 }

References AbstractAspect::Private::g_defaults, and AbstractAspect::Private::g_settings.

Referenced by importImageDialog(), and ProjectConfigPage::ProjectConfigPage().

Here is the caller graph for this function:

◆ goToCell

void Matrix::goToCell ( )
slot

Definition at line 850 of file future_Matrix.cpp.

851 {
852  if (!d_view) return;
853  bool ok;
854 
855  int col = QInputDialog::getInt(0, tr("Go to Cell"), tr("Enter column"),
856  1, 1, columnCount(), 1, &ok);
857  if ( !ok ) return;
858 
859  int row = QInputDialog::getInt(0, tr("Go to Cell"), tr("Enter row"),
860  1, 1, rowCount(), 1, &ok);
861  if ( !ok ) return;
862 
863  d_view->goToCell(row-1, col-1);
864 }

References columnCount(), d_view, and rowCount().

Referenced by connectActions().

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

◆ icon()

QIcon Matrix::icon ( ) const
virtual

Return an icon to be used for decorating my views.

Reimplemented from AbstractAspect.

Definition at line 896 of file future_Matrix.cpp.

897 {
898  QIcon ico;
899  ico.addPixmap(QPixmap(":/16x16/matrix.png"));
900  ico.addPixmap(QPixmap(":/24x24/matrix.png"));
901  ico.addPixmap(QPixmap(":/32x32/matrix.png"));
902  return ico;
903 }

◆ importImageDialog

void Matrix::importImageDialog ( )
slot

Definition at line 943 of file future_Matrix.cpp.

944 {
945  QList<QByteArray> formats = QImageReader::supportedImageFormats();
946  QString filter = tr("Images") + " (";
947  for (int i=0; i<formats.count(); i++)
948  filter += " *."+formats.at(i)+" ";
949  filter += ");;";
950  for (int i=0; i<formats.count(); i++)
951  filter += " *."+formats.at(i)+" (*." + formats.at(i) +");;";
952 
953  QString images_path = global("images_path").toString();
954  QString file_name = QFileDialog::getOpenFileName(0, tr("Import image from file"), images_path, filter);
955  if ( !file_name.isEmpty() )
956  {
957  QFileInfo file_info(file_name);
958  images_path = file_info.canonicalPath();
959  setGlobal("images_path", images_path);
960  QImage image(file_name);
961  Matrix * matrix = NULL;
962  if (!image.isNull())
963  matrix = Matrix::fromImage(image);
964  if (matrix)
965  {
966  copy(matrix);
967  delete matrix;
968  }
969  else
970  QMessageBox::information(0, tr("Error importing image"), tr("Import of image '%1' failed").arg(file_name));
971  }
972 }

References copy(), fromImage(), AbstractAspect::global(), and AbstractAspect::setGlobal().

Referenced by connectActions().

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

◆ importV0x0001XXCreationTime()

void AbstractAspect::importV0x0001XXCreationTime ( const QString &  str)
inlineinherited

Definition at line 255 of file AbstractAspect.h.

256  {
257  setCreationTime(QDateTime::fromString(str, Qt::LocalDate));
258  }

References AbstractAspect::setCreationTime(), and str.

Referenced by Matrix::setBirthDate().

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

◆ index()

int AbstractAspect::index ( ) const
inlineinherited

Return my position in my parent's list of children.

Definition at line 137 of file AbstractAspect.h.

137 { return parentAspect() ? parentAspect()->indexOfChild(this) : 0; }

References AbstractAspect::indexOfChild(), and AbstractAspect::parentAspect().

Referenced by AbstractAspect::Private::child(), AbstractAspect::child(), future::Table::column(), future::Table::Private::column(), AbstractAspect::completeAspectInsertion(), future::Table::completeAspectInsertion(), future::Table::handleDataChange(), future::Table::handleDescriptionChange(), future::Table::handleModeChange(), future::Table::handlePlotDesignationChange(), future::Table::handleRowsInserted(), future::Table::handleRowsRemoved(), AbstractAspect::insertChild(), AbstractAspect::Private::insertChild(), AbstractAspect::Private::removeChild(), AbstractAspect::removeChild(), and Column::XmlReadRow().

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

◆ indexOfChild()

int AbstractAspect::indexOfChild ( const AbstractAspect child) const
inherited

Return the position of child in my list of children.

Definition at line 191 of file AbstractAspect.cpp.

192 {
194 }

References AbstractAspect::child(), AbstractAspect::d_aspect_private, and AbstractAspect::Private::indexOfChild().

Referenced by AbstractAspect::index(), AbstractAspect::remove(), AbstractAspect::Private::removeChild(), AbstractAspect::removeChild(), and AbstractAspect::reparentChild().

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

◆ info()

void AbstractAspect::info ( const QString &  text)
inlineprotectedinherited

Implementations should call this whenever status information should be given to the user.

This will cause statusInfo() to be emitted. Typically, this will cause the specified string to be displayed in a status bar, a log window or some similar non-blocking way so as not to disturb the workflow.

Definition at line 307 of file AbstractAspect.h.

307 { emit statusInfo(text); }

References AbstractAspect::statusInfo().

Referenced by AbstractAspect::addChild(), AbstractAspect::insertChild(), AbstractAspect::reparentChild(), and AbstractAspect::setName().

Here is the caller graph for this function:

◆ initActionManager()

void Matrix::initActionManager ( )
static

Definition at line 1488 of file future_Matrix.cpp.

1489 {
1490  if (!action_manager)
1491  action_manager = new ActionManager();
1492 
1493  action_manager->setTitle(tr("Matrix"));
1494  volatile Matrix * action_creator = new Matrix(); // initialize the action texts
1495  delete action_creator;
1496 }

References action_manager, and Matrix().

Referenced by actionManager().

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

◆ insertChild()

void AbstractAspect::insertChild ( AbstractAspect child,
int  index 
)
inherited

Insert the given Aspect at a specific position in my list of children.

Definition at line 128 of file AbstractAspect.cpp.

129 {
130  Q_CHECK_PTR(child);
131  QString new_name = d_aspect_private->uniqueNameFor(child->name());
132  beginMacro(tr("%1: insert %2 at position %3.").arg(name()).arg(new_name).arg(index+1));
133  if (new_name != child->name()) {
134  info(tr("Renaming \"%1\" to \"%2\" in order to avoid name collision.").arg(child->name()).arg(new_name));
135  child->setName(new_name);
136  }
139  endMacro();
140 }

References AbstractAspect::beginMacro(), AbstractAspect::child(), AbstractAspect::completeAspectInsertion(), AbstractAspect::d_aspect_private, AbstractAspect::endMacro(), AbstractAspect::exec(), AbstractAspect::index(), AbstractAspect::info(), AbstractAspect::name(), AbstractAspect::setName(), and AbstractAspect::Private::uniqueNameFor().

Referenced by AbstractAspect::Private::addChild(), and future::Table::insertColumns().

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

◆ insertColumns()

void Matrix::insertColumns ( int  before,
int  count 
)

Definition at line 120 of file future_Matrix.cpp.

121 {
122  if( count < 1 || before < 0 || before > columnCount()) return;
123  WAIT_CURSOR;
124  beginMacro(QObject::tr("%1: insert %2 column(s)").arg(name()).arg(count));
125  exec(new MatrixInsertColumnsCmd(d_matrix_private, before, count));
126  endMacro();
127  RESET_CURSOR;
128 }

References AbstractAspect::beginMacro(), columnCount(), d_matrix_private, AbstractAspect::endMacro(), AbstractAspect::exec(), AbstractAspect::name(), RESET_CURSOR, and WAIT_CURSOR.

Referenced by appendColumns(), and insertEmptyColumns().

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

◆ insertEmptyColumns

void Matrix::insertEmptyColumns ( )
slot

Insert columns depending on the selection.

Definition at line 324 of file future_Matrix.cpp.

325 {
326  if (!d_view) return;
327  int first = d_view->firstSelectedColumn();
328  int last = d_view->lastSelectedColumn();
329  if( first < 0 ) return;
330  int count, current = first;
331 
332  WAIT_CURSOR;
333  beginMacro(QObject::tr("%1: insert empty column(s)").arg(name()));
334  while( current <= last )
335  {
336  current = first+1;
337  while( current <= last && d_view->isColumnSelected(current) ) current++;
338  count = current-first;
339  insertColumns(first, count);
340  current += count;
341  last += count;
342  while( current <= last && !d_view->isColumnSelected(current) ) current++;
343  first = current;
344  }
345  endMacro();
346  RESET_CURSOR;
347 }

References AbstractAspect::beginMacro(), d_view, AbstractAspect::endMacro(), insertColumns(), AbstractAspect::name(), RESET_CURSOR, and WAIT_CURSOR.

Referenced by connectActions(), and Matrix::insertColumn().

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

◆ insertEmptyRows

void Matrix::insertEmptyRows ( )
slot

Insert rows depending on the selection.

Definition at line 376 of file future_Matrix.cpp.

377 {
378  if (!d_view) return;
379  int first = d_view->firstSelectedRow();
380  int last = d_view->lastSelectedRow();
381  int count, current = first;
382 
383  if( first < 0 ) return;
384 
385  WAIT_CURSOR;
386  beginMacro(QObject::tr("%1: insert empty rows(s)").arg(name()));
387  while( current <= last )
388  {
389  current = first+1;
390  while( current <= last && d_view->isRowSelected(current) ) current++;
391  count = current-first;
392  insertRows(first, count);
393  current += count;
394  last += count;
395  while( current <= last && !d_view->isRowSelected(current) ) current++;
396  first = current;
397  }
398  endMacro();
399  RESET_CURSOR;
400 }

References AbstractAspect::beginMacro(), d_view, AbstractAspect::endMacro(), insertRows(), AbstractAspect::name(), RESET_CURSOR, and WAIT_CURSOR.

Referenced by connectActions(), and Matrix::insertRow().

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

◆ insertRows()

void Matrix::insertRows ( int  before,
int  count 
)

Definition at line 150 of file future_Matrix.cpp.

151 {
152  if( count < 1 || before < 0 || before > rowCount()) return;
153  WAIT_CURSOR;
154  beginMacro(QObject::tr("%1: insert %2 row(s)").arg(name()).arg(count));
155  exec(new MatrixInsertRowsCmd(d_matrix_private, before, count));
156  endMacro();
157  RESET_CURSOR;
158 }

References AbstractAspect::beginMacro(), d_matrix_private, AbstractAspect::endMacro(), AbstractAspect::exec(), AbstractAspect::name(), RESET_CURSOR, rowCount(), and WAIT_CURSOR.

Referenced by appendRows(), and insertEmptyRows().

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

◆ isDescendantOf()

bool AbstractAspect::isDescendantOf ( AbstractAspect other)
inherited

Return whether the there is a path upwards to the given aspect.

This also returns true if other==this.

Definition at line 325 of file AbstractAspect.cpp.

326 {
327  if(other == this) return true;
328  AbstractAspect * parent_aspect = parentAspect();
329  while(parent_aspect)
330  {
331  if(parent_aspect == other) return true;
332  parent_aspect = parent_aspect->parentAspect();
333  }
334  return false;
335 }

References AbstractAspect::parentAspect().

Here is the call graph for this function:

◆ load()

bool Matrix::load ( XmlStreamReader reader)
virtual

Load from XML.

Reimplemented from AbstractAspect.

Definition at line 1167 of file future_Matrix.cpp.

1168 {
1169  if(reader->isStartElement() && reader->name() == "matrix")
1170  {
1171  setDimensions(0, 0);
1172  setComment("");
1173  setFormula("");
1174  setNumericFormat('f');
1175  setDisplayedDigits(6);
1176  setCoordinates(0.0, 1.0, 0.0, 1.0);
1177 
1178  if (!readBasicAttributes(reader)) return false;
1179 
1180  // read dimensions
1181  bool ok1, ok2;
1182  int rows, cols;
1183  rows = reader->readAttributeInt("rows", &ok1);
1184  cols = reader->readAttributeInt("columns", &ok2);
1185  if(!ok1 || !ok2)
1186  {
1187  reader->raiseError(tr("invalid row or column count"));
1188  return false;
1189  }
1191  setDimensions(rows, cols);
1192 
1193  // read child elements
1194  while (!reader->atEnd())
1195  {
1196  reader->readNext();
1197 
1198  if (reader->isEndElement()) break;
1199 
1200  if (reader->isStartElement())
1201  {
1202  bool ret_val = true;
1203  if (reader->name() == "comment")
1204  ret_val = readCommentElement(reader);
1205  else if(reader->name() == "formula")
1206  ret_val = readFormulaElement(reader);
1207  else if(reader->name() == "display")
1208  ret_val = readDisplayElement(reader);
1209  else if(reader->name() == "coordinates")
1210  ret_val = readCoordinatesElement(reader);
1211  else if(reader->name() == "cell")
1212  ret_val = readCellElement(reader);
1213  else if(reader->name() == "row_height")
1214  ret_val = readRowHeightElement(reader);
1215  else if(reader->name() == "column_width")
1216  ret_val = readColumnWidthElement(reader);
1217  else // unknown element
1218  {
1219  reader->raiseWarning(tr("unknown element '%1'").arg(reader->name().toString()));
1220  if (!reader->skipToEndElement()) return false;
1221  }
1222  if(!ret_val) return false;
1223  }
1224  }
1226  }
1227  else // no matrix element
1228  reader->raiseError(tr("no matrix element found"));
1229 
1230  return !reader->hasError();
1231 }

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().

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

◆ mdiSubWindow()

PartMdiView * AbstractPart::mdiSubWindow ( )
inherited

Wrap the view() into a PartMdiView.

A new view is only created the first time this method is called; after that, a pointer to the pre-existing view is returned.

File : AbstractPart.cpp Project : SciDAVis

Description : Base class of Aspects with MDI windows as views.

Copyright : (C) 2008-2009 Knut Franke (knut.franke*gmx.de) (replace * with @ in the email address)

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

Definition at line 35 of file AbstractPart.cpp.

36 {
37  if (!d_mdi_window)
38  d_mdi_window = new PartMdiView(this, view());
39  return d_mdi_window;
40 }

References AbstractPart::d_mdi_window, and AbstractPart::view().

Here is the call graph for this function:

◆ mirrorHorizontally

void Matrix::mirrorHorizontally ( )
slot

Definition at line 1450 of file future_Matrix.cpp.

1451 {
1452  WAIT_CURSOR;
1454  RESET_CURSOR;
1455 }

References d_matrix_private, AbstractAspect::exec(), RESET_CURSOR, and WAIT_CURSOR.

Referenced by connectActions().

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

◆ mirrorVertically

void Matrix::mirrorVertically ( )
slot

Definition at line 1457 of file future_Matrix.cpp.

1458 {
1459  WAIT_CURSOR;
1461  RESET_CURSOR;
1462 }

References d_matrix_private, AbstractAspect::exec(), RESET_CURSOR, and WAIT_CURSOR.

Referenced by connectActions().

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

◆ moveChild()

void AbstractAspect::moveChild ( int  from,
int  to 
)
inherited

Change the positon of a child in my list of children.

Definition at line 196 of file AbstractAspect.cpp.

197 {
198  Q_ASSERT(0 <= from && from < d_aspect_private->childCount());
199  Q_ASSERT(0 <= to && to < d_aspect_private->childCount());
200  exec(new AspectChildMoveCmd(d_aspect_private, from, to));
201 }

References AbstractAspect::childCount(), AbstractAspect::d_aspect_private, and AbstractAspect::exec().

Referenced by future::Table::moveColumn().

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

◆ name()

QString AbstractAspect::name ( ) const
inherited

Definition at line 229 of file AbstractAspect.cpp.

230 {
231  return d_aspect_private->name();
232 }

References AbstractAspect::d_aspect_private, and AbstractAspect::Private::name().

Referenced by AbstractAspect::addChild(), future::Table::addColumn(), addColumns(), future::Table::addColumns(), Filter::addResultCurve(), addRows(), future::Table::addRows(), TableView::applyType(), AspectChildAddCmd::AspectChildAddCmd(), AspectChildRemoveCmd::AspectChildRemoveCmd(), AspectChildReparentCmd::AspectChildReparentCmd(), clear(), future::Table::clear(), future::Table::clearMasks(), clearSelectedCells(), future::Table::clearSelectedCells(), clearSelectedColumns(), future::Table::clearSelectedColumns(), clearSelectedRows(), Table::colLabel(), Table::colNames(), future::Table::column(), Table::columnsList(), copy(), future::Table::copy(), cutSelection(), future::Table::cutSelection(), DateTime2StringFilterSetFormatCmd::DateTime2StringFilterSetFormatCmd(), ApplicationWindow::defineErrorBars(), Double2StringFilterSetDigitsCmd::Double2StringFilterSetDigitsCmd(), Double2StringFilterSetFormatCmd::Double2StringFilterSetFormatCmd(), Table::drawableColumnSelection(), duplicate(), future::Table::export_to_TeX(), future::Table::fillSelectedCellsWithRandomNumbers(), future::Table::fillSelectedCellsWithRowNumbers(), TableView::handleAspectAdded(), Matrix::handleAspectDescriptionChange(), Table::handleAspectDescriptionChange(), TableView::handleAspectDescriptionChanged(), Table::importASCII(), ApplicationWindow::importASCII(), Table::init(), AbstractAspect::insertChild(), insertColumns(), future::Table::insertColumns(), insertEmptyColumns(), future::Table::insertEmptyColumns(), insertEmptyRows(), future::Table::insertEmptyRows(), insertRows(), future::Table::insertRows(), future::Table::maskSelection(), future::Table::moveColumn(), Matrix::name(), future::Matrix::Private::name(), future::Table::Private::name(), future::Table::normalizeColumns(), future::Table::normalizeSelection(), Differentiation::output(), pasteIntoSelection(), future::Table::pasteIntoSelection(), AbstractAspect::path(), AbstractAspect::readBasicAttributes(), future::Table::recalculateSelectedCells(), AbstractAspect::removeAllChildAspects(), AbstractAspect::removeChild(), removeColumns(), future::Table::removeColumns(), removeRows(), future::Table::removeRows(), removeSelectedColumns(), future::Table::removeSelectedColumns(), removeSelectedRows(), future::Table::removeSelectedRows(), AbstractAspect::reparentChild(), Table::selectedColumns(), Table::selectedErrColumns(), Table::selectedYColumns(), Table::selectedYLabels(), TableView::setColumnForControlTabs(), Column::setColumnMode(), setDimensions(), Graph::setLabelsTextFormat(), future::Table::setRowCount(), future::Table::setSelectionAs(), future::Table::showTeXTableExportDialog(), future::Table::sortColumns(), String2DateTimeFilterSetFormatCmd::String2DateTimeFilterSetFormatCmd(), TableMoveColumnCmd::TableMoveColumnCmd(), ApplicationWindow::tableWindows(), AbstractAspect::Private::uniqueNameFor(), future::Table::unmaskSelection(), AbstractAspect::writeBasicAttributes(), and Table::YColumns().

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

◆ numericFormat()

char Matrix::numericFormat ( ) const

Definition at line 1107 of file future_Matrix.cpp.

1108 {
1109  return d_matrix_private->numericFormat();
1110 }

References d_matrix_private, and future::Matrix::Private::numericFormat().

Referenced by copy(), MatrixModel::headerData(), save(), Matrix::saveAsTemplate(), Matrix::saveToString(), setNumericFormat(), Matrix::setNumericFormat(), and Matrix::textFormat().

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

◆ parentAspect()

AbstractAspect * AbstractAspect::parentAspect ( ) const
inherited

Return my parent Aspect or 0 if I currently don't have one.

Definition at line 109 of file AbstractAspect.cpp.

110 {
111  return d_aspect_private->parent();
112 }

References AbstractAspect::d_aspect_private, and AbstractAspect::Private::parent().

Referenced by DateTime2StringFilterSetFormatCmd::DateTime2StringFilterSetFormatCmd(), Double2StringFilterSetDigitsCmd::Double2StringFilterSetDigitsCmd(), Double2StringFilterSetFormatCmd::Double2StringFilterSetFormatCmd(), AbstractAspect::folder(), TableView::handleAspectAdded(), TableView::handleAspectDescriptionChanged(), AbstractAspect::index(), AbstractAspect::isDescendantOf(), AbstractAspect::path(), AbstractAspect::project(), AbstractAspect::remove(), Graph::setLabelsTextFormat(), String2DateTimeFilterSetFormatCmd::String2DateTimeFilterSetFormatCmd(), and AbstractAspect::undoStack().

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

◆ paste()

virtual void AbstractPart::paste ( )
inlinevirtualinherited

Paste at the current location or into the current selection.

Definition at line 83 of file AbstractPart.h.

83 {};

◆ pasteIntoSelection

void Matrix::pasteIntoSelection ( )
slot

Definition at line 253 of file future_Matrix.cpp.

254 {
255  if (!d_view) return;
256  if(columnCount() < 1 || rowCount() < 1) return;
257 
258  WAIT_CURSOR;
259  beginMacro(tr("%1: paste from clipboard").arg(name()));
260 
261  int first_col = d_view->firstSelectedColumn(false);
262  int last_col = d_view->lastSelectedColumn(false);
263  int first_row = d_view->firstSelectedRow(false);
264  int last_row = d_view->lastSelectedRow(false);
265  int input_row_count = 0;
266  int input_col_count = 0;
267  int rows, cols;
268 
269  const QClipboard *clipboard = QApplication::clipboard();
270  const QMimeData *mimeData = clipboard->mimeData();;
271  if(mimeData->hasText())
272  {
273  QString input_str = QString(clipboard->text());
274  QList< QStringList > cell_texts;
275  QStringList input_rows(input_str.split(QRegExp("\\n|\\r\\n|\\r")));
276  input_row_count = input_rows.count();
277  input_col_count = 0;
278  for(int i=0; i<input_row_count; i++)
279  {
280  cell_texts.append(input_rows.at(i).split("\t"));
281  if(cell_texts.at(i).count() > input_col_count) input_col_count = cell_texts.at(i).count();
282  }
283 
284  if( (first_col == -1 || first_row == -1) ||
285  (last_row == first_row && last_col == first_col) )
286  // if the is no selection or only one cell selected, the
287  // selection will be expanded to the needed size from the current cell
288  {
289  int current_row, current_col;
290  d_view->getCurrentCell(&current_row, &current_col);
291  if(current_row == -1) current_row = 0;
292  if(current_col == -1) current_col = 0;
293  d_view->setCellSelected(current_row, current_col);
294  first_col = current_col;
295  first_row = current_row;
296  last_row = first_row + input_row_count -1;
297  last_col = first_col + input_col_count -1;
298  // resize the matrix if necessary
299  if(last_col >= columnCount())
300  appendColumns(last_col+1-columnCount());
301  if(last_row >= rowCount())
302  appendRows(last_row+1-rowCount());
303  // select the rectangle to be pasted in
304  d_view->setCellsSelected(first_row, first_col, last_row, last_col);
305  }
306 
307  rows = last_row - first_row + 1;
308  cols = last_col - first_col + 1;
309  for(int r=0; r<rows && r<input_row_count; r++)
310  {
311  for(int c=0; c<cols && c<input_col_count; c++)
312  {
313  if(d_view->isCellSelected(first_row + r, first_col + c) && (c < cell_texts.at(r).count()) )
314  {
315  setCell(first_row + r, first_col + c, cell_texts.at(r).at(c).toDouble());
316  }
317  }
318  }
319  }
320  endMacro();
321  RESET_CURSOR;
322 }

References appendColumns(), appendRows(), AbstractAspect::beginMacro(), columnCount(), d_view, AbstractAspect::endMacro(), AbstractAspect::name(), RESET_CURSOR, rowCount(), setCell(), and WAIT_CURSOR.

Referenced by connectActions(), and Matrix::pasteSelection().

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

◆ path()

virtual QString AbstractAspect::path ( ) const
inlinevirtualinherited

Return the path that leads from the top-most Aspect (usually a Project) to me.

Reimplemented in Project.

Definition at line 154 of file AbstractAspect.h.

154 { return parentAspect() ? parentAspect()->path() + "/" + name() : ""; }

References AbstractAspect::name(), AbstractAspect::parentAspect(), and AbstractAspect::path().

Referenced by AbstractAspect::path().

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

◆ prepareAspectRemoval()

virtual void AbstractAspect::prepareAspectRemoval ( AbstractAspect aspect)
inlineprotectedvirtualinherited

Called before a child is removed.

Unlike the aspectAboutToBeRemoved() signals, this method does not get called inside undo/redo actions; allowing subclasses to execute undo commands of their own.

Reimplemented in future::Table.

Definition at line 300 of file AbstractAspect.h.

300 { Q_UNUSED(aspect); }

Referenced by AbstractAspect::removeChild(), and AbstractAspect::reparentChild().

Here is the caller graph for this function:

◆ project() [1/2]

virtual Project* AbstractAspect::project ( )
inlinevirtualinherited

Return the Project this Aspect belongs to, or 0 if it is currently not part of one.

Reimplemented in Project.

Definition at line 152 of file AbstractAspect.h.

152 { return parentAspect() ? parentAspect()->project() : 0; }

References AbstractAspect::parentAspect(), and AbstractAspect::project().

Here is the call graph for this function:

◆ project() [2/2]

virtual const Project* AbstractAspect::project ( ) const
inlinevirtualinherited

Return the Project this Aspect belongs to, or 0 if it is currently not part of one.

Reimplemented in Project.

Definition at line 150 of file AbstractAspect.h.

150 { return parentAspect() ? parentAspect()->project() : 0; }

References AbstractAspect::parentAspect(), and AbstractAspect::project().

Referenced by future::Folder::createContextMenu(), and AbstractAspect::project().

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

◆ readBasicAttributes()

bool AbstractAspect::readBasicAttributes ( XmlStreamReader reader)
protectedinherited

Load name, creation time and caption spec from XML.

Returns
false on error

Definition at line 77 of file AbstractAspect.cpp.

78 {
79  QString prefix(tr("XML read error: ","prefix for XML error messages"));
80  QString postfix(tr(" (non-critical)", "postfix for XML error messages"));
81 
82  QXmlStreamAttributes attribs = reader->attributes();
83  QString str;
84 
85  // read name
86  str = attribs.value(reader->namespaceUri().toString(), "name").toString();
87  if(str.isEmpty())
88  {
89  reader->raiseWarning(prefix+tr("aspect name missing or empty")+postfix);
90  }
91  setName(str);
92  // read creation time
93  str = attribs.value(reader->namespaceUri().toString(), "creation_time").toString();
94  QDateTime creation_time = QDateTime::fromString(str, "yyyy-dd-MM hh:mm:ss:zzz");
95  if(str.isEmpty() || !creation_time.isValid())
96  {
97  reader->raiseWarning(tr("Invalid creation time for '%1'. Using current time.").arg(name()));
98  setCreationTime(QDateTime::currentDateTime());
99  }
100  else
101  setCreationTime(creation_time);
102  // read caption spec
103  str = attribs.value(reader->namespaceUri().toString(), "caption_spec").toString();
105 
106  return true;
107 }

References AbstractAspect::name(), XmlStreamReader::raiseWarning(), AbstractAspect::setCaptionSpec(), AbstractAspect::setCreationTime(), AbstractAspect::setName(), and str.

Referenced by future::Folder::load(), load(), future::Table::load(), AbstractSimpleFilter::load(), and Column::load().

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

◆ readCellElement()

bool Matrix::readCellElement ( XmlStreamReader reader)
private

Read XML cell element.

Definition at line 1357 of file future_Matrix.cpp.

1358 {
1359  Q_ASSERT(reader->isStartElement() && reader->name() == "cell");
1360 
1361  QString str;
1362  int row, col;
1363  bool ok;
1364 
1365  QXmlStreamAttributes attribs = reader->attributes();
1366  row = reader->readAttributeInt("row", &ok);
1367  if(!ok)
1368  {
1369  reader->raiseError(tr("invalid or missing row index"));
1370  return false;
1371  }
1372  col = reader->readAttributeInt("column", &ok);
1373  if(!ok)
1374  {
1375  reader->raiseError(tr("invalid or missing column index"));
1376  return false;
1377  }
1378 
1379  str = reader->readElementText();
1380  double value = str.toDouble(&ok);
1381  if(!ok)
1382  {
1383  reader->raiseError(tr("invalid cell value"));
1384  return false;
1385  }
1386  setCell(row, col, value);
1387 
1388  return true;
1389 }

References XmlStreamReader::raiseError(), XmlStreamReader::readAttributeInt(), setCell(), and str.

Referenced by load().

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

◆ readColumnWidthElement()

bool Matrix::readColumnWidthElement ( XmlStreamReader reader)
private

Definition at line 1333 of file future_Matrix.cpp.

1334 {
1335  Q_ASSERT(reader->isStartElement() && reader->name() == "column_width");
1336  bool ok;
1337  int col = reader->readAttributeInt("column", &ok);
1338  if(!ok)
1339  {
1340  reader->raiseError(tr("invalid or missing column index"));
1341  return false;
1342  }
1343  QString str = reader->readElementText();
1344  int value = str.toInt(&ok);
1345  if(!ok)
1346  {
1347  reader->raiseError(tr("invalid column width"));
1348  return false;
1349  }
1350  if (d_view)
1351  d_view->setColumnWidth(col, value);
1352  else
1353  setColumnWidth(col, value);
1354  return true;
1355 }

References d_view, XmlStreamReader::raiseError(), XmlStreamReader::readAttributeInt(), setColumnWidth(), and str.

Referenced by load().

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

◆ readCommentElement()

bool AbstractAspect::readCommentElement ( XmlStreamReader reader)
protectedinherited

Load comment from an XML element.

Definition at line 61 of file AbstractAspect.cpp.

62 {
63  Q_ASSERT(reader->isStartElement() && reader->name() == "comment");
64  QString temp = reader->readElementText();
65  temp.replace("\\n", "\n");
66  setComment(temp);
67  return true;
68 }

References AbstractAspect::setComment().

Referenced by future::Folder::load(), load(), future::Table::load(), AbstractSimpleFilter::load(), and Column::load().

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

◆ readCoordinatesElement()

bool Matrix::readCoordinatesElement ( XmlStreamReader reader)
private

Read XML coodinates element.

Definition at line 1259 of file future_Matrix.cpp.

1260 {
1261  Q_ASSERT(reader->isStartElement() && reader->name() == "coordinates");
1262 
1263  bool ok;
1264  int val;
1265 
1266  val = reader->readAttributeInt("x_start", &ok);
1267  if(!ok)
1268  {
1269  reader->raiseError(tr("invalid x start value"));
1270  return false;
1271  }
1272  setXStart(val);
1273 
1274  val = reader->readAttributeInt("x_end", &ok);
1275  if(!ok)
1276  {
1277  reader->raiseError(tr("invalid x end value"));
1278  return false;
1279  }
1280  setXEnd(val);
1281 
1282  val = reader->readAttributeInt("y_start", &ok);
1283  if(!ok)
1284  {
1285  reader->raiseError(tr("invalid y start value"));
1286  return false;
1287  }
1288  setYStart(val);
1289 
1290  val = reader->readAttributeInt("y_end", &ok);
1291  if(!ok)
1292  {
1293  reader->raiseError(tr("invalid y end value"));
1294  return false;
1295  }
1296  setYEnd(val);
1297  if (!reader->skipToEndElement()) return false;
1298 
1299  return true;
1300 }

References XmlStreamReader::raiseError(), XmlStreamReader::readAttributeInt(), setXEnd(), setXStart(), setYEnd(), setYStart(), and XmlStreamReader::skipToEndElement().

Referenced by load().

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

◆ readDisplayElement()

bool Matrix::readDisplayElement ( XmlStreamReader reader)
private

Read XML display element.

Definition at line 1233 of file future_Matrix.cpp.

1234 {
1235  Q_ASSERT(reader->isStartElement() && reader->name() == "display");
1236  QXmlStreamAttributes attribs = reader->attributes();
1237 
1238  QString str = attribs.value(reader->namespaceUri().toString(), "numeric_format").toString();
1239  if(str.isEmpty() || str.length() != 1)
1240  {
1241  reader->raiseError(tr("invalid or missing numeric format"));
1242  return false;
1243  }
1244  setNumericFormat(str.at(0).toLatin1());
1245 
1246  bool ok;
1247  int digits = reader->readAttributeInt("displayed_digits", &ok);
1248  if(!ok)
1249  {
1250  reader->raiseError(tr("invalid or missing number of displayed digits"));
1251  return false;
1252  }
1253  setDisplayedDigits(digits);
1254  if (!reader->skipToEndElement()) return false;
1255 
1256  return true;
1257 }

References XmlStreamReader::raiseError(), XmlStreamReader::readAttributeInt(), setDisplayedDigits(), setNumericFormat(), XmlStreamReader::skipToEndElement(), and str.

Referenced by load().

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

◆ readFormulaElement()

bool Matrix::readFormulaElement ( XmlStreamReader reader)
private

Read XML formula element.

Definition at line 1302 of file future_Matrix.cpp.

1303 {
1304  Q_ASSERT(reader->isStartElement() && reader->name() == "formula");
1305  setFormula(reader->readElementText());
1306  return true;
1307 }

References setFormula().

Referenced by load().

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

◆ readRowHeightElement()

bool Matrix::readRowHeightElement ( XmlStreamReader reader)
private

Definition at line 1309 of file future_Matrix.cpp.

1310 {
1311  Q_ASSERT(reader->isStartElement() && reader->name() == "row_height");
1312  bool ok;
1313  int row = reader->readAttributeInt("row", &ok);
1314  if(!ok)
1315  {
1316  reader->raiseError(tr("invalid or missing row index"));
1317  return false;
1318  }
1319  QString str = reader->readElementText();
1320  int value = str.toInt(&ok);
1321  if(!ok)
1322  {
1323  reader->raiseError(tr("invalid row height"));
1324  return false;
1325  }
1326  if (d_view)
1327  d_view->setRowHeight(row, value);
1328  else
1329  setRowHeight(row, value);
1330  return true;
1331 }

References d_view, XmlStreamReader::raiseError(), XmlStreamReader::readAttributeInt(), setRowHeight(), and str.

Referenced by load().

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

◆ remove

virtual void AbstractAspect::remove ( )
inlinevirtualslotinherited

Remove me from my parent's list of children.

Definition at line 250 of file AbstractAspect.h.

References AbstractAspect::indexOfChild(), AbstractAspect::parentAspect(), and AbstractAspect::removeChild().

Referenced by Matrix::closeEvent(), PartMdiView::closeEvent(), AbstractAspect::createContextMenu(), Table::importASCII(), Column::Private::removeRows(), and future::Matrix::Private::removeRows().

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

◆ removeAllChildAspects()

void AbstractAspect::removeAllChildAspects ( )
virtualinherited

Remove all child aspects.

Definition at line 352 of file AbstractAspect.cpp.

353 {
354  beginMacro(tr("%1: remove all children.").arg(name()));
355  for (int i=childCount()-1; i >= 0; i--)
356  removeChild(i);
357  endMacro();
358 }

References AbstractAspect::beginMacro(), AbstractAspect::childCount(), AbstractAspect::endMacro(), AbstractAspect::name(), and AbstractAspect::removeChild().

Referenced by future::Folder::load().

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

◆ removeChild() [1/2]

void AbstractAspect::removeChild ( AbstractAspect child,
bool  detach = false 
)
inherited

Remove the given Aspect from my list of children.

Usually, the ownership of the child is transfered to the undo command, i.e., the aspect is deleted by the undo command. But by setting detach to true, you can remove a child from the Aspect tree without deleting it. Of course, that means whovere detaches an Aspect in responsible for deleting it (or re-attaching it somewhere in the tree).

See also
reparentChild()

Definition at line 142 of file AbstractAspect.cpp.

143 {
144  Q_ASSERT(indexOfChild(child) != -1);
145  beginMacro(tr("%1: remove %2.").arg(name()).arg(child->name()));
148  endMacro();
149 }

References AbstractAspect::beginMacro(), AbstractAspect::child(), AbstractAspect::d_aspect_private, AbstractAspect::endMacro(), AbstractAspect::exec(), AbstractAspect::indexOfChild(), AbstractAspect::name(), and AbstractAspect::prepareAspectRemoval().

Referenced by AbstractAspect::remove(), AbstractAspect::removeAllChildAspects(), AbstractAspect::removeChild(), future::Table::removeColumns(), ApplicationWindow::removeDependentTableStatistics(), and Column::setColumnMode().

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

◆ removeChild() [2/2]

void AbstractAspect::removeChild ( int  index)
inherited

Remove the Aspect at the given index from my list of children.

The ownership of the child is transfered to the undo command, i.e., the aspect is deleted by the undo command.

See also
reparentChild()

Definition at line 174 of file AbstractAspect.cpp.

175 {
176  Q_ASSERT(index >= 0 && index <= childCount());
178 }

References AbstractAspect::Private::child(), AbstractAspect::childCount(), AbstractAspect::d_aspect_private, AbstractAspect::index(), and AbstractAspect::removeChild().

Here is the call graph for this function:

◆ removeColumns()

void Matrix::removeColumns ( int  first,
int  count 
)

Definition at line 130 of file future_Matrix.cpp.

131 {
132  if( count < 1 || first < 0 || first+count > columnCount()) return;
133  WAIT_CURSOR;
134  beginMacro(QObject::tr("%1: remove %2 column(s)").arg(name()).arg(count));
135  exec(new MatrixRemoveColumnsCmd(d_matrix_private, first, count));
136  endMacro();
137  RESET_CURSOR;
138 }

References AbstractAspect::beginMacro(), columnCount(), d_matrix_private, AbstractAspect::endMacro(), AbstractAspect::exec(), AbstractAspect::name(), RESET_CURSOR, and WAIT_CURSOR.

Referenced by removeSelectedColumns().

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

◆ removeRows()

void Matrix::removeRows ( int  first,
int  count 
)

Definition at line 140 of file future_Matrix.cpp.

141 {
142  if( count < 1 || first < 0 || first+count > rowCount()) return;
143  WAIT_CURSOR;
144  beginMacro(QObject::tr("%1: remove %2 row(s)").arg(name()).arg(count));
145  exec(new MatrixRemoveRowsCmd(d_matrix_private, first, count));
146  endMacro();
147  RESET_CURSOR;
148 }

References AbstractAspect::beginMacro(), d_matrix_private, AbstractAspect::endMacro(), AbstractAspect::exec(), AbstractAspect::name(), RESET_CURSOR, rowCount(), and WAIT_CURSOR.

Referenced by removeSelectedRows().

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

◆ removeSelectedColumns

void Matrix::removeSelectedColumns ( )
slot

Definition at line 349 of file future_Matrix.cpp.

350 {
351  if (!d_view) return;
352  int first = d_view->firstSelectedColumn();
353  int last = d_view->lastSelectedColumn();
354  if( first < 0 ) return;
355 
356  WAIT_CURSOR;
357  beginMacro(QObject::tr("%1: remove selected column(s)").arg(name()));
358  for(int i=last; i>=first; i--)
359  if(d_view->isColumnSelected(i, false)) removeColumns(i, 1);
360  endMacro();
361  RESET_CURSOR;
362 }

References AbstractAspect::beginMacro(), d_view, AbstractAspect::endMacro(), AbstractAspect::name(), removeColumns(), RESET_CURSOR, and WAIT_CURSOR.

Referenced by connectActions(), and Matrix::deleteSelectedColumns().

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

◆ removeSelectedRows

void Matrix::removeSelectedRows ( )
slot

Definition at line 402 of file future_Matrix.cpp.

403 {
404  if (!d_view) return;
405  int first = d_view->firstSelectedRow();
406  int last = d_view->lastSelectedRow();
407  if( first < 0 ) return;
408 
409  WAIT_CURSOR;
410  beginMacro(QObject::tr("%1: remove selected rows(s)").arg(name()));
411  for(int i=last; i>=first; i--)
412  if(d_view->isRowSelected(i, false)) removeRows(i, 1);
413  endMacro();
414  RESET_CURSOR;
415 }

References AbstractAspect::beginMacro(), d_view, AbstractAspect::endMacro(), AbstractAspect::name(), removeRows(), RESET_CURSOR, and WAIT_CURSOR.

Referenced by connectActions(), and Matrix::deleteSelectedRows().

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

◆ reparentChild() [1/2]

void AbstractAspect::reparentChild ( AbstractAspect new_parent,
AbstractAspect child 
)
inherited

Move a child to another aspect and transfer ownership.

Definition at line 151 of file AbstractAspect.cpp.

152 {
153  Q_ASSERT(new_parent != NULL);
154  reparentChild(new_parent, child, new_parent->childCount());
155 }

References AbstractAspect::child(), AbstractAspect::childCount(), and AbstractAspect::reparentChild().

Here is the call graph for this function:

◆ reparentChild() [2/2]

void AbstractAspect::reparentChild ( AbstractAspect new_parent,
AbstractAspect child,
int  d_new_index 
)
inherited

Move a child to another aspect and transfer ownership.

Definition at line 157 of file AbstractAspect.cpp.

158 {
159  Q_ASSERT(indexOfChild(child) != -1);
160  Q_ASSERT(new_index > 0 && new_index <= new_parent->childCount());
161  Q_ASSERT(new_parent != NULL);
162  QString new_name = new_parent->d_aspect_private->uniqueNameFor(child->name());
163  beginMacro(tr("%1: move %2 to %3.").arg(name()).arg(child->name()).arg(new_parent->name()));
164  if (new_name != child->name()) {
165  info(tr("Renaming \"%1\" to \"%2\" in order to avoid name collision.").arg(child->name()).arg(new_name));
166  child->setName(new_name);
167  }
169  exec(new AspectChildReparentCmd(d_aspect_private, new_parent->d_aspect_private, child, new_index));
170  new_parent->completeAspectInsertion(child, new_index);
171  endMacro();
172 }

References AbstractAspect::beginMacro(), AbstractAspect::child(), AbstractAspect::childCount(), AbstractAspect::completeAspectInsertion(), AbstractAspect::d_aspect_private, AbstractAspect::endMacro(), AbstractAspect::exec(), AbstractAspect::indexOfChild(), AbstractAspect::info(), AbstractAspect::name(), AbstractAspect::prepareAspectRemoval(), AbstractAspect::setName(), and AbstractAspect::Private::uniqueNameFor().

Referenced by AbstractAspect::reparentChild().

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

◆ rowCells()

QVector< qreal > Matrix::rowCells ( int  row,
int  first_column,
int  last_column 
)

Return the values in the given cells as double vector.

Definition at line 1431 of file future_Matrix.cpp.

1432 {
1433  return d_matrix_private->rowCells(row, first_column, last_column);
1434 }

References d_matrix_private, and future::Matrix::Private::rowCells().

Here is the call graph for this function:

◆ rowCount()

int Matrix::rowCount ( ) const

Return the total number of rows.

Definition at line 184 of file future_Matrix.cpp.

185 {
186  return d_matrix_private->rowCount();
187 }

References d_matrix_private, and future::Matrix::Private::rowCount().

Referenced by addRows(), appendRows(), cell(), copy(), dimensionsDialog(), duplicate(), goToCell(), MatrixModel::headerData(), insertRows(), Matrix::numRows(), pasteIntoSelection(), removeRows(), MatrixModel::rowCount(), save(), Matrix::saveText(), setCell(), future::Matrix::Private::setCells(), setDimensions(), and Matrix::setNumCols().

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

◆ rowHeight()

int Matrix::rowHeight ( int  row) const

Definition at line 1401 of file future_Matrix.cpp.

1402 {
1403  return d_matrix_private->rowHeight(row);
1404 }

References d_matrix_private, and future::Matrix::Private::rowHeight().

Referenced by copy(), and save().

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

◆ rowsAboutToBeInserted

void future::Matrix::rowsAboutToBeInserted ( int  before,
int  count 
)
signal

◆ rowsAboutToBeRemoved

void future::Matrix::rowsAboutToBeRemoved ( int  first,
int  count 
)
signal

◆ rowsInserted

void future::Matrix::rowsInserted ( int  first,
int  count 
)
signal

◆ rowsRemoved

void future::Matrix::rowsRemoved ( int  first,
int  count 
)
signal

◆ save()

void Matrix::save ( QXmlStreamWriter *  writer) const
virtual

Save as XML.

Reimplemented from AbstractAspect.

Definition at line 1117 of file future_Matrix.cpp.

1118 {
1119  int cols = columnCount();
1120  int rows = rowCount();
1121  writer->writeStartElement("matrix");
1122  writeBasicAttributes(writer);
1123  writer->writeAttribute("columns", QString::number(cols));
1124  writer->writeAttribute("rows", QString::number(rows));
1125  writeCommentElement(writer);
1126  writer->writeStartElement("formula");
1127  writer->writeCharacters(formula());
1128  writer->writeEndElement();
1129  writer->writeStartElement("display");
1130  writer->writeAttribute("numeric_format", QString(QChar(numericFormat())));
1131  writer->writeAttribute("displayed_digits", QString::number(displayedDigits()));
1132  writer->writeEndElement();
1133  writer->writeStartElement("coordinates");
1134  writer->writeAttribute("x_start", QString::number(xStart()));
1135  writer->writeAttribute("x_end", QString::number(xEnd()));
1136  writer->writeAttribute("y_start", QString::number(yStart()));
1137  writer->writeAttribute("y_end", QString::number(yEnd()));
1138  writer->writeEndElement();
1139 
1140  for (int col=0; col<cols; col++)
1141  for (int row=0; row<rows; row++)
1142  {
1143  writer->writeStartElement("cell");
1144  writer->writeAttribute("row", QString::number(row));
1145  writer->writeAttribute("column", QString::number(col));
1146  writer->writeCharacters(QString::number(cell(row, col), 'e', 16));
1147  writer->writeEndElement();
1148  }
1149  for (int col=0; col<cols; col++)
1150  {
1151  writer->writeStartElement("column_width");
1152  writer->writeAttribute("column", QString::number(col));
1153  writer->writeCharacters(QString::number(columnWidth(col)));
1154  writer->writeEndElement();
1155  }
1156  for (int row=0; row<rows; row++)
1157  {
1158  writer->writeStartElement("row_height");
1159  writer->writeAttribute("row", QString::number(row));
1160  writer->writeCharacters(QString::number(rowHeight(row)));
1161  writer->writeEndElement();
1162  }
1163  writer->writeEndElement(); // "matrix"
1164 }

References cell(), columnCount(), columnWidth(), displayedDigits(), formula(), numericFormat(), rowCount(), rowHeight(), AbstractAspect::writeBasicAttributes(), AbstractAspect::writeCommentElement(), xEnd(), xStart(), yEnd(), and yStart().

Referenced by Matrix::saveToString().

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

◆ scriptingChangeEvent()

void scripted::scriptingChangeEvent ( ScriptingChangeEvent sce)
inherited

Definition at line 119 of file Script.cpp.

120 {
121  scriptEnv->decref();
122  sce->scriptingEnv()->incref();
123  scriptEnv = sce->scriptingEnv();
124 }

References ScriptingEnv::decref(), ScriptingEnv::incref(), scripted::scriptEnv, and ScriptingChangeEvent::scriptingEnv().

Referenced by ScriptEdit::customEvent(), ApplicationWindow::customEvent(), Matrix::customEvent(), and Table::customEvent().

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

◆ selectAll

void Matrix::selectAll ( )
slot

Definition at line 910 of file future_Matrix.cpp.

911 {
912  if (!d_view) return;
913  d_view->selectAll();
914 }

References d_view.

Referenced by connectActions().

Here is the caller graph for this function:

◆ setCaptionSpec

void AbstractAspect::setCaptionSpec ( const QString &  value)
slotinherited

Set the specification string used for constructing the caption().

The caption is constructed by substituting some magic tokens in the specification:

Additionally, you can use the construct C{<text>}. <text> is only shown in the caption if comment() is not empty (name and creation time should never be empty).

The default caption specification is "%n%C{ - }%c".

Definition at line 276 of file AbstractAspect.cpp.

277 {
278  if (value == d_aspect_private->captionSpec()) return;
280 }

References AbstractAspect::Private::captionSpec(), AbstractAspect::d_aspect_private, and AbstractAspect::exec().

Referenced by future::Table::copy(), AbstractAspect::readBasicAttributes(), and Matrix::setCaptionPolicy().

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

◆ setCell()

void Matrix::setCell ( int  row,
int  col,
double  value 
)

Set the value of the cell.

Definition at line 916 of file future_Matrix.cpp.

917 {
918  if(row < 0 || row >= rowCount()) return;
919  if(col < 0 || col >= columnCount()) return;
920  exec(new MatrixSetCellValueCmd(d_matrix_private, row, col, value));
921 }

References columnCount(), d_matrix_private, AbstractAspect::exec(), and rowCount().

Referenced by pasteIntoSelection(), readCellElement(), Matrix::setCell(), and Matrix::setText().

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

◆ setCells()

void Matrix::setCells ( const QVector< qreal > &  data)

Set the value of all cells.

Definition at line 923 of file future_Matrix.cpp.

924 {
926 }

References d_matrix_private, and future::Matrix::Private::setCells().

Referenced by Matrix::setCells().

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

◆ setColumnCells()

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.

Definition at line 1424 of file future_Matrix.cpp.

1425 {
1426  WAIT_CURSOR;
1427  exec(new MatrixSetColumnCellsCmd(d_matrix_private, col, first_row, last_row, values));
1428  RESET_CURSOR;
1429 }

References d_matrix_private, AbstractAspect::exec(), RESET_CURSOR, and WAIT_CURSOR.

Referenced by copy(), and fromImage().

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

◆ setColumnWidth()

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

Definition at line 1396 of file future_Matrix.cpp.

1397 {
1398  d_matrix_private->setColumnWidth(col, width);
1399 }

References d_matrix_private, and future::Matrix::Private::setColumnWidth().

Referenced by copy(), and readColumnWidthElement().

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

◆ setComment

void AbstractAspect::setComment ( const QString &  value)
slotinherited

Definition at line 265 of file AbstractAspect.cpp.

266 {
267  if (value == d_aspect_private->comment()) return;
269 }

References AbstractAspect::Private::comment(), AbstractAspect::d_aspect_private, and AbstractAspect::exec().

Referenced by future::Table::copy(), ImportOPJ::importSpreadsheet(), future::Folder::load(), load(), future::Table::load(), Column::load(), AbstractAspect::readCommentElement(), Table::setColComment(), Table::setColComments(), and Matrix::setWindowLabel().

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

◆ setCoordinates()

void Matrix::setCoordinates ( double  x1,
double  x2,
double  y1,
double  y2 
)

Definition at line 1052 of file future_Matrix.cpp.

1053 {
1054  WAIT_CURSOR;
1055  exec(new MatrixSetCoordinatesCmd(d_matrix_private, x1, x2, y1, y2));
1056  RESET_CURSOR;
1057 }

References d_matrix_private, AbstractAspect::exec(), RESET_CURSOR, and WAIT_CURSOR.

Referenced by copy(), Matrix::init(), load(), and Matrix::setCoordinates().

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

◆ setCreationTime()

void AbstractAspect::setCreationTime ( const QDateTime &  time)
protectedinherited

Set the creation time.

The creation time will automatically be set when the aspect object is created. This function is usually only needed when the aspect is loaded from a file.

Definition at line 282 of file AbstractAspect.cpp.

283 {
284  if (time == d_aspect_private->creationTime()) return;
286 }

References AbstractAspect::Private::creationTime(), AbstractAspect::d_aspect_private, and AbstractAspect::exec().

Referenced by AbstractAspect::importV0x0001XXCreationTime(), and AbstractAspect::readBasicAttributes().

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

◆ setDefaultColumnWidth()

static void future::Matrix::setDefaultColumnWidth ( int  width)
inlinestatic

Definition at line 208 of file future_Matrix.h.

208 { default_column_width = width; }

References default_column_width.

◆ setDefaultRowHeight()

static void future::Matrix::setDefaultRowHeight ( int  height)
inlinestatic

Definition at line 209 of file future_Matrix.h.

209 { default_row_height = height; }

References default_row_height.

◆ setDimensions()

void Matrix::setDimensions ( int  rows,
int  cols 
)

Set the number of rows and columns.

Definition at line 160 of file future_Matrix.cpp.

161 {
162  if( (rows < 0) || (cols < 0 ) || (rows == rowCount() && cols == columnCount()) ) return;
163  WAIT_CURSOR;
164  beginMacro(QObject::tr("%1: set matrix size to %2x%3").arg(name()).arg(rows).arg(cols));
165  int col_diff = cols - columnCount();
166  int row_diff = rows - rowCount();
167  if(col_diff > 0)
169  else if(col_diff < 0)
170  exec(new MatrixRemoveColumnsCmd(d_matrix_private, columnCount()+col_diff, -col_diff));
171  if(row_diff > 0)
173  else if(row_diff < 0)
174  exec(new MatrixRemoveRowsCmd(d_matrix_private, rowCount()+row_diff, -row_diff));
175  endMacro();
176  RESET_CURSOR;
177 }

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().

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

◆ setDisplayedDigits()

void Matrix::setDisplayedDigits ( int  digits)

Definition at line 1067 of file future_Matrix.cpp.

1068 {
1069  if (digits == displayedDigits()) return;
1070  WAIT_CURSOR;
1072  RESET_CURSOR;
1073 }

References d_matrix_private, displayedDigits(), AbstractAspect::exec(), RESET_CURSOR, and WAIT_CURSOR.

Referenced by copy(), Matrix::init(), load(), readDisplayElement(), Matrix::setNumericFormat(), Matrix::setNumericPrecision(), and Matrix::setTextFormat().

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

◆ setFormula()

void Matrix::setFormula ( const QString &  formula)

Definition at line 1100 of file future_Matrix.cpp.

1101 {
1102  WAIT_CURSOR;
1104  RESET_CURSOR;
1105 }

References d_matrix_private, AbstractAspect::exec(), formula(), RESET_CURSOR, and WAIT_CURSOR.

Referenced by copy(), load(), readFormulaElement(), and Matrix::setFormula().

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

◆ setGlobal()

void AbstractAspect::setGlobal ( const QString &  key,
const QVariant &  value 
)
staticinherited

Update a global setting.

Definition at line 370 of file AbstractAspect.cpp.

371 {
372  Private::g_settings->setValue(QString(staticMetaObject.className()) + "/" + key, value);
373 }

References AbstractAspect::Private::g_settings.

Referenced by ProjectConfigPage::apply(), and importImageDialog().

Here is the caller graph for this function:

◆ setGlobalDefault()

void AbstractAspect::setGlobalDefault ( const QString &  key,
const QVariant &  value 
)
staticinherited

Set default value for a global setting.

Definition at line 375 of file AbstractAspect.cpp.

376 {
377  Private::g_defaults[QString(staticMetaObject.className()) + "/" + key] = value;
378 }

References AbstractAspect::Private::g_defaults.

◆ setName

void AbstractAspect::setName ( const QString &  value)
slotinherited

Definition at line 234 of file AbstractAspect.cpp.

235 {
236  if (value.isEmpty()) {
237  setObjectName("1");
238  return;
239  }
240  if (value == d_aspect_private->name()) return;
241  // Until we get around to completely sanitizing the project file format, we have to remove
242  // characters that can easily break file save/restore.
243  // FIXME: once the project file format is fully XML-based (i.e. able to escape special characters),
244  // this can be removed
245  QString sanitized_value = value;
246  sanitized_value.remove(QChar('\n'));
247  sanitized_value.remove(QChar('\r'));
248  sanitized_value.remove(QChar('\t'));
249  if (sanitized_value != value)
250  info(tr("Tabs and line breaks in object names are currently not supported. They have been removed."));
251  if (d_aspect_private->parent()) {
252  QString new_name = d_aspect_private->parent()->uniqueNameFor(sanitized_value);
253  if (new_name != sanitized_value)
254  info(tr("Intended name \"%1\" diverted to \"%2\" in order to avoid name collision.").arg(sanitized_value).arg(new_name));
255  exec(new AspectNameChangeCmd(d_aspect_private, new_name));
256  } else
257  exec(new AspectNameChangeCmd(d_aspect_private, sanitized_value));
258 }

References AbstractAspect::d_aspect_private, AbstractAspect::exec(), AbstractAspect::info(), AbstractAspect::Private::name(), AbstractAspect::Private::parent(), and AbstractAspect::uniqueNameFor().

Referenced by AbstractAspect::addChild(), Table::importASCII(), ApplicationWindow::importASCII(), ImportOPJ::importSpreadsheet(), Table::importV0x0001XXHeader(), AbstractAspect::insertChild(), Column::Private::Private(), AbstractAspect::readBasicAttributes(), AbstractAspect::reparentChild(), Column::Private::replaceModeData(), Table::setColName(), Column::Private::setColumnMode(), Table::setHeader(), and Matrix::setName().

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

◆ setNumericFormat()

void Matrix::setNumericFormat ( char  format)

Definition at line 1059 of file future_Matrix.cpp.

1060 {
1061  if (format == numericFormat()) return;
1062  WAIT_CURSOR;
1064  RESET_CURSOR;
1065 }

References d_matrix_private, AbstractAspect::exec(), numericFormat(), RESET_CURSOR, and WAIT_CURSOR.

Referenced by copy(), Matrix::init(), load(), readDisplayElement(), Matrix::setNumericFormat(), and Matrix::setTextFormat().

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

◆ setPlotMenu()

void Matrix::setPlotMenu ( QMenu *  menu)

Set a plot menu.

The matrix takes ownership of the menu.

Definition at line 891 of file future_Matrix.cpp.

892 {
893  d_plot_menu = menu;
894 }

References d_plot_menu.

◆ setRowCells()

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.

Definition at line 1436 of file future_Matrix.cpp.

1437 {
1438  WAIT_CURSOR;
1439  exec(new MatrixSetRowCellsCmd(d_matrix_private, row, first_column, last_column, values));
1440  RESET_CURSOR;
1441 }

References d_matrix_private, AbstractAspect::exec(), RESET_CURSOR, and WAIT_CURSOR.

Here is the call graph for this function:

◆ setRowHeight()

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

Definition at line 1391 of file future_Matrix.cpp.

1392 {
1393  d_matrix_private->setRowHeight(row, height);
1394 }

References d_matrix_private, and future::Matrix::Private::setRowHeight().

Referenced by copy(), and readRowHeightElement().

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

◆ setXEnd()

void Matrix::setXEnd ( double  x)

Definition at line 1031 of file future_Matrix.cpp.

1032 {
1033  WAIT_CURSOR;
1035  RESET_CURSOR;
1036 }

References d_matrix_private, AbstractAspect::exec(), RESET_CURSOR, WAIT_CURSOR, xStart(), yEnd(), and yStart().

Referenced by readCoordinatesElement().

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

◆ setXStart()

void Matrix::setXStart ( double  x)

Definition at line 1024 of file future_Matrix.cpp.

1025 {
1026  WAIT_CURSOR;
1028  RESET_CURSOR;
1029 }

References d_matrix_private, AbstractAspect::exec(), RESET_CURSOR, WAIT_CURSOR, xEnd(), yEnd(), and yStart().

Referenced by readCoordinatesElement().

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

◆ setYEnd()

void Matrix::setYEnd ( double  y)

Definition at line 1045 of file future_Matrix.cpp.

1046 {
1047  WAIT_CURSOR;
1049  RESET_CURSOR;
1050 }

References d_matrix_private, AbstractAspect::exec(), RESET_CURSOR, WAIT_CURSOR, xEnd(), xStart(), and yStart().

Referenced by readCoordinatesElement().

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

◆ setYStart()

void Matrix::setYStart ( double  y)

Definition at line 1038 of file future_Matrix.cpp.

1039 {
1040  WAIT_CURSOR;
1042  RESET_CURSOR;
1043 }

References d_matrix_private, AbstractAspect::exec(), RESET_CURSOR, WAIT_CURSOR, xEnd(), xStart(), and yEnd().

Referenced by readCoordinatesElement().

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

◆ showMatrixViewColumnContextMenu

void Matrix::showMatrixViewColumnContextMenu ( const QPoint &  pos)
slot

Show a context menu for the selected columns.

Parameters
posglobal position of the event

Definition at line 832 of file future_Matrix.cpp.

833 {
834  QMenu context_menu;
835 
836  createColumnMenu(&context_menu);
837 
838  context_menu.exec(pos);
839 }

References createColumnMenu().

Here is the call graph for this function:

◆ showMatrixViewContextMenu

void Matrix::showMatrixViewContextMenu ( const QPoint &  pos)
slot

Show a context menu for the selected cells.

Parameters
posglobal position of the event

Definition at line 819 of file future_Matrix.cpp.

820 {
821  if (!d_view) return;
822  QMenu context_menu;
823 
824  createSelectionMenu(&context_menu);
825  context_menu.addSeparator();
826  createMatrixMenu(&context_menu);
827  context_menu.addSeparator();
828 
829  context_menu.exec(pos);
830 }

References createMatrixMenu(), createSelectionMenu(), and d_view.

Here is the call graph for this function:

◆ showMatrixViewRowContextMenu

void Matrix::showMatrixViewRowContextMenu ( const QPoint &  pos)
slot

Show a context menu for the selected rows.

Parameters
posglobal position of the event

Definition at line 841 of file future_Matrix.cpp.

842 {
843  QMenu context_menu;
844 
845  createRowMenu(&context_menu);
846 
847  context_menu.exec(pos);
848 }

References createRowMenu().

Here is the call graph for this function:

◆ statusInfo

void AbstractAspect::statusInfo ( const QString &  text)
signalinherited

Emit this to give status information to the user.

Referenced by AbstractAspect::info(), and AbstractAspect::Private::insertChild().

Here is the caller graph for this function:

◆ text()

QString Matrix::text ( int  row,
int  col 
)

Return the text displayed in the given cell.

Definition at line 905 of file future_Matrix.cpp.

906 {
907  return QLocale().toString(cell(row,col), d_matrix_private->numericFormat(), d_matrix_private->displayedDigits());
908 }

References cell(), d_matrix_private, future::Matrix::Private::displayedDigits(), and future::Matrix::Private::numericFormat().

Referenced by MatrixModel::data(), and Matrix::text().

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

◆ translateActionsStrings()

void Matrix::translateActionsStrings ( )
private

Definition at line 751 of file future_Matrix.cpp.

752 {
753  action_cut_selection->setText(tr("Cu&t"));
754  action_copy_selection->setText(tr("&Copy"));
755  action_paste_into_selection->setText(tr("Past&e"));
756  action_clear_selection->setText(tr("Clea&r","clear selection"));
757  action_set_formula->setText(tr("Assign &Formula"));
758  action_recalculate->setText(tr("Recalculate"));
759  action_select_all->setText(tr("Select All"));
760  action_clear_matrix->setText(tr("Clear Matrix"));
761  action_go_to_cell->setText(tr("&Go to Cell"));
762  action_transpose->setText(tr("&Transpose"));
763  action_mirror_horizontally->setText(tr("Mirror &Horizontally"));
764  action_mirror_vertically->setText(tr("Mirror &Vertically"));
765  action_import_image->setText(tr("&Import Image", "import image as matrix"));
766 #ifndef LEGACY_CODE_0_2_x
767  action_duplicate->setText(tr("&Duplicate", "duplicate matrix"));
768 #endif
769  action_dimensions_dialog->setText(tr("&Dimensions", "matrix size"));
770  action_edit_coordinates->setText(tr("Set &Coordinates"));
771  action_edit_format->setText(tr("Set Display &Format"));
772  action_insert_columns->setText(tr("&Insert Empty Columns"));
773  action_remove_columns->setText(tr("Remo&ve Columns"));
774  action_clear_columns->setText(tr("Clea&r Columns"));
775  action_add_columns->setText(tr("&Add Columns"));
776  action_insert_rows->setText(tr("&Insert Empty Rows"));
777  action_remove_rows->setText(tr("Remo&ve Rows"));
778  action_clear_rows->setText(tr("Clea&r Rows"));
779  action_add_rows->setText(tr("&Add Rows"));
780 }

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, and action_transpose.

Referenced by fillProjectMenu().

Here is the caller graph for this function:

◆ transpose

void Matrix::transpose ( )
slot

Definition at line 1443 of file future_Matrix.cpp.

1444 {
1445  WAIT_CURSOR;
1447  RESET_CURSOR;
1448 }

References d_matrix_private, AbstractAspect::exec(), RESET_CURSOR, and WAIT_CURSOR.

Referenced by connectActions(), and Matrix::transpose().

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

◆ undoStack()

virtual QUndoStack* AbstractAspect::undoStack ( ) const
inlinevirtualinherited

Return the undo stack of the Project, or 0 if this Aspect is not part of a Project.

It's also possible to construct undo-enabled Aspect trees without Project. The only requirement is that the root Aspect reimplements undoStack() to get the undo stack from somewhere (the default implementation just delegates to parentAspect()).

Reimplemented in Project.

Definition at line 182 of file AbstractAspect.h.

182 { return parentAspect() ? parentAspect()->undoStack() : 0; }

References AbstractAspect::parentAspect(), and AbstractAspect::undoStack().

Referenced by AbstractAspect::beginMacro(), AbstractAspect::endMacro(), AbstractAspect::exec(), and AbstractAspect::undoStack().

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

◆ uniqueNameFor

QString AbstractAspect::uniqueNameFor ( const QString &  current_name) const
slotinherited

Make the specified name unique among my children by incrementing a trailing number.

Definition at line 337 of file AbstractAspect.cpp.

338 {
339  return d_aspect_private->uniqueNameFor(current_name);
340 }

References AbstractAspect::d_aspect_private, and AbstractAspect::Private::uniqueNameFor().

Referenced by AbstractAspect::setName().

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

◆ view()

QWidget * Matrix::view ( )
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.

Definition at line 104 of file future_Matrix.cpp.

105 {
106 #ifndef LEGACY_CODE_0_2_x
107  if (!d_view)
108  {
109  d_view = new MatrixView(this);
111  connect(d_view, SIGNAL(controlTabBarStatusChanged(bool)), this, SLOT(adjustTabBarAction(bool)));
112  adjustTabBarAction(true);
113  }
114 #else
115  Q_ASSERT(d_view != NULL);
116 #endif
117  return d_view;
118 }

References addActionsToView(), adjustTabBarAction(), and d_view.

Referenced by MatrixModel::setData(), and Matrix::view().

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

◆ writeBasicAttributes()

void AbstractAspect::writeBasicAttributes ( QXmlStreamWriter *  writer) const
protectedinherited

Save name, creation time and caption spec to XML.

Definition at line 70 of file AbstractAspect.cpp.

71 {
72  writer->writeAttribute("creation_time" , creationTime().toString("yyyy-dd-MM hh:mm:ss:zzz"));
73  writer->writeAttribute("caption_spec", captionSpec());
74  writer->writeAttribute("name", name());
75 }

References AbstractAspect::captionSpec(), AbstractAspect::creationTime(), AbstractAspect::name(), and toString().

Referenced by future::Folder::save(), save(), future::Table::save(), AbstractSimpleFilter::save(), and Column::save().

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

◆ writeCommentElement()

void AbstractAspect::writeCommentElement ( QXmlStreamWriter *  writer) const
protectedinherited

Save the comment to XML.

Definition at line 52 of file AbstractAspect.cpp.

53 {
54  writer->writeStartElement("comment");
55  QString temp = comment();
56  temp.replace("\n", "\\n");
57  writer->writeCDATA(temp);
58  writer->writeEndElement();
59 }

References AbstractAspect::comment().

Referenced by future::Folder::save(), save(), future::Table::save(), AbstractSimpleFilter::save(), and Column::save().

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

◆ xEnd()

double Matrix::xEnd ( ) const

Definition at line 1085 of file future_Matrix.cpp.

1086 {
1087  return d_matrix_private->xEnd();
1088 }

References d_matrix_private, and future::Matrix::Private::xEnd().

Referenced by copy(), MatrixModel::headerData(), save(), setXStart(), setYEnd(), setYStart(), and Matrix::xEnd().

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

◆ xStart()

double Matrix::xStart ( ) const

Definition at line 1075 of file future_Matrix.cpp.

1076 {
1077  return d_matrix_private->xStart();
1078 }

References d_matrix_private, and future::Matrix::Private::xStart().

Referenced by copy(), MatrixModel::headerData(), save(), setXEnd(), setYEnd(), setYStart(), and Matrix::xStart().

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

◆ yEnd()

double Matrix::yEnd ( ) const

Definition at line 1090 of file future_Matrix.cpp.

1091 {
1092  return d_matrix_private->yEnd();
1093 }

References d_matrix_private, and future::Matrix::Private::yEnd().

Referenced by copy(), MatrixModel::headerData(), save(), setXEnd(), setXStart(), setYStart(), and Matrix::yEnd().

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

◆ yStart()

double Matrix::yStart ( ) const

Definition at line 1080 of file future_Matrix.cpp.

1081 {
1082  return d_matrix_private->yStart();
1083 }

References d_matrix_private, and future::Matrix::Private::yStart().

Referenced by copy(), MatrixModel::headerData(), save(), setXEnd(), setXStart(), setYEnd(), and Matrix::yStart().

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

Friends And Related Function Documentation

◆ Private

friend class Private
friend

Definition at line 65 of file future_Matrix.h.

Referenced by Matrix().

Member Data Documentation

◆ action_add_columns

QAction* future::Matrix::action_add_columns
private

◆ action_add_rows

QAction* future::Matrix::action_add_rows
private

◆ action_clear_columns

QAction* future::Matrix::action_clear_columns
private

◆ action_clear_matrix

QAction* future::Matrix::action_clear_matrix
private

◆ action_clear_rows

QAction* future::Matrix::action_clear_rows
private

◆ action_clear_selection

QAction* future::Matrix::action_clear_selection
private

◆ action_copy_selection

QAction* future::Matrix::action_copy_selection
private

◆ action_cut_selection

QAction* future::Matrix::action_cut_selection
private

◆ action_dimensions_dialog

QAction* future::Matrix::action_dimensions_dialog
private

◆ action_duplicate

QAction* future::Matrix::action_duplicate
private

◆ action_edit_coordinates

QAction* future::Matrix::action_edit_coordinates
private

◆ action_edit_format

QAction* future::Matrix::action_edit_format
private

◆ action_go_to_cell

QAction* future::Matrix::action_go_to_cell
private

◆ action_import_image

QAction* future::Matrix::action_import_image
private

◆ action_insert_columns

QAction* future::Matrix::action_insert_columns
private

◆ action_insert_rows

QAction* future::Matrix::action_insert_rows
private

◆ action_manager

ActionManager * Matrix::action_manager = 0
staticprivate

Definition at line 212 of file future_Matrix.h.

Referenced by actionManager(), and initActionManager().

◆ action_mirror_horizontally

QAction* future::Matrix::action_mirror_horizontally
private

◆ action_mirror_vertically

QAction* future::Matrix::action_mirror_vertically
private

◆ action_paste_into_selection

QAction* future::Matrix::action_paste_into_selection
private

◆ action_recalculate

QAction* future::Matrix::action_recalculate
private

◆ action_remove_columns

QAction* future::Matrix::action_remove_columns
private

◆ action_remove_rows

QAction* future::Matrix::action_remove_rows
private

◆ action_select_all

QAction* future::Matrix::action_select_all
private

◆ action_set_formula

QAction* future::Matrix::action_set_formula
private

◆ action_toggle_tabbar

QAction* future::Matrix::action_toggle_tabbar
private

◆ action_transpose

QAction* future::Matrix::action_transpose
private

◆ d_aspect_private

◆ d_matrix_private

◆ d_mdi_window

PartMdiView* AbstractPart::d_mdi_window
privateinherited

The MDI sub-window that is wrapped around my primary view.

Definition at line 87 of file AbstractPart.h.

Referenced by AbstractPart::createContextMenu(), and AbstractPart::mdiSubWindow().

◆ d_plot_menu

QMenu* future::Matrix::d_plot_menu
private

Definition at line 309 of file future_Matrix.h.

Referenced by setPlotMenu().

◆ d_view

◆ default_column_width

int Matrix::default_column_width = 120
staticprivate

Definition at line 216 of file future_Matrix.h.

Referenced by defaultColumnWidth(), and setDefaultColumnWidth().

◆ default_row_height

int Matrix::default_row_height = 20
staticprivate

Definition at line 217 of file future_Matrix.h.

Referenced by defaultRowHeight(), and setDefaultRowHeight().

◆ scriptEnv


The documentation for this class was generated from the following files:
Matrix
Matrix worksheet class.
Definition: Matrix.h:52
AspectNameChangeCmd
Definition: aspectcommands.h:36
future::Matrix::yEnd
double yEnd() const
Definition: future_Matrix.cpp:1090
future::Matrix::action_clear_columns
QAction * action_clear_columns
Definition: future_Matrix.h:339
future::Matrix::columnCount
int columnCount() const
Return the total number of columns.
Definition: future_Matrix.cpp:179
Matrix::yStart
double yStart()
Return the Y value corresponding to row 1.
Definition: Matrix.h:267
future::Matrix::action_transpose
QAction * action_transpose
Definition: future_Matrix.h:331
future::Matrix::addColumns
void addColumns()
Append as many columns as are selected.
Definition: future_Matrix.cpp:1013
MatrixInsertRowsCmd
Insert rows.
Definition: matrixcommands.h:67
future::Matrix::editCoordinates
void editCoordinates()
Definition: future_Matrix.cpp:990
future::Matrix::goToCell
void goToCell()
Definition: future_Matrix.cpp:850
AbstractAspect::Private::comment
QString comment() const
Definition: AspectPrivate.cpp:134
AbstractAspect::writeCommentElement
void writeCommentElement(QXmlStreamWriter *writer) const
Save the comment to XML.
Definition: AbstractAspect.cpp:52
MatrixView
View class for Matrix.
Definition: MatrixView.h:83
future::Matrix::Private::setColumnWidth
void setColumnWidth(int col, int width)
Definition: future_Matrix.h:437
future::Matrix::clearSelectedRows
void clearSelectedRows()
Definition: future_Matrix.cpp:417
future::Matrix::transpose
void transpose()
Definition: future_Matrix.cpp:1443
future::Matrix::xStart
double xStart() const
Definition: future_Matrix.cpp:1075
Matrix::formula
QString formula()
Return the matrix formula.
Definition: Matrix.cpp:250
ScriptingChangeEvent::scriptingEnv
ScriptingEnv * scriptingEnv() const
Definition: Script.h:136
AbstractPart::d_mdi_window
PartMdiView * d_mdi_window
The MDI sub-window that is wrapped around my primary view.
Definition: AbstractPart.h:83
Matrix::xEnd
double xEnd()
Return the X value corresponding to the last column.
Definition: Matrix.h:265
future::Matrix::duplicate
void duplicate()
Duplicate the matrix inside its folder.
Definition: future_Matrix.cpp:974
AbstractAspect::reparentChild
void reparentChild(AbstractAspect *new_parent, AbstractAspect *child, int d_new_index)
Move a child to another aspect and transfer ownership.
Definition: AbstractAspect.cpp:157
scripted::scriptEnv
ScriptingEnv * scriptEnv
Definition: Script.h:155
future::Matrix::action_insert_columns
QAction * action_insert_columns
Definition: future_Matrix.h:337
ScriptingEnv::incref
void incref()
Increase the reference count. This should only be called by scripted and Script to avoid memory leaks...
Definition: ScriptingEnv.cpp:60
AbstractAspect::Private::captionSpec
QString captionSpec() const
Definition: AspectPrivate.cpp:146
AbstractPart::AbstractPart
AbstractPart(const QString &name)
Constructor.
Definition: AbstractPart.h:49
future::Matrix::Private::rowHeight
int rowHeight(int row) const
Definition: future_Matrix.h:438
MatrixView::columnWidth
int columnWidth(int col) const
Definition: MatrixView.cpp:537
future::Matrix::Private::columnCount
int columnCount() const
Return the number of columns in the table.
Definition: future_Matrix.h:402
AbstractAspect::Private::caption
QString caption() const
Definition: AspectPrivate.cpp:171
future::Matrix::Private::xStart
double xStart() const
Definition: future_Matrix.cpp:1701
future::Matrix::readFormulaElement
bool readFormulaElement(XmlStreamReader *reader)
Read XML formula element.
Definition: future_Matrix.cpp:1302
AbstractAspect::exec
void exec(QUndoCommand *command)
Execute the given command, pushing it on the undoStack() if available.
Definition: AbstractAspect.cpp:203
XmlStreamReader::raiseError
void raiseError(const QString &message=QString())
Definition: XmlStreamReader.cpp:80
future::Matrix::appendColumns
void appendColumns(int count)
Definition: future_Matrix.h:131
AbstractAspect::global
static QVariant global(const QString &key)
Retrieve a global setting.
Definition: AbstractAspect.cpp:360
future::Matrix::default_column_width
static int default_column_width
Definition: future_Matrix.h:216
data
Definition: exp_saturation.c:37
XmlStreamReader::readAttributeInt
int readAttributeInt(const QString &name, bool *ok)
Read an XML attribute and convert it to int.
Definition: XmlStreamReader.cpp:110
str
#define str(x)
Definition: PythonScripting.cpp:41
MatrixInsertColumnsCmd
Insert columns.
Definition: matrixcommands.h:41
future::Matrix::action_toggle_tabbar
QAction * action_toggle_tabbar
Definition: future_Matrix.h:320
AbstractAspect::setComment
void setComment(const QString &value)
Definition: AbstractAspect.cpp:265
future::Matrix::setNumericFormat
void setNumericFormat(char format)
Definition: future_Matrix.cpp:1059
future::Matrix::action_recalculate
QAction * action_recalculate
Definition: future_Matrix.h:328
Matrix::xStart
double xStart()
Return the X value corresponding to column 1.
Definition: Matrix.h:263
ScriptingEnv::decref
void decref()
Decrease the reference count. This should only be called by scripted and Script to avoid segfaults.
Definition: ScriptingEnv.cpp:65
MatrixSetRowCellsCmd
Set cell values for (a part of) a row at once.
Definition: matrixcommands.h:354
AbstractAspect::Private::uniqueNameFor
QString uniqueNameFor(const QString &current_name) const
Definition: AspectPrivate.cpp:201
future::Matrix::setColumnCells
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.
Definition: future_Matrix.cpp:1424
future::Matrix::displayedDigits
int displayedDigits() const
Definition: future_Matrix.cpp:1112
future::Matrix::readCoordinatesElement
bool readCoordinatesElement(XmlStreamReader *reader)
Read XML coodinates element.
Definition: future_Matrix.cpp:1259
AbstractAspect::Private::childCount
int childCount() const
Definition: AspectPrivate.cpp:111
future::Matrix::Private::rowCount
int rowCount() const
Return the number of rows in the table.
Definition: future_Matrix.h:404
future::Matrix::action_cut_selection
QAction * action_cut_selection
Definition: future_Matrix.h:313
AbstractAspect::index
int index() const
Return my position in my parent's list of children.
Definition: AbstractAspect.h:137
AbstractAspect::creationTime
QDateTime creationTime() const
Definition: AbstractAspect.cpp:288
AspectChildAddCmd
Definition: aspectcommands.h:154
future::Matrix::removeRows
void removeRows(int first, int count)
Definition: future_Matrix.cpp:140
future::Matrix::createRowMenu
QMenu * createRowMenu(QMenu *append_to=0)
Create a menu with row related operations.
Definition: future_Matrix.cpp:519
future::Matrix::copy
virtual void copy()
Copy current selection.
Definition: AbstractPart.h:79
AbstractPart::view
virtual QWidget * view()=0
Construct a primary view on me.
future::Matrix::action_duplicate
QAction * action_duplicate
Definition: future_Matrix.h:330
future::Matrix::Private::yEnd
double yEnd() const
Definition: future_Matrix.cpp:1716
future::Matrix::action_insert_rows
QAction * action_insert_rows
Definition: future_Matrix.h:344
future::Matrix::pasteIntoSelection
void pasteIntoSelection()
Definition: future_Matrix.cpp:253
future::Matrix::action_edit_format
QAction * action_edit_format
Definition: future_Matrix.h:325
future::Matrix::action_edit_coordinates
QAction * action_edit_coordinates
Definition: future_Matrix.h:326
future::Matrix::action_clear_selection
QAction * action_clear_selection
Definition: future_Matrix.h:316
toString
S toString(const QString &x)
Deal with conversion between QString and std::string/std::wstring in a generic way.
AspectChildMoveCmd
Definition: aspectcommands.h:168
AbstractAspect::d_aspect_private
Private * d_aspect_private
Definition: AbstractAspect.h:310
future::Matrix::Private::setRowHeight
void setRowHeight(int row, int height)
Definition: future_Matrix.h:436
future::Matrix::action_manager
static ActionManager * action_manager
Definition: future_Matrix.h:212
future::Matrix::action_clear_rows
QAction * action_clear_rows
Definition: future_Matrix.h:346
AbstractAspect::descendantsThatInherit
QList< AbstractAspect * > descendantsThatInherit(const char *class_name)
Get all descendents that inherit the given class.
Definition: AbstractAspect.cpp:342
future::Folder
Folder in a project.
Definition: future_Folder.h:38
future::Matrix::Matrix
Matrix()
Private ctor for initActionManager() only.
Definition: future_Matrix.cpp:80
AbstractAspect::uniqueNameFor
QString uniqueNameFor(const QString &current_name) const
Make the specified name unique among my children by incrementing a trailing number.
Definition: AbstractAspect.cpp:337
future::Matrix::selectAll
void selectAll()
Definition: future_Matrix.cpp:910
future::Matrix::d_plot_menu
QMenu * d_plot_menu
Definition: future_Matrix.h:309
Matrix::name
virtual QString name()
Return the window name.
Definition: Matrix.h:59
AbstractAspect::Private::indexOfChild
int indexOfChild(const AbstractAspect *child) const
Definition: AspectPrivate.cpp:91
WAIT_CURSOR
#define WAIT_CURSOR
Definition: future_Matrix.cpp:55
future::Matrix::default_row_height
static int default_row_height
Definition: future_Matrix.h:217
future::Matrix::setXEnd
void setXEnd(double x)
Definition: future_Matrix.cpp:1031
future::Matrix::setYStart
void setYStart(double y)
Definition: future_Matrix.cpp:1038
XmlStreamReader::skipToEndElement
bool skipToEndElement()
Go to the end element tag of the current element.
Definition: XmlStreamReader.cpp:121
future::Matrix::adjustTabBarAction
void adjustTabBarAction(bool visible)
Definition: future_Matrix.cpp:1411
AbstractAspect::indexOfChild
int indexOfChild(const AbstractAspect *child) const
Return the position of child in my list of children.
Definition: AbstractAspect.cpp:191
future::Matrix::xEnd
double xEnd() const
Definition: future_Matrix.cpp:1085
future::Matrix::setColumnWidth
void setColumnWidth(int col, int width)
This method should only be called by the view.
Definition: future_Matrix.cpp:1396
MatrixSetFormulaCmd
Set matrix formula.
Definition: matrixcommands.h:301
future::Matrix::action_clear_matrix
QAction * action_clear_matrix
Definition: future_Matrix.h:322
future::Matrix::action_remove_rows
QAction * action_remove_rows
Definition: future_Matrix.h:345
future::Matrix::action_copy_selection
QAction * action_copy_selection
Definition: future_Matrix.h:314
AbstractAspect::endMacro
void endMacro()
End the undo stack macro.
Definition: AbstractAspect.cpp:222
MatrixClearCmd
Clear matrix.
Definition: matrixcommands.h:149
future::Matrix::createSelectionMenu
QMenu * createSelectionMenu(QMenu *append_to=0)
Create a menu with selection related operations.
Definition: future_Matrix.cpp:468
future::Matrix::action_add_rows
QAction * action_add_rows
Definition: future_Matrix.h:347
AbstractAspect::captionSpec
QString captionSpec() const
Return the specification string used for constructing the caption().
Definition: AbstractAspect.cpp:271
AbstractAspect::Private::g_defaults
static QHash< QString, QVariant > g_defaults
Definition: AspectPrivate.h:70
AbstractAspect::beginMacro
void beginMacro(const QString &text)
Begin an undo stack macro (series of commands)
Definition: AbstractAspect.cpp:215
AbstractAspect::statusInfo
void statusInfo(const QString &text)
Emit this to give status information to the user.
AspectCaptionSpecChangeCmd
Definition: aspectcommands.h:78
future::Matrix::setRowHeight
void setRowHeight(int row, int height)
This method should only be called by the view.
Definition: future_Matrix.cpp:1391
AspectCommentChangeCmd
Definition: aspectcommands.h:57
PartMdiView
MDI sub window that implements functions common to all aspect views.
Definition: PartMdiView.h:50
future::Matrix::insertColumns
void insertColumns(int before, int count)
Definition: future_Matrix.cpp:120
AbstractAspect::childCount
int childCount() const
Return the number of child Aspects.
Definition: AbstractAspect.cpp:186
future::Matrix::setCoordinates
void setCoordinates(double x1, double x2, double y1, double y2)
Definition: future_Matrix.cpp:1052
future::Matrix::editFormat
void editFormat()
Definition: future_Matrix.cpp:984
future::Matrix::Private::blockChangeSignals
void blockChangeSignals(bool block)
Enable/disable the emission of dataChanged signals.
Definition: future_Matrix.h:453
future::Matrix::rowCount
int rowCount() const
Return the total number of rows.
Definition: future_Matrix.cpp:184
future::Matrix::readRowHeightElement
bool readRowHeightElement(XmlStreamReader *reader)
Definition: future_Matrix.cpp:1309
future::Matrix::Private::cell
double cell(int row, int col) const
Return the value in the given cell.
Definition: future_Matrix.cpp:1609
future::Matrix::action_mirror_horizontally
QAction * action_mirror_horizontally
Definition: future_Matrix.h:333
future::Matrix::action_paste_into_selection
QAction * action_paste_into_selection
Definition: future_Matrix.h:315
future::Matrix::fromImage
static Matrix * fromImage(const QImage &image)
Definition: future_Matrix.cpp:1498
AbstractAspect::completeAspectInsertion
virtual void completeAspectInsertion(AbstractAspect *aspect, int index)
Called after a new child has been inserted or added.
Definition: AbstractAspect.h:294
MatrixMirrorHorizontallyCmd
Mirror the matrix horizontally.
Definition: matrixcommands.h:408
future::Matrix::d_matrix_private
Private * d_matrix_private
Definition: future_Matrix.h:351
future::Matrix::action_import_image
QAction * action_import_image
Definition: future_Matrix.h:329
future::Matrix::columnWidth
int columnWidth(int col) const
Definition: future_Matrix.cpp:1406
AbstractAspect::name
QString name() const
Definition: AbstractAspect.cpp:229
future::Matrix::d_view
QPointer< MatrixView > d_view
Definition: future_Matrix.h:350
AbstractAspect::path
virtual QString path() const
Return the path that leads from the top-most Aspect (usually a Project) to me.
Definition: AbstractAspect.h:154
AbstractAspect::readBasicAttributes
bool readBasicAttributes(XmlStreamReader *reader)
Load name, creation time and caption spec from XML.
Definition: AbstractAspect.cpp:77
future::Matrix::Private::xEnd
double xEnd() const
Definition: future_Matrix.cpp:1711
AbstractAspect::child
AbstractAspect * child(int index) const
Get a child by its position in my list of children.
Definition: AbstractAspect.cpp:180
future::Matrix::insertEmptyRows
void insertEmptyRows()
Insert rows depending on the selection.
Definition: future_Matrix.cpp:376
future::Matrix::setFormula
void setFormula(const QString &formula)
Definition: future_Matrix.cpp:1100
future::Matrix::yStart
double yStart() const
Definition: future_Matrix.cpp:1080
MatrixView::rowHeight
int rowHeight(int row) const
Definition: MatrixView.cpp:531
future::Matrix::addRows
void addRows()
Append as many rows as are selected.
Definition: future_Matrix.cpp:1002
future::Matrix::Private::rowCells
QVector< qreal > rowCells(int row, int first_column, int last_column)
Return the values in the given cells as double vector.
Definition: future_Matrix.cpp:1671
future::Matrix::Private::numericFormat
char numericFormat() const
Definition: future_Matrix.h:420
future::Matrix::appendRows
void appendRows(int count)
Definition: future_Matrix.h:134
future::Matrix::dataChanged
void dataChanged(int top, int left, int bottom, int right)
future::Matrix::Private::formula
QString formula() const
Definition: future_Matrix.cpp:1745
MatrixSetFormatCmd
Set numeric format.
Definition: matrixcommands.h:259
MatrixTransposeCmd
Transpose the matrix.
Definition: matrixcommands.h:386
future::Matrix::clear
void clear()
Clear the whole matrix (i.e. set all cells to 0.0)
Definition: future_Matrix.cpp:189
AbstractAspect::Private::name
QString name() const
Definition: AspectPrivate.cpp:122
AbstractAspect::undoStack
virtual QUndoStack * undoStack() const
Return the undo stack of the Project, or 0 if this Aspect is not part of a Project.
Definition: AbstractAspect.h:182
AspectChildReparentCmd
Definition: aspectcommands.h:195
future::Matrix::formula
QString formula() const
Definition: future_Matrix.cpp:1095
AbstractAspect::parentAspect
AbstractAspect * parentAspect() const
Return my parent Aspect or 0 if I currently don't have one.
Definition: AbstractAspect.cpp:109
AbstractAspect::writeBasicAttributes
void writeBasicAttributes(QXmlStreamWriter *writer) const
Save name, creation time and caption spec to XML.
Definition: AbstractAspect.cpp:70
AbstractAspect::folder
future::Folder * folder()
Return the folder the Aspect is contained in or 0 if not.
Definition: AbstractAspect.cpp:316
AbstractAspect::removeChild
void removeChild(AbstractAspect *child, bool detach=false)
Remove the given Aspect from my list of children.
Definition: AbstractAspect.cpp:142
Matrix::copy
void copy(Matrix *m)
Definition: Matrix.cpp:718
MatrixSetCoordinatesCmd
Set matrix coordinates.
Definition: matrixcommands.h:229
future::Matrix::mirrorHorizontally
void mirrorHorizontally()
Definition: future_Matrix.cpp:1450
AbstractAspect::Private::creationTime
QDateTime creationTime() const
Definition: AspectPrivate.cpp:196
AbstractAspect::project
virtual const Project * project() const
Return the Project this Aspect belongs to, or 0 if it is currently not part of one.
Definition: AbstractAspect.h:150
future::Matrix::insertEmptyColumns
void insertEmptyColumns()
Insert columns depending on the selection.
Definition: future_Matrix.cpp:324
AbstractAspect::setCaptionSpec
void setCaptionSpec(const QString &value)
Set the specification string used for constructing the caption().
Definition: AbstractAspect.cpp:276
future::Matrix::Private::setCells
void setCells(const QVector< qreal > &data)
Set the value of all cells.
Definition: future_Matrix.cpp:1625
RESET_CURSOR
#define RESET_CURSOR
Definition: future_Matrix.cpp:56
AbstractAspect::Private::parent
AbstractAspect * parent()
Definition: AspectPrivate.h:65
scripted::scripted
scripted(ScriptingEnv *env)
Definition: Script.cpp:108
AbstractAspect::setName
void setName(const QString &value)
Definition: AbstractAspect.cpp:234
MatrixMirrorVerticallyCmd
Mirror the matrix vertically.
Definition: matrixcommands.h:430
MatrixSetDigitsCmd
Set displayed digits.
Definition: matrixcommands.h:280
AbstractAspect::comment
QString comment() const
Definition: AbstractAspect.cpp:260
future::Matrix::cutSelection
void cutSelection()
Definition: future_Matrix.cpp:205
future::Matrix::editFormula
void editFormula()
Definition: future_Matrix.cpp:996
future::Matrix::action_go_to_cell
QAction * action_go_to_cell
Definition: future_Matrix.h:323
AspectChildRemoveCmd
Definition: aspectcommands.h:122
future::Matrix::initActionManager
static void initActionManager()
Definition: future_Matrix.cpp:1488
future::Matrix::setDisplayedDigits
void setDisplayedDigits(int digits)
Definition: future_Matrix.cpp:1067
AbstractAspect::Private::child
AbstractAspect * child(int index)
Definition: AspectPrivate.cpp:116
AbstractAspect::addChild
void addChild(AbstractAspect *child)
Add the given Aspect to my list of children.
Definition: AbstractAspect.cpp:114
MatrixRemoveColumnsCmd
Remove columns.
Definition: matrixcommands.h:93
MatrixSetColumnCellsCmd
Set cell values for (a part of) a column at once.
Definition: matrixcommands.h:322
future::Matrix::action_mirror_vertically
QAction * action_mirror_vertically
Definition: future_Matrix.h:332
future::Matrix::setCell
void setCell(int row, int col, double value)
Set the value of the cell.
Definition: future_Matrix.cpp:916
MatrixSetCellValueCmd
Set cell value.
Definition: matrixcommands.h:199
ActionManager
Manages QActions and their shortcuts.
Definition: ActionManager.h:84
AbstractPart::createContextMenu
virtual QMenu * createContextMenu() const
Return AbstractAspect::createContextMenu() plus operations on the primary view.
Definition: AbstractPart.cpp:42
AbstractAspect::setGlobal
static void setGlobal(const QString &key, const QVariant &value)
Update a global setting.
Definition: AbstractAspect.cpp:370
future::Matrix::clearSelectedCells
void clearSelectedCells()
Definition: future_Matrix.cpp:436
MatrixRemoveRowsCmd
Remove rows.
Definition: matrixcommands.h:121
future::Matrix::importImageDialog
void importImageDialog()
Definition: future_Matrix.cpp:943
Matrix::yEnd
double yEnd()
Return the Y value corresponding to the last row.
Definition: Matrix.h:269
future::Matrix::Private::displayedDigits
int displayedDigits() const
Definition: future_Matrix.h:422
future::Matrix::numericFormat
char numericFormat() const
Definition: future_Matrix.cpp:1107
future::Matrix::action_set_formula
QAction * action_set_formula
Definition: future_Matrix.h:327
MatrixClearColumnCmd
Clear matrix column.
Definition: matrixcommands.h:173
AbstractAspect::setCreationTime
void setCreationTime(const QDateTime &time)
Set the creation time.
Definition: AbstractAspect.cpp:282
future::Matrix::readDisplayElement
bool readDisplayElement(XmlStreamReader *reader)
Read XML display element.
Definition: future_Matrix.cpp:1233
future::Matrix::dimensionsDialog
void dimensionsDialog()
Definition: future_Matrix.cpp:928
future::Matrix::readCellElement
bool readCellElement(XmlStreamReader *reader)
Read XML cell element.
Definition: future_Matrix.cpp:1357
future::Matrix::createColumnMenu
QMenu * createColumnMenu(QMenu *append_to=0)
Create a menu with column related operations.
Definition: future_Matrix.cpp:483
XmlStreamReader::raiseWarning
void raiseWarning(const QString &message=QString())
Definition: XmlStreamReader.cpp:86
future::Matrix::actionManager
static ActionManager * actionManager()
Definition: future_Matrix.cpp:1480
future::Matrix::copySelection
void copySelection()
Definition: future_Matrix.cpp:219
future::Matrix::clearSelectedColumns
void clearSelectedColumns()
Definition: future_Matrix.cpp:364
future::Matrix::addActionsToView
void addActionsToView()
Definition: future_Matrix.cpp:717
future::Matrix::action_remove_columns
QAction * action_remove_columns
Definition: future_Matrix.h:338
future::Matrix::Private::columnWidth
int columnWidth(int col) const
Definition: future_Matrix.h:439
future::Matrix::removeSelectedColumns
void removeSelectedColumns()
Definition: future_Matrix.cpp:349
future::Matrix::removeSelectedRows
void removeSelectedRows()
Definition: future_Matrix.cpp:402
future::Matrix::action_add_columns
QAction * action_add_columns
Definition: future_Matrix.h:340
future::Matrix::translateActionsStrings
void translateActionsStrings()
Definition: future_Matrix.cpp:751
future::Matrix::createMatrixMenu
QMenu * createMatrixMenu(QMenu *append_to=0)
Create a menu with table related operations.
Definition: future_Matrix.cpp:498
future::Matrix::action_select_all
QAction * action_select_all
Definition: future_Matrix.h:321
future::Matrix::setYEnd
void setYEnd(double y)
Definition: future_Matrix.cpp:1045
AbstractAspect::Private::g_settings
static QSettings * g_settings
Definition: AspectPrivate.h:69
future::Matrix::removeColumns
void removeColumns(int first, int count)
Definition: future_Matrix.cpp:130
future::Matrix::Private::columnCells
QVector< qreal > columnCells(int col, int first_row, int last_row)
Return the values in the given cells as double vector.
Definition: future_Matrix.cpp:1636
future::Matrix::rowHeight
int rowHeight(int row) const
Definition: future_Matrix.cpp:1401
future::Matrix::setDimensions
void setDimensions(int rows, int cols)
Set the number of rows and columns.
Definition: future_Matrix.cpp:160
future::Matrix::cell
double cell(int row, int col) const
Return the value in the given cell.
Definition: future_Matrix.cpp:198
future::Matrix::readColumnWidthElement
bool readColumnWidthElement(XmlStreamReader *reader)
Definition: future_Matrix.cpp:1333
AbstractAspect::readCommentElement
bool readCommentElement(XmlStreamReader *reader)
Load comment from an XML element.
Definition: AbstractAspect.cpp:61
AbstractAspect
Base class of all persistent objects in a Project.
Definition: AbstractAspect.h:86
AbstractAspect::prepareAspectRemoval
virtual void prepareAspectRemoval(AbstractAspect *aspect)
Called before a child is removed.
Definition: AbstractAspect.h:300
AspectCreationTimeChangeCmd
Definition: aspectcommands.h:100
future::Matrix::Private::yStart
double yStart() const
Definition: future_Matrix.cpp:1706
future::Matrix::action_dimensions_dialog
QAction * action_dimensions_dialog
Definition: future_Matrix.h:324
ActionManager::addAction
void addAction(QAction *action, const QString &internal_name)
Definition: ActionManager.cpp:44
future::Matrix::mirrorVertically
void mirrorVertically()
Definition: future_Matrix.cpp:1457
future::Matrix::setXStart
void setXStart(double x)
Definition: future_Matrix.cpp:1024
future::Matrix::insertRows
void insertRows(int before, int count)
Definition: future_Matrix.cpp:150
AbstractAspect::info
void info(const QString &text)
Implementations should call this whenever status information should be given to the user.
Definition: AbstractAspect.h:307
AbstractPart
Base class of Aspects with MDI windows as views.
Definition: AbstractPart.h:44