! \internal Replaces all occurrences of the format pattern belonging to \a unit in \a text with the specified \a value, using the field width as specified with \ref setFieldWidth for the \a unit. */
| 6386 | \a value, using the field width as specified with \ref setFieldWidth for the \a unit. |
| 6387 | */ |
| 6388 | void QCPAxisTickerTime::replaceUnit(QString &text, QCPAxisTickerTime::TimeUnit unit, int value) const |
| 6389 | { |
| 6390 | QString valueStr = QString::number(value); |
| 6391 | while (valueStr.size() < mFieldWidth.value(unit)) |
| 6392 | valueStr.prepend(QLatin1Char('0')); |
| 6393 | |
| 6394 | text.replace(mFormatPattern.value(unit), valueStr); |
| 6395 | } |
| 6396 | /* end of 'src/axis/axistickertime.cpp' */ |
| 6397 | |
| 6398 |