KUnitConversion

electrical_current.cpp
1/*
2 * SPDX-FileCopyrightText: 2010 Petri Damstén <damu@iki.fi>
3 * SPDX-FileCopyrightText: 2014 John Layt <jlayt@kde.org>
4 * SPDX-FileCopyrightText: 2014 Garret Wassermann <gwasser@gmail.com>
5 *
6 * SPDX-License-Identifier: LGPL-2.0-or-later
7 */
8
9#include "electrical_current_p.h"
10#include "unit_p.h"
11
12#include <KLocalizedString>
13
14namespace KUnitConversion
15{
16UnitCategory ElectricalCurrent::makeCategory()
17{
18 auto c = UnitCategoryPrivate::makeCategory(ElectricalCurrentCategory, i18n("ElectricalCurrent"), i18n("ElectricalCurrent"));
19 auto d = UnitCategoryPrivate::get(c);
20 KLocalizedString symbolString = ki18nc("%1 value, %2 unit symbol (electrical current", "%1 %2");
21
22 d->addUnit(UnitPrivate::makeUnit(ElectricalCurrentCategory,
23 Yottaampere,
24 1e+24,
25 i18nc("electrical current unit symbol", "YA"),
26 i18nc("unit description in lists", "yottaamperes"),
27 i18nc("unit synonyms for matching user input", "yottaampere;yottaamperes;YA"),
28 symbolString,
29 ki18nc("amount in units (real)", "%1 yottaamperes"),
30 ki18ncp("amount in units (integer)", "%1 yottaampere", "%1 yottaamperes")));
31
32 d->addUnit(UnitPrivate::makeUnit(ElectricalCurrentCategory,
33 Zettaampere,
34 1e+21,
35 i18nc("electrical current unit symbol", "ZA"),
36 i18nc("unit description in lists", "zettaamperes"),
37 i18nc("unit synonyms for matching user input", "zettaampere;zettaamperes;ZA"),
38 symbolString,
39 ki18nc("amount in units (real)", "%1 zettaamperes"),
40 ki18ncp("amount in units (integer)", "%1 zettaampere", "%1 zettaamperes")));
41
42 d->addUnit(UnitPrivate::makeUnit(ElectricalCurrentCategory,
43 Exaampere,
44 1e+18,
45 i18nc("electrical current unit symbol", "EA"),
46 i18nc("unit description in lists", "exaamperes"),
47 i18nc("unit synonyms for matching user input", "exaampere;exaamperes;EA"),
48 symbolString,
49 ki18nc("amount in units (real)", "%1 exaamperes"),
50 ki18ncp("amount in units (integer)", "%1 exaampere", "%1 exaamperes")));
51
52 d->addUnit(UnitPrivate::makeUnit(ElectricalCurrentCategory,
53 Petaampere,
54 1e+15,
55 i18nc("electrical current unit symbol", "PA"),
56 i18nc("unit description in lists", "petaamperes"),
57 i18nc("unit synonyms for matching user input", "petaampere;petaamperes;PA"),
58 symbolString,
59 ki18nc("amount in units (real)", "%1 petaamperes"),
60 ki18ncp("amount in units (integer)", "%1 petaampere", "%1 petaamperes")));
61
62 d->addUnit(UnitPrivate::makeUnit(ElectricalCurrentCategory,
63 Teraampere,
64 1e+12,
65 i18nc("electrical current unit symbol", "TA"),
66 i18nc("unit description in lists", "teraamperes"),
67 i18nc("unit synonyms for matching user input", "teraampere;teraamperes;TA"),
68 symbolString,
69 ki18nc("amount in units (real)", "%1 teraamperes"),
70 ki18ncp("amount in units (integer)", "%1 teraampere", "%1 teraamperes")));
71
72 d->addCommonUnit(UnitPrivate::makeUnit(ElectricalCurrentCategory,
73 Gigaampere,
74 1e+09,
75 i18nc("electrical current unit symbol", "GA"),
76 i18nc("unit description in lists", "gigaamperes"),
77 i18nc("unit synonyms for matching user input", "gigaampere;gigaamperes;GA"),
78 symbolString,
79 ki18nc("amount in units (real)", "%1 gigaamperes"),
80 ki18ncp("amount in units (integer)", "%1 gigaampere", "%1 gigaamperes")));
81
82 d->addCommonUnit(UnitPrivate::makeUnit(ElectricalCurrentCategory,
83 Megaampere,
84 1e+06,
85 i18nc("electrical current unit symbol", "MA"),
86 i18nc("unit description in lists", "megaamperes"),
87 i18nc("unit synonyms for matching user input", "megaampere;megaamperes;MA"),
88 symbolString,
89 ki18nc("amount in units (real)", "%1 megaamperes"),
90 ki18ncp("amount in units (integer)", "%1 megaampere", "%1 megaamperes")));
91
92 d->addCommonUnit(UnitPrivate::makeUnit(ElectricalCurrentCategory,
93 Kiloampere,
94 1000,
95 i18nc("electrical current unit symbol", "kA"),
96 i18nc("unit description in lists", "kiloamperes"),
97 i18nc("unit synonyms for matching user input", "kiloampere;kiloamperes;kA"),
98 symbolString,
99 ki18nc("amount in units (real)", "%1 kiloamperes"),
100 ki18ncp("amount in units (integer)", "%1 kiloampere", "%1 kiloamperes")));
101
102 d->addUnit(UnitPrivate::makeUnit(ElectricalCurrentCategory,
103 Hectoampere,
104 100,
105 i18nc("electrical current unit symbol", "hA"),
106 i18nc("unit description in lists", "hectoamperes"),
107 i18nc("unit synonyms for matching user input", "hectoampere;hectoamperes;hA"),
108 symbolString,
109 ki18nc("amount in units (real)", "%1 hectoamperes"),
110 ki18ncp("amount in units (integer)", "%1 hectoampere", "%1 hectoamperes")));
111
112 d->addUnit(UnitPrivate::makeUnit(ElectricalCurrentCategory,
113 Decaampere,
114 10,
115 i18nc("electrical current unit symbol", "daA"),
116 i18nc("unit description in lists", "decaamperes"),
117 i18nc("unit synonyms for matching user input", "decaampere;decaamperes;daA"),
118 symbolString,
119 ki18nc("amount in units (real)", "%1 decaamperes"),
120 ki18ncp("amount in units (integer)", "%1 decaampere", "%1 decaamperes")));
121
122 d->addDefaultUnit(UnitPrivate::makeUnit(ElectricalCurrentCategory,
123 Ampere,
124 1,
125 i18nc("electrical current unit symbol", "A"),
126 i18nc("unit description in lists", "amperes"),
127 i18nc("unit synonyms for matching user input", "amp;amps;ampere;amperes;A"),
128 symbolString,
129 ki18nc("amount in units (real)", "%1 amperes"),
130 ki18ncp("amount in units (integer)", "%1 ampere", "%1 amperes")));
131
132 d->addUnit(UnitPrivate::makeUnit(ElectricalCurrentCategory,
133 Deciampere,
134 0.1,
135 i18nc("electrical current unit symbol", "dA"),
136 i18nc("unit description in lists", "deciamperes"),
137 i18nc("unit synonyms for matching user input", "deciampere;deciamperes;dA"),
138 symbolString,
139 ki18nc("amount in units (real)", "%1 deciamperes"),
140 ki18ncp("amount in units (integer)", "%1 deciampere", "%1 deciamperes")));
141
142 d->addUnit(UnitPrivate::makeUnit(ElectricalCurrentCategory,
143 Centiampere,
144 0.01,
145 i18nc("electrical current unit symbol", "cA"),
146 i18nc("unit description in lists", "centiamperes"),
147 i18nc("unit synonyms for matching user input", "centiampere;centiamperes;cA"),
148 symbolString,
149 ki18nc("amount in units (real)", "%1 centiamperes"),
150 ki18ncp("amount in units (integer)", "%1 centiampere", "%1 centiamperes")));
151
152 d->addUnit(UnitPrivate::makeUnit(ElectricalCurrentCategory,
153 Milliampere,
154 0.001,
155 i18nc("electrical current unit symbol", "mA"),
156 i18nc("unit description in lists", "milliamperes"),
157 i18nc("unit synonyms for matching user input", "milliamp;milliamps;milliampere;milliamperes;mA"),
158 symbolString,
159 ki18nc("amount in units (real)", "%1 milliamperes"),
160 ki18ncp("amount in units (integer)", "%1 milliampere", "%1 milliamperes")));
161
162 d->addUnit(UnitPrivate::makeUnit(ElectricalCurrentCategory,
163 Microampere,
164 1e-06,
165 i18nc("electrical current unit symbol", "µA"),
166 i18nc("unit description in lists", "microamperes"),
167 i18nc("unit synonyms for matching user input", "microamp;microamps;microampere;microamperes;µA;uA"),
168 symbolString,
169 ki18nc("amount in units (real)", "%1 microamperes"),
170 ki18ncp("amount in units (integer)", "%1 microampere", "%1 microamperes")));
171
172 d->addUnit(UnitPrivate::makeUnit(ElectricalCurrentCategory,
173 Nanoampere,
174 1e-09,
175 i18nc("electrical current unit symbol", "nA"),
176 i18nc("unit description in lists", "nanoamperes"),
177 i18nc("unit synonyms for matching user input", "nanoamp;nanoamps;nanoampere;nanoamperes;nA"),
178 symbolString,
179 ki18nc("amount in units (real)", "%1 nanoamperes"),
180 ki18ncp("amount in units (integer)", "%1 nanoampere", "%1 nanoamperes")));
181
182 d->addUnit(UnitPrivate::makeUnit(ElectricalCurrentCategory,
183 Picoampere,
184 1e-12,
185 i18nc("electrical current unit symbol", "pA"),
186 i18nc("unit description in lists", "picoamperes"),
187 i18nc("unit synonyms for matching user input", "picoamp;picoamps;picoampere;picoamperes;pA"),
188 symbolString,
189 ki18nc("amount in units (real)", "%1 picoamperes"),
190 ki18ncp("amount in units (integer)", "%1 picoampere", "%1 picoamperes")));
191
192 d->addUnit(UnitPrivate::makeUnit(ElectricalCurrentCategory,
193 Femtoampere,
194 1e-15,
195 i18nc("electrical current unit symbol", "fA"),
196 i18nc("unit description in lists", "femtoamperes"),
197 i18nc("unit synonyms for matching user input", "femtoampere;femtoamperes;fA"),
198 symbolString,
199 ki18nc("amount in units (real)", "%1 femtoamperes"),
200 ki18ncp("amount in units (integer)", "%1 femtoampere", "%1 femtoamperes")));
201
202 d->addUnit(UnitPrivate::makeUnit(ElectricalCurrentCategory,
203 Attoampere,
204 1e-18,
205 i18nc("electrical current unit symbol", "aA"),
206 i18nc("unit description in lists", "attoamperes"),
207 i18nc("unit synonyms for matching user input", "attoampere;attoamperes;aA"),
208 symbolString,
209 ki18nc("amount in units (real)", "%1 attoamperes"),
210 ki18ncp("amount in units (integer)", "%1 attoampere", "%1 attoamperes")));
211
212 d->addUnit(UnitPrivate::makeUnit(ElectricalCurrentCategory,
213 Zeptoampere,
214 1e-21,
215 i18nc("electrical current unit symbol", "zA"),
216 i18nc("unit description in lists", "zeptoamperes"),
217 i18nc("unit synonyms for matching user input", "zeptoampere;zeptoamperes;zA"),
218 symbolString,
219 ki18nc("amount in units (real)", "%1 zeptoamperes"),
220 ki18ncp("amount in units (integer)", "%1 zeptoampere", "%1 zeptoamperes")));
221
222 d->addUnit(UnitPrivate::makeUnit(ElectricalCurrentCategory,
223 Yoctoampere,
224 1e-24,
225 i18nc("electrical current unit symbol", "yA"),
226 i18nc("unit description in lists", "yoctoamperes"),
227 i18nc("unit synonyms for matching user input", "yoctoampere;yoctoamperes;yA"),
228 symbolString,
229 ki18nc("amount in units (real)", "%1 yoctoamperes"),
230 ki18ncp("amount in units (integer)", "%1 yoctoampere", "%1 yoctoamperes")));
231
232 return c;
233}
234
235} // 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 Fri Dec 13 2024 11:53:30 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.