1
/***************************************************************************
2
twintableundo - description
5
copyright : (C) 2006 by Thomas Friedrichsmeier
6
email : tfry@users.sourceforge.net
7
***************************************************************************/
9
/***************************************************************************
11
* This program is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU General Public License as published by *
13
* the Free Software Foundation; either version 2 of the License, or *
14
* (at your option) any later version. *
16
***************************************************************************/
18
#ifndef TWINTABLEUNDO_H
19
#define TWINTABLEUNDO_H
23
class TwinTableMember;
25
class TwinTableCommand : public KCommand {
27
TwinTableCommand (TwinTableMember *table, int row, int col, const QString &new_text);
29
/** reimplemented from KCommand to return "Edit Cell" */
30
QString name () const;
31
/** reimplemented from KCommand to redo editing the cell */
33
/** reimplemented from KCommand to revert the cell */
38
TwinTableMember *table;
43
class TwinTablePasteCommand : public KCommand {
45
TwinTableCommand (TwinTableMember *table, int top_row, int left_col, int bottom_row, int right_col, const QCString &old_content, const QCString &pasted);
47
/** reimplemented from KCommand to return "Edit Cell" */
48
QString name () const;
49
/** reimplemented from KCommand to redo pasting */
51
/** reimplemented from KCommand to undo pasting */
58
TwinTableMember *table;
63
class TwinTableUndo : public KCommandHistory {
65
TwinTableUndo (KActionCollection *actionCollection);
68
/** basically a wrapper around KCommandHistory::addCommand () */
69
void makeChange (TwinTableMember *table, int row, int col, const QString &new_text);
70
void startBlock (const QString &name);
73
TwinTableCommandSequence *current_block;