aboutsummaryrefslogtreecommitdiff
path: root/qml/pages/PressureModel.qml
diff options
context:
space:
mode:
authorOskari Timperi <oskari.timperi@iki.fi>2013-12-07 17:33:25 +0200
committerOskari Timperi <oskari.timperi@iki.fi>2013-12-07 17:33:25 +0200
commitef5baad9ff47cfe32bb4f97368e0b3148765caa6 (patch)
tree87d59ecc69e7981489e16aeed62115b4a4927223 /qml/pages/PressureModel.qml
parent3aeb00f43988ae607082cdabe124b9d5e123e33c (diff)
downloadunitmaster-ef5baad9ff47cfe32bb4f97368e0b3148765caa6.tar.gz
unitmaster-ef5baad9ff47cfe32bb4f97368e0b3148765caa6.zip
shuffle stuff around and add directory for tests
Diffstat (limited to 'qml/pages/PressureModel.qml')
-rw-r--r--qml/pages/PressureModel.qml71
1 files changed, 0 insertions, 71 deletions
diff --git a/qml/pages/PressureModel.qml b/qml/pages/PressureModel.qml
deleted file mode 100644
index 2196f8a..0000000
--- a/qml/pages/PressureModel.qml
+++ /dev/null
@@ -1,71 +0,0 @@
-import QtQuick 2.0
-
-ListModel {
- function from(title, value) {
- var functions = {
- "pascal": function () { return value; },
- "kilopascal": function () { return value*1000; },
- "bar": function () { return value*1e5; },
- "millibar": function () { return value*100.0; },
- "pounds per square inch": function () { return value*(6.8948e3); },
- "technical atmosphere": function () { return value*0.980665e5; },
- "standard atmosphere": function () { return value*1.01325e5; },
- "torr": function () { return value*133.3224; }
- };
- return functions[title]();
- }
-
- function to(title, value) {
- var functions = {
- "pascal": function () { return value; },
- "kilopascal": function () { return value/1000; },
- "bar": function () { return value/1e5; },
- "millibar": function () { return value/100.0; },
- "pounds per square inch": function () { return value/(6.8948e3); },
- "technical atmosphere": function () { return value/(0.980665e5); },
- "standard atmosphere": function () { return value/(1.01325e5); },
- "torr": function () { return value/133.3224; }
- };
- return functions[title]();
- }
-
- ListElement {
- title: "pascal"
- abbr: "Pa"
- }
-
- ListElement {
- title: "kilopascal"
- abbr: "kPa"
- }
-
- ListElement {
- title: "bar"
- abbr: ""
- }
-
- ListElement {
- title: "millibar"
- abbr: "mbar"
- }
-
- ListElement {
- title: "pounds per square inch"
- abbr: "psi"
- }
-
- ListElement {
- title: "technical atmosphere"
- abbr: "at"
- }
-
- ListElement {
- title: "standard atmosphere"
- abbr: "atm"
- }
-
- ListElement {
- title: "torr"
- abbr: ""
- }
-}