Mercurial > hg > svgui
diff layer/Layer.cpp @ 363:6167a28d25fc sv1-v1.2pre3
* line up overview widget nicely with main pane (at least on first startup)
* fix #1878396 renaming layer seems to have no visible effect
* comment out some debug output
author | Chris Cannam |
---|---|
date | Wed, 06 Feb 2008 17:40:53 +0000 |
parents | d58701996fae |
children | e1a9e478b7f2 |
line wrap: on
line diff
--- a/layer/Layer.cpp Wed Feb 06 16:21:29 2008 +0000 +++ b/layer/Layer.cpp Wed Feb 06 17:40:53 2008 +0000 @@ -68,10 +68,16 @@ (LayerFactory::getInstance()->getLayerType(this)); } +void +Layer::setPresentationName(QString name) +{ + m_presentationName = name; +} + QString Layer::getLayerPresentationName() const { -// QString layerName = objectName(); + if (m_presentationName != "") return m_presentationName; LayerFactory *factory = LayerFactory::getInstance(); QString layerName = factory->getLayerPresentationName @@ -588,6 +594,11 @@ { stream << indent; + if (m_presentationName != "") { + extraAttributes = QString("%1 presentationName=\"%2\"") + .arg(extraAttributes).arg(encodeEntities(m_presentationName)); + } + stream << QString("<layer id=\"%2\" type=\"%1\" name=\"%3\" model=\"%4\" %5") .arg(encodeEntities(LayerFactory::getInstance()->getLayerTypeName (LayerFactory::getInstance()->getLayerType(this)))) @@ -617,6 +628,11 @@ { stream << indent; + if (m_presentationName != "") { + extraAttributes = QString("%1 presentationName=\"%2\"") + .arg(extraAttributes).arg(encodeEntities(m_presentationName)); + } + stream << QString("<layer id=\"%2\" type=\"%1\" name=\"%3\" model=\"%4\" %5/>\n") .arg(encodeEntities(LayerFactory::getInstance()->getLayerTypeName (LayerFactory::getInstance()->getLayerType(this))))