Mercurial > hg > svgui
changeset 327:29fcf125f98b
* Pass StorageAdviser::Criteria into FFTModel constructor etc
author | Chris Cannam |
---|---|
date | Sun, 11 Nov 2007 20:31:12 +0000 |
parents | 4f4f38a11cd2 |
children | b6df8b44b98d |
files | layer/LayerFactory.cpp layer/SpectrogramLayer.cpp layer/SpectrumLayer.cpp view/Pane.cpp |
diffstat | 4 files changed, 23 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/layer/LayerFactory.cpp Fri Nov 09 17:46:58 2007 +0000 +++ b/layer/LayerFactory.cpp Sun Nov 11 20:31:12 2007 +0000 @@ -418,8 +418,8 @@ std::cerr << "LayerFactory::createLayer: Unknown layer type " << type << std::endl; } else { -// std::cerr << "LayerFactory::createLayer: Setting object name " -// << getLayerPresentationName(type).toStdString() << " on " << layer << std::endl; + std::cerr << "LayerFactory::createLayer: Setting object name " + << getLayerPresentationName(type).toStdString() << " on " << layer << std::endl; layer->setObjectName(getLayerPresentationName(type)); setLayerDefaultProperties(type, layer); } @@ -430,11 +430,15 @@ void LayerFactory::setLayerDefaultProperties(LayerType type, Layer *layer) { + std::cerr << "LayerFactory::setLayerDefaultProperties: type " << type << " (name \"" << getLayerTypeName(type).toStdString() << "\"" << std::endl; + QSettings settings; settings.beginGroup("LayerDefaults"); QString defaults = settings.value(getLayerTypeName(type), "").toString(); if (defaults == "") return; + std::cerr << "defaults=\"" << defaults.toStdString() << "\"" << std::endl; + QString xml = layer->toXmlString(); QDomDocument docOld, docNew; @@ -449,6 +453,9 @@ for (unsigned int i = 0; i < attrNodes.length(); ++i) { QDomAttr attr = attrNodes.item(i).toAttr(); if (attr.isNull()) continue; + std::cerr << "append \"" << attr.name().toStdString() + << "\" -> \"" << attr.value().toStdString() << "\"" + << std::endl; attrs.append(attr.name(), "", "", attr.value()); } @@ -458,6 +465,9 @@ QDomAttr attr = attrNodes.item(i).toAttr(); if (attr.isNull()) continue; if (attrs.value(attr.name()) == "") { + std::cerr << "append \"" << attr.name().toStdString() + << "\" -> \"" << attr.value().toStdString() << "\"" + << std::endl; attrs.append(attr.name(), "", "", attr.value()); } }
--- a/layer/SpectrogramLayer.cpp Fri Nov 09 17:46:58 2007 +0000 +++ b/layer/SpectrogramLayer.cpp Sun Nov 11 20:31:12 2007 +0000 @@ -878,6 +878,9 @@ void SpectrogramLayer::setNormalizeVisibleArea(bool n) { + std::cerr << "SpectrogramLayer::setNormalizeVisibleArea(" << n + << ") (from " << m_normalizeVisibleArea << ")" << std::endl; + if (m_normalizeVisibleArea == n) return; invalidatePixmapCaches(); @@ -1539,8 +1542,8 @@ m_windowSize, getWindowIncrement(), fftSize, -//!!! true, - false, + true, + StorageAdviser::SpeedCritical, m_candidateFillStartFrame); if (!model->isOK()) {
--- a/layer/SpectrumLayer.cpp Fri Nov 09 17:46:58 2007 +0000 +++ b/layer/SpectrumLayer.cpp Sun Nov 11 20:31:12 2007 +0000 @@ -84,7 +84,10 @@ m_windowSize, getWindowIncrement(), m_windowSize, - true); + false, + StorageAdviser::Criteria + (StorageAdviser::SpeedCritical | + StorageAdviser::FrequentLookupLikely)); setSliceableModel(newFFT);
--- a/view/Pane.cpp Fri Nov 09 17:46:58 2007 +0000 +++ b/view/Pane.cpp Sun Nov 11 20:31:12 2007 +0000 @@ -810,6 +810,8 @@ { QString title = model->getTitle(); QString maker = model->getMaker(); +//std::cerr << "Pane::drawWorkTitle: title=\"" << title.toStdString() +//<< "\", maker=\"" << maker.toStdString() << "\"" << std::endl; if (title == "") return; QString text = title;