PaintAssistant.h
Go to the documentation of this file.
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
2 
3 /*
4  Sonic Visualiser
5  An audio file viewer and annotation editor.
6  Centre for Digital Music, Queen Mary, University of London.
7  This file copyright 2006-2007 Chris Cannam and QMUL.
8 
9  This program is free software; you can redistribute it and/or
10  modify it under the terms of the GNU General Public License as
11  published by the Free Software Foundation; either version 2 of the
12  License, or (at your option) any later version. See the file
13  COPYING included with this distribution for more information.
14 */
15 
16 #ifndef SV_PAINT_ASSISTANT_H
17 #define SV_PAINT_ASSISTANT_H
18 
19 #include <QRect>
20 #include <QPen>
21 #include <vector>
22 
23 class QPainter;
24 class Layer;
26 
28 {
29 public:
31 
32  static void paintVerticalLevelScale(QPainter &p, QRect rect,
33  double minVal, double maxVal,
34  Scale scale, int &multRtn,
35  std::vector<int> *markCoordRtns = 0);
36 
37  static int getYForValue(Scale scale, double value,
38  double minVal, double maxVal,
39  int minY, int height);
40 
41  enum TextStyle {
45  };
46 
47  static void drawVisibleText(const LayerGeometryProvider *,
48  QPainter &p, int x, int y,
49  QString text, TextStyle style);
50 };
51 
52 #endif
The base class for visual representations of the data found in a Model.
Definition: Layer.h:54
static int getYForValue(Scale scale, double value, double minVal, double maxVal, int minY, int height)
Interface for classes that provide geometry information (such as size, start frame, and a large number of other properties) about the disposition of a layer.
static void paintVerticalLevelScale(QPainter &p, QRect rect, double minVal, double maxVal, Scale scale, int &multRtn, std::vector< int > *markCoordRtns=0)
static void drawVisibleText(const LayerGeometryProvider *, QPainter &p, int x, int y, QString text, TextStyle style)