comparison layer/HorizontalFrequencyScale.cpp @ 1471:f2525e6cbdf1 by-id

More layer updates
author Chris Cannam
date Mon, 01 Jul 2019 14:17:13 +0100
parents fc9d9f1103fa
children
comparison
equal deleted inserted replaced
1470:696e569ff21b 1471:f2525e6cbdf1
54 n = int(ticks.size()); 54 n = int(ticks.size());
55 55
56 int marginx = -1; 56 int marginx = -1;
57 57
58 for (int i = 0; i < n; ++i) { 58 for (int i = 0; i < n; ++i) {
59
60 // Qt 5.13 deprecates QFontMetrics::width(), but its suggested
61 // replacement (horizontalAdvance) was only added in Qt 5.11
62 // which is too new for us
63 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
59 64
60 double val = ticks[i].value; 65 double val = ticks[i].value;
61 QString label = QString::fromStdString(ticks[i].label); 66 QString label = QString::fromStdString(ticks[i].label);
62 int tw = paint.fontMetrics().width(label); 67 int tw = paint.fontMetrics().width(label);
63 68