Mercurial > hg > svgui
comparison layer/TimeValueLayer.cpp @ 1078:ee01a4062747 spectrogram-minor-refactor
Move drawVisibleText to PaintAssistant
author | Chris Cannam |
---|---|
date | Thu, 30 Jun 2016 12:40:22 +0100 |
parents | fa96108d552d |
children | 69ff93e0c624 |
comparison
equal
deleted
inserted
replaced
1077:5144d7185fb5 | 1078:ee01a4062747 |
---|---|
19 #include "base/RealTime.h" | 19 #include "base/RealTime.h" |
20 #include "base/Profiler.h" | 20 #include "base/Profiler.h" |
21 #include "base/LogRange.h" | 21 #include "base/LogRange.h" |
22 #include "base/RangeMapper.h" | 22 #include "base/RangeMapper.h" |
23 #include "base/Pitch.h" | 23 #include "base/Pitch.h" |
24 #include "ColourDatabase.h" | |
25 #include "view/View.h" | 24 #include "view/View.h" |
26 | 25 |
27 #include "data/model/SparseTimeValueModel.h" | 26 #include "data/model/SparseTimeValueModel.h" |
28 #include "data/model/Labeller.h" | 27 #include "data/model/Labeller.h" |
29 | 28 |
30 #include "widgets/ItemEditDialog.h" | 29 #include "widgets/ItemEditDialog.h" |
31 #include "widgets/ListInputDialog.h" | 30 #include "widgets/ListInputDialog.h" |
32 #include "widgets/TextAbbrev.h" | 31 #include "widgets/TextAbbrev.h" |
33 | 32 |
33 #include "ColourDatabase.h" | |
34 #include "ColourMapper.h" | 34 #include "ColourMapper.h" |
35 #include "PianoScale.h" | 35 #include "PianoScale.h" |
36 #include "LinearNumericalScale.h" | 36 #include "LinearNumericalScale.h" |
37 #include "LogNumericalScale.h" | 37 #include "LogNumericalScale.h" |
38 #include "LinearColourScale.h" | 38 #include "LinearColourScale.h" |
39 #include "LogColourScale.h" | 39 #include "LogColourScale.h" |
40 #include "PaintAssistant.h" | |
40 | 41 |
41 #include <QPainter> | 42 #include <QPainter> |
42 #include <QPainterPath> | 43 #include <QPainterPath> |
43 #include <QMouseEvent> | 44 #include <QMouseEvent> |
44 #include <QRegExp> | 45 #include <QRegExp> |
1212 haveRoom = (haveRoom && | 1213 haveRoom = (haveRoom && |
1213 (nx > x + 6 + paint.fontMetrics().width(label))); | 1214 (nx > x + 6 + paint.fontMetrics().width(label))); |
1214 if (haveRoom || | 1215 if (haveRoom || |
1215 (!haveNext && | 1216 (!haveNext && |
1216 (pointCount == 0 || !italic))) { | 1217 (pointCount == 0 || !italic))) { |
1217 v->drawVisibleText(paint, x + 5, textY, label, | 1218 PaintAssistant::drawVisibleText(v, paint, x + 5, textY, label, |
1218 italic ? | 1219 italic ? |
1219 View::OutlinedItalicText : | 1220 PaintAssistant::OutlinedItalicText : |
1220 View::OutlinedText); | 1221 PaintAssistant::OutlinedText); |
1221 } | 1222 } |
1222 } | 1223 } |
1223 } | 1224 } |
1224 | 1225 |
1225 prevFrame = p.frame; | 1226 prevFrame = p.frame; |