summaryrefslogtreecommitdiff
path: root/muse2/muse/miditransform.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/miditransform.h
parenta27706d9629e8b592cca4659f865b70adef24e6d (diff)
new branch muse2, first checkin
Diffstat (limited to 'muse2/muse/miditransform.h')
-rw-r--r--muse2/muse/miditransform.h105
1 files changed, 105 insertions, 0 deletions
diff --git a/muse2/muse/miditransform.h b/muse2/muse/miditransform.h
new file mode 100644
index 00000000..3dcb4a98
--- /dev/null
+++ b/muse2/muse/miditransform.h
@@ -0,0 +1,105 @@
+//=========================================================
+// MusE
+// Linux Music Editor
+// $Id: miditransform.h,v 1.2.2.2 2009/02/02 21:38:00 terminator356 Exp $
+//
+// (C) Copyright 2001 Werner Schweer (ws@seh.de)
+//=========================================================
+
+#ifndef __MIDITRANSFORM_H__
+#define __MIDITRANSFORM_H__
+
+#include "transformbase.h"
+
+class Q3ListBoxItem;
+class MidiTransformation;
+class MidiTransformPrivate;
+class Event;
+class MidiPart;
+class Xml;
+
+enum ValOp {
+ All=0, Ignore=0, Equal=1, Unequal=2, Higher=3, Lower=4,
+ Inside=5, Outside=6
+ };
+
+enum TransformFunction {
+ Select, Quantize, Delete, Transform, Insert, Copy, Extract
+ };
+
+enum TransformOperator {
+ Keep, Plus, Minus, Multiply, Divide, Fix, Value, Invert,
+ ScaleMap, Flip, Dynamic, Random
+ };
+
+//---------------------------------------------------------
+// MidiTransformDialog
+//---------------------------------------------------------
+
+class MidiTransformerDialog : public MidiTransformDialogBase {
+ Q_OBJECT
+ MidiTransformPrivate* data;
+
+ virtual void accept();
+// virtual void reject();
+ void setValOp(QWidget* a, QWidget* b, ValOp op);
+ void processEvent(Event&, MidiPart*, MidiPart*);
+ bool isSelected(Event&, MidiPart*);
+ void transformEvent(Event&, MidiPart*, MidiPart*);
+ bool typesMatch(Event& e, unsigned selType);
+
+ void updatePresetList();
+
+ private slots:
+ void apply();
+ void presetNew();
+ void presetDelete();
+
+ void selEventOpSel(int);
+ void selTypeSel(int);
+ void selVal1OpSel(int);
+ void selVal2OpSel(int);
+ void selLenOpSel(int);
+ void selRangeOpSel(int);
+ void procEventOpSel(int);
+ void procEventTypeSel(int);
+ void procVal1OpSel(int);
+ void procVal2OpSel(int);
+ void procLenOpSel(int);
+ void procPosOpSel(int);
+ void funcOpSel(int);
+ void presetChanged(Q3ListBoxItem*);
+ void nameChanged(const QString&);
+ void commentChanged();
+ void selVal1aChanged(int);
+ void selVal1bChanged(int);
+ void selVal2aChanged(int);
+ void selVal2bChanged(int);
+ void selLenAChanged(int);
+ void selLenBChanged(int);
+ void selBarAChanged(int);
+ void selBarBChanged(int);
+ void procVal1aChanged(int);
+ void procVal1bChanged(int);
+ void procVal2aChanged(int);
+ void procVal2bChanged(int);
+ void procLenAChanged(int);
+ void procPosAChanged(int);
+ void funcQuantValSel(int);
+ void processAllChanged(bool);
+ void selectedTracksChanged(bool);
+ void insideLoopChanged(bool);
+
+ public slots:
+ void songChanged(int);
+
+ public:
+ MidiTransformerDialog(QWidget* parent = 0, const char* name = 0,
+ bool modal = false, Qt::WFlags fl = 0);
+ ~MidiTransformerDialog();
+ };
+
+extern void writeMidiTransforms(int level, Xml& xml);
+extern void readMidiTransform(Xml&);
+extern void clearMidiTransforms();
+#endif