Chris@195: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ Chris@195: Chris@195: /* Chris@195: Sonic Visualiser Chris@195: An audio file viewer and annotation editor. Chris@195: Centre for Digital Music, Queen Mary, University of London. Chris@195: This file copyright 2006-2007 Chris Cannam and QMUL. Chris@195: Chris@195: This program is free software; you can redistribute it and/or Chris@195: modify it under the terms of the GNU General Public License as Chris@195: published by the Free Software Foundation; either version 2 of the Chris@195: License, or (at your option) any later version. See the file Chris@195: COPYING included with this distribution for more information. Chris@195: */ Chris@195: Chris@195: #ifndef _PAINT_ASSISTANT_H_ Chris@195: #define _PAINT_ASSISTANT_H_ Chris@195: Chris@195: #include Chris@195: #include Chris@195: Chris@195: class QPainter; Chris@195: Chris@195: class PaintAssistant Chris@195: { Chris@195: public: Chris@195: enum Scale { LinearScale, MeterScale, dBScale }; Chris@195: Chris@195: static void paintVerticalLevelScale(QPainter &p, QRect rect, Chris@195: float minVal, float maxVal, Chris@220: Scale scale, int &multRtn, Chris@195: std::vector *markCoordRtns = 0); Chris@195: Chris@195: static int getYForValue(Scale scale, float value, Chris@195: float minVal, float maxVal, Chris@195: int minY, int height); Chris@195: }; Chris@195: Chris@195: #endif