KDeclarative

formats.cpp
1 /*
2  SPDX-FileCopyrightText: 2014 Bhushan Shah <[email protected]>
3 
4  SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
5 */
6 
7 #include "formats.h"
8 
9 Formats::Formats(QObject* parent)
10  : QObject(parent)
11  , m_format()
12 {
13 }
14 
15 QString Formats::formatByteSize(double size, int precision) const
16 {
17  return m_format.formatByteSize(size, precision);
18 }
19 
20 QString Formats::formatDuration(quint64 msecs, KFormat::DurationFormatOptions options) const
21 {
22  return m_format.formatDuration(msecs, options);
23 }
24 
25 QString Formats::formatDuration(quint64 msecs, int options) const
26 {
27  return m_format.formatDuration(msecs, static_cast<KFormat::DurationFormatOptions>(options));
28 }
29 
30 QString Formats::formatDecimalDuration(quint64 msecs, int decimalPlaces) const
31 {
32  return m_format.formatDecimalDuration(msecs, decimalPlaces);
33 }
34 
35 QString Formats::formatSpelloutDuration(quint64 msecs) const
36 {
37  return m_format.formatSpelloutDuration(msecs);
38 }
39 
40 QString Formats::formatRelativeDate(const QDate &date, QLocale::FormatType format) const
41 {
42  return m_format.formatRelativeDate(date, format);
43 }
44 
45 QString Formats::formatRelativeDateTime(const QDateTime &dateTime, QLocale::FormatType format) const
46 {
47  return m_format.formatRelativeDateTime(dateTime, format);
48 }
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Mon Jan 25 2021 22:44:28 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.