Mercurial > hg > svgui
comparison layer/LayerFactory.h @ 373:0895517bb2d1 1.2-stable
* merge from trunk (1.2 ended up being tracked from trunk, but we may want
this branch for fixes later)
author | Chris Cannam |
---|---|
date | Wed, 27 Feb 2008 10:32:45 +0000 |
parents | 4f4f38a11cd2 |
children | 96e4d7b9e165 |
comparison
equal
deleted
inserted
replaced
337:813170c57b13 | 373:0895517bb2d1 |
---|---|
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; |