Matrix Class Reference

Matrix worksheet class. More...

`#include <Matrix.h>`

Inheritance diagram for Matrix:

## Public Types

enum | ColorMapType { Default, GrayScale, Rainbow, Custom }
enum | HeaderViewType { ColumnRow, XY }
enum | ImportMode { NewColumns, NewRows, Overwrite }
enum | Operation { Transpose, Invert, FlipHorizontally, FlipVertically, RotateClockwise, RotateCounterClockwise, FFT, Clear, Calculate, MuParserCalculate, SetImage, ImportAscii }
enum | ResamplingMethod { Bilinear, Bicubic }
enum | ViewType { TableView, ImageView }
Public Types inherited from MdiSubWindow
enum | CaptionPolicy { Name = 0, Label = 1, Both = 2 }
| Possible window captions. More...
enum | Status { Hidden = -1, Normal = 0, Minimized = 1, Maximized = 2 }

## Public Slots

static double ** | allocateMatrixData (int rows, int columns, bool init=false)
| Allocate memory for a matrix buffer. More...
QwtDoubleRect | boundingRect ()
| Returns the bounding rect of the matrix coordinates. More...
bool | canCalculate (bool useMuParser=true)
double | cell (int row, int col)
| Return the value of the cell as a double. More...
void | clearSelection ()
| Clear cells. More...
QwtDoubleInterval | colorRange ()
| Min and max values of the color map. More...
int | columnsWidth ()
| Return the width of all columns. More...
void | copy (Matrix *m)
void | copySelection ()
| Standard copy operation. More...
void | cutSelection ()
| Standard cut operation. More...
void | deleteSelectedColumns ()
| Delte the selected columns. More...
void | deleteSelectedRows ()
| Delete the selected rows. More...
double | dx ()
| Returns the step of the X axis. More...
double | dy ()
| Returns the step of the Y axis. More...
void | exportPDF (const QString &fileName)
QString | formula ()
| Return the matrix formula. More...
static void | freeMatrixData (double **data, int rows)
| Free memory used for a matrix buffer. More...
void | freeWorkspace ()
void | goToColumn (int col)
| Scroll to column (column starts with 1) More...
void | goToRow (int row)
| Scroll to row (row starts with 1) More...
double * | initWorkspace (int size)
| Tries to allocate memory for the workspace. Returns a NULL pointer if failure. More...
void | insertColumn ()
| Insert a column before the current cell. More...
void | insertRow ()
| Insert a row before the current cell. More...
bool | isEmpty ()
| Returns true if no data values were set for this matrix. More...
void | notifyModifiedData ()
int | numSelectedColumns ()
| Return the number of selected columns. More...
int | numSelectedRows ()
| Return the number of selected rows. More...
void | pasteSelection ()
| Standard paste operation. More...
int | precision ()
| Return the number precision digits. More...
void | print ()
| Print the Matrix. More...
void | print (QPrinter *)
void | print (const QString &fileName)
| Print the Matrix to fileName. More...
void | range (double *min, double *max)
| Min and max values of the matrix. More...
void | restore (const QStringList &l)
| Load the matrix from a string list (i.e. lines from a project file) More...
void | save (const QString &, const QString &, bool saveAsTemplate=false)
void | setCell (int row, int col, double value)
| Set the value of the cell. More...
void | setColumnsWidth (int width)
| Set the width of all columns. More...
void | setCoordinates (double xs, double xe, double ys, double ye)
| Set the X and Y coordinate intervals. More...
void | setDimensions (int rows, int cols)
| Set the Matrix size. More...
void | setFormula (const QString &s)
| Set the matrix forumla. More...
void | setNumericFormat (const QChar &f, int prec)
void | setNumericPrecision (int prec)
| Set the number of significant digits. More...
void | setText (int row, int col, const QString &new_text)
| Set the content of the cell as a string. More...
void | setTextFormat (const QChar &format, int precision)
| Set the number format for the cells. More...
QString | text (int row, int col)
| Return the content of the cell as a string. More...
QChar | textFormat ()
| Return the text format code ('e', 'f', ...) More...
int | verticalHeaderWidth ()
double | xEnd ()
| Returns the X value corresponding to the last column. More...
double | xStart ()
| Returns the X value corresponding to column 1. More...
double | yEnd ()
| Returns the Y value corresponding to the last row. More...
double | yStart ()
| Returns the Y value corresponding to row 1. More...
Public Slots inherited from MdiSubWindow
void | notifyChanges ()
| Notifies the main application that the window has been modified. More...
virtual void | print ()
virtual void | print (QPrinter *)

## Signals

void | modifiedData (Matrix *)
Signals inherited from MdiSubWindow
void | closedWindow (MdiSubWindow *)
| Emitted when the window was closed. More...
void | hiddenWindow (MdiSubWindow *)
| Emitted when the window was hidden. More...
void | modifiedWindow (MdiSubWindow *)
void | resizedWindow (MdiSubWindow *)
void | showContextMenu ()
| Show the context menu. More...
void | statusChanged (MdiSubWindow *)
| Emitted when the window status changed. More...

## Public Member Functions

bool | calculate (int startRow=0, int endRow=-1, int startCol=0, int endCol=-1, bool forceMuParser=false)
| Calculate matrix values using the formula_str. More...
LinearColorMap | colorMap ()
LinearColorMap * | colorMapPointer ()
ColorMapType | colorMapType ()
void | customEvent (QEvent *e)
| Custom event handler. More...
double | determinant ()
| Calculate the determinant of the matrix. More...
void | displayImage (const QImage &image)
bool | exportASCII (const QString &fname, const QString &separator, bool exportSelection)
void | exportEMF (const QString &fileName)
bool | exportExcel (const QString &fname, bool exportSelection)
bool | exportODF (const QString &fname, bool exportSelection)
bool | exportOdsSpreadsheet (const QString &fname, bool exportSelection)
void | exportRasterImage (const QString &fileName, int quality=100, int dpi=0, int compression=0)
void | exportSVG (const QString &fileName)
void | exportToFile (const QString &fileName)
void | exportVector (const QString &fileName, int res=0, bool color=true)
void | exportVector (QPrinter *printer, int res=0, bool color=true)
void | fft (bool inverse=false)
void | flipHorizontally ()
void | flipVertically ()
HeaderViewType | headerViewType ()
QImage | image ()
void | importASCII (const QString &fname, const QString &sep, int ignoredLines, bool stripSpaces, bool simplifySpaces, const QString &commentString, ImportMode importAs=Overwrite, const QLocale &l=QLocale(), int endLineChar=0, int maxRows=-1)
void | importImage (const QString &fn)
void | importImage (const QImage &image)
double | integrate ()
| Calculate the volume integral. More...
void | invert ()
| Invert the matrix. More...
| Matrix (ScriptingEnv *env, int r, int c, const QString &label, ApplicationWindow *parent, const QString &name=QString(), Qt::WFlags f=0)
| Constructor. More...
| Matrix (ScriptingEnv *env, const QImage &image, const QString &label, ApplicationWindow *parent, const QString &name=QString(), Qt::WFlags f=0)
MatrixModel * | matrixModel ()
void | moveCell (const QModelIndex &index)
bool | muParserCalculate (int startRow=0, int endRow=-1, int startCol=0, int endCol=-1)
| Calculate matrix values using the formula_str (optimization for muParser). More...
int | numCols ()
| Return the number of columns. More...
int | numRows ()
| Return the number of rows. More...
void | resample (int rows, int cols, const ResamplingMethod &method=Bilinear)
void | resetView ()
void | rotate90 (bool clockwise=true)
QItemSelectionModel * | selectionModel ()
void | setColorMap (const LinearColorMap &map)
void | setColorMapType (ColorMapType mapType)
void | setDefaultColorMap ()
| Resets the color map to the one defined by the user in the Preferences dialog (3D plots tab) More...
void | setGrayScale ()
void | setHeaderViewType (HeaderViewType type)
void | setNumCols (int cols)
void | setNumRows (int rows)
void | setRainbowColorMap ()
void | setViewType (ViewType, bool renderImage=true)
virtual QString | sizeToString ()
| Size of the widget as a string. More...
void | smooth ()
void | transpose ()
| Transpose the matrix. More...
QUndoStack * | undoStack ()
ViewType | viewType ()
| ~Matrix ()
Public Member Functions inherited from MdiSubWindow
ApplicationWindow * | applicationWindow ()
| Returns a pointer to the parent application. More...
void | askOnCloseEvent (bool ask)
| Toggle the "ask on close" flag. More...
QString | aspect ()
| Return the window status as a string. More...
QString | birthDate ()
| Return the creation date. More...
CaptionPolicy | captionPolicy ()
| Return the caption policy. More...
void | closeEvent (QCloseEvent *)
| Close event handler. More...
bool | eventFilter (QObject *object, QEvent *e)
| Filters other object's events (customizes title bar's context menu) More...
virtual void | exportPDF (const QString &)
Folder * | folder ()
| Returns the pointer to the parent folder of the window. More...
| MdiSubWindow (const QString &label=QString(), ApplicationWindow *app=0, const QString &name=QString(), Qt::WFlags f=0)
| Constructor. More...
QSize | minRestoreSize ()
| Returns the size the window had before a change state event to minimized. More...
QString | name ()
| Return the window name. More...
void | resizeEvent (QResizeEvent *)
virtual void | restore (const QStringList &)
| Not implemented yet. More...
void | restoreWindow ()
| Show window making sure that layers in MultiLayer windows are not resized. More...
virtual void | save (const QString &, const QString &, bool=false)
void | setBirthDate (const QString &s)
| Set the creation date. More...
void | setCaptionPolicy (CaptionPolicy policy)
| Set the caption policy. More...
void | setFolder (Folder *f)
| Initializes the pointer to the parent folder of the window. More...
virtual void | setHidden ()
| Notifies that a window was hidden by a direct user action. More...
void | setMaximized ()
void | setMinimized ()
void | setName (const QString &s)
| Set the window name. More...
void | setNormal ()
void | setStatus (Status s)
| Set the window status flag (hidden, normal, minimized or maximized) More...
void | setWindowLabel (const QString &s)
| Set the window label. More...
Status | status ()
| Return the window status flag (hidden, normal, minimized or maximized) More...
QString | windowLabel ()
| Return the window label. More...
Public Member Functions inherited from scripted
| scripted (ScriptingEnv *env)
void | scriptingChangeEvent (ScriptingChangeEvent *)
ScriptingEnv * | scriptingEnv ()
| ~scripted ()

## Private Member Functions

bool | eventFilter (QObject *, QEvent *)
bool | ignoreUndo ()
void | initGlobals ()
void | initImage (const QImage &image)
void | initImageView ()
void | initTable (int rows, int cols)
| Initialize the matrix. More...
void | initTableView ()

## Private Attributes

LinearColorMap | d_color_map
| The color map used to display images. More...
ColorMapType | d_color_map_type
| The color map type. More...
double | d_color_max
| Maximum value corresponding to the last color in the color map. More...
double | d_color_min
| Minimum value corresponding to the first color in the color map. More...
int | d_column_width
| Column width in pixels;. More...
HeaderViewType | d_header_view_type
| Keeps track of the header view type;. More...
MatrixModel * | d_matrix_model
QShortcut * | d_select_all_shortcut
QStackedWidget * | d_stack
QTableView * | d_table_view
| Pointer to the table view. More...
QUndoStack * | d_undo_stack
| Undo/Redo commands stack. More...
ViewType | d_view_type
| Keeps track of the view type;. More...
double * | d_workspace
| Pointer to a data buffer used for matrix operations. More...
QString | formula_str
| Last formula used to calculate cell values. More...
QLabel * | imageLabel
| Used to display the image view. More...
int | num_precision
| Number of significant digits. More...
QChar | txt_format
| Format code for displaying numbers. More...
double | x_end
| X value corresponding to the last column. More...
double | x_start
| X value corresponding to column 1. More...
double | y_end
| Y value corresponding to the last row. More...
double | y_start
| Y value corresponding to row 1. More...

## Additional Inherited Members

Static Public Member Functions inherited from MdiSubWindow
static QString | parseAsciiFile (const QString &fname, const QString &commentString, int endLine, int ignoreFirstLines, int maxRows, int &rows)
| Static function used as a workaround for ASCII files having end line char != ' '. More...
Protected Member Functions inherited from MdiSubWindow
virtual void | changeEvent (QEvent *event)
| Catches status changes. More...
Protected Attributes inherited from scripted
ScriptingEnv * | scriptEnv

## Detailed Description

Matrix worksheet class.

## Member Enumeration Documentation

enum Matrix::ColorMapType

Enumerator
Default |
GrayScale |
Rainbow |
Custom |

enum Matrix::HeaderViewType

Enumerator
ColumnRow |
XY |

enum Matrix::ImportMode

Enumerator
NewColumns | add file as new columns to the current matrix
NewRows | add file as new rows to the current matrix
Overwrite | replace content of current matrix with the imported file

enum Matrix::Operation

Enumerator
Transpose |
Invert |
FlipHorizontally |
FlipVertically |
RotateClockwise |
RotateCounterClockwise |
FFT |
Clear |
Calculate |
MuParserCalculate |
SetImage |
ImportAscii |

enum Matrix::ResamplingMethod

Enumerator
Bilinear |
Bicubic |

enum Matrix::ViewType

Enumerator
TableView |
ImageView |

## Constructor & Destructor Documentation

Matrix::Matrix | ( | ScriptingEnv * | env,
|  | int | r,
|  | int | c,
|  | const QString & | label,
|  | ApplicationWindow * | parent,
|  | const QString & | name = `QString()`,
|  | Qt::WFlags | f = `0`
| ) |  |

Constructor.

Parameters

  env | scripting interpreter
  r | initial number of rows
  c | initial number of columns
  label | window label
  parent | parent object
  name |
  name | window name
  f | window flags

References initTable().

Matrix::Matrix | ( | ScriptingEnv * | env,
|  | const QImage & | image,
|  | const QString & | label,
|  | ApplicationWindow * | parent,
|  | const QString & | name = `QString()`,
|  | Qt::WFlags | f = `0`
| ) |  |

References initImage().

Matrix::~Matrix | ( |  | ) |

References d_matrix_model, and d_undo_stack.

## Member Function Documentation

double ** Matrix::allocateMatrixData | ( | int | rows,
|  | int | columns,
|  | bool | init = `false`
| ) |  |

static slot

Allocate memory for a matrix buffer.

Referenced by Graph3D::addMatrixData(), Graph3D::addRibbon(), MatrixModel::fft(), fft2d(), fft2d_inv(), FFT::fftMatrix(), GriddingDialog::preview(), Graph3D::updateDataXY(), Graph3D::updateMatrixData(), Graph3D::updateScales(), and Graph3D::updateScalesFromMatrix().

QwtDoubleRect Matrix::boundingRect | ( |  | ) |

slot

Returns the bounding rect of the matrix coordinates.

References dx(), dy(), numCols(), numRows(), x_end, x_start, y_end, and y_start.

Referenced by Spectrogram::boundingRect().

bool Matrix::calculate | ( | int | startRow = `0`,
|  | int | endRow = `-1`,
|  | int | startCol = `0`,
|  | int | endCol = `-1`,
|  | bool | forceMuParser = `false`
| ) |  |

Calculate matrix values using the formula_str.

References Calculate, MatrixModel::calculate(), d_matrix_model, d_undo_stack, MatrixModel::dataCopy(), ignoreUndo(), modifiedData(), MdiSubWindow::modifiedWindow(), muParserCalculate(), and scripted::scriptEnv.

Referenced by MatrixValuesDialog::apply(), and restore().

bool Matrix::canCalculate | ( | bool | useMuParser = `true` | ) |

slot

References muParserScript::codeLines(), muParserScript::compile(), Script::compile(), muParserScript::defineVariable(), muParserScript::eval(), Script::eval(), muParserScript::evalSingleLine(), formula_str, ScriptingEnv::newScript(), print(), scripted::scriptEnv, and Script::setDouble().

Referenced by MatrixValuesDialog::apply(), MatrixData::MatrixData(), Spectrogram::setMatrix(), and Spectrogram::setUseMatrixFormula().

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

slot

Return the value of the cell as a double.

References MatrixModel::cell(), and d_matrix_model.

Referenced by Graph3D::addMatrixData(), muParserScript::cell(), determinant(), FFT::fftMatrix(), ApplicationWindow::matrixToTable(), pasteSelection(), range(), Graph3D::updateMatrixData(), Graph3D::updateScalesFromMatrix(), and MatrixData::value().

void Matrix::clearSelection | ( |  | ) |

slot

Clear cells.

References Clear, MatrixModel::clear(), d_matrix_model, d_table_view, d_undo_stack, d_view_type, MatrixModel::dataCopy(), ignoreUndo(), ImageView, modifiedData(), and MdiSubWindow::modifiedWindow().

Referenced by cutSelection().

LinearColorMap Matrix::colorMap | ( |  | ) |

inline

References d_color_map.

Referenced by ColorMapDialog::apply(), copy(), FFT::fftMatrix(), ApplicationWindow::plot3DMatrix(), ApplicationWindow::plotSpectrogram(), MatrixModel::renderImage(), ColorMapDialog::setMatrix(), ApplicationWindow::setMatrixDefaultScale(), ApplicationWindow::setMatrixGrayScale(), and ApplicationWindow::setMatrixRainbowScale().

LinearColorMap* Matrix::colorMapPointer | ( |  | ) |

inline

References d_color_map.

ColorMapType Matrix::colorMapType | ( |  | ) |

inline

References d_color_map_type.

Referenced by ColorMapDialog::apply(), copy(), ApplicationWindow::matrixMenuAboutToShow(), ApplicationWindow::setMatrixDefaultScale(), ApplicationWindow::setMatrixGrayScale(), ApplicationWindow::setMatrixRainbowScale(), and ApplicationWindow::showWindowContextMenu().

QwtDoubleInterval Matrix::colorRange | ( |  | ) |

slot

Min and max values of the color map.

References d_color_map, LinearColorMap::intensityRange(), and range().

Referenced by MatrixModel::renderImage(), and ColorMapDialog::setMatrix().

int Matrix::columnsWidth | ( |  | ) |

inline slot

Return the width of all columns.

References d_column_width.

Referenced by MatrixDialog::apply(), copy(), and MatrixDialog::setMatrix().

void Matrix::copy | ( | Matrix * | m | ) |

slot

References colorMap(), colorMapType(), columnsWidth(), d_color_map, d_color_map_type, d_header_view_type, d_matrix_model, d_select_all_shortcut, d_stack, d_table_view, d_view_type, MatrixModel::dataVector(), formula(), formula_str, headerViewType(), imageLabel, ImageView, initImageView(), matrixModel(), num_precision, numCols(), numRows(), precision(), resetView(), setColumnsWidth(), textFormat(), txt_format, viewType(), x_end, x_start, xEnd(), xStart(), y_end, y_start, yEnd(), and yStart().

void Matrix::copySelection | ( |  | ) |

slot

Standard copy operation.

References MdiSubWindow::applicationWindow(), d_matrix_model, d_table_view, d_view_type, ApplicationWindow::endOfLine(), ImageView, MatrixModel::text(), and text().

Referenced by cutSelection().

void Matrix::customEvent | ( | QEvent * | e | ) |

Custom event handler.

Currently handles SCRIPTING_CHANGE_EVENT only.

References SCRIPTING_CHANGE_EVENT, and scripted::scriptingChangeEvent().

void Matrix::cutSelection | ( |  | ) |

slot

Standard cut operation.

References clearSelection(), and copySelection().

void Matrix::deleteSelectedColumns | ( |  | ) |

slot

Delte the selected columns.

References d_matrix_model, d_table_view, d_undo_stack, MatrixModel::dataCopy(), ignoreUndo(), modifiedData(), MdiSubWindow::modifiedWindow(), numCols(), numRows(), and MatrixModel::removeColumns().

void Matrix::deleteSelectedRows | ( |  | ) |

slot

Delete the selected rows.

References d_matrix_model, d_table_view, d_undo_stack, MatrixModel::dataCopy(), ignoreUndo(), modifiedData(), MdiSubWindow::modifiedWindow(), numCols(), numRows(), and MatrixModel::removeRows().

double Matrix::determinant | ( |  | ) |

Calculate the determinant of the matrix.

References MdiSubWindow::applicationWindow(), cell(), d_matrix_model, MatrixModel::dataVector(), numCols(), and numRows().

Referenced by ApplicationWindow::matrixDeterminant().

void Matrix::displayImage | ( | const QImage & | image | ) |

References imageLabel.

Referenced by eventFilter(), importImage(), initImage(), MatrixSetImageCommand::redo(), resetView(), setColorMap(), setDefaultColorMap(), setGrayScale(), setRainbowColorMap(), and setViewType().

double Matrix::dx | ( |  | ) |

inline slot

Returns the step of the X axis.

References numCols(), x_end, and x_start.

Referenced by boundingRect(), MatrixModel::calculate(), FFT::fftMatrix(), MatrixModel::headerData(), integrate(), MatrixData::MatrixData(), MatrixModel::muParserCalculate(), Graph3D::updateScalesFromMatrix(), and MatrixModel::x().

double Matrix::dy | ( |  | ) |

inline slot

Returns the step of the Y axis.

References numRows(), y_end, and y_start.

Referenced by boundingRect(), MatrixModel::calculate(), FFT::fftMatrix(), MatrixModel::headerData(), integrate(), MatrixData::MatrixData(), MatrixModel::muParserCalculate(), Graph3D::updateScalesFromMatrix(), and MatrixModel::y().

bool Matrix::eventFilter | ( | QObject * | object,
|  | QEvent * | e
| ) |  |

private

References d_matrix_model, displayImage(), MdiSubWindow::eventFilter(), imageLabel, and MatrixModel::renderImage().

bool Matrix::exportASCII | ( | const QString & | fname,
|  | const QString & | separator,
|  | bool | exportSelection
| ) |  |

References MdiSubWindow::applicationWindow(), d_matrix_model, d_table_view, d_view_type, ApplicationWindow::endOfLine(), exportExcel(), ImportExportPlugin::exportMatrix(), exportODF(), exportOdsSpreadsheet(), ApplicationWindow::exportPlugin(), numCols(), numRows(), TableView, and MatrixModel::text().

void Matrix::exportEMF | ( | const QString & | fileName | ) |

References MdiSubWindow::applicationWindow(), ImportExportPlugin::exportMatrix(), and ApplicationWindow::exportPlugin().

Referenced by ApplicationWindow::exportMatrix(), and exportToFile().

bool Matrix::exportExcel | ( | const QString & | fname,
|  | bool | exportSelection
| ) |  |

References MdiSubWindow::applicationWindow(), ImportExportPlugin::exportMatrix(), and ApplicationWindow::exportPlugin().

Referenced by exportASCII(), and exportOdsSpreadsheet().

bool Matrix::exportODF | ( | const QString & | fname,
|  | bool | exportSelection
| ) |  |

References d_matrix_model, d_table_view, d_view_type, numCols(), numRows(), TableView, and MatrixModel::text().

Referenced by exportASCII().

bool Matrix::exportOdsSpreadsheet | ( | const QString & | fname,
|  | bool | exportSelection
| ) |  |

References MdiSubWindow::applicationWindow(), exportExcel(), and MdiSubWindow::name().

Referenced by exportASCII().

void Matrix::exportPDF | ( | const QString & | fileName | ) |

slot

References print().

void Matrix::exportRasterImage | ( | const QString & | fileName,
|  | int | quality = `100`,
|  | int | dpi = `0`,
|  | int | compression = `0`
| ) |  |

References d_matrix_model, image(), and MatrixModel::renderImage().

Referenced by ApplicationWindow::exportMatrix().

void Matrix::exportSVG | ( | const QString & | fileName | ) |

References d_matrix_model, numCols(), numRows(), and MatrixModel::renderImage().

Referenced by ApplicationWindow::exportMatrix(), and exportToFile().

void Matrix::exportToFile | ( | const QString & | fileName | ) |

References d_matrix_model, exportEMF(), exportSVG(), exportVector(), and MatrixModel::renderImage().

void Matrix::exportVector | ( | const QString & | fileName,
|  | int | res = `0`,
|  | bool | color = `true`
| ) |  |

Referenced by ApplicationWindow::exportMatrix(), and exportToFile().

void Matrix::exportVector | ( | QPrinter * | printer,
|  | int | res = `0`,
|  | bool | color = `true`
| ) |  |

References d_matrix_model, numCols(), numRows(), and MatrixModel::renderImage().

void Matrix::fft | ( | bool | inverse = `false` | ) |

References d_matrix_model, d_undo_stack, MatrixModel::dataCopy(), MatrixModel::fft(), ignoreUndo(), modifiedData(), MdiSubWindow::modifiedWindow(), numCols(), and numRows().

Referenced by ApplicationWindow::matrixDirectFFT(), and ApplicationWindow::matrixInverseFFT().

void Matrix::flipHorizontally | ( |  | ) |

References d_matrix_model, d_undo_stack, d_workspace, FlipHorizontally, initWorkspace(), numCols(), and numRows().

Referenced by ApplicationWindow::flipMatrixHorizontally().

void Matrix::flipVertically | ( |  | ) |

References d_matrix_model, d_undo_stack, d_workspace, FlipVertically, initWorkspace(), numCols(), and numRows().

Referenced by ApplicationWindow::flipMatrixVertically().

QString Matrix::formula | ( |  | ) |

inline slot

Return the matrix formula.

References formula_str.

Referenced by MatrixValuesDialog::apply(), MatrixModel::calculate(), copy(), MatrixData::MatrixData(), MatrixModel::muParserCalculate(), PlotDialog::setActiveCurve(), and MatrixValuesDialog::setMatrix().

void Matrix::freeMatrixData | ( | double ** | data,
|  | int | rows
| ) |  |

static slot

Free memory used for a matrix buffer.

Referenced by Graph3D::addMatrixData(), Graph3D::addRibbon(), MatrixModel::fft(), fft2d(), fft2d_inv(), FFT::fftMatrix(), GriddingDialog::preview(), Graph3D::updateDataXY(), Graph3D::updateMatrixData(), Graph3D::updateScales(), and Graph3D::updateScalesFromMatrix().

void Matrix::freeWorkspace | ( |  | ) |

inline slot

References d_workspace.

Referenced by MatrixModel::flipHorizontally(), MatrixModel::flipVertically(), MatrixModel::rotate90(), and MatrixModel::transpose().

void Matrix::goToColumn | ( | int | col | ) |

slot

Scroll to column (column starts with 1)

References d_matrix_model, d_table_view, d_undo_stack, d_view_type, ImageView, numCols(), and TableView.

void Matrix::goToRow | ( | int | row | ) |

slot

Scroll to row (row starts with 1)

References d_matrix_model, d_table_view, d_undo_stack, d_view_type, ImageView, numRows(), and TableView.

HeaderViewType Matrix::headerViewType | ( |  | ) |

inline

References d_header_view_type.

Referenced by copy(), FFT::fftMatrix(), MatrixModel::headerData(), ApplicationWindow::matrixMenuAboutToShow(), ApplicationWindow::viewMatrixColumnRow(), and ApplicationWindow::viewMatrixXY().

bool Matrix::ignoreUndo | ( |  | ) |

private

References MdiSubWindow::applicationWindow().

Referenced by calculate(), clearSelection(), deleteSelectedColumns(), deleteSelectedRows(), fft(), importASCII(), importImage(), muParserCalculate(), pasteSelection(), resample(), setDimensions(), and smooth().

QImage Matrix::image | ( |  | ) |

References d_matrix_model, and MatrixModel::renderImage().

Referenced by exportRasterImage(), and importImage().

void Matrix::importASCII | ( | const QString & | fname,
|  | const QString & | sep,
|  | int | ignoredLines,
|  | bool | stripSpaces,
|  | bool | simplifySpaces,
|  | const QString & | commentString,
|  | ImportMode | importAs = `Overwrite`,
|  | const QLocale & | l = `QLocale()`,
|  | int | endLineChar = `0`,
|  | int | maxRows = `-1`
| ) |  |

References d_matrix_model, d_undo_stack, MatrixModel::dataCopy(), ignoreUndo(), MatrixModel::importASCII(), modifiedData(), MdiSubWindow::modifiedWindow(), numCols(), and numRows().

Referenced by ApplicationWindow::importASCII().

void Matrix::importImage | ( | const QString & | fn | ) |

References d_matrix_model, d_undo_stack, d_view_type, MatrixModel::dataCopy(), displayImage(), ignoreUndo(), image(), ImageView, modifiedData(), MdiSubWindow::modifiedWindow(), numCols(), numRows(), MatrixModel::setImage(), setViewType(), MdiSubWindow::setWindowLabel(), x_end, x_start, y_end, and y_start.

Referenced by ApplicationWindow::dropEvent(), and ApplicationWindow::importImage().

void Matrix::importImage | ( | const QImage & | image | ) |

References d_matrix_model, d_undo_stack, d_view_type, MatrixModel::dataCopy(), displayImage(), ignoreUndo(), ImageView, modifiedData(), MdiSubWindow::modifiedWindow(), numCols(), numRows(), MatrixModel::setImage(), and setViewType().

void Matrix::initGlobals | ( |  | ) |

private

References MdiSubWindow::applicationWindow(), ColumnRow, ApplicationWindow::d_3D_color_map, d_color_map, d_color_map_type, d_column_width, d_header_view_type, d_stack, d_table_view, d_undo_stack, d_workspace, Default, formula_str, imageLabel, num_precision, txt_format, x_end, x_start, y_end, and y_start.

Referenced by initImage(), and initTable().

void Matrix::initImage | ( | const QImage & | image | ) |

private

References d_matrix_model, d_view_type, displayImage(), imageLabel, ImageView, initGlobals(), initImageView(), x_end, x_start, y_end, and y_start.

Referenced by Matrix().

void Matrix::initImageView | ( |  | ) |

private

References d_stack, and imageLabel.

Referenced by copy(), initImage(), restore(), and setViewType().

void Matrix::initTable | ( | int | rows,
|  | int | cols
| ) |  |

private

Initialize the matrix.

References _Matrix_initial_columns_, _Matrix_initial_rows_, d_matrix_model, d_table_view, d_view_type, initGlobals(), initTableView(), and TableView.

Referenced by Matrix().

void Matrix::initTableView | ( |  | ) |

private

References d_column_width, d_matrix_model, d_select_all_shortcut, d_stack, d_table_view, and numCols().

Referenced by initTable(), and setViewType().

double * Matrix::initWorkspace | ( | int | size | ) |

slot

Tries to allocate memory for the workspace. Returns a NULL pointer if failure.

References MdiSubWindow::applicationWindow(), and d_workspace.

Referenced by MatrixModel::flipHorizontally(), flipHorizontally(), MatrixModel::flipVertically(), flipVertically(), MatrixModel::rotate90(), rotate90(), MatrixModel::transpose(), and transpose().

void Matrix::insertColumn | ( |  | ) |

slot

Insert a column before the current cell.

References MatrixModel::canResize(), d_matrix_model, d_table_view, d_undo_stack, modifiedData(), MdiSubWindow::modifiedWindow(), numCols(), and numRows().

void Matrix::insertRow | ( |  | ) |

slot

Insert a row before the current cell.

References MatrixModel::canResize(), d_matrix_model, d_table_view, d_undo_stack, modifiedData(), MdiSubWindow::modifiedWindow(), numCols(), and numRows().

double Matrix::integrate | ( |  | ) |

Calculate the volume integral.

References MatrixModel::cell(), d_matrix_model, dx(), dy(), numCols(), and numRows().

void Matrix::invert | ( |  | ) |

Invert the matrix.

References MdiSubWindow::applicationWindow(), d_matrix_model, d_undo_stack, MatrixModel::initWorkspace(), Invert, numCols(), and numRows().

Referenced by ApplicationWindow::invertMatrix().

bool Matrix::isEmpty | ( |  | ) |

slot

Returns true if no data values were set for this matrix.

References d_matrix_model, MatrixModel::dataVector(), numCols(), and numRows().

Referenced by Graph3D::addMatrixData(), ApplicationWindow::matrixDirectFFT(), ApplicationWindow::matrixInverseFFT(), ApplicationWindow::matrixMenuAboutToShow(), and Graph3D::updateMatrixData().

MatrixModel* Matrix::matrixModel | ( |  | ) |

inline

References d_matrix_model.

Referenced by copy(), QwtHistogram::loadDataFromMatrix(), ApplicationWindow::matrixToTable(), and ImageProfilesTool::modifiedMatrix().

void Matrix::modifiedData | ( | Matrix * |  | ) |

signal

Referenced by calculate(), clearSelection(), deleteSelectedColumns(), deleteSelectedRows(), fft(), importASCII(), importImage(), insertColumn(), insertRow(), muParserCalculate(), notifyModifiedData(), pasteSelection(), resample(), setCoordinates(), setDimensions(), and smooth().

void Matrix::moveCell | ( | const QModelIndex & | index | ) |

References d_matrix_model, and d_table_view.

Referenced by MatrixModel::setData().

bool Matrix::muParserCalculate | ( | int | startRow = `0`,
|  | int | endRow = `-1`,
|  | int | startCol = `0`,
|  | int | endCol = `-1`
| ) |  |

Calculate matrix values using the formula_str (optimization for muParser).

References d_matrix_model, d_undo_stack, MatrixModel::dataCopy(), ignoreUndo(), modifiedData(), MdiSubWindow::modifiedWindow(), MuParserCalculate, and MatrixModel::muParserCalculate().

Referenced by calculate().

void Matrix::notifyModifiedData | ( |  | ) |

inline slot

References modifiedData().

Referenced by MatrixModel::setData().

int Matrix::numCols | ( |  | ) |

inline

Return the number of columns.

References MatrixModel::columnCount(), and d_matrix_model.

Referenced by CreateBinMatrixDialog::accept(), FFTDialog::activateDataSet(), Graph3D::addMatrixData(), boundingRect(), MatrixResamplingDialog::calculateDimensions(), muParserScript::cell(), copy(), deleteSelectedColumns(), deleteSelectedRows(), determinant(), dx(), exportASCII(), exportODF(), exportSVG(), exportVector(), fft(), FFT::fftMatrix(), flipHorizontally(), flipVertically(), goToColumn(), importASCII(), importImage(), initTableView(), insertColumn(), insertRow(), integrate(), invert(), isEmpty(), QwtHistogram::loadDataFromMatrix(), MatrixData::MatrixData(), MatrixSizeDialog::MatrixSizeDialog(), ApplicationWindow::matrixToTable(), ImageProfilesTool::modifiedMatrix(), numSelectedColumns(), pasteSelection(), ApplicationWindow::plotImageProfiles(), print(), range(), resample(), rotate90(), save(), setColumnsWidth(), setDimensions(), MatrixValuesDialog::setMatrix(), FFTDialog::setMatrix(), MultiLayer::sizeToString(), transpose(), MatrixResamplingDialog::updateDimensionsInfo(), Graph3D::updateMatrixData(), and Graph3D::updateScalesFromMatrix().

int Matrix::numRows | ( |  | ) |

inline

Return the number of rows.

References d_matrix_model, and MatrixModel::rowCount().

Referenced by CreateBinMatrixDialog::accept(), FFTDialog::activateDataSet(), Graph3D::addMatrixData(), boundingRect(), MatrixResamplingDialog::calculateDimensions(), muParserScript::cell(), copy(), deleteSelectedColumns(), deleteSelectedRows(), determinant(), dy(), exportASCII(), exportODF(), exportSVG(), exportVector(), fft(), FFT::fftMatrix(), flipHorizontally(), flipVertically(), goToRow(), importASCII(), importImage(), insertColumn(), insertRow(), integrate(), invert(), isEmpty(), QwtHistogram::loadDataFromMatrix(), MatrixData::MatrixData(), MatrixSizeDialog::MatrixSizeDialog(), ApplicationWindow::matrixToTable(), ImageProfilesTool::modifiedMatrix(), numSelectedRows(), pasteSelection(), ApplicationWindow::plotImageProfiles(), print(), range(), resample(), rotate90(), save(), setDimensions(), FFTDialog::setMatrix(), MatrixValuesDialog::setMatrix(), MultiLayer::sizeToString(), transpose(), MatrixResamplingDialog::updateDimensionsInfo(), Graph3D::updateMatrixData(), and Graph3D::updateScalesFromMatrix().

int Matrix::numSelectedColumns | ( |  | ) |

slot

Return the number of selected columns.

References d_table_view, and numCols().

Referenced by ApplicationWindow::showWindowContextMenu().

int Matrix::numSelectedRows | ( |  | ) |

slot

Return the number of selected rows.

References d_table_view, and numRows().

Referenced by ApplicationWindow::showWindowContextMenu().

void Matrix::pasteSelection | ( |  | ) |

slot

Standard paste operation.

References MdiSubWindow::applicationWindow(), cell(), ApplicationWindow::clipboardLocale(), d_matrix_model, d_table_view, d_undo_stack, d_view_type, MatrixModel::dataCopy(), ApplicationWindow::guessEndOfLine(), ignoreUndo(), ImageView, modifiedData(), MdiSubWindow::modifiedWindow(), numCols(), numRows(), MatrixModel::pasteData(), and text().

int Matrix::precision | ( |  | ) |

inline slot

Return the number precision digits.

See arguments of setNumericFormat().

See Also
  setNumericFormat(), setTextFormat()

References num_precision.

Referenced by MatrixDialog::apply(), copy(), MatrixModel::data(), ApplicationWindow::decreasePrecision(), MatrixModel::headerData(), ApplicationWindow::increasePrecision(), MatrixModel::MatrixModel(), MatrixDialog::setMatrix(), setTextFormat(), and MatrixModel::text().

void Matrix::print | ( |  | ) |

slot

Print the Matrix.

Referenced by canCalculate(), exportPDF(), and print().

void Matrix::print | ( | QPrinter * | printer | ) |

slot

References d_matrix_model, d_table_view, d_view_type, MatrixModel::headerData(), ImageView, numCols(), numRows(), MatrixModel::renderImage(), and text().

void Matrix::print | ( | const QString & | fileName | ) |

slot

Print the Matrix to fileName.

References MdiSubWindow::applicationWindow(), and print().

void Matrix::range | ( | double * | min,
|  | double * | max
| ) |  |

slot

Min and max values of the matrix.

References cell(), numCols(), and numRows().

Referenced by colorRange(), FFT::fftMatrix(), QwtHistogram::loadDataFromMatrix(), MatrixData::MatrixData(), ImageProfilesTool::modifiedMatrix(), MultiLayer::plotProfiles(), Spectrogram::range(), and Graph3D::updateScalesFromMatrix().

void Matrix::resample | ( | int | rows,
|  | int | cols,
|  | const ResamplingMethod & | method = `Bilinear`
| ) |  |

References Bilinear, MatrixModel::canResize(), d_matrix_model, d_undo_stack, MatrixModel::dataCopy(), ignoreUndo(), modifiedData(), MdiSubWindow::modifiedWindow(), numCols(), numRows(), and MatrixResampleCommand::redo().

Referenced by MatrixResamplingDialog::apply().

void Matrix::resetView | ( |  | ) |

References d_column_width, d_matrix_model, d_table_view, d_view_type, displayImage(), ImageView, MatrixModel::renderImage(), and TableView.

Referenced by copy(), Fit::covarianceMatrix(), MatrixModel::fft(), MatrixModel::importASCII(), ApplicationWindow::openMatrix(), MatrixEditCellCommand::redo(), MatrixSetSizeCommand::redo(), MatrixUndoCommand::redo(), MatrixSymmetryOperation::redo(), MatrixPasteCommand::redo(), MatrixModel::resample(), restore(), MatrixModel::setData(), setDimensions(), setHeaderViewType(), setNumericFormat(), MatrixEditCellCommand::undo(), MatrixSetSizeCommand::undo(), MatrixSmoothCommand::undo(), MatrixUndoCommand::undo(), MatrixSymmetryOperation::undo(), and MatrixPasteCommand::undo().

void Matrix::restore | ( | const QStringList & | l | ) |

slot

Load the matrix from a string list (i.e. lines from a project file)

References calculate(), d_color_map_type, d_header_view_type, d_select_all_shortcut, d_stack, d_table_view, d_view_type, formula_str, LinearColorMap::fromXmlStringList(), imageLabel, ImageView, initImageView(), Rainbow, resetView(), setColorMap(), setColumnsWidth(), setRainbowColorMap(), setTextFormat(), x_end, x_start, y_end, and y_start.

void Matrix::rotate90 | ( | bool | clockwise = `true` | ) |

References d_matrix_model, d_undo_stack, d_workspace, initWorkspace(), numCols(), numRows(), RotateClockwise, and RotateCounterClockwise.

Referenced by ApplicationWindow::rotateMatrix90(), and ApplicationWindow::rotateMatrixMinus90().

void Matrix::save | ( | const QString & | fn,
|  | const QString & | info,
|  | bool | saveAsTemplate = `false`
| ) |  |

slot

Format the matrix format in a string to save it in a template file Return a string to save the matrix in a project file (<matrix> section)

References MdiSubWindow::birthDate(), MdiSubWindow::captionPolicy(), Custom, d_color_map, d_color_map_type, d_column_width, d_header_view_type, d_matrix_model, d_view_type, MatrixModel::dataVector(), formula_str, num_precision, numCols(), numRows(), LinearColorMap::toXmlString(), txt_format, MdiSubWindow::windowLabel(), x_end, x_start, y_end, and y_start.

Referenced by ApplicationWindow::saveWindow().

QItemSelectionModel* Matrix::selectionModel | ( |  | ) |

inline

References d_table_view.

Referenced by MatrixValuesDialog::setMatrix().

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

slot

Set the value of the cell.

References d_matrix_model, and MatrixModel::setCell().

Referenced by CreateBinMatrixDialog::accept(), GriddingDialog::accept(), Fit::covarianceMatrix(), FFT::fftMatrix(), ApplicationWindow::openMatrix(), ApplicationWindow::tableToMatrix(), and ApplicationWindow::tableToMatrixRegularXYZ().

void Matrix::setColorMap | ( | const LinearColorMap & | map | ) |

References Custom, d_color_map, d_color_map_type, d_matrix_model, d_view_type, displayImage(), ImageView, MdiSubWindow::modifiedWindow(), and MatrixModel::renderImage().

Referenced by ColorMapDialog::apply(), FFT::fftMatrix(), ApplicationWindow::openMatrix(), MatrixSetColorMapCommand::redo(), restore(), and MatrixSetColorMapCommand::undo().

void Matrix::setColorMapType | ( | ColorMapType | mapType | ) |

References d_color_map_type, GrayScale, Rainbow, setGrayScale(), and setRainbowColorMap().

Referenced by ApplicationWindow::openMatrix().

void Matrix::setColumnsWidth | ( | int | width | ) |

slot

Set the width of all columns.

References d_column_width, d_table_view, d_view_type, MdiSubWindow::modifiedWindow(), numCols(), and TableView.

Referenced by MatrixDialog::apply(), copy(), ApplicationWindow::openMatrix(), MatrixSetColWidthCommand::redo(), restore(), and MatrixSetColWidthCommand::undo().

void Matrix::setCoordinates | ( | double | xs,
|  | double | xe,
|  | double | ys,
|  | double | ye
| ) |  |

slot

Set the X and Y coordinate intervals.

References modifiedData(), MdiSubWindow::modifiedWindow(), x_end, x_start, y_end, and y_start.

Referenced by CreateBinMatrixDialog::accept(), GriddingDialog::accept(), MatrixSizeDialog::apply(), FFT::fftMatrix(), ApplicationWindow::openMatrix(), MatrixSetCoordinatesCommand::redo(), ApplicationWindow::tableToMatrixRegularXYZ(), and MatrixSetCoordinatesCommand::undo().

void Matrix::setDefaultColorMap | ( |  | ) |

Resets the color map to the one defined by the user in the Preferences dialog (3D plots tab)

References MdiSubWindow::applicationWindow(), ApplicationWindow::d_3D_color_map, d_color_map, d_color_map_type, d_matrix_model, d_view_type, Default, displayImage(), ImageView, MdiSubWindow::modifiedWindow(), and MatrixModel::renderImage().

Referenced by MatrixSetColorMapCommand::redo(), ApplicationWindow::setMatrixDefaultScale(), and MatrixSetColorMapCommand::undo().

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

slot

Set the Matrix size.

References MatrixModel::canResize(), d_matrix_model, d_undo_stack, MatrixModel::dataCopy(), ignoreUndo(), modifiedData(), MdiSubWindow::modifiedWindow(), numCols(), numRows(), resetView(), and MatrixModel::setDimensions().

Referenced by MatrixSizeDialog::apply().

void Matrix::setFormula | ( | const QString & | s | ) |

inline slot

Set the matrix forumla.

References formula_str.

Referenced by MatrixValuesDialog::apply(), ApplicationWindow::openMatrix(), MatrixSetFormulaCommand::redo(), and MatrixSetFormulaCommand::undo().

void Matrix::setGrayScale | ( |  | ) |

References d_color_map, d_color_map_type, d_matrix_model, d_view_type, displayImage(), GrayScale, ImageView, MdiSubWindow::modifiedWindow(), and MatrixModel::renderImage().

Referenced by MatrixSetColorMapCommand::redo(), setColorMapType(), ApplicationWindow::setMatrixGrayScale(), and MatrixSetColorMapCommand::undo().

void Matrix::setHeaderViewType | ( | HeaderViewType | type | ) |

References d_header_view_type, d_view_type, MdiSubWindow::modifiedWindow(), resetView(), and TableView.

Referenced by FFT::fftMatrix(), ApplicationWindow::openMatrix(), MatrixSetHeaderViewCommand::redo(), MatrixSetHeaderViewCommand::undo(), ApplicationWindow::viewMatrixColumnRow(), and ApplicationWindow::viewMatrixXY().

void Matrix::setNumCols | ( | int | cols | ) |

inline

References d_matrix_model, and MatrixModel::setColumnCount().

void Matrix::setNumericFormat | ( | const QChar & | f,
|  | int | prec
| ) |  |

slot

References MdiSubWindow::modifiedWindow(), num_precision, resetView(), and txt_format.

Referenced by MatrixDialog::apply(), MatrixSetPrecisionCommand::redo(), and MatrixSetPrecisionCommand::undo().

void Matrix::setNumericPrecision | ( | int | prec | ) |

slot

Set the number of significant digits.

See Also
  precision(), setNumericFormat(), setTextFormat()

References num_precision.

Referenced by Fit::covarianceMatrix(), ApplicationWindow::decreasePrecision(), ApplicationWindow::increasePrecision(), and ApplicationWindow::initMatrix().

void Matrix::setNumRows | ( | int | rows | ) |

inline

References d_matrix_model, and MatrixModel::setRowCount().

void Matrix::setRainbowColorMap | ( |  | ) |

References d_color_map, d_color_map_type, d_matrix_model, d_view_type, displayImage(), ImageView, MdiSubWindow::modifiedWindow(), Rainbow, and MatrixModel::renderImage().

Referenced by MatrixSetColorMapCommand::redo(), restore(), setColorMapType(), ApplicationWindow::setMatrixRainbowScale(), and MatrixSetColorMapCommand::undo().

void Matrix::setText | ( | int | row,
|  | int | col,
|  | const QString & | new_text
| ) |  |

slot

Set the content of the cell as a string.

References d_matrix_model, and MatrixModel::setText().

Referenced by ApplicationWindow::openMatrix().

void Matrix::setTextFormat | ( | const QChar & | format,
|  | int | precision
| ) |  |

slot

Set the number format for the cells.

This method should only be called before any user interaction was done. Use setTextFormat() if you want to change it from a dialog.

See Also
  setTextFormat()

References num_precision, precision(), and txt_format.

Referenced by ApplicationWindow::openMatrix(), and restore().

void Matrix::setViewType | ( | ViewType | type,
|  | bool | renderImage = `true`
| ) |  |

References d_matrix_model, d_select_all_shortcut, d_stack, d_table_view, d_view_type, displayImage(), imageLabel, ImageView, initImageView(), initTableView(), MdiSubWindow::modifiedWindow(), MatrixModel::renderImage(), and TableView.

Referenced by FFT::fftMatrix(), importImage(), ApplicationWindow::openMatrix(), MatrixSetViewCommand::redo(), MatrixSetImageCommand::redo(), MatrixSetViewCommand::undo(), MatrixSetImageCommand::undo(), ApplicationWindow::viewMatrixImage(), and ApplicationWindow::viewMatrixTable().

QString Matrix::sizeToString | ( |  | ) |

virtual

Size of the widget as a string.

Reimplemented from MdiSubWindow.

References MatrixModel::columnCount(), d_matrix_model, and MatrixModel::rowCount().

void Matrix::smooth | ( |  | ) |

References d_matrix_model, d_undo_stack, MatrixModel::dataCopy(), ignoreUndo(), modifiedData(), MdiSubWindow::modifiedWindow(), and MatrixSmoothCommand::redo().

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

slot

Return the content of the cell as a string.

References d_matrix_model, and MatrixModel::text().

Referenced by muParserScript::cell(), copySelection(), pasteSelection(), and print().

QChar Matrix::textFormat | ( |  | ) |

inline slot

Return the text format code ('e', 'f', ...)

See Also
  setNumerFormat(), setTextFormat()

References txt_format.

Referenced by MatrixDialog::apply(), copy(), MatrixModel::data(), ApplicationWindow::decreasePrecision(), MatrixModel::headerData(), ApplicationWindow::increasePrecision(), MatrixModel::MatrixModel(), MatrixDialog::setMatrix(), and MatrixModel::text().

void Matrix::transpose | ( |  | ) |

Transpose the matrix.

References d_matrix_model, d_undo_stack, d_workspace, initWorkspace(), numCols(), numRows(), and Transpose.

Referenced by ApplicationWindow::transposeMatrix().

QUndoStack* Matrix::undoStack | ( |  | ) |

inline

References d_undo_stack.

Referenced by ColorMapDialog::apply(), MatrixDialog::apply(), MatrixSizeDialog::apply(), MatrixValuesDialog::apply(), ApplicationWindow::decreasePrecision(), ApplicationWindow::increasePrecision(), ApplicationWindow::initMatrix(), MatrixModel::setData(), ApplicationWindow::setMatrixDefaultScale(), ApplicationWindow::setMatrixGrayScale(), ApplicationWindow::setMatrixRainbowScale(), ApplicationWindow::viewMatrixColumnRow(), ApplicationWindow::viewMatrixImage(), ApplicationWindow::viewMatrixTable(), and ApplicationWindow::viewMatrixXY().

int Matrix::verticalHeaderWidth | ( |  | ) |

inline slot

References d_table_view.

Referenced by ApplicationWindow::importASCII().

ViewType Matrix::viewType | ( |  | ) |

inline

References d_view_type.

Referenced by copy(), FFT::fftMatrix(), ApplicationWindow::matrixMenuAboutToShow(), MatrixValuesDialog::setMatrix(), ApplicationWindow::showWindowContextMenu(), ApplicationWindow::viewMatrixImage(), and ApplicationWindow::viewMatrixTable().

double Matrix::xEnd | ( |  | ) |

inline slot

Returns the X value corresponding to the last column.

References x_end.

Referenced by Graph3D::addMatrixData(), MatrixSizeDialog::apply(), copy(), MatrixModel::headerData(), ImageProfilesTool::ImageProfilesTool(), MatrixSizeDialog::MatrixSizeDialog(), ImageProfilesTool::modifiedMatrix(), ApplicationWindow::plotImage(), MultiLayer::plotProfiles(), Graph3D::updateMatrixData(), Graph3D::updateScalesFromMatrix(), and MatrixModel::x().

double Matrix::xStart | ( |  | ) |

inline slot

Returns the X value corresponding to column 1.

References x_start.

Referenced by Graph3D::addMatrixData(), MatrixSizeDialog::apply(), MatrixModel::calculate(), copy(), MatrixModel::headerData(), ImageProfilesTool::ImageProfilesTool(), MatrixData::MatrixData(), MatrixSizeDialog::MatrixSizeDialog(), ImageProfilesTool::modifiedMatrix(), MatrixModel::muParserCalculate(), ApplicationWindow::plotImage(), MultiLayer::plotProfiles(), Graph3D::updateMatrixData(), Graph3D::updateScalesFromMatrix(), and MatrixModel::x().

double Matrix::yEnd | ( |  | ) |

inline slot

Returns the Y value corresponding to the last row.

References y_end.

Referenced by Graph3D::addMatrixData(), MatrixSizeDialog::apply(), copy(), MatrixModel::headerData(), ImageProfilesTool::ImageProfilesTool(), MatrixSizeDialog::MatrixSizeDialog(), ImageProfilesTool::modifiedMatrix(), ApplicationWindow::plotImage(), MultiLayer::plotProfiles(), Graph3D::updateMatrixData(), Graph3D::updateScalesFromMatrix(), and MatrixModel::y().

double Matrix::yStart | ( |  | ) |

inline slot

Returns the Y value corresponding to row 1.

References y_start.

Referenced by Graph3D::addMatrixData(), MatrixSizeDialog::apply(), MatrixModel::calculate(), copy(), MatrixModel::headerData(), ImageProfilesTool::ImageProfilesTool(), MatrixData::MatrixData(), MatrixSizeDialog::MatrixSizeDialog(), ImageProfilesTool::modifiedMatrix(), MatrixModel::muParserCalculate(), ApplicationWindow::plotImage(), MultiLayer::plotProfiles(), Graph3D::updateMatrixData(), Graph3D::updateScalesFromMatrix(), and MatrixModel::y().

## Member Data Documentation

LinearColorMap Matrix::d_color_map

private

The color map used to display images.

Referenced by colorMap(), colorMapPointer(), colorRange(), copy(), initGlobals(), save(), setColorMap(), setDefaultColorMap(), setGrayScale(), and setRainbowColorMap().

ColorMapType Matrix::d_color_map_type

private

The color map type.

Referenced by colorMapType(), copy(), initGlobals(), restore(), save(), setColorMap(), setColorMapType(), setDefaultColorMap(), setGrayScale(), and setRainbowColorMap().

double Matrix::d_color_max

private

Maximum value corresponding to the last color in the color map.

double Matrix::d_color_min

private

Minimum value corresponding to the first color in the color map.

int Matrix::d_column_width

private

Column width in pixels;.

Referenced by columnsWidth(), initGlobals(), initTableView(), resetView(), save(), and setColumnsWidth().

HeaderViewType Matrix::d_header_view_type

private

Keeps track of the header view type;.

Referenced by copy(), headerViewType(), initGlobals(), restore(), save(), and setHeaderViewType().

MatrixModel* Matrix::d_matrix_model

private

Referenced by calculate(), cell(), clearSelection(), copy(), copySelection(), deleteSelectedColumns(), deleteSelectedRows(), determinant(), eventFilter(), exportASCII(), exportODF(), exportRasterImage(), exportSVG(), exportToFile(), exportVector(), fft(), flipHorizontally(), flipVertically(), goToColumn(), goToRow(), image(), importASCII(), importImage(), initImage(), initTable(), initTableView(), insertColumn(), insertRow(), integrate(), invert(), isEmpty(), matrixModel(), moveCell(), muParserCalculate(), numCols(), numRows(), pasteSelection(), print(), resample(), resetView(), rotate90(), save(), setCell(), setColorMap(), setDefaultColorMap(), setDimensions(), setGrayScale(), setNumCols(), setNumRows(), setRainbowColorMap(), setText(), setViewType(), sizeToString(), smooth(), text(), transpose(), and ~Matrix().

QShortcut* Matrix::d_select_all_shortcut

private

Referenced by copy(), initTableView(), restore(), and setViewType().

QStackedWidget* Matrix::d_stack

private

Referenced by copy(), initGlobals(), initImageView(), initTableView(), restore(), and setViewType().

QTableView* Matrix::d_table_view

private

Pointer to the table view.

Referenced by clearSelection(), copy(), copySelection(), deleteSelectedColumns(), deleteSelectedRows(), exportASCII(), exportODF(), goToColumn(), goToRow(), initGlobals(), initTable(), initTableView(), insertColumn(), insertRow(), moveCell(), numSelectedColumns(), numSelectedRows(), pasteSelection(), print(), resetView(), restore(), selectionModel(), setColumnsWidth(), setViewType(), and verticalHeaderWidth().

QUndoStack* Matrix::d_undo_stack

private

Undo/Redo commands stack.

Referenced by calculate(), clearSelection(), deleteSelectedColumns(), deleteSelectedRows(), fft(), flipHorizontally(), flipVertically(), goToColumn(), goToRow(), importASCII(), importImage(), initGlobals(), insertColumn(), insertRow(), invert(), muParserCalculate(), pasteSelection(), resample(), rotate90(), setDimensions(), smooth(), transpose(), undoStack(), and ~Matrix().

ViewType Matrix::d_view_type

private

Keeps track of the view type;.

Referenced by clearSelection(), copy(), copySelection(), exportASCII(), exportODF(), goToColumn(), goToRow(), importImage(), initImage(), initTable(), pasteSelection(), print(), resetView(), restore(), save(), setColorMap(), setColumnsWidth(), setDefaultColorMap(), setGrayScale(), setHeaderViewType(), setRainbowColorMap(), setViewType(), and viewType().

double* Matrix::d_workspace

private

Pointer to a data buffer used for matrix operations.

Referenced by flipHorizontally(), flipVertically(), freeWorkspace(), initGlobals(), initWorkspace(), rotate90(), and transpose().

QString Matrix::formula_str

private

Last formula used to calculate cell values.

Referenced by canCalculate(), copy(), formula(), initGlobals(), restore(), save(), and setFormula().

QLabel* Matrix::imageLabel

private

Used to display the image view.

Referenced by copy(), displayImage(), eventFilter(), initGlobals(), initImage(), initImageView(), restore(), and setViewType().

int Matrix::num_precision

private

Number of significant digits.

Referenced by copy(), initGlobals(), precision(), save(), setNumericFormat(), setNumericPrecision(), and setTextFormat().

QChar Matrix::txt_format

private

Format code for displaying numbers.

Referenced by copy(), initGlobals(), save(), setNumericFormat(), setTextFormat(), and textFormat().

double Matrix::x_end

private

X value corresponding to the last column.

Referenced by boundingRect(), copy(), dx(), importImage(), initGlobals(), initImage(), restore(), save(), setCoordinates(), and xEnd().

double Matrix::x_start

private

X value corresponding to column 1.

Referenced by boundingRect(), copy(), dx(), importImage(), initGlobals(), initImage(), restore(), save(), setCoordinates(), and xStart().

double Matrix::y_end

private

Y value corresponding to the last row.

Referenced by boundingRect(), copy(), dy(), importImage(), initGlobals(), initImage(), restore(), save(), setCoordinates(), and yEnd().

double Matrix::y_start

private

Y value corresponding to row 1.

Referenced by boundingRect(), copy(), dy(), importImage(), initGlobals(), initImage(), restore(), save(), setCoordinates(), and yStart().

The documentation for this class was generated from the following files:

- qtiplot/src/matrix/Matrix.h
- qtiplot/src/matrix/Matrix.cpp