Mercurial > hg > svcore
diff 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 |
line wrap: on
line diff
--- a/base/Layer.cpp Thu Mar 16 18:46:00 2006 +0000 +++ b/base/Layer.cpp Fri Mar 17 17:38:28 2006 +0000 @@ -9,6 +9,7 @@ #include "Layer.h" #include "View.h" +#include "Model.h" #include <iostream> @@ -31,6 +32,23 @@ (LayerFactory::instance()->getLayerType(this)); } +QString +Layer::getLayerPresentationName() const +{ + QString layerName = objectName(); + QString modelName; + if (getModel()) modelName = getModel()->objectName(); + + QString text; + if (modelName != "") { + text = QString("%1: %2").arg(modelName).arg(layerName); + } else { + text = layerName; + } + + return text; +} + void Layer::setObjectName(const QString &name) {