8#ifndef KUNITCONVERSION_UNIT_H
9#define KUNITCONVERSION_UNIT_H
11#include "kunitconversion/kunitconversion_export.h"
13#include <QExplicitlySharedDataPointer>
16namespace KUnitConversion
31 FuelEfficiencyCategory,
33 WeightPerAreaCategory,
39 ThermalConductivityCategory,
43 ThermalGenerationCategory,
47 ElectricalCurrentCategory,
49 ElectricalResistanceCategory,
62 SquareYottameter = 1000,
122 CubicYottameter = 3000,
240 PoundForcePerSquareInch,
242 MillimetersOfMercury,
276 GuidelineDailyAmount,
343 MeterPerSecond = 9000,
413 LitersPer100Kilometers = 12000,
415 MilePerImperialGallon,
419 YottakilogramsPerCubicMeter = 13000,
420 ZettakilogramPerCubicMeter,
421 ExakilogramPerCubicMeter,
422 PetakilogramPerCubicMeter,
423 TerakilogramPerCubicMeter,
424 GigakilogramPerCubicMeter,
425 MegakilogramPerCubicMeter,
426 KilokilogramPerCubicMeter,
427 HectokilogramsPerCubicMeter,
428 DecakilogramsPerCubicMeter,
429 KilogramsPerCubicMeter,
430 DecikilogramsPerCubicMeter,
431 CentikilogramsPerCubicMeter,
432 MillikilogramsPerCubicMeter,
433 MicrokilogramsPerCubicMeter,
434 NanokilogramsPerCubicMeter,
435 PicokilogramsPerCubicMeter,
436 FemtokilogramsPerCubicMeter,
437 AttokilogramsPerCubicMeter,
438 ZeptokilogramsPerCubicMeter,
439 YoctokilogramsPerCubicMeter,
455 MetresPerSecondSquared = 14000,
456 FeetPerSecondSquared,
519 WattPerMeterKelvin = 18000,
521 BtuPerFootHourFahrenheit,
523 BtuPerSquareFootHourFahrenheitPerInch,
527 WattPerSquareMeter = 19000,
529 BtuPerHourPerSquareFoot,
533 WattPerCubicMeter = 20000,
535 BtuPerHourPerCubicFoot,
676 PermeabilitySquareMicrometer,
762class KUNITCONVERSION_EXPORT
Unit
791 bool operator==(
const Unit &other)
const;
796 bool operator!=(
const Unit &other)
const;
806 bool isValid()
const;
816 CategoryId categoryId()
const;
843 QString toString(qreal value,
int fieldWidth = 0,
char format =
'g',
int precision = -1,
const QChar &fillChar =
QLatin1Char(
' '))
const;
855 QString toSymbolString(qreal value,
int fieldWidth = 0,
char format =
'g',
int precision = -1,
const QChar &fillChar =
QLatin1Char(
' '))
const;
858 qreal toDefault(qreal value)
const;
859 qreal fromDefault(qreal value)
const;
862 friend class UnitPrivate;
864 friend class UnitCategoryPrivate;
865 friend class CurrencyCategoryPrivate;
867 KUNITCONVERSION_NO_EXPORT
explicit Unit(UnitPrivate *dd);
869 KUNITCONVERSION_NO_EXPORT
void setUnitMultiplier(qreal multiplier);
Class to define a category of units of measurement.
Class to define a unit of measurement.