KUnitConversion

kunitconversion Directory Reference
Directory dependency graph for kunitconversion:
kunitconversion

Directories

 src
 

Detailed Description

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
  • Weight per area

Usage

To convert 100 GBP into EUR, you can write:

using namespace KUnitConversion;
Value pounds(100, Gbp);
Value eur = pounds.convertTo(Eur);
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 31 2025 12:06:06 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.