diff options
author | Robert Jonsson <spamatica@gmail.com> | 2011-03-07 19:01:11 +0000 |
---|---|---|
committer | Robert Jonsson <spamatica@gmail.com> | 2011-03-07 19:01:11 +0000 |
commit | e40fc849149dd97c248866a4a1d026dda5e57b62 (patch) | |
tree | b12b358f3b3a0608001d30403358f8443118ec5f /attic/muse2-oom/muse2/muse/miditransform.h | |
parent | 1bd4f2e8d9745cabb667b043171cad22c8577768 (diff) |
clean3
Diffstat (limited to 'attic/muse2-oom/muse2/muse/miditransform.h')
-rw-r--r-- | attic/muse2-oom/muse2/muse/miditransform.h | 105 |
1 files changed, 105 insertions, 0 deletions
diff --git a/attic/muse2-oom/muse2/muse/miditransform.h b/attic/muse2-oom/muse2/muse/miditransform.h new file mode 100644 index 00000000..4cf444bd --- /dev/null +++ b/attic/muse2-oom/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 "ui_transformbase.h" + +class QListWidgetItem; +class QDialog; +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 QDialog, public Ui::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(QListWidgetItem*); + 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(QDialog* parent = 0, Qt::WFlags fl = 0); + ~MidiTransformerDialog(); + }; + +extern void writeMidiTransforms(int level, Xml& xml); +extern void readMidiTransform(Xml&); +extern void clearMidiTransforms(); +#endif |