summaryrefslogtreecommitdiffstats
path: root/basicsuite/qt5-everywhere/demos/calqlatr
diff options
context:
space:
mode:
Diffstat (limited to 'basicsuite/qt5-everywhere/demos/calqlatr')
-rw-r--r--basicsuite/qt5-everywhere/demos/calqlatr/Calqlatr.qml107
-rw-r--r--basicsuite/qt5-everywhere/demos/calqlatr/content/Button.qml85
-rw-r--r--basicsuite/qt5-everywhere/demos/calqlatr/content/Display.qml128
-rw-r--r--basicsuite/qt5-everywhere/demos/calqlatr/content/NumberPad.qml69
-rw-r--r--basicsuite/qt5-everywhere/demos/calqlatr/content/StyleLabel.qml50
-rw-r--r--basicsuite/qt5-everywhere/demos/calqlatr/content/audio/touch.wavbin950 -> 0 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/calqlatr/content/calculator.js150
-rw-r--r--basicsuite/qt5-everywhere/demos/calqlatr/content/images/icon-back.pngbin328 -> 0 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/calqlatr/content/images/icon-close.pngbin488 -> 0 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/calqlatr/content/images/icon-settings.pngbin503 -> 0 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/calqlatr/content/images/logo.pngbin5950 -> 0 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/calqlatr/content/images/paper-edge-left.pngbin12401 -> 0 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/calqlatr/content/images/paper-edge-right.pngbin12967 -> 0 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/calqlatr/content/images/paper-grip.pngbin298 -> 0 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/calqlatr/content/images/settings-selected-a.pngbin2326 -> 0 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/calqlatr/content/images/settings-selected-b.pngbin2334 -> 0 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/calqlatr/content/images/touch-green.pngbin4808 -> 0 bytes
-rw-r--r--basicsuite/qt5-everywhere/demos/calqlatr/content/images/touch-white.pngbin4601 -> 0 bytes
18 files changed, 0 insertions, 589 deletions
diff --git a/basicsuite/qt5-everywhere/demos/calqlatr/Calqlatr.qml b/basicsuite/qt5-everywhere/demos/calqlatr/Calqlatr.qml
deleted file mode 100644
index 39a0834..0000000
--- a/basicsuite/qt5-everywhere/demos/calqlatr/Calqlatr.qml
+++ /dev/null
@@ -1,107 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import "content"
-import "content/calculator.js" as CalcEngine
-
-
-Rectangle {
- id: window
- anchors.fill: parent
- color: "#272822"
-
- function operatorPressed(operator) { CalcEngine.operatorPressed(operator) }
- function digitPressed(digit) { CalcEngine.digitPressed(digit) }
-
- Item {
- id: pad
- width: window.width * 0.58
- height: window.height * 0.98
- NumberPad { anchors.horizontalCenter: parent.horizontalCenter }
- }
-
- AnimationController {
- id: controller
- animation: ParallelAnimation {
- id: anim
- NumberAnimation { target: display; property: "x"; duration: 400; from: -16; to: window.width - display.width; easing.type: Easing.InOutQuad }
- NumberAnimation { target: pad; property: "x"; duration: 400; from: window.width - pad.width; to: 0; easing.type: Easing.InOutQuad }
- SequentialAnimation {
- NumberAnimation { target: pad; property: "scale"; duration: 200; from: 1; to: 0.97; easing.type: Easing.InOutQuad }
- NumberAnimation { target: pad; property: "scale"; duration: 200; from: 0.97; to: 1; easing.type: Easing.InOutQuad }
- }
- }
- }
-
- Display {
- id: display
- x: -16
- width: window.width * 0.42
- height: parent.height
-
- MouseArea {
- property real startX: 0
- property real oldP: 0
- property bool rewind: false
-
- anchors.fill: parent
- onPositionChanged: {
- var reverse = startX > window.width / 2
- var mx = mapToItem(window, mouse.x).x
- var p = Math.abs((mx - startX) / (window.width - display.width))
- if (p < oldP)
- rewind = reverse ? false : true
- else
- rewind = reverse ? true : false
- controller.progress = reverse ? 1 - p : p
- oldP = p
- }
- onPressed: startX = mapToItem(window, mouse.x).x
- onReleased: {
- if (rewind)
- controller.completeToBeginning()
- else
- controller.completeToEnd()
- }
- }
- }
-
-}
diff --git a/basicsuite/qt5-everywhere/demos/calqlatr/content/Button.qml b/basicsuite/qt5-everywhere/demos/calqlatr/content/Button.qml
deleted file mode 100644
index 6165ed3..0000000
--- a/basicsuite/qt5-everywhere/demos/calqlatr/content/Button.qml
+++ /dev/null
@@ -1,85 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-
-Item {
- property alias text: textItem.text
- property alias color: textItem.color
- property bool operator: false
-
- signal clicked
-
- width: 0.33*pad.width
- height: pad.height/7
-
- Text {
- id: textItem
- anchors.centerIn: parent
- horizontalAlignment: Text.AlignHCenter
- font.pixelSize: parent.height * 0.6
- elide: Text.ElideLeft
- lineHeight: 0.75
- color: "white"
- }
-
- Image {
- id: touchImage
- source: "images/touch-green.png"
- anchors.centerIn: parent
- width: 2*parent.height
- height: 2*parent.height
- visible: false
- }
-
- MouseArea {
- id: mouse
- anchors.fill: parent
- anchors.margins: -5
- onPressed: touchImage.visible = true
- onReleased: touchImage.visible = false
- onClicked: {
- if (operator)
- window.operatorPressed(parent.text)
- else
- window.digitPressed(parent.text)
- }
- }
-}
diff --git a/basicsuite/qt5-everywhere/demos/calqlatr/content/Display.qml b/basicsuite/qt5-everywhere/demos/calqlatr/content/Display.qml
deleted file mode 100644
index df3bfa2..0000000
--- a/basicsuite/qt5-everywhere/demos/calqlatr/content/Display.qml
+++ /dev/null
@@ -1,128 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-
-Item {
- id: display
- function clearAll()
- {
- listView.model.clear();
- }
-
- function displayOperator(operator)
- {
- listView.model.append({ "operator": operator, "operand": "" })
- }
-
- function newLine(operator, operand)
- {
- listView.model.append({ "operator": operator, "operand": operand })
- }
-
- function appendDigit(digit)
- {
- if (!listView.model.count)
- listView.model.append({ "operator": "", "operand": "" })
- var i = listView.model.count - 1;
- listView.model.get(i).operand = listView.model.get(i).operand + digit;
- }
-
- Item {
- id: theItem
- width: parent.width + 32
- height: parent.height
-
- Rectangle {
- id: rect
- x: 16
- color: "white"
- height: parent.height
- width: display.width - 16
- }
- Image {
- anchors.right: rect.left
- source: "images/paper-edge-left.png"
- height: parent.height
- fillMode: Image.TileVertically
- }
- Image {
- anchors.left: rect.right
- source: "images/paper-edge-right.png"
- height: parent.height
- fillMode: Image.TileVertically
- }
-
- Image {
- source: "images/paper-grip.png"
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.bottom: parent.bottom
- anchors.bottomMargin: 20
- }
-
- ListView {
- id: listView
- x: 16; y: 30
- width: display.width
- height: display.height
- delegate: Item {
- height: 20
- width: parent.width
- Text {
- id: operator
- x: 8
- font.pixelSize: 18
- color: "#6da43d"
- text: model.operator
- }
- Text {
- id: operand
- font.pixelSize: 18
- anchors.right: parent.right
- anchors.rightMargin: 26
- text: model.operand
- }
- }
- model: ListModel { }
- }
-
- }
-
-}
diff --git a/basicsuite/qt5-everywhere/demos/calqlatr/content/NumberPad.qml b/basicsuite/qt5-everywhere/demos/calqlatr/content/NumberPad.qml
deleted file mode 100644
index 454c50d..0000000
--- a/basicsuite/qt5-everywhere/demos/calqlatr/content/NumberPad.qml
+++ /dev/null
@@ -1,69 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-
-Grid {
- columns: 3
- columnSpacing: 0
- rowSpacing: 0
-
- Button { text: "7" }
- Button { text: "8" }
- Button { text: "9" }
- Button { text: "4" }
- Button { text: "5" }
- Button { text: "6" }
- Button { text: "1" }
- Button { text: "2" }
- Button { text: "3" }
- Button { text: "0" }
- Button { text: "." }
- Button { text: " " }
- Button { text: "±"; color: "#6da43d"; operator: true }
- Button { text: "−"; color: "#6da43d"; operator: true }
- Button { text: "+"; color: "#6da43d"; operator: true }
- Button { text: " "; color: "#6da43d"; operator: true }
- Button { text: "÷"; color: "#6da43d"; operator: true }
- Button { text: "×"; color: "#6da43d"; operator: true }
- Button { text: "C"; color: "#6da43d"; operator: true }
- Button { text: " "; color: "#6da43d"; operator: true }
- Button { text: "="; color: "#6da43d"; operator: true }
-}
diff --git a/basicsuite/qt5-everywhere/demos/calqlatr/content/StyleLabel.qml b/basicsuite/qt5-everywhere/demos/calqlatr/content/StyleLabel.qml
deleted file mode 100644
index 3bdea86..0000000
--- a/basicsuite/qt5-everywhere/demos/calqlatr/content/StyleLabel.qml
+++ /dev/null
@@ -1,50 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-
-Text {
- width: 64
- font.pixelSize: 14
- font.bold: false
- wrapMode: Text.WordWrap
- lineHeight: 0.75
- color: "#676764"
-}
diff --git a/basicsuite/qt5-everywhere/demos/calqlatr/content/audio/touch.wav b/basicsuite/qt5-everywhere/demos/calqlatr/content/audio/touch.wav
deleted file mode 100644
index 94cccb7..0000000
--- a/basicsuite/qt5-everywhere/demos/calqlatr/content/audio/touch.wav
+++ /dev/null
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/calqlatr/content/calculator.js b/basicsuite/qt5-everywhere/demos/calqlatr/content/calculator.js
deleted file mode 100644
index ffc78bf..0000000
--- a/basicsuite/qt5-everywhere/demos/calqlatr/content/calculator.js
+++ /dev/null
@@ -1,150 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-
-var curVal = 0
-var memory = 0
-var lastOp = ""
-var previousOperator = ""
-var digits = ""
-
-function disabled(op) {
- if (op == "." && digits.toString().search(/\./) != -1) {
- return true
- } else if (op == window.squareRoot && digits.toString().search(/-/) != -1) {
- return true
- } else {
- return false
- }
-}
-
-function digitPressed(op)
-{
- if (lastOp == "=")
- display.newLine("", "");
-
- if (disabled(op))
- return
- if (digits.toString().length >= 14)
- return
- if (lastOp.toString().length == 1 && ((lastOp >= "0" && lastOp <= "9") || lastOp == ".") ) {
- digits = digits + op.toString()
- display.appendDigit(op.toString())
- } else {
- digits = op
- display.appendDigit(op.toString())
- }
- lastOp = op
-}
-
-function operatorPressed(op)
-{
- if (disabled(op))
- return
- lastOp = op
-
- if (previousOperator == "+") {
- digits = Number(digits.valueOf()) + Number(curVal.valueOf())
- } else if (previousOperator == "−") {
- digits = Number(curVal) - Number(digits.valueOf())
- } else if (previousOperator == "×") {
- digits = Number(curVal) * Number(digits.valueOf())
- } else if (previousOperator == "÷") {
- digits = Number(Number(curVal) / Number(digits.valueOf())).toString()
- } else if (previousOperator == "=") {
- }
-
- if (op == "+" || op == "−" || op == "×" || op == "÷") {
- previousOperator = op
- curVal = digits.valueOf()
- display.displayOperator(previousOperator)
- return
- }
-
- if (op == "=") {
- display.newLine("=", digits.toString())
- }
-
- curVal = 0
- previousOperator = ""
-
- if (op == "1/x") {
- digits = (1 / digits.valueOf()).toString()
- } else if (op == "x^2") {
- digits = (digits.valueOf() * digits.valueOf()).toString()
- } else if (op == "Abs") {
- digits = (Math.abs(digits.valueOf())).toString()
- } else if (op == "Int") {
- digits = (Math.floor(digits.valueOf())).toString()
- } else if (op == window.plusminus) {
- digits = (digits.valueOf() * -1).toString()
- } else if (op == window.squareRoot) {
- digits = (Math.sqrt(digits.valueOf())).toString()
- } else if (op == "mc") {
- memory = 0;
- } else if (op == "m+") {
- memory += digits.valueOf()
- } else if (op == "mr") {
- digits = memory.toString()
- } else if (op == "m-") {
- memory = digits.valueOf()
- } else if (op == window.leftArrow) {
- digits = digits.toString().slice(0, -1)
- if (digits.length == 0) {
- digits = "0"
- }
- } else if (op == "Off") {
- Qt.quit();
- } else if (op == "C") {
- curVal = 0
- memory = 0
- lastOp = ""
- digits = ""
- display.clearAll()
- } else if (op == "AC") {
- curVal = 0
- memory = 0
- lastOp = ""
- digits ="0"
- }
-
-
-}
-
diff --git a/basicsuite/qt5-everywhere/demos/calqlatr/content/images/icon-back.png b/basicsuite/qt5-everywhere/demos/calqlatr/content/images/icon-back.png
deleted file mode 100644
index 2989ee2..0000000
--- a/basicsuite/qt5-everywhere/demos/calqlatr/content/images/icon-back.png
+++ /dev/null
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/calqlatr/content/images/icon-close.png b/basicsuite/qt5-everywhere/demos/calqlatr/content/images/icon-close.png
deleted file mode 100644
index 3e21248..0000000
--- a/basicsuite/qt5-everywhere/demos/calqlatr/content/images/icon-close.png
+++ /dev/null
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/calqlatr/content/images/icon-settings.png b/basicsuite/qt5-everywhere/demos/calqlatr/content/images/icon-settings.png
deleted file mode 100644
index 98e662f..0000000
--- a/basicsuite/qt5-everywhere/demos/calqlatr/content/images/icon-settings.png
+++ /dev/null
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/calqlatr/content/images/logo.png b/basicsuite/qt5-everywhere/demos/calqlatr/content/images/logo.png
deleted file mode 100644
index 6bc6561..0000000
--- a/basicsuite/qt5-everywhere/demos/calqlatr/content/images/logo.png
+++ /dev/null
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/calqlatr/content/images/paper-edge-left.png b/basicsuite/qt5-everywhere/demos/calqlatr/content/images/paper-edge-left.png
deleted file mode 100644
index ca29a3a..0000000
--- a/basicsuite/qt5-everywhere/demos/calqlatr/content/images/paper-edge-left.png
+++ /dev/null
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/calqlatr/content/images/paper-edge-right.png b/basicsuite/qt5-everywhere/demos/calqlatr/content/images/paper-edge-right.png
deleted file mode 100644
index 7c2da7b..0000000
--- a/basicsuite/qt5-everywhere/demos/calqlatr/content/images/paper-edge-right.png
+++ /dev/null
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/calqlatr/content/images/paper-grip.png b/basicsuite/qt5-everywhere/demos/calqlatr/content/images/paper-grip.png
deleted file mode 100644
index 953c408..0000000
--- a/basicsuite/qt5-everywhere/demos/calqlatr/content/images/paper-grip.png
+++ /dev/null
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/calqlatr/content/images/settings-selected-a.png b/basicsuite/qt5-everywhere/demos/calqlatr/content/images/settings-selected-a.png
deleted file mode 100644
index e08ddfa..0000000
--- a/basicsuite/qt5-everywhere/demos/calqlatr/content/images/settings-selected-a.png
+++ /dev/null
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/calqlatr/content/images/settings-selected-b.png b/basicsuite/qt5-everywhere/demos/calqlatr/content/images/settings-selected-b.png
deleted file mode 100644
index d9aa7e3..0000000
--- a/basicsuite/qt5-everywhere/demos/calqlatr/content/images/settings-selected-b.png
+++ /dev/null
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/calqlatr/content/images/touch-green.png b/basicsuite/qt5-everywhere/demos/calqlatr/content/images/touch-green.png
deleted file mode 100644
index 64dbde6..0000000
--- a/basicsuite/qt5-everywhere/demos/calqlatr/content/images/touch-green.png
+++ /dev/null
Binary files differ
diff --git a/basicsuite/qt5-everywhere/demos/calqlatr/content/images/touch-white.png b/basicsuite/qt5-everywhere/demos/calqlatr/content/images/touch-white.png
deleted file mode 100644
index bb02b00..0000000
--- a/basicsuite/qt5-everywhere/demos/calqlatr/content/images/touch-white.png
+++ /dev/null
Binary files differ