8#ifndef KUNITCONVERSION_UNIT_H
9#define KUNITCONVERSION_UNIT_H
11#include "kunitconversion/kunitconversion_export.h"
13#include <QExplicitlySharedDataPointer>
16namespace KUnitConversion
31 FuelEfficiencyCategory,
38 ThermalConductivityCategory,
42 ThermalGenerationCategory,
46 ElectricalCurrentCategory,
48 ElectricalResistanceCategory,
61 SquareYottameter = 1000,
121 CubicYottameter = 3000,
239 PoundForcePerSquareInch,
241 MillimetersOfMercury,
275 GuidelineDailyAmount,
342 MeterPerSecond = 9000,
412 LitersPer100Kilometers = 12000,
414 MilePerImperialGallon,
418 YottakilogramsPerCubicMeter = 13000,
419 ZettakilogramPerCubicMeter,
420 ExakilogramPerCubicMeter,
421 PetakilogramPerCubicMeter,
422 TerakilogramPerCubicMeter,
423 GigakilogramPerCubicMeter,
424 MegakilogramPerCubicMeter,
425 KilokilogramPerCubicMeter,
426 HectokilogramsPerCubicMeter,
427 DecakilogramsPerCubicMeter,
428 KilogramsPerCubicMeter,
429 DecikilogramsPerCubicMeter,
430 CentikilogramsPerCubicMeter,
431 MillikilogramsPerCubicMeter,
432 MicrokilogramsPerCubicMeter,
433 NanokilogramsPerCubicMeter,
434 PicokilogramsPerCubicMeter,
435 FemtokilogramsPerCubicMeter,
436 AttokilogramsPerCubicMeter,
437 ZeptokilogramsPerCubicMeter,
438 YoctokilogramsPerCubicMeter,
450 MetresPerSecondSquared = 14000,
451 FeetPerSecondSquared,
514 WattPerMeterKelvin = 18000,
516 BtuPerFootHourFahrenheit,
518 BtuPerSquareFootHourFahrenheitPerInch,
522 WattPerSquareMeter = 19000,
524 BtuPerHourPerSquareFoot,
528 WattPerCubicMeter = 20000,
530 BtuPerHourPerCubicFoot,
671 PermeabilitySquareMicrometer,
757class KUNITCONVERSION_EXPORT
Unit
779#ifdef Q_COMPILER_RVALUE_REFS
855 QString
toString(qreal value,
int fieldWidth = 0,
char format =
'g',
int precision = -1,
const QChar &fillChar = QLatin1Char(
' '))
const;
867 QString
toSymbolString(qreal value,
int fieldWidth = 0,
char format =
'g',
int precision = -1,
const QChar &fillChar = QLatin1Char(
' '))
const;
870 qreal toDefault(qreal value)
const;
871 qreal fromDefault(qreal value)
const;
874 friend class UnitPrivate;
876 friend class UnitCategoryPrivate;
877 friend class CurrencyCategoryPrivate;
879 KUNITCONVERSION_NO_EXPORT
explicit Unit(UnitPrivate *dd);
881 KUNITCONVERSION_NO_EXPORT
void setUnitMultiplier(qreal multiplier);
883 QExplicitlySharedDataPointer<UnitPrivate> d;
Class to define a category of units of measurement.
Definition unitcategory.h:35
Class to define a unit of measurement.
Definition unit.h:758
bool operator==(const Unit &other) const
Unit(const Unit &other)
Copy constructor, copy other to this.
void swap(Unit &other)
Swaps this Unit with other.
Definition unit.h:795
QString toString(qreal value, int fieldWidth=0, char format='g', int precision=-1, const QChar &fillChar=QLatin1Char(' ')) const
QString toSymbolString(qreal value, int fieldWidth=0, char format='g', int precision=-1, const QChar &fillChar=QLatin1Char(' ')) const
Unit & operator=(const Unit &other)
Assignment operator, assign other to this.
UnitCategory category() const
QString description() const
CategoryId categoryId() const
bool operator!=(const Unit &other) const