Mercurial > hg > svcore
comparison base/Layer.cpp @ 47:bac8b14ab355
* Add menu for re-adding existing layers
* Fix layer tree window so that it at least approximates correct
* Add bundled operations in command history, for use with things like
multiple consecutive changes to a parameter value
* Disambiguate plugins that happen to have identical descriptions
* Add spectral centroid plugin (could use some parameters!)
* Some other fixes
author | Chris Cannam |
---|---|
date | Fri, 17 Mar 2006 17:38:28 +0000 |
parents | b8aae4f883b7 |
children | 39ae3dee27b9 |
comparison
equal
deleted
inserted
replaced
46:5364a9d338a2 | 47:bac8b14ab355 |
---|---|
7 This is experimental software. Not for distribution. | 7 This is experimental software. Not for distribution. |
8 */ | 8 */ |
9 | 9 |
10 #include "Layer.h" | 10 #include "Layer.h" |
11 #include "View.h" | 11 #include "View.h" |
12 #include "Model.h" | |
12 | 13 |
13 #include <iostream> | 14 #include <iostream> |
14 | 15 |
15 #include "layer/LayerFactory.h" //!!! shouldn't be including this here -- does that suggest we need to move this into layer/ ? | 16 #include "layer/LayerFactory.h" //!!! shouldn't be including this here -- does that suggest we need to move this into layer/ ? |
16 #include "PlayParameterRepository.h" | 17 #include "PlayParameterRepository.h" |
27 QString | 28 QString |
28 Layer::getPropertyContainerIconName() const | 29 Layer::getPropertyContainerIconName() const |
29 { | 30 { |
30 return LayerFactory::instance()->getLayerIconName | 31 return LayerFactory::instance()->getLayerIconName |
31 (LayerFactory::instance()->getLayerType(this)); | 32 (LayerFactory::instance()->getLayerType(this)); |
33 } | |
34 | |
35 QString | |
36 Layer::getLayerPresentationName() const | |
37 { | |
38 QString layerName = objectName(); | |
39 QString modelName; | |
40 if (getModel()) modelName = getModel()->objectName(); | |
41 | |
42 QString text; | |
43 if (modelName != "") { | |
44 text = QString("%1: %2").arg(modelName).arg(layerName); | |
45 } else { | |
46 text = layerName; | |
47 } | |
48 | |
49 return text; | |
32 } | 50 } |
33 | 51 |
34 void | 52 void |
35 Layer::setObjectName(const QString &name) | 53 Layer::setObjectName(const QString &name) |
36 { | 54 { |