comparison layer/TimeValueLayer.cpp @ 552:2e8194a30f40 sv-v1.7.1

* Layer data editor window: fix sorting for columns in region model, add Find feature * RDF import: assign names to layers based on event types, if no suitable labels are found in the RDF * Add label to status bar showing the last text that was passed in current layer (so e.g. counting 1, 2, 3, 4 if that's what beats are labelled) * Better layout of text labels for region layers in segmentation mode when they are close together * Give text layer the same method for finding "nearest point" as region and note layers, should improve its editability
author Chris Cannam
date Thu, 22 Oct 2009 15:54:21 +0000
parents e60e6fccfe4e
children 97e60a895211
comparison
equal deleted inserted replaced
551:c2ba2796cbee 552:2e8194a30f40
503 503
504 return usePoints; 504 return usePoints;
505 } 505 }
506 506
507 QString 507 QString
508 TimeValueLayer::getLabelPreceding(size_t frame) const
509 {
510 if (!m_model) return "";
511 SparseTimeValueModel::PointList points = m_model->getPreviousPoints(frame);
512 for (SparseTimeValueModel::PointList::const_iterator i = points.begin();
513 i != points.end(); ++i) {
514 if (i->label != "") return i->label;
515 }
516 return "";
517 }
518
519 QString
508 TimeValueLayer::getFeatureDescription(View *v, QPoint &pos) const 520 TimeValueLayer::getFeatureDescription(View *v, QPoint &pos) const
509 { 521 {
510 int x = pos.x(); 522 int x = pos.x();
511 523
512 if (!m_model || !m_model->getSampleRate()) return ""; 524 if (!m_model || !m_model->getSampleRate()) return "";