SciDAVis
1.D4
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
scidavis
src
future
table
tablecommands.h
Go to the documentation of this file.
1
/***************************************************************************
2
File : tablecommands.h
3
Project : SciDAVis
4
Description : Commands used in Table (part of the undo/redo framework)
5
--------------------------------------------------------------------
6
Copyright : (C) 2007 Tilman Benkert (thzs*gmx.net)
7
(replace * with @ in the email addresses)
8
9
***************************************************************************/
10
11
/***************************************************************************
12
* *
13
* This program is free software; you can redistribute it and/or modify *
14
* it under the terms of the GNU General Public License as published by *
15
* the Free Software Foundation; either version 2 of the License, or *
16
* (at your option) any later version. *
17
* *
18
* This program is distributed in the hope that it will be useful, *
19
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
20
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
21
* GNU General Public License for more details. *
22
* *
23
* You should have received a copy of the GNU General Public License *
24
* along with this program; if not, write to the Free Software *
25
* Foundation, Inc., 51 Franklin Street, Fifth Floor, *
26
* Boston, MA 02110-1301 USA *
27
* *
28
***************************************************************************/
29
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
"
38
#include "
core/column/ColumnPrivate.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
~TableInsertColumnsCmd
();
55
56
virtual
void
redo
();
57
virtual
void
undo
();
58
59
private
:
61
future::Table::Private
*
d_private_obj
;
63
int
d_before
;
65
QList<Column*>
d_cols
;
67
int
d_rows_before
;
68
69
};
70
72
// end of class TableInsertColumnsCmd
74
76
// class TableSetNumberOfRowsCmd
79
class
TableSetNumberOfRowsCmd
:
public
QUndoCommand
80
{
81
public
:
82
TableSetNumberOfRowsCmd
(
future::Table::Private
* private_obj,
int
rows, QUndoCommand * parent = 0 );
83
~TableSetNumberOfRowsCmd
();
84
85
virtual
void
redo
();
86
virtual
void
undo
();
87
88
private
:
90
future::Table::Private
*
d_private_obj
;
92
int
d_rows
;
94
int
d_old_rows
;
95
};
96
98
// end of class TableSetNumberOfRowsCmd
100
102
// class TableRemoveColumnsCmd
105
class
TableRemoveColumnsCmd
:
public
QUndoCommand
106
{
107
public
:
108
TableRemoveColumnsCmd
(
future::Table::Private
* private_obj,
int
first,
int
count, QList<Column*> cols, QUndoCommand * parent = 0 );
109
~TableRemoveColumnsCmd
();
110
111
virtual
void
redo
();
112
virtual
void
undo
();
113
114
private
:
116
future::Table::Private
*
d_private_obj
;
118
int
d_first
;
120
int
d_count
;
122
QList<Column*>
d_old_cols
;
123
};
124
126
// end of class TableRemoveColumnsCmd
128
130
// class TableMoveColumnCmd
133
class
TableMoveColumnCmd
:
public
QUndoCommand
134
{
135
public
:
136
TableMoveColumnCmd
(
future::Table::Private
* private_obj,
int
from,
int
to, QUndoCommand * parent = 0 );
137
~TableMoveColumnCmd
();
138
139
virtual
void
redo
();
140
virtual
void
undo
();
141
142
private
:
144
future::Table::Private
*
d_private_obj
;
146
int
d_from
;
148
int
d_to
;
149
};
150
152
// end of class TableMoveColumnCmd
154
155
#endif // ifndef TABLE_COMMANDS_H
Generated by
1.8.1