Go to file
luzhiping 52f07e7389 update info 2022-08-22 16:47:16 +08:00
LICENSES Import Upstream version 5.92.0 2022-05-16 16:03:24 +08:00
autotests Import Upstream version 5.92.0 2022-05-16 16:03:24 +08:00
debian update info 2022-08-22 16:47:16 +08:00
po Import Upstream version 5.92.0 2022-05-16 16:03:24 +08:00
src Import Upstream version 5.92.0 2022-05-16 16:03:24 +08:00
.git-blame-ignore-revs Import Upstream version 5.92.0 2022-05-16 16:03:24 +08:00
.gitignore Import Upstream version 5.92.0 2022-05-16 16:03:24 +08:00
.gitlab-ci.yml Import Upstream version 5.92.0 2022-05-16 16:03:24 +08:00
.kde-ci.yml Import Upstream version 5.92.0 2022-05-16 16:03:24 +08:00
CMakeLists.txt Import Upstream version 5.92.0 2022-05-16 16:03:24 +08:00
KF5UnitConversionConfig.cmake.in Import Upstream version 5.92.0 2022-05-16 16:03:24 +08:00
README.md Import Upstream version 5.92.0 2022-05-16 16:03:24 +08:00
metainfo.yaml Import Upstream version 5.92.0 2022-05-16 16:03:24 +08:00

README.md

KUnitConversion

Converting physical units

Introduction

KUnitConversion provides functions to convert values in different physical units. It supports converting different prefixes (e.g. kilo, mega, giga) as well as converting between different unit systems (e.g. liters, gallons). The following areas are supported:

  • Acceleration
  • Angle
  • Area
  • Binary Data
  • Currency
  • Density
  • Electrical Current
  • Electrical Resistance
  • Energy
  • Force
  • Frequency
  • Fuel Efficiency
  • Length
  • Mass
  • Permeability
  • Power
  • Pressure
  • Temperature
  • Thermal Conductivity
  • Thermal Flux
  • Thermal Generation
  • Time
  • Velocity
  • Volume
  • Voltage

Usage

To convert 100 GBP into EUR, you can write:

using namespace KUnitConversion;
Value pounds(100, Gbp);
Value eur = pounds.convertTo(Eur);