Mercurial > hg > svgui
comparison 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 |
comparison
equal
deleted
inserted
replaced
259:2d891e02c5ce | 260:6d113226bb4c |
---|---|
120 { | 120 { |
121 setLayerDormant(view, !show); | 121 setLayerDormant(view, !show); |
122 emit layerParametersChanged(); | 122 emit layerParametersChanged(); |
123 } | 123 } |
124 | 124 |
125 bool | |
126 Layer::getXScaleValue(View *v, int x, float &value, QString &unit) const | |
127 { | |
128 if (!hasTimeXAxis()) return false; | |
129 | |
130 const Model *m = getModel(); | |
131 if (!m) return false; | |
132 | |
133 value = float(v->getFrameForX(x)) / m->getSampleRate(); | |
134 unit = "s"; | |
135 return true; | |
136 } | |
137 |