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,
344 MeterPerSecond = 9000,
414 LitersPer100Kilometers = 12000,
416 MilePerImperialGallon,
420 YottakilogramsPerCubicMeter = 13000,
421 ZettakilogramPerCubicMeter,
422 ExakilogramPerCubicMeter,
423 PetakilogramPerCubicMeter,
424 TerakilogramPerCubicMeter,
425 GigakilogramPerCubicMeter,
426 MegakilogramPerCubicMeter,
427 KilokilogramPerCubicMeter,
428 HectokilogramsPerCubicMeter,
429 DecakilogramsPerCubicMeter,
430 KilogramsPerCubicMeter,
431 DecikilogramsPerCubicMeter,
432 CentikilogramsPerCubicMeter,
433 MillikilogramsPerCubicMeter,
434 MicrokilogramsPerCubicMeter,
435 NanokilogramsPerCubicMeter,
436 PicokilogramsPerCubicMeter,
437 FemtokilogramsPerCubicMeter,
438 AttokilogramsPerCubicMeter,
439 ZeptokilogramsPerCubicMeter,
440 YoctokilogramsPerCubicMeter,
456 MetresPerSecondSquared = 14000,
457 FeetPerSecondSquared,
520 WattPerMeterKelvin = 18000,
522 BtuPerFootHourFahrenheit,
524 BtuPerSquareFootHourFahrenheitPerInch,
528 WattPerSquareMeter = 19000,
530 BtuPerHourPerSquareFoot,
534 WattPerCubicMeter = 20000,
536 BtuPerHourPerCubicFoot,
677 PermeabilitySquareMicrometer,
763class KUNITCONVERSION_EXPORT
Unit
792 bool operator==(
const Unit &other)
const;
797 bool operator!=(
const Unit &other)
const;
807 bool isValid()
const;
817 CategoryId categoryId()
const;
844 QString toString(qreal value,
int fieldWidth = 0,
char format =
'g',
int precision = -1,
const QChar &fillChar =
QLatin1Char(
' '))
const;
856 QString toSymbolString(qreal value,
int fieldWidth = 0,
char format =
'g',
int precision = -1,
const QChar &fillChar =
QLatin1Char(
' '))
const;
859 qreal toDefault(qreal value)
const;
860 qreal fromDefault(qreal value)
const;
863 friend class UnitPrivate;
865 friend class UnitCategoryPrivate;
866 friend class CurrencyCategoryPrivate;
868 KUNITCONVERSION_NO_EXPORT
explicit Unit(UnitPrivate *dd);
870 KUNITCONVERSION_NO_EXPORT
void setUnitMultiplier(qreal multiplier);
Class to define a category of units of measurement.
Class to define a unit of measurement.