Mercurial > hg > svgui
comparison layer/LayerFactory.h @ 374:64e84e5efb76 spectrogram-cache-rejig
* Merge from trunk
author | Chris Cannam |
---|---|
date | Wed, 27 Feb 2008 11:59:42 +0000 |
parents | 4f4f38a11cd2 |
children | 96e4d7b9e165 |
comparison
equal
deleted
inserted
replaced
332:6440e280122e | 374:64e84e5efb76 |
---|---|
19 #include <QString> | 19 #include <QString> |
20 #include <set> | 20 #include <set> |
21 | 21 |
22 class Layer; | 22 class Layer; |
23 class Model; | 23 class Model; |
24 class Clipboard; | |
24 | 25 |
25 class LayerFactory | 26 class LayerFactory |
26 { | 27 { |
27 public: | 28 public: |
28 enum LayerType { | 29 enum LayerType { |
74 | 75 |
75 QString getLayerIconName(LayerType); | 76 QString getLayerIconName(LayerType); |
76 QString getLayerTypeName(LayerType); | 77 QString getLayerTypeName(LayerType); |
77 LayerType getLayerTypeForName(QString); | 78 LayerType getLayerTypeForName(QString); |
78 | 79 |
80 LayerType getLayerTypeForClipboardContents(const Clipboard &); | |
81 | |
79 protected: | 82 protected: |
80 template <typename LayerClass, typename ModelClass> | 83 template <typename LayerClass, typename ModelClass> |
81 bool trySetModel(Layer *layerBase, Model *modelBase) { | 84 bool trySetModel(Layer *layerBase, Model *modelBase) { |
82 LayerClass *layer = dynamic_cast<LayerClass *>(layerBase); | 85 LayerClass *layer = dynamic_cast<LayerClass *>(layerBase); |
83 if (!layer) return false; | 86 if (!layer) return false; |