KUnitConversion

thermal_generation.cpp
1/*
2 * SPDX-FileCopyrightText: 2010 Petri Damstén <damu@iki.fi>
3 * SPDX-FileCopyrightText: 2014 John Layt <jlayt@kde.org>
4 *
5 * SPDX-License-Identifier: LGPL-2.0-or-later
6 */
7
8#include "thermal_generation_p.h"
9#include "unit_p.h"
10
11#include <KLocalizedString>
12
13namespace KUnitConversion
14{
15UnitCategory ThermalGeneration::makeCategory()
16{
17 auto c = UnitCategoryPrivate::makeCategory(ThermalGenerationCategory, i18n("Thermal Generation"), i18n("Thermal Generation"));
18 auto d = UnitCategoryPrivate::get(c);
19 KLocalizedString symbolString = ki18nc("%1 value, %2 unit symbol (thermal generation)", "%1 %2");
20
21 d->addDefaultUnit(UnitPrivate::makeUnit(ThermalGenerationCategory,
22 WattPerCubicMeter,
23 1,
24 i18nc("thermal generation unit symbol", "W/m³"),
25 i18nc("unit description in lists", "watt per cubic meter"),
26 i18nc("unit synonyms for matching user input", "watt per cubic meter;W/m3;W/m^3"),
27 symbolString,
28 ki18nc("amount in units (real)", "%1 watts per cubic meter"),
29 ki18ncp("amount in units (integer)", "%1 watt per cubic meter", "%1 watts per cubic meter")));
30
31 d->addCommonUnit(UnitPrivate::makeUnit(ThermalGenerationCategory,
32 BtuPerHourPerCubicFoot,
33 0.09662,
34 i18nc("thermal generation unit symbol", "Btu/hr/ft³"),
35 i18nc("unit description in lists", "btu per hour per cubic foot"),
36 i18nc("unit synonyms for matching user input", "btu per hour per cubic foot;Btu/hr/ft3;Btu/hr/ft^3;Btu/ft^3/hr;Btu/ft3/hr"),
37 symbolString,
38 ki18nc("amount in units (real)", "%1 btu per hour per cubic foot"),
39 ki18ncp("amount in units (integer)", "%1 btu per hour per cubic foot", "%1 btu per hour per cubic foot")));
40
41 return c;
42}
43
44} // KUnitConversion namespace
QString i18nc(const char *context, const char *text, const TYPE &arg...)
KLocalizedString KI18N_EXPORT ki18ncp(const char *context, const char *singular, const char *plural)
KLocalizedString KI18N_EXPORT ki18nc(const char *context, const char *text)
QString i18n(const char *text, const TYPE &arg...)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:06:12 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.