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.h
Go to the documentation of this file.
1 
13 
31 #ifndef FUTURE_MATRIX_H
32 #define FUTURE_MATRIX_H
33 
34 #ifndef LEGACY_CODE_0_2_x
35 #include "core/AbstractScriptingEngine.h"
36 #endif
37 #include "core/AbstractPart.h"
38 #include "matrix/MatrixView.h"
39 #include "lib/macros.h"
40 
41 #include <QPointer>
42 
43 class QContextMenuEvent;
44 class QEvent;
45 class ActionManager;
46 
47 // (maximum) initial matrix size (this is the size of the window, not the number of cells)
48 #define _Matrix_initial_rows_ 10
49 #define _Matrix_initial_columns_ 3
50 
51 // TODO: move all selection related stuff to the primary view
52 
53 namespace future{
54 #ifndef LEGACY_CODE_0_2_x
55 class Matrix : public AbstractPart, public scripted
57 #else
58 class Matrix : public AbstractPart
59 #endif
60 {
61  Q_OBJECT
62 
63  public:
64  class Private;
65  friend class Private;
66 
75 #ifndef LEGACY_CODE_0_2_x
76  Matrix(AbstractScriptingEngine *engine, int rows, int cols, const QString& name);
77 #else
78  Matrix(void *, int rows, int cols, const QString& name);
79  void setView(MatrixView * view);
80 #endif
81  ~Matrix();
82 
84  virtual QIcon icon() const;
86 
89  virtual QMenu *createContextMenu() const;
91 
95  virtual QWidget *view();
97 
102  QMenu * createSelectionMenu(QMenu * append_to = 0);
104 
109  QMenu * createColumnMenu(QMenu * append_to = 0);
111 
116  QMenu * createRowMenu(QMenu * append_to = 0);
118 
123  QMenu * createMatrixMenu(QMenu * append_to = 0);
125 
128  virtual bool fillProjectMenu(QMenu * menu);
129 
130  void insertColumns(int before, int count);
131  void appendColumns(int count) { insertColumns(columnCount(), count); }
132  void removeColumns(int first, int count);
133  void insertRows(int before, int count);
134  void appendRows(int count) { insertRows(rowCount(), count); }
135  void removeRows(int first, int count);
137  void setDimensions(int rows, int cols);
139  int columnCount() const;
141  int rowCount() const;
142 
144 
147  void setPlotMenu(QMenu * menu);
149  double cell(int row, int col) const;
151  void setCell(int row, int col, double value );
153  void setCells(const QVector<qreal>& data);
155  QVector<qreal> columnCells(int col, int first_row, int last_row);
157  void setColumnCells(int col, int first_row, int last_row, const QVector<qreal> & values);
159  QVector<qreal> rowCells(int row, int first_column, int last_column);
161  void setRowCells(int row, int first_column, int last_column, const QVector<qreal> & values);
163  QString text(int row, int col);
164  using AbstractPart::copy;
165  void copy(Matrix * other);
166  double xStart() const;
167  double yStart() const;
168  double xEnd() const;
169  double yEnd() const;
170  QString formula() const;
171  void setFormula(const QString & formula);
172  void setXStart(double x);
173  void setXEnd(double x);
174  void setYStart(double y);
175  void setYEnd(double y);
176  void setCoordinates(double x1, double x2, double y1, double y2);
177  char numericFormat() const;
178  int displayedDigits() const;
179  void setNumericFormat(char format);
180  void setDisplayedDigits(int digits);
181 
183 
184  virtual void save(QXmlStreamWriter *) const;
187  virtual bool load(XmlStreamReader *);
189 
191 
194  void setRowHeight(int row, int height);
196 
199  void setColumnWidth(int col, int width);
200  int rowHeight(int row) const;
201  int columnWidth(int col) const;
202 
203  public:
204  static ActionManager * actionManager();
205  static void initActionManager();
206  static int defaultColumnWidth() { return default_column_width; }
207  static int defaultRowHeight() { return default_row_height; }
208  static void setDefaultColumnWidth(int width) { default_column_width = width; }
209  static void setDefaultRowHeight(int height) { default_row_height = height; }
210 
211  private:
214  Matrix();
215  // TODO: the default sizes are to be controlled by the global Matrix settings
217  static int default_row_height;
218  public:
219  static Matrix * fromImage(const QImage & image);
220 
221  public slots:
223  void clear();
224  void transpose();
225  void mirrorVertically();
226  void mirrorHorizontally();
227 
228  void cutSelection();
229  void copySelection();
230  void pasteIntoSelection();
231  void clearSelectedCells();
232  void dimensionsDialog();
233  void goToCell();
235  void insertEmptyColumns();
237  void insertEmptyRows();
238  void removeSelectedColumns();
239  void removeSelectedRows();
240  void clearSelectedColumns();
241  void clearSelectedRows();
242  void selectAll();
244 
247  void showMatrixViewContextMenu(const QPoint& pos);
249 
252  void showMatrixViewColumnContextMenu(const QPoint& pos);
254 
257  void showMatrixViewRowContextMenu(const QPoint& pos);
258  void editFormat();
259  void editCoordinates();
260  void editFormula();
262  void addColumns();
264  void addRows();
265  void importImageDialog();
267  void duplicate();
268 #ifdef LEGACY_CODE_0_2_x
269  void recalculateSelectedCells();
270 #endif
271 
272  signals:
273  void columnsAboutToBeInserted(int before, int count);
274  void columnsInserted(int first, int count);
275  void columnsAboutToBeRemoved(int first, int count);
276  void columnsRemoved(int first, int count);
277  void rowsAboutToBeInserted(int before, int count);
278  void rowsInserted(int first, int count);
279  void rowsAboutToBeRemoved(int first, int count);
280  void rowsRemoved(int first, int count);
281  void dataChanged(int top, int left, int bottom, int right);
285 #ifdef LEGACY_CODE_0_2_x
286  void recalculate();
287 #endif
288 
289  private slots:
290  void adjustTabBarAction(bool visible);
291 
292  private:
293  void createActions();
294  void connectActions();
295  void addActionsToView();
297 
299  bool readDisplayElement(XmlStreamReader * reader);
303  bool readFormulaElement(XmlStreamReader * reader);
305  bool readCellElement(XmlStreamReader * reader);
306  bool readRowHeightElement(XmlStreamReader * reader);
308 
309  QMenu * d_plot_menu;
310 
312 
318 
321  QAction * action_select_all;
323  QAction * action_go_to_cell;
330  QAction * action_duplicate;
331  QAction * action_transpose;
335 
342 
346  QAction * action_clear_rows;
347  QAction * action_add_rows;
349 
350  QPointer<MatrixView> d_view;
352 };
353 
370 {
371  public:
372  Private(Matrix *owner);
374 
380  void insertColumns(int before, int count);
382 
386  void removeColumns(int first, int count);
388 
394  void insertRows(int before, int count);
396 
400  void removeRows(int first, int count);
402  int columnCount() const { return d_column_count; }
404  int rowCount() const { return d_row_count; }
405  QString name() const { return d_owner->name(); }
407  double cell(int row, int col) const;
409  void setCell(int row, int col, double value);
411  void setCells(const QVector<qreal>& data);
413  QVector<qreal> columnCells(int col, int first_row, int last_row);
415  void setColumnCells(int col, int first_row, int last_row, const QVector<qreal> & values);
417  QVector<qreal> rowCells(int row, int first_column, int last_column);
419  void setRowCells(int row, int first_column, int last_column, const QVector<qreal> & values);
420  char numericFormat() const { return d_numeric_format; }
421  void setNumericFormat(char format) { d_numeric_format = format; emit d_owner->formatChanged(); }
422  int displayedDigits() const { return d_displayed_digits; }
423  void setDisplayedDigits(int digits) { d_displayed_digits = digits; emit d_owner->formatChanged(); }
425  void clearColumn(int col);
426  double xStart() const;
427  double yStart() const;
428  double xEnd() const;
429  double yEnd() const;
430  QString formula() const;
431  void setFormula(const QString & formula);
432  void setXStart(double x);
433  void setXEnd(double x);
434  void setYStart(double y);
435  void setYEnd(double y);
436  void setRowHeight(int row, int height) { d_row_heights[row] = height; }
437  void setColumnWidth(int col, int width) { d_column_widths[col] = width; }
438  int rowHeight(int row) const { return d_row_heights.at(row); }
439  int columnWidth(int col) const { return d_column_widths.at(col); }
441 
453  void blockChangeSignals(bool block) { d_block_change_signals = block; }
455  void emitDataChanged(int top, int left, int bottom, int right) { emit d_owner->dataChanged(top, left, bottom, right); }
456 
457  private:
465  QVector< QVector<qreal> > d_data;
467  QList<int> d_row_heights;
469  QList<int> d_column_widths;
471  QString d_formula; // TODO: should we support interval/rectangle based formulas?
476  double d_x_start,
481 
482 };
483 
484 } // namespace
485 #endif
Matrix
Matrix worksheet class.
Definition: Matrix.h:52
future::Matrix::Private::clearColumn
void clearColumn(int col)
Fill column with zeroes.
Definition: future_Matrix.cpp:1694
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
AbstractPart.h
future::Matrix::columnCount
int columnCount() const
Return the total number of columns.
Definition: future_Matrix.cpp:179
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
future::Matrix::editCoordinates
void editCoordinates()
Definition: future_Matrix.cpp:990
future::Matrix::Private::setXEnd
void setXEnd(double x)
Definition: future_Matrix.cpp:1727
future::Matrix::goToCell
void goToCell()
Definition: future_Matrix.cpp:850
future
Definition: AbstractAspect.h:43
future::Matrix::save
virtual void save(QXmlStreamWriter *) const
Save as XML.
Definition: future_Matrix.cpp:1117
future::Matrix::Private::insertColumns
void insertColumns(int before, int count)
Insert columns before column number 'before'.
Definition: future_Matrix.cpp:1552
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::setDefaultColumnWidth
static void setDefaultColumnWidth(int width)
Definition: future_Matrix.h:208
future::Matrix::transpose
void transpose()
Definition: future_Matrix.cpp:1443
future::Matrix::xStart
double xStart() const
Definition: future_Matrix.cpp:1075
future::Matrix::Private::d_block_change_signals
bool d_block_change_signals
Definition: future_Matrix.h:480
future::Matrix::rowsRemoved
void rowsRemoved(int first, int count)
future::Matrix::Private::setNumericFormat
void setNumericFormat(char format)
Definition: future_Matrix.h:421
future::Matrix::duplicate
void duplicate()
Duplicate the matrix inside its folder.
Definition: future_Matrix.cpp:974
future::Matrix::action_insert_columns
QAction * action_insert_columns
Definition: future_Matrix.h:337
future::Matrix::rowsAboutToBeRemoved
void rowsAboutToBeRemoved(int first, int count)
future::Matrix::Private::setDisplayedDigits
void setDisplayedDigits(int digits)
Definition: future_Matrix.h:423
future::Matrix::Private::rowHeight
int rowHeight(int row) const
Definition: future_Matrix.h:438
future::Matrix::Private::columnCount
int columnCount() const
Return the number of columns in the table.
Definition: future_Matrix.h:402
future::Matrix::Private::setRowCells
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.
Definition: future_Matrix.cpp:1682
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
future::Matrix::appendColumns
void appendColumns(int count)
Definition: future_Matrix.h:131
future::Matrix::default_column_width
static int default_column_width
Definition: future_Matrix.h:216
data
Definition: exp_saturation.c:37
future::Matrix::Private::d_data
QVector< QVector< qreal > > d_data
The matrix data.
Definition: future_Matrix.h:465
future::Matrix::setCells
void setCells(const QVector< qreal > &data)
Set the value of all cells.
Definition: future_Matrix.cpp:923
future::Matrix::columnsAboutToBeRemoved
void columnsAboutToBeRemoved(int first, int count)
XmlStreamReader
XML stream parser that supports errors as well as warnings.
Definition: XmlStreamReader.h:42
future::Matrix::action_toggle_tabbar
QAction * action_toggle_tabbar
Definition: future_Matrix.h:320
future::Matrix::setNumericFormat
void setNumericFormat(char format)
Definition: future_Matrix.cpp:1059
future::Matrix::action_recalculate
QAction * action_recalculate
Definition: future_Matrix.h:328
future::Matrix::Private::setYEnd
void setYEnd(double y)
Definition: future_Matrix.cpp:1739
future::Matrix::showMatrixViewContextMenu
void showMatrixViewContextMenu(const QPoint &pos)
Show a context menu for the selected cells.
Definition: future_Matrix.cpp:819
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::Private::name
QString name() const
Definition: future_Matrix.h:405
future::Matrix::displayedDigits
int displayedDigits() const
Definition: future_Matrix.cpp:1112
future::Matrix::formulaChanged
void formulaChanged()
future::Matrix::readCoordinatesElement
bool readCoordinatesElement(XmlStreamReader *reader)
Read XML coodinates element.
Definition: future_Matrix.cpp:1259
macros.h
future::Matrix::Private::d_y_start
double d_y_start
Y value corresponding to row 1.
Definition: future_Matrix.h:478
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
future::Matrix::columnsRemoved
void columnsRemoved(int first, int count)
future::Matrix::Private::setYStart
void setYStart(double y)
Definition: future_Matrix.cpp:1733
AbstractPart::copy
virtual void copy()
Copy current selection.
Definition: AbstractPart.h:79
future::Matrix::Private::setXStart
void setXStart(double x)
Definition: future_Matrix.cpp:1721
future::Matrix::removeRows
void removeRows(int first, int count)
Definition: future_Matrix.cpp:140
future::Matrix::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:1431
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
future::Matrix::action_duplicate
QAction * action_duplicate
Definition: future_Matrix.h:330
future::Matrix::createActions
void createActions()
Definition: future_Matrix.cpp:535
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::formatChanged
void formatChanged()
future::Matrix::action_clear_selection
QAction * action_clear_selection
Definition: future_Matrix.h:316
future::Matrix::Private::setRowHeight
void setRowHeight(int row, int height)
Definition: future_Matrix.h:436
future::Matrix::Private::d_x_start
double d_x_start
X value corresponding to column 1.
Definition: future_Matrix.h:476
future::Matrix::action_manager
static ActionManager * action_manager
Definition: future_Matrix.h:212
scripted
Interface for maintaining a reference to the current ScriptingEnv.
Definition: Script.h:149
future::Matrix::action_clear_rows
QAction * action_clear_rows
Definition: future_Matrix.h:346
future::Matrix::setRowCells
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.
Definition: future_Matrix.cpp:1436
future::Matrix::Matrix
Matrix()
Private ctor for initActionManager() only.
Definition: future_Matrix.cpp:80
future::Matrix::defaultColumnWidth
static int defaultColumnWidth()
Definition: future_Matrix.h:206
future::Matrix::Private::d_numeric_format
char d_numeric_format
Format code for displaying numbers.
Definition: future_Matrix.h:473
future::Matrix::fillProjectMenu
virtual bool fillProjectMenu(QMenu *menu)
Fill the part specific menu for the main window including setting the title.
Definition: future_Matrix.cpp:782
future::Matrix::selectAll
void selectAll()
Definition: future_Matrix.cpp:910
future::Matrix::Private::d_column_widths
QList< int > d_column_widths
Columns widths.
Definition: future_Matrix.h:469
future::Matrix::Private::setFormula
void setFormula(const QString &formula)
Definition: future_Matrix.cpp:1750
future::Matrix::d_plot_menu
QMenu * d_plot_menu
Definition: future_Matrix.h:309
future::Matrix::Private::d_row_count
int d_row_count
The number of rows.
Definition: future_Matrix.h:463
future::Matrix::connectActions
void connectActions()
Definition: future_Matrix.cpp:686
future::Matrix::Private::emitDataChanged
void emitDataChanged(int top, int left, int bottom, int right)
Access to the dataChanged signal for commands.
Definition: future_Matrix.h:455
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
future::Matrix::adjustTabBarAction
void adjustTabBarAction(bool visible)
Definition: future_Matrix.cpp:1411
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
future::Matrix::action_clear_matrix
QAction * action_clear_matrix
Definition: future_Matrix.h:322
future::Matrix::showMatrixViewColumnContextMenu
void showMatrixViewColumnContextMenu(const QPoint &pos)
Show a context menu for the selected columns.
Definition: future_Matrix.cpp:832
future::Matrix
Aspect providing a spreadsheet to manage MxN matrix data.
Definition: future_Matrix.h:60
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
future::Matrix::columnsInserted
void columnsInserted(int first, int count)
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
future::Matrix::icon
virtual QIcon icon() const
Return an icon to be used for decorating my views.
Definition: future_Matrix.cpp:896
future::Matrix::view
virtual QWidget * view()
Construct a primary view on me.
Definition: future_Matrix.cpp:104
future::Matrix::setRowHeight
void setRowHeight(int row, int height)
This method should only be called by the view.
Definition: future_Matrix.cpp:1391
future::Matrix::rowsInserted
void rowsInserted(int first, int count)
future::Matrix::setPlotMenu
void setPlotMenu(QMenu *menu)
Set a plot menu.
Definition: future_Matrix.cpp:891
future::Matrix::insertColumns
void insertColumns(int before, int count)
Definition: future_Matrix.cpp:120
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::Private::insertRows
void insertRows(int before, int count)
Insert rows before row number 'before'.
Definition: future_Matrix.cpp:1580
future::Matrix::fromImage
static Matrix * fromImage(const QImage &image)
Definition: future_Matrix.cpp:1498
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
future::Matrix::Private::xEnd
double xEnd() const
Definition: future_Matrix.cpp:1711
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
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
future::Matrix::load
virtual bool load(XmlStreamReader *)
Load from XML.
Definition: future_Matrix.cpp:1167
future::Matrix::Private::Private
Private(Matrix *owner)
Definition: future_Matrix.cpp:1540
future::Matrix::columnsAboutToBeInserted
void columnsAboutToBeInserted(int before, int count)
future::Matrix::Private::setCell
void setCell(int row, int col, double value)
Set the value in the given cell.
Definition: future_Matrix.cpp:1616
future::Matrix::clear
void clear()
Clear the whole matrix (i.e. set all cells to 0.0)
Definition: future_Matrix.cpp:189
future::Matrix::formula
QString formula() const
Definition: future_Matrix.cpp:1095
future::Matrix::coordinatesChanged
void coordinatesChanged()
future::Matrix::Private::d_row_heights
QList< int > d_row_heights
Row widths.
Definition: future_Matrix.h:467
future::Matrix::Private::d_formula
QString d_formula
Last formula used to calculate cell values.
Definition: future_Matrix.h:471
future::Matrix::setDefaultRowHeight
static void setDefaultRowHeight(int height)
Definition: future_Matrix.h:209
future::Matrix::Private::removeColumns
void removeColumns(int first, int count)
Remove Columns.
Definition: future_Matrix.cpp:1568
future::Matrix::Private::d_x_end
double d_x_end
X value corresponding to the last column.
Definition: future_Matrix.h:477
future::Matrix::mirrorHorizontally
void mirrorHorizontally()
Definition: future_Matrix.cpp:1450
future::Matrix::insertEmptyColumns
void insertEmptyColumns()
Insert columns depending on the selection.
Definition: future_Matrix.cpp:324
future::Matrix::Private::setCells
void setCells(const QVector< qreal > &data)
Set the value of all cells.
Definition: future_Matrix.cpp:1625
future::Matrix::Private
friend class Private
Definition: future_Matrix.h:64
future::Matrix::createContextMenu
virtual QMenu * createContextMenu() const
Return a new context menu.
Definition: future_Matrix.cpp:456
future::Matrix::cutSelection
void cutSelection()
Definition: future_Matrix.cpp:205
future::Matrix::action_go_to_cell
QAction * action_go_to_cell
Definition: future_Matrix.h:323
future::Matrix::editFormula
void editFormula()
Definition: future_Matrix.cpp:996
future::Matrix::~Matrix
~Matrix()
Definition: future_Matrix.cpp:91
future::Matrix::initActionManager
static void initActionManager()
Definition: future_Matrix.cpp:1488
future::Matrix::Private::d_displayed_digits
int d_displayed_digits
Number of significant digits.
Definition: future_Matrix.h:475
future::Matrix::setDisplayedDigits
void setDisplayedDigits(int digits)
Definition: future_Matrix.cpp:1067
future::Matrix::Private
Definition: future_Matrix.h:370
future::Matrix::Private::d_column_count
int d_column_count
The number of columns.
Definition: future_Matrix.h:461
MatrixView.h
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
ActionManager
Manages QActions and their shortcuts.
Definition: ActionManager.h:84
future::Matrix::clearSelectedCells
void clearSelectedCells()
Definition: future_Matrix.cpp:436
future::Matrix::importImageDialog
void importImageDialog()
Definition: future_Matrix.cpp:943
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
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
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::text
QString text(int row, int col)
Return the text displayed in the given cell.
Definition: future_Matrix.cpp:905
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::Private::d_owner
Matrix * d_owner
The owner aspect.
Definition: future_Matrix.h:459
future::Matrix::rowsAboutToBeInserted
void rowsAboutToBeInserted(int before, int count)
future::Matrix::showMatrixViewRowContextMenu
void showMatrixViewRowContextMenu(const QPoint &pos)
Show a context menu for the selected rows.
Definition: future_Matrix.cpp:841
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::defaultRowHeight
static int defaultRowHeight()
Definition: future_Matrix.h:207
future::Matrix::Private::d_y_end
double d_y_end
Y value corresponding to the last row.
Definition: future_Matrix.h:479
future::Matrix::setYEnd
void setYEnd(double y)
Definition: future_Matrix.cpp:1045
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::Private::removeRows
void removeRows(int first, int count)
Remove Columns.
Definition: future_Matrix.cpp:1595
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
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
future::Matrix::mirrorVertically
void mirrorVertically()
Definition: future_Matrix.cpp:1457
future::Matrix::Private::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:1650
future::Matrix::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:1419
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
AbstractPart
Base class of Aspects with MDI windows as views.
Definition: AbstractPart.h:44