comparison layer/LayerFactory.h @ 6:02aaea1ffaf7

* Beginnings of session save code * Add spline curve mode to time value layer
author Chris Cannam
date Thu, 12 Jan 2006 17:19:08 +0000
parents 37b110168acf
children 0183ebb725ca
comparison
equal deleted inserted replaced
5:37b110168acf 6:02aaea1ffaf7
42 virtual ~LayerFactory(); 42 virtual ~LayerFactory();
43 43
44 typedef std::set<LayerType> LayerTypeSet; 44 typedef std::set<LayerType> LayerTypeSet;
45 LayerTypeSet getValidLayerTypes(Model *model); 45 LayerTypeSet getValidLayerTypes(Model *model);
46 46
47 LayerType getLayerType(Layer *); 47 LayerType getLayerType(const Layer *);
48 48
49 Layer *createLayer(LayerType type, View *view, 49 Layer *createLayer(LayerType type, View *view,
50 Model *model = 0, int channel = -1); 50 Model *model = 0, int channel = -1);
51 51
52 QString getLayerPresentationName(LayerType type); 52 QString getLayerPresentationName(LayerType type);
53 53
54 void setModel(Layer *layer, Model *model); 54 void setModel(Layer *layer, Model *model);
55
56 QString getLayerTypeName(LayerType);
57 LayerType getLayerTypeForName(QString);
55 58
56 protected: 59 protected:
57 template <typename LayerClass, typename ModelClass> 60 template <typename LayerClass, typename ModelClass>
58 bool trySetModel(Layer *layerBase, Model *modelBase) { 61 bool trySetModel(Layer *layerBase, Model *modelBase) {
59 LayerClass *layer = dynamic_cast<LayerClass *>(layerBase); 62 LayerClass *layer = dynamic_cast<LayerClass *>(layerBase);