• Skip to content
  • Skip to link menu
KDE 4.6 API Reference
  • KDE API Reference
  • kdelibs
  • KDE Home
  • Contact Us
 

KUnitConversion

acceleration.cpp

Go to the documentation of this file.
00001 /*
00002  *   Copyright (C) 2010 Petri Damstén <damu@iki.fi>
00003  *
00004  *   This program is free software; you can redistribute it and/or modify
00005  *   it under the terms of the GNU Library General Public License as
00006  *   published by the Free Software Foundation; either version 2, or
00007  *   (at your option) any later version.
00008  *
00009  *   This program is distributed in the hope that it will be useful,
00010  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  *   GNU General Public License for more details
00013  *
00014  *   You should have received a copy of the GNU Library General Public
00015  *   License along with this program; if not, write to the
00016  *   Free Software Foundation, Inc.,
00017  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00018  */
00019 
00020 #include "acceleration.h"
00021 #include "converter.h"
00022 #include <klocale.h>
00023 
00024 using namespace KUnitConversion;
00025 
00026 Acceleration::Acceleration() : UnitCategory(AccelerationCategory)
00027 {
00028     setName(i18n("Acceleration"));
00029     setSymbolStringFormat(ki18nc("%1 value, %2 unit symbol (acceleration)", "%1 %2"));
00030 
00031     setDefaultUnit(UP(MetresPerSecondSquared, 1,
00032       i18nc("acceleration unit symbol", "m/s²"),
00033       i18nc("unit description in lists", "meters per second squared"),
00034       i18nc("unit synonyms for matching user input",
00035             "meter per second squared;meters per second squared;m/s²;m/s2;m/s^2"),
00036       ki18nc("amount in units (real)", "%1 meters per second squared"),
00037       ki18ncp("amount in units (integer)", "%1 meter per second squared",
00038               "%1 meters per second squared")
00039     ));
00040     U(FeetPerSecondSquared, 0.3048,
00041       i18nc("acceleration unit symbol", "ft/s²"),
00042       i18nc("unit description in lists", "feet per second squared"),
00043       i18nc("unit synonyms for matching user input",
00044             "foot per second squared;feet per second squared;ft/s²;ft/s2;ft/s^2"),
00045       ki18nc("amount in units (real)", "%1 feet per second squared"),
00046       ki18ncp("amount in units (integer)", "%1 foot per second squared",
00047               "%1 feet per second squared")
00048     );
00049     U(StandardGravity, 9.80665,
00050       i18nc("acceleration unit symbol", "g"),
00051       i18nc("unit description in lists", "standard gravity"),
00052       i18nc("unit synonyms for matching user input", "standard gravity;g"),
00053       ki18nc("amount in units (real)", "%1 times standard gravity"),
00054       ki18ncp("amount in units (integer)", "%1 standard gravity",
00055               "%1 times standard gravity")
00056     );
00057 
00058     setMostCommonUnits(QList<int>() <<
00059             MetresPerSecondSquared << FeetPerSecondSquared);
00060 }
00061 

KUnitConversion

Skip menu "KUnitConversion"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.7.3
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal