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)  

tablecommands.h
Go to the documentation of this file.
1 
11 
30 #ifndef TABLE_COMMANDS_H
31 #define TABLE_COMMANDS_H
32 
33 #include <QUndoCommand>
34 #include <QAbstractItemModel>
35 #include <QModelIndex>
36 #include <QItemSelection>
37 #include "core/column/Column.h"
39 #include "table/future_Table.h"
40 #include "core/AbstractFilter.h"
41 #include "lib/IntervalAttribute.h"
42 
44 // class TableInsertColumnsCmd
47 
50 class TableInsertColumnsCmd : public QUndoCommand
51 {
52 public:
53  TableInsertColumnsCmd( future::Table::Private& private_obj, int before, QList<Column*> cols, QUndoCommand * parent = 0 );
54 
55  void redo() override;
56  void undo() override;
57 
58 private:
62  int d_before;
64  QList<Column*> d_cols;
67 
68 };
69 
71 // end of class TableInsertColumnsCmd
73 
75 // class TableSetNumberOfRowsCmd
78 class TableSetNumberOfRowsCmd : public QUndoCommand
79 {
80 public:
81  TableSetNumberOfRowsCmd( future::Table::Private& private_obj, int rows, QUndoCommand * parent = 0 );
82 
83  void redo() override;
84  void undo() override;
85 
86 private:
90  int d_rows;
93 };
94 
96 // end of class TableSetNumberOfRowsCmd
98 
100 // class TableRemoveColumnsCmd
103 class TableRemoveColumnsCmd : public QUndoCommand
104 {
105 public:
106  TableRemoveColumnsCmd( future::Table::Private& private_obj, int first, int count, QList<Column*> cols, QUndoCommand * parent = 0 );
107 
108  void redo() override;
109  void undo() override;
110 
111 private:
115  int d_first;
117  int d_count;
119  QList<Column*> d_old_cols;
120 };
121 
123 // end of class TableRemoveColumnsCmd
125 
127 // class TableMoveColumnCmd
130 class TableMoveColumnCmd : public QUndoCommand
131 {
132 public:
133  TableMoveColumnCmd( future::Table::Private& private_obj, int from, int to, QUndoCommand * parent = 0 );
134 
135  void redo() override;
136  void undo() override;
137 
138 private:
142  int d_from;
144  int d_to;
145 };
146 
148 // end of class TableMoveColumnCmd
150 
151 #endif // ifndef TABLE_COMMANDS_H
TableRemoveColumnsCmd
Remove columns.
Definition: tablecommands.h:104
TableSetNumberOfRowsCmd
Set the number of rows in the table.
Definition: tablecommands.h:79
TableMoveColumnCmd::d_from
int d_from
The old column index.
Definition: tablecommands.h:142
AbstractFilter.h
TableRemoveColumnsCmd::d_count
int d_count
The number of columns to be removed.
Definition: tablecommands.h:117
TableMoveColumnCmd::undo
void undo() override
Definition: tablecommands.cpp:127
TableInsertColumnsCmd::redo
void redo() override
Definition: tablecommands.cpp:47
Column.h
TableMoveColumnCmd::d_to
int d_to
The new column index.
Definition: tablecommands.h:144
TableInsertColumnsCmd::d_rows_before
int d_rows_before
Row count before the command.
Definition: tablecommands.h:66
TableMoveColumnCmd::redo
void redo() override
Definition: tablecommands.cpp:122
future_Table.h
TableRemoveColumnsCmd::TableRemoveColumnsCmd
TableRemoveColumnsCmd(future::Table::Private &private_obj, int first, int count, QList< Column * > cols, QUndoCommand *parent=0)
Definition: tablecommands.cpp:90
TableRemoveColumnsCmd::redo
void redo() override
Definition: tablecommands.cpp:96
TableSetNumberOfRowsCmd::TableSetNumberOfRowsCmd
TableSetNumberOfRowsCmd(future::Table::Private &private_obj, int rows, QUndoCommand *parent=0)
Definition: tablecommands.cpp:66
TableInsertColumnsCmd::d_cols
QList< Column * > d_cols
The new columns.
Definition: tablecommands.h:64
ColumnPrivate.h
TableMoveColumnCmd::d_private_obj
future::Table::Private & d_private_obj
The private object to modify.
Definition: tablecommands.h:140
IntervalAttribute.h
TableRemoveColumnsCmd::d_first
int d_first
The first column.
Definition: tablecommands.h:115
TableRemoveColumnsCmd::d_private_obj
future::Table::Private & d_private_obj
The private object to modify.
Definition: tablecommands.h:113
TableRemoveColumnsCmd::undo
void undo() override
Definition: tablecommands.cpp:101
TableInsertColumnsCmd::d_private_obj
future::Table::Private & d_private_obj
The private object to modify.
Definition: tablecommands.h:60
TableSetNumberOfRowsCmd::d_old_rows
int d_old_rows
Number of rows before.
Definition: tablecommands.h:92
TableInsertColumnsCmd::d_before
int d_before
Column to insert before.
Definition: tablecommands.h:62
TableSetNumberOfRowsCmd::undo
void undo() override
Definition: tablecommands.cpp:78
TableSetNumberOfRowsCmd::d_private_obj
future::Table::Private & d_private_obj
The private object to modify.
Definition: tablecommands.h:88
TableInsertColumnsCmd
Insert columns.
Definition: tablecommands.h:51
TableSetNumberOfRowsCmd::redo
void redo() override
Definition: tablecommands.cpp:72
TableMoveColumnCmd
Move a column.
Definition: tablecommands.h:131
TableInsertColumnsCmd::TableInsertColumnsCmd
TableInsertColumnsCmd(future::Table::Private &private_obj, int before, QList< Column * > cols, QUndoCommand *parent=0)
Definition: tablecommands.cpp:41
TableMoveColumnCmd::TableMoveColumnCmd
TableMoveColumnCmd(future::Table::Private &private_obj, int from, int to, QUndoCommand *parent=0)
Definition: tablecommands.cpp:113
TableInsertColumnsCmd::undo
void undo() override
Definition: tablecommands.cpp:53
future::Table::Private
Definition: future_Table.h:486
TableSetNumberOfRowsCmd::d_rows
int d_rows
Number of rows.
Definition: tablecommands.h:90
TableRemoveColumnsCmd::d_old_cols
QList< Column * > d_old_cols
The removed columns.
Definition: tablecommands.h:119