diff layer/LayerFactory.h @ 17:0183ebb725ca

* Add ability to create empty layers for editing * Add first basic editing capability (adding points to a time instant layer) * Add various keyboard and mouse shortcuts for navigation &c * Add ability to resize a selection by dragging its edges * Add maximum zoom level
author Chris Cannam
date Thu, 26 Jan 2006 16:15:40 +0000
parents 02aaea1ffaf7
children ea6fe8cfcdd5
line wrap: on
line diff
--- a/layer/LayerFactory.h	Thu Jan 26 11:56:09 2006 +0000
+++ b/layer/LayerFactory.h	Thu Jan 26 16:15:40 2006 +0000
@@ -43,6 +43,7 @@
 
     typedef std::set<LayerType> LayerTypeSet;
     LayerTypeSet getValidLayerTypes(Model *model);
+    LayerTypeSet getValidEmptyLayerTypes();
 
     LayerType getLayerType(const Layer *);
 
@@ -52,7 +53,9 @@
     QString getLayerPresentationName(LayerType type);
 
     void setModel(Layer *layer, Model *model);
+    Model *createEmptyModel(LayerType type, Model *baseModel);
 
+    QString getLayerIconName(LayerType);
     QString getLayerTypeName(LayerType);
     LayerType getLayerTypeForName(QString);
 
@@ -62,6 +65,7 @@
 	LayerClass *layer = dynamic_cast<LayerClass *>(layerBase);
 	if (!layer) return false;
 	ModelClass *model = dynamic_cast<ModelClass *>(modelBase);
+	if (!model) return false;
 	layer->setModel(model);
 	return true;
     }