comparison transform/TransformFactory.h @ 16:cc98d496d52b

* Add command history class, and basic undo/redo menus. No actual commands to undo/redo yet. Selecting the placeholders sometimes seems to cause a crash, so this looks a little uncertain so far. * Add Rename Layer * Remove models from playback when their layers are removed (and ref counts hit zero) * Don't hang around waiting so much when there's work to be done in the audio buffer fill thread * Put more sensible names on layers generated from transforms * Add basic editing to time-value layer like existing editing in time-instants layer, and make both of them snap to the appropriate resolution during drag
author Chris Cannam
date Mon, 30 Jan 2006 17:51:56 +0000
parents d86891498eef
children 4563a72c1d8b
comparison
equal deleted inserted replaced
15:47500c27ac26 16:cc98d496d52b
9 9
10 #ifndef _TRANSFORM_FACTORY_H_ 10 #ifndef _TRANSFORM_FACTORY_H_
11 #define _TRANSFORM_FACTORY_H_ 11 #define _TRANSFORM_FACTORY_H_
12 12
13 #include "Transform.h" 13 #include "Transform.h"
14
15 #include <map>
14 16
15 class TransformFactory : public QObject 17 class TransformFactory : public QObject
16 { 18 {
17 Q_OBJECT 19 Q_OBJECT
18 20
48 * The returned model is owned by the caller and must be deleted 50 * The returned model is owned by the caller and must be deleted
49 * when no longer needed. 51 * when no longer needed.
50 */ 52 */
51 Model *transform(TransformName name, Model *inputModel); 53 Model *transform(TransformName name, Model *inputModel);
52 54
55 QString getTransformDescription(TransformName name);
56
53 //!!! Need some way to indicate that the input model has changed / 57 //!!! Need some way to indicate that the input model has changed /
54 //been deleted so as not to blow up backgrounded transform! -- Or 58 //been deleted so as not to blow up backgrounded transform! -- Or
55 //indeed, if the output model has been deleted -- could equally 59 //indeed, if the output model has been deleted -- could equally
56 //well happen! 60 //well happen!
57 61
63 protected: 67 protected:
64 Transform *createTransform(TransformName name, Model *inputModel); 68 Transform *createTransform(TransformName name, Model *inputModel);
65 Transform *createTransform(TransformName name, Model *inputModel, 69 Transform *createTransform(TransformName name, Model *inputModel,
66 bool start); 70 bool start);
67 71
72 typedef std::map<TransformName, QString> TransformMap;
73 TransformMap m_transforms;
74 void populateTransforms();
75
68 static TransformFactory *m_instance; 76 static TransformFactory *m_instance;
69 }; 77 };
70 78
71 79
72 #endif 80 #endif