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,
123 CubicYottameter = 3000,
241 PoundForcePerSquareInch,
243 MillimetersOfMercury,
277 GuidelineDailyAmount,
345 MeterPerSecond = 9000,
415 LitersPer100Kilometers = 12000,
417 MilePerImperialGallon,
421 YottakilogramsPerCubicMeter = 13000,
422 ZettakilogramPerCubicMeter,
423 ExakilogramPerCubicMeter,
424 PetakilogramPerCubicMeter,
425 TerakilogramPerCubicMeter,
426 GigakilogramPerCubicMeter,
427 MegakilogramPerCubicMeter,
428 KilokilogramPerCubicMeter,
429 HectokilogramsPerCubicMeter,
430 DecakilogramsPerCubicMeter,
431 KilogramsPerCubicMeter,
432 DecikilogramsPerCubicMeter,
433 CentikilogramsPerCubicMeter,
434 MillikilogramsPerCubicMeter,
435 MicrokilogramsPerCubicMeter,
436 NanokilogramsPerCubicMeter,
437 PicokilogramsPerCubicMeter,
438 FemtokilogramsPerCubicMeter,
439 AttokilogramsPerCubicMeter,
440 ZeptokilogramsPerCubicMeter,
441 YoctokilogramsPerCubicMeter,
457 MetresPerSecondSquared = 14000,
458 FeetPerSecondSquared,
521 WattPerMeterKelvin = 18000,
523 BtuPerFootHourFahrenheit,
525 BtuPerSquareFootHourFahrenheitPerInch,
529 WattPerSquareMeter = 19000,
531 BtuPerHourPerSquareFoot,
535 WattPerCubicMeter = 20000,
537 BtuPerHourPerCubicFoot,
678 PermeabilitySquareMicrometer,
764class KUNITCONVERSION_EXPORT
Unit
793 bool operator==(
const Unit &other)
const;
798 bool operator!=(
const Unit &other)
const;
808 bool isValid()
const;
818 CategoryId categoryId()
const;
845 QString toString(qreal value,
int fieldWidth = 0,
char format =
'g',
int precision = -1,
const QChar &fillChar =
QLatin1Char(
' '))
const;
857 QString toSymbolString(qreal value,
int fieldWidth = 0,
char format =
'g',
int precision = -1,
const QChar &fillChar =
QLatin1Char(
' '))
const;
860 qreal toDefault(qreal value)
const;
861 qreal fromDefault(qreal value)
const;
864 friend class UnitPrivate;
866 friend class UnitCategoryPrivate;
867 friend class CurrencyCategoryPrivate;
869 KUNITCONVERSION_NO_EXPORT
explicit Unit(UnitPrivate *dd);
871 KUNITCONVERSION_NO_EXPORT
void setUnitMultiplier(qreal multiplier);
Class to define a category of units of measurement.
Class to define a unit of measurement.