Mercurial > hg > svgui
comparison layer/LogColourScale.cpp @ 805:1d526ba11a24 warnfix_no_size_t
Remove size_t's and fix warnings in layer/
author | Chris Cannam |
---|---|
date | Tue, 17 Jun 2014 15:18:06 +0100 |
parents | 1a1448f7beb2 |
children | 3ca3b8fbbcee |
comparison
equal
deleted
inserted
replaced
782:ddae586bc47b | 805:1d526ba11a24 |
---|---|
23 #include <cmath> | 23 #include <cmath> |
24 | 24 |
25 #include "view/View.h" | 25 #include "view/View.h" |
26 | 26 |
27 int | 27 int |
28 LogColourScale::getWidth(View *v, | 28 LogColourScale::getWidth(View *, |
29 QPainter &paint) | 29 QPainter &paint) |
30 { | 30 { |
31 return paint.fontMetrics().width("-000.00") + 15; | 31 return paint.fontMetrics().width("-000.00") + 15; |
32 } | 32 } |
33 | 33 |
34 void | 34 void |
35 LogColourScale::paintVertical(View *v, | 35 LogColourScale::paintVertical(View *v, |
36 const ColourScaleLayer *layer, | 36 const ColourScaleLayer *layer, |
37 QPainter &paint, | 37 QPainter &paint, |
38 int x0, | 38 int /* x0 */, |
39 float minlog, | 39 float minlog, |
40 float maxlog) | 40 float maxlog) |
41 { | 41 { |
42 int h = v->height(); | 42 int h = v->height(); |
43 | 43 |
45 | 45 |
46 float val = minlog; | 46 float val = minlog; |
47 float inc = (maxlog - val) / n; | 47 float inc = (maxlog - val) / n; |
48 | 48 |
49 char buffer[40]; | 49 char buffer[40]; |
50 | |
51 int w = getWidth(v, paint) + x0; | |
52 | 50 |
53 int boxx = 5, boxy = 5; | 51 int boxx = 5, boxy = 5; |
54 if (layer->getScaleUnits() != "") { | 52 if (layer->getScaleUnits() != "") { |
55 boxy += paint.fontMetrics().height(); | 53 boxy += paint.fontMetrics().height(); |
56 } | 54 } |