Mercurial > hg > svcore
comparison data/model/EditableDenseThreeDimensionalModel.cpp @ 886:48410857b03c
Add bin-values and bin-value unit to EditableDense3DModel
author | Chris Cannam |
---|---|
date | Thu, 06 Feb 2014 18:26:18 +0000 |
parents | e802e550a1f2 |
children | 59e7fe1b1003 |
comparison
equal
deleted
inserted
replaced
885:12a6140b3ae0 | 886:48410857b03c |
---|---|
408 m_binNames = names; | 408 m_binNames = names; |
409 emit modelChanged(); | 409 emit modelChanged(); |
410 } | 410 } |
411 | 411 |
412 bool | 412 bool |
413 EditableDenseThreeDimensionalModel::hasBinValues() const | |
414 { | |
415 return !m_binValues.empty(); | |
416 } | |
417 | |
418 float | |
419 EditableDenseThreeDimensionalModel::getBinValue(size_t n) const | |
420 { | |
421 if (n < m_binValues.size()) return m_binValues[n]; | |
422 else return 0.f; | |
423 } | |
424 | |
425 void | |
426 EditableDenseThreeDimensionalModel::setBinValues(std::vector<float> values) | |
427 { | |
428 m_binValues = values; | |
429 } | |
430 | |
431 QString | |
432 EditableDenseThreeDimensionalModel::getBinValueUnit() const | |
433 { | |
434 return m_binValueUnit; | |
435 } | |
436 | |
437 void | |
438 EditableDenseThreeDimensionalModel::setBinValueUnit(QString unit) | |
439 { | |
440 m_binValueUnit = unit; | |
441 } | |
442 | |
443 bool | |
413 EditableDenseThreeDimensionalModel::shouldUseLogValueScale() const | 444 EditableDenseThreeDimensionalModel::shouldUseLogValueScale() const |
414 { | 445 { |
415 QReadLocker locker(&m_lock); | 446 QReadLocker locker(&m_lock); |
416 | 447 |
417 QVector<float> sample; | 448 QVector<float> sample; |