1/*
2 SPDX-FileCopyrightText: 2014 Bhushan Shah <bhush94@gmail.com>
3
4 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5*/
6
7#include "formats.h"
8
9QString Formats::formatByteSize(double size, int precision) const
10{
11 return m_format.formatByteSize(size, precision);
12}
13
14QString Formats::formatDuration(quint64 msecs, KFormat::DurationFormatOptions options) const
15{
16 return m_format.formatDuration(msecs, options);
17}
18
19QString Formats::formatDuration(quint64 msecs, int options) const
20{
21 return m_format.formatDuration(msecs, options: static_cast<KFormat::DurationFormatOptions>(options));
22}
23
24QString Formats::formatDecimalDuration(quint64 msecs, int decimalPlaces) const
25{
26 return m_format.formatDecimalDuration(msecs, decimalPlaces);
27}
28
29QString Formats::formatSpelloutDuration(quint64 msecs) const
30{
31 return m_format.formatSpelloutDuration(msecs);
32}
33
34QString Formats::formatRelativeDate(const QDate &date, QLocale::FormatType format) const
35{
36 return m_format.formatRelativeDate(date, format);
37}
38
39QString Formats::formatRelativeDateTime(const QDateTime &dateTime, QLocale::FormatType format) const
40{
41 return m_format.formatRelativeDateTime(dateTime, format);
42}
43
44#include "moc_formats.cpp"
45

source code of kcoreaddons/src/qml/formats.cpp