Mercurial > hg > svgui
diff layer/Layer.cpp @ 260:6d113226bb4c
* a bit more work on measurement tool mode
* use arrow cursors on thumbwheels and panner in pane HUD
author | Chris Cannam |
---|---|
date | Thu, 14 Jun 2007 15:20:49 +0000 |
parents | 6969f21da18a |
children | 4ed1446ad604 |
line wrap: on
line diff
--- a/layer/Layer.cpp Wed Jun 13 13:44:19 2007 +0000 +++ b/layer/Layer.cpp Thu Jun 14 15:20:49 2007 +0000 @@ -122,3 +122,16 @@ emit layerParametersChanged(); } +bool +Layer::getXScaleValue(View *v, int x, float &value, QString &unit) const +{ + if (!hasTimeXAxis()) return false; + + const Model *m = getModel(); + if (!m) return false; + + value = float(v->getFrameForX(x)) / m->getSampleRate(); + unit = "s"; + return true; +} +