Typica is a free program for professional coffee roasters. https://typica.us
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

units.h 636B

1234567891011121314151617181920212223242526272829303132333435
  1. /*268:*/
  2. #line 8 "./units.w"
  3. #include <QObject>
  4. #ifndef TypicaUnitsIncluded
  5. #define TypicaUnitsIncluded
  6. class Units:public QObject
  7. {
  8. Q_OBJECT
  9. Q_ENUMS(Unit)
  10. public:
  11. enum Unit
  12. {
  13. Unitless= 0,
  14. Fahrenheit= 10144,
  15. Celsius= 10143,
  16. Kelvin= 10325,
  17. Rankine= 10145,
  18. Pound= 15876,
  19. Kilogram= 15877,
  20. Ounce= 1,
  21. Gram= 2
  22. };
  23. static double convertTemperature(double value,Unit fromUnit,Unit toUnit);
  24. static double convertRelativeTemperature(double value,Unit fromUnit,Unit toUnit);
  25. static bool isTemperatureUnit(Unit unit);
  26. static double convertWeight(double value,Unit fromUnit,Unit toUnit);
  27. static bool isWeightUnit(Unit unit);
  28. };
  29. #endif
  30. /*:268*/