Chris@690: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ Chris@690: Chris@690: /* Chris@690: Sonic Visualiser Chris@690: An audio file viewer and annotation editor. Chris@690: Centre for Digital Music, Queen Mary, University of London. Chris@690: This file copyright 2006-2013 Chris Cannam and QMUL. Chris@690: Chris@690: This program is free software; you can redistribute it and/or Chris@690: modify it under the terms of the GNU General Public License as Chris@690: published by the Free Software Foundation; either version 2 of the Chris@690: License, or (at your option) any later version. See the file Chris@690: COPYING included with this distribution for more information. Chris@690: */ Chris@690: Chris@690: #ifndef PIANO_SCALE_H Chris@690: #define PIANO_SCALE_H Chris@690: Chris@690: #include Chris@690: Chris@690: class QPainter; Chris@918: class LayerGeometryProvider; Chris@690: Chris@690: class PianoScale Chris@690: { Chris@690: public: Chris@690: void paintPianoVertical Chris@917: (LayerGeometryProvider *v, QPainter &paint, QRect rect, double minf, double maxf); Chris@1238: Chris@1238: class HorizontalScaleProvider { Chris@1238: public: Chris@1238: virtual double getFrequencyForX(const LayerGeometryProvider *, double x) const = 0; Chris@1238: virtual double getXForFrequency(const LayerGeometryProvider *, double freq) const = 0; Chris@1238: }; Chris@1238: Chris@1238: void paintPianoHorizontal Chris@1238: (LayerGeometryProvider *v, const HorizontalScaleProvider *p, Chris@1238: QPainter &paint, QRect rect); Chris@690: }; Chris@690: Chris@690: #endif Chris@690: Chris@690: Chris@690: