comparison layer/LayerFactory.h @ 44:ad214997dddb

* Refactor Layer classes so as no longer to store a single View pointer; instead they need to be able to draw themselves on any View on demand. Layers with caches (e.g. spectrogram) will need to be further refactored so as to maintain a per-View cache * Begin refactoring MainWindow by pulling out the document stuff (set of layers, models etc) into a Document class. Not yet in use. This revision is fairly unstable.
author Chris Cannam
date Thu, 02 Mar 2006 16:58:49 +0000
parents 21d061e66177
children f2fe98a7c57e
comparison
equal deleted inserted replaced
43:78515b1e29eb 44:ad214997dddb
12 12
13 #include <QString> 13 #include <QString>
14 #include <set> 14 #include <set>
15 15
16 class Layer; 16 class Layer;
17 class View;
18 class Model; 17 class Model;
19 18
20 class LayerFactory 19 class LayerFactory
21 { 20 {
22 public: 21 public:
48 LayerTypeSet getValidLayerTypes(Model *model); 47 LayerTypeSet getValidLayerTypes(Model *model);
49 LayerTypeSet getValidEmptyLayerTypes(); 48 LayerTypeSet getValidEmptyLayerTypes();
50 49
51 LayerType getLayerType(const Layer *); 50 LayerType getLayerType(const Layer *);
52 51
53 Layer *createLayer(LayerType type, View *view, 52 Layer *createLayer(LayerType type, Model *model = 0, int channel = -1);
54 Model *model = 0, int channel = -1);
55 53
56 QString getLayerPresentationName(LayerType type); 54 QString getLayerPresentationName(LayerType type);
57 55
58 void setModel(Layer *layer, Model *model); 56 void setModel(Layer *layer, Model *model);
59 Model *createEmptyModel(LayerType type, Model *baseModel); 57 Model *createEmptyModel(LayerType type, Model *baseModel);