kwave  18.07.70
UndoAction.h
Go to the documentation of this file.
1 /***************************************************************************
2  UndoAction.h - Abstract base class for undo actions
3  -------------------
4  begin : Sat May 26 2001
5  copyright : (C) 2001 by Thomas Eschenbacher
6  email : Thomas Eschenbacher <Thomas.Eschenbacher@gmx.de>
7 
8  ***************************************************************************/
9 
10 /***************************************************************************
11  * *
12  * This program is free software; you can redistribute it and/or modify *
13  * it under the terms of the GNU General Public License as published by *
14  * the Free Software Foundation; either version 2 of the License, or *
15  * (at your option) any later version. *
16  * *
17  ***************************************************************************/
18 
19 #ifndef UNDO_ACTION_H
20 #define UNDO_ACTION_H
21 
22 #include "config.h"
23 
24 #include <QtGlobal>
25 #include <QString>
26 
27 #include "libkwave/String.h"
28 
29 namespace Kwave
30 {
31 
32  class SignalManager;
33 
44  class Q_DECL_EXPORT UndoAction
45  {
46 
47  public:
48 
50  virtual ~UndoAction()
51  {
52  }
53 
57  virtual QString description() = 0;
58 
65  virtual qint64 undoSize() = 0;
66 
71  virtual qint64 redoSize() = 0;
72 
79  virtual bool store(Kwave::SignalManager &manager) = 0;
80 
91  virtual Kwave::UndoAction *undo(Kwave::SignalManager &manager,
92  bool with_redo) = 0;
93 
102  virtual bool containsModification() const { return true; }
103 
105  virtual void dump(const QString &indent) {
106  qDebug("%s%s", DBG(indent), DBG(description()));
107  }
108 
109  };
110 }
111 
112 #endif /* UNDO_ACTION_H */
113 
114 //***************************************************************************
115 //***************************************************************************
virtual ~UndoAction()
Definition: UndoAction.h:50
Definition: App.h:33
virtual void dump(const QString &indent)
Definition: UndoAction.h:105
#define DBG(qs)
Definition: String.h:55
virtual bool containsModification() const
Definition: UndoAction.h:102