summaryrefslogtreecommitdiff
path: root/muse2/muse/undo.h
diff options
context:
space:
mode:
authorRobert Jonsson <spamatica@gmail.com>2010-10-13 19:34:22 +0000
committerRobert Jonsson <spamatica@gmail.com>2010-10-13 19:34:22 +0000
commit8a2c2824a59d7644e13bc52c9a0ecbd641f21f95 (patch)
tree064ad3f2bf8daab0ad27b128abd86a9bbdb1e496 /muse2/muse/undo.h
parenta27706d9629e8b592cca4659f865b70adef24e6d (diff)
new branch muse2, first checkin
Diffstat (limited to 'muse2/muse/undo.h')
-rw-r--r--muse2/muse/undo.h102
1 files changed, 102 insertions, 0 deletions
diff --git a/muse2/muse/undo.h b/muse2/muse/undo.h
new file mode 100644
index 00000000..c20fe3f5
--- /dev/null
+++ b/muse2/muse/undo.h
@@ -0,0 +1,102 @@
+//=========================================================
+// MusE
+// Linux Music Editor
+// $Id: undo.h,v 1.6.2.5 2009/05/24 21:43:44 terminator356 Exp $
+//
+// (C) Copyright 1999/2000 Werner Schweer (ws@seh.de)
+//=========================================================
+
+#ifndef __UNDO_H__
+#define __UNDO_H__
+
+#include <list>
+#include <qstring.h>
+#include "event.h"
+#include "marker/marker.h"
+
+class Track;
+class TEvent;
+class SigEvent;
+class Part;
+
+extern std::list<QString> temporaryWavFiles; //!< Used for storing all tmp-files, for cleanup on shutdown
+//---------------------------------------------------------
+// UndoOp
+//---------------------------------------------------------
+
+struct UndoOp {
+ enum UndoType {
+ AddTrack, DeleteTrack, ModifyTrack,
+ AddPart, DeletePart, ModifyPart,
+ AddEvent, DeleteEvent, ModifyEvent,
+ AddTempo, DeleteTempo,
+ AddSig, DeleteSig,
+ SwapTrack,
+ ModifyClip,
+ ModifyMarker
+ };
+ UndoType type;
+
+ union {
+ struct {
+ int a;
+ int b;
+ int c;
+ };
+ struct {
+ Track* oTrack;
+ Track* nTrack;
+ int trackno;
+ };
+ struct {
+ Part* oPart;
+ Part* nPart;
+ };
+ struct {
+ Part* part;
+ };
+ struct {
+ SigEvent* nSignature;
+ SigEvent* oSignature;
+ };
+ struct {
+ int channel;
+ int ctrl;
+ int oVal;
+ int nVal;
+ };
+ struct {
+ int startframe; //!< Start frame of changed data
+ int endframe; //!< End frame of changed data
+ const char* filename; //!< The file that is changed
+ const char* tmpwavfile; //!< The file with the changed data
+ };
+ struct {
+ Marker* realMarker;
+ Marker* copyMarker;
+ };
+ };
+ Event oEvent;
+ Event nEvent;
+ bool doCtrls;
+ bool doClones;
+ const char* typeName();
+ void dump();
+ };
+
+class Undo : public std::list<UndoOp> {
+ void undoOp(UndoOp::UndoType, int data);
+ };
+
+typedef Undo::iterator iUndoOp;
+typedef Undo::reverse_iterator riUndoOp;
+
+class UndoList : public std::list<Undo> {
+ public:
+ void clearDelete();
+ };
+
+typedef UndoList::iterator iUndo;
+
+
+#endif // __UNDO_H__