From 160d1d6010062beb0ff286d9b06c501566ba156f Mon Sep 17 00:00:00 2001 From: Mark Washeim Date: Fri, 5 May 2023 15:13:34 +0200 Subject: [PATCH 1/6] Fix: remove yaml --- SailfishOS/rpm/RPNCalc.yaml | 47 ------------------------------------- 1 file changed, 47 deletions(-) delete mode 100644 SailfishOS/rpm/RPNCalc.yaml diff --git a/SailfishOS/rpm/RPNCalc.yaml b/SailfishOS/rpm/RPNCalc.yaml deleted file mode 100644 index ee8a55c..0000000 --- a/SailfishOS/rpm/RPNCalc.yaml +++ /dev/null @@ -1,47 +0,0 @@ -Name: harbour-rpncalc -Summary: A RPN Calculator for Sailfish -Version: 2.5 -Release: 1 -# The contents of the Group field should be one of the groups listed here: -# http://gitorious.org/meego-developer-tools/spectacle/blobs/master/data/GROUPS -Group: Qt/Qt -URL: https://github.com/lainwir3d/sailfish-rpn-calculator -License: GPL -# This must be generated before uploading a package to a remote build service. -# Usually this line does not need to be modified. -Sources: -- '%{name}-%{version}.tar.bz2' -Description: "Full symbolic RPN calculator. Read http://en.wikipedia.org/wiki/Reverse_Polish_notation if you want to know more about RPN calculators." -Configure: none -# The qtc5 builder inserts macros to allow QtCreator to have fine -# control over qmake/make execution -Builder: qtc5 - -# This section specifies build dependencies that are resolved using pkgconfig. -# This is the preferred way of specifying build dependencies for your package. -PkgConfigBR: -- sailfishapp >= 1.0.2 -- Qt5Core -- Qt5Qml -- Qt5Quick - -# Runtime dependencies which are not automatically detected -Requires: -- sailfishsilica-qt5 >= 0.10.9 -- pyotherside-qml-plugin-python3-qt5 >= 1.4.0 -Files: -- '%{_datadir}/icons/hicolor/86x86/apps/%{name}.png' -- '%{_datadir}/applications/%{name}.desktop' -- '%{_datadir}/%{name}' -- '%{_bindir}' - - -# Build dependencies without a pkgconfig setup can be listed here -# PkgBR: -# - package-needed-to-build -PkgBR: [] - - -# For more information about yaml and what's supported in Sailfish OS -# build system, please see https://wiki.merproject.org/wiki/Spectacle - From 461ff156a3b02f1ef1b1b6ed17231a54e233466a Mon Sep 17 00:00:00 2001 From: Mark Washeim Date: Fri, 5 May 2023 16:29:29 +0200 Subject: [PATCH 2/6] Fix: removed decprecated bindings. small size fixes for menus --- SailfishOS/qml/harbour-rpncalc.qml | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/SailfishOS/qml/harbour-rpncalc.qml b/SailfishOS/qml/harbour-rpncalc.qml index be5897b..6bcfea3 100644 --- a/SailfishOS/qml/harbour-rpncalc.qml +++ b/SailfishOS/qml/harbour-rpncalc.qml @@ -37,8 +37,18 @@ import "elements" ApplicationWindow { id: root + ListModel { + id: memory - initialPage: (Screen.sizeCategory > Screen.Medium) ? wideLandscapeView : portraitView + property var stack + } + initialPage: MainPage{ + currentStack: root.currentStack + currentOperand: root.currentOperand + currentOperandValid: root.currentOperandValid + engineLoaded: root.engineLoaded + } + //(Screen.sizeCategory > Screen.Medium) ? wideLandscapeView : portraitView cover: Qt.resolvedUrl("cover/CoverPage.qml") property string currentOperand: '' @@ -90,7 +100,7 @@ ApplicationWindow } } - onDeviceOrientationChanged: { + /* onDeviceOrientationChanged: { if(deviceOrientation & Orientation.LandscapeMask){ if((orientation & Orientation.PortraitMask) && (Screen.sizeCategory > Screen.Medium)){ @@ -101,12 +111,8 @@ ApplicationWindow pageStack.replaceAbove(0, portraitView); } } - } + }*/ - Memory { - id: memory - stack: currentStack - } PythonGlue { id: python From 281bc7b756d6fc3821e911dc0fb125fd12dad35f Mon Sep 17 00:00:00 2001 From: Mark Washeim Date: Fri, 5 May 2023 16:37:11 +0200 Subject: [PATCH 3/6] Fix: various fixes to get it to build --- SailfishOS/qml/harbour-rpncalc.qml | 8 ++++---- SailfishOS/qml/pages/MainPage.qml | 2 +- SailfishOS/rpm/harbour-rpncalc.spec | 20 ++++++++++---------- SailfishOS/sailfish-rpn-calc.pro | 1 - common/qml/elements/CalcScreen.qml | 2 +- common/qml/elements/OperandEditor.qml | 3 ++- common/src/settingsmanager.cpp | 4 ++-- linux.pri | 4 ++-- rpn-calc.pri | 3 +++ 9 files changed, 25 insertions(+), 22 deletions(-) diff --git a/SailfishOS/qml/harbour-rpncalc.qml b/SailfishOS/qml/harbour-rpncalc.qml index 6bcfea3..6a4bb0d 100644 --- a/SailfishOS/qml/harbour-rpncalc.qml +++ b/SailfishOS/qml/harbour-rpncalc.qml @@ -42,12 +42,12 @@ ApplicationWindow property var stack } - initialPage: MainPage{ + /*initialPage: MainPage{ currentStack: root.currentStack currentOperand: root.currentOperand currentOperandValid: root.currentOperandValid engineLoaded: root.engineLoaded - } + }*/ //(Screen.sizeCategory > Screen.Medium) ? wideLandscapeView : portraitView cover: Qt.resolvedUrl("cover/CoverPage.qml") @@ -100,7 +100,7 @@ ApplicationWindow } } - /* onDeviceOrientationChanged: { + onDeviceOrientationChanged: { if(deviceOrientation & Orientation.LandscapeMask){ if((orientation & Orientation.PortraitMask) && (Screen.sizeCategory > Screen.Medium)){ @@ -111,7 +111,7 @@ ApplicationWindow pageStack.replaceAbove(0, portraitView); } } - }*/ + } PythonGlue { diff --git a/SailfishOS/qml/pages/MainPage.qml b/SailfishOS/qml/pages/MainPage.qml index 1128130..34644bb 100644 --- a/SailfishOS/qml/pages/MainPage.qml +++ b/SailfishOS/qml/pages/MainPage.qml @@ -1,6 +1,7 @@ import QtQuick 2.0 import Sailfish.Silica 1.0 import io.thp.pyotherside 1.3 + import "../elements" //import QtFeedback 5.0 @@ -128,7 +129,6 @@ Page { defaultColor: page.secondaryHighlightColor labelMargin: page.paddingSmall } - CalcScreen { id: calcScreen diff --git a/SailfishOS/rpm/harbour-rpncalc.spec b/SailfishOS/rpm/harbour-rpncalc.spec index f9fc4af..cab60eb 100755 --- a/SailfishOS/rpm/harbour-rpncalc.spec +++ b/SailfishOS/rpm/harbour-rpncalc.spec @@ -21,7 +21,11 @@ Group: Qt/Qt License: GPL URL: https://github.com/lainwir3d/sailfish-rpn-calculator Source0: %{name}-%{version}.tar.bz2 -Source100: harbour-rpncalc.yaml +Source1: https://files.pythonhosted.org/packages/s/fastcache/fastcache-1.0.2.tar.gz +Source2: https://files.pythonhosted.org/packages/s/mpmath/mpmath-0.19.tar.gz +Source3: https://files.pythonhosted.org/packages/s/sympy/sympy-0.7.6.1.tar.gz +Source4: https://files.pythonhosted.org/packages/s/dice/dice-1.0.2.tar.gz + Requires: sailfishsilica-qt5 >= 0.10.9 Requires: pyotherside-qml-plugin-python3-qt5 >= 1.3.0 BuildRequires: pkgconfig(sailfishapp) >= 1.0.2 @@ -51,7 +55,8 @@ Full symbolic RPN calculator. Read http://en.wikipedia.org/wiki/Reverse_Polish_n # >> build post echo %_builddir -cp -r /home/mersdk/share/projects/Qt/sailfish-rpn-calculator/common/python_modules_src %_builddir/ +cp -r ../common/python_modules_src %_builddir/ + cd python_modules_src/ tar xvf fastcache-1.0.2.tar.gz @@ -59,11 +64,6 @@ cd fastcache-1.0.2 python3 setup.py build cd .. -#tar xvf numpy-1.9.2.tar.gz -#cd numpy-1.9.2 -#python3 setup.py build -#cd .. - tar xvf sympy-0.7.6.1.tar.gz cd sympy-0.7.6.1 python3 setup.py build @@ -82,7 +82,6 @@ cd .. tar xvf dice-1.0.2.tar.gz cd dice-1.0.2 python3 setup.py build -cd .. cd .. # << build post @@ -94,6 +93,7 @@ rm -rf %{buildroot} %qmake5_install # >> install post + cd python_modules_src/ cd fastcache-1.0.2 @@ -125,8 +125,8 @@ rm -rf %{buildroot}/%{_datadir}/%{name}/bin cd .. -cp /usr/lib/libpython3.7m.so.1.0 %{buildroot}/%{_datadir}/%{name}/lib/ -cp /lib/libutil.so.1 %{buildroot}/%{_datadir}/%{name}/lib/libutil.so.1 +#cp /usr/lib/libpython3.7m.so.1.0 %{buildroot}/%{_datadir}/%{name}/lib/ +#cp /lib/libutil.so.1 %{buildroot}/%{_datadir}/%{name}/lib/libutil.so.1 # << install post desktop-file-install --delete-original \ diff --git a/SailfishOS/sailfish-rpn-calc.pro b/SailfishOS/sailfish-rpn-calc.pro index 3de2bcf..4b1b435 100644 --- a/SailfishOS/sailfish-rpn-calc.pro +++ b/SailfishOS/sailfish-rpn-calc.pro @@ -17,7 +17,6 @@ include(../rpn-calc.pri) OTHER_FILES += \ rpm/sailfish-rpn-calc.spec \ - rpm/RPNCalc.yaml \ rpm/harbour-rpncalc.spec \ harbour-rpncalc.desktop \ qml/cover/CoverPage.qml \ diff --git a/common/qml/elements/CalcScreen.qml b/common/qml/elements/CalcScreen.qml index b553c8e..a2d7bd0 100644 --- a/common/qml/elements/CalcScreen.qml +++ b/common/qml/elements/CalcScreen.qml @@ -1,5 +1,5 @@ import QtQuick 2.5 -import QtQuick.Controls 2.13 +//import QtQuick.Controls 2.13 import "../elements" Item{ diff --git a/common/qml/elements/OperandEditor.qml b/common/qml/elements/OperandEditor.qml index a8f837b..fc5a36f 100644 --- a/common/qml/elements/OperandEditor.qml +++ b/common/qml/elements/OperandEditor.qml @@ -1,5 +1,6 @@ import QtQuick 2.0 -import QtQuick.Controls 2.13 +import Sailfish.Silica 1.0 +//import QtQuick.Controls 2.13 import QtGraphicalEffects 1.0 Item{ diff --git a/common/src/settingsmanager.cpp b/common/src/settingsmanager.cpp index 7035031..8217c28 100644 --- a/common/src/settingsmanager.cpp +++ b/common/src/settingsmanager.cpp @@ -5,8 +5,8 @@ SettingsManager::SettingsManager(QObject *parent) : { settings = new QSettings("harbour-rpncalc", "harbour-rpncalc"); - if(settings->value("vibration") == QVariant()) settings->setValue("vibration", 1); - if(settings->value("angle_unit") == QVariant()) settings->setValue("angle_unit", QString("DEG")); + if(settings->value("vibration") == QVariant()) settings->setValue("vibration", 0); + if(settings->value("angle_unit") == QVariant()) settings->setValue("angle_unit", QString("Degree")); if(settings->value("reprFloatPrecision") == QVariant()) settings->setValue("reprFloatPrecision", 9); if(settings->value("symbolicMode") == QVariant()) settings->setValue("symbolicMode", true); diff --git a/linux.pri b/linux.pri index 8955f4c..575b3bc 100644 --- a/linux.pri +++ b/linux.pri @@ -1,8 +1,8 @@ python.path = /usr/share/$${TARGET} python.files = ../common/python -commonqml.path = /usr/share/$${TARGET}/qml/ -commonqml.files = ../common/qml/* +commonqml.path = /usr/share/$${TARGET}/qml/elements +commonqml.files = ../common/qml/elements/* #libs.path = /usr/share/$${TARGET} #libs.files = libs/i686/lib diff --git a/rpn-calc.pri b/rpn-calc.pri index db7243e..8706d51 100644 --- a/rpn-calc.pri +++ b/rpn-calc.pri @@ -28,6 +28,9 @@ OTHER_FILES += \ ../common/qml/elements/StdKeyboard.qml \ ../common/qml/elements/Popup.qml \ ../common/qml/elements/StackFlick.qml \ + ../common/qml/elements/PythonGlue.qml \ + ../common/qml/elements/CustomBackgroundItem.qml \ + ../common/qml/elements/CustomGlassItem.qml \ ../common/qml/elements/OperandEditor.qml \ ../TODO.txt \ ../LICENSE \ From 6ad37ba7606b338489dc980c90dccba944c84456 Mon Sep 17 00:00:00 2001 From: Mark Washeim Date: Fri, 5 May 2023 17:21:24 +0200 Subject: [PATCH 4/6] Fix: all the bloody fixes again. --- SailfishOS/qml/harbour-rpncalc.qml | 11 ++++++----- SailfishOS/sailfish-rpn-calc.pro | 12 +++++++++++- linux.pri | 7 ++++--- rpn-calc.pri | 10 ---------- 4 files changed, 21 insertions(+), 19 deletions(-) diff --git a/SailfishOS/qml/harbour-rpncalc.qml b/SailfishOS/qml/harbour-rpncalc.qml index 6a4bb0d..2eb2172 100644 --- a/SailfishOS/qml/harbour-rpncalc.qml +++ b/SailfishOS/qml/harbour-rpncalc.qml @@ -42,12 +42,12 @@ ApplicationWindow property var stack } - /*initialPage: MainPage{ + initialPage: MainPage{ currentStack: root.currentStack currentOperand: root.currentOperand currentOperandValid: root.currentOperandValid engineLoaded: root.engineLoaded - }*/ + } //(Screen.sizeCategory > Screen.Medium) ? wideLandscapeView : portraitView cover: Qt.resolvedUrl("cover/CoverPage.qml") @@ -89,7 +89,7 @@ ApplicationWindow } } - Component { + /*Component { id: wideLandscapeView WideLandscape { @@ -98,8 +98,8 @@ ApplicationWindow currentOperandValid: root.currentOperandValid engineLoaded: root.engineLoaded } - } - + }*/ +/* onDeviceOrientationChanged: { if(deviceOrientation & Orientation.LandscapeMask){ @@ -112,6 +112,7 @@ ApplicationWindow } } } + */ PythonGlue { diff --git a/SailfishOS/sailfish-rpn-calc.pro b/SailfishOS/sailfish-rpn-calc.pro index 4b1b435..feb6e25 100644 --- a/SailfishOS/sailfish-rpn-calc.pro +++ b/SailfishOS/sailfish-rpn-calc.pro @@ -25,6 +25,16 @@ OTHER_FILES += \ qml/harbour-rpncalc.qml \ qml/pages/Settings.qml \ qml/pages/SymbolPage.qml \ - qml/pages/WideLandscape.qml + qml/pages/WideLandscape.qml \ + qml/elements/KeyboardButton.qml \ + qml/elements/CalcScreen.qml \ + qml/elements/Memory.qml \ + qml/elements/StdKeyboard.qml \ + qml/elements/Popup.qml \ + qml/elements/StackFlick.qml \ + qml/elements/PythonGlue.qml \ + qml/elements/CustomBackgroundItem.qml \ + qml/elements/CustomGlassItem.qml \ + qml/elements/OperandEditor.qml \ include("../linux.pri") diff --git a/linux.pri b/linux.pri index 575b3bc..872130b 100644 --- a/linux.pri +++ b/linux.pri @@ -1,8 +1,8 @@ python.path = /usr/share/$${TARGET} python.files = ../common/python -commonqml.path = /usr/share/$${TARGET}/qml/elements -commonqml.files = ../common/qml/elements/* +#commonqml.path = /usr/share/$${TARGET}/qml/elements +#commonqml.files = ../common/qml/elements/* #libs.path = /usr/share/$${TARGET} #libs.files = libs/i686/lib @@ -12,5 +12,6 @@ appicons.path = /usr/share/icons/hicolor appicons.files = ../common/icons/* #INSTALLS += python libs -INSTALLS += appicons python commonqml +INSTALLS += appicons python +#commonqml diff --git a/rpn-calc.pri b/rpn-calc.pri index 8706d51..1158cdc 100644 --- a/rpn-calc.pri +++ b/rpn-calc.pri @@ -22,16 +22,6 @@ OTHER_FILES += \ ../common/python/rpncalc_sympy_functions.py \ ../common/python/rpncalc_constants.py \ ../common/python/rpncalc_engine.py \ - ../common/qml/elements/KeyboardButton.qml \ - ../common/qml/elements/CalcScreen.qml \ - ../common/qml/elements/Memory.qml \ - ../common/qml/elements/StdKeyboard.qml \ - ../common/qml/elements/Popup.qml \ - ../common/qml/elements/StackFlick.qml \ - ../common/qml/elements/PythonGlue.qml \ - ../common/qml/elements/CustomBackgroundItem.qml \ - ../common/qml/elements/CustomGlassItem.qml \ - ../common/qml/elements/OperandEditor.qml \ ../TODO.txt \ ../LICENSE \ ../README From d42cd22e9cb701d85884924f8d85e5d1f40805fd Mon Sep 17 00:00:00 2001 From: Mark Washeim Date: Fri, 5 May 2023 17:56:59 +0200 Subject: [PATCH 5/6] fix: more build fixes --- rpn-calc.pri | 2 -- 1 file changed, 2 deletions(-) diff --git a/rpn-calc.pri b/rpn-calc.pri index 1158cdc..1332f00 100644 --- a/rpn-calc.pri +++ b/rpn-calc.pri @@ -29,5 +29,3 @@ OTHER_FILES += \ RESOURCES += \ $$PWD/common/qml/commonqml.qrc -DISTFILES += \ - $$PWD/common/qml/elements/CustomGlassItem.qml From 3337bb3e01e9fa6943b92270147e940c03b567e9 Mon Sep 17 00:00:00 2001 From: Mark Washeim Date: Fri, 5 May 2023 18:39:40 +0200 Subject: [PATCH 6/6] Add: elements only work in qmlllive this way --- SailfishOS/qml/elements/CalcScreen.qml | 193 ++++ .../qml/elements/CustomBackgroundItem.qml | 25 + SailfishOS/qml/elements/CustomGlassItem.qml | 6 + SailfishOS/qml/elements/KeyboardButton.qml | 94 ++ SailfishOS/qml/elements/Memory.qml | 7 + SailfishOS/qml/elements/OperandEditor.qml | 155 ++++ SailfishOS/qml/elements/Popup.qml | 83 ++ SailfishOS/qml/elements/PythonGlue.qml | 194 ++++ SailfishOS/qml/elements/StackFlick.qml | 194 ++++ SailfishOS/qml/elements/StdKeyboard.qml | 840 ++++++++++++++++++ SailfishOS/qml/elements/Style.qml | 7 + 11 files changed, 1798 insertions(+) create mode 100644 SailfishOS/qml/elements/CalcScreen.qml create mode 100644 SailfishOS/qml/elements/CustomBackgroundItem.qml create mode 100644 SailfishOS/qml/elements/CustomGlassItem.qml create mode 100644 SailfishOS/qml/elements/KeyboardButton.qml create mode 100644 SailfishOS/qml/elements/Memory.qml create mode 100644 SailfishOS/qml/elements/OperandEditor.qml create mode 100644 SailfishOS/qml/elements/Popup.qml create mode 100644 SailfishOS/qml/elements/PythonGlue.qml create mode 100644 SailfishOS/qml/elements/StackFlick.qml create mode 100644 SailfishOS/qml/elements/StdKeyboard.qml create mode 100644 SailfishOS/qml/elements/Style.qml diff --git a/SailfishOS/qml/elements/CalcScreen.qml b/SailfishOS/qml/elements/CalcScreen.qml new file mode 100644 index 0000000..f380126 --- /dev/null +++ b/SailfishOS/qml/elements/CalcScreen.qml @@ -0,0 +1,193 @@ +import QtQuick 2.5 +import Sailfish.Silica 1.0 +//import QtQuick.Controls 2.13 +import "../elements" + +Item{ + id: calcScreen + + property alias contentHeight: listView.contentHeight + property alias model: listView.model + + property alias view: listView + + property color fontColor: "black" + property color glassItemColor: "lightblue" + property int fontSize: 12 + property string fontFamily: "helvetica" + + property string dropIconPath: "" + property color dropIconColor: "white" + + property Component horizontalScrollDecorator: Item{} + property int horizontalScrollPadding: 10 + + property Component verticalScrollDecorator: Item{} + property int verticalScrollPadding: 10 + + property int scrollIndicatorHeight: 3 + + CustomGlassItem { + id: divider + + anchors.top: parent.top + anchors.horizontalCenter: parent.horizontalCenter + + objectName: "menuitem" + + height: scrollIndicatorHeight + width: parent.width + + color: glassItemColor + opacity : (listView.height >= listView.contentHeight) || listView.atYBeginning ? 0.0 : 1.0 + + Behavior on opacity { NumberAnimation {duration: 500} } + + //cache: false + } + + ListView { + id: listView + + anchors.fill: parent + + snapMode: ListView.NoSnap + + //ScrollIndicator.vertical: ScrollIndicator { } + Loader{ + sourceComponent: verticalScrollDecorator + } + + property Item contextMenu + + delegate: Item { + id: myListItem + property bool menuOpen: view.contextMenu != null && view.contextMenu.parent === myListItem + + width: view.width + height: menuOpen ? view.contextMenu.height + stackFlick.height : stackFlick.height + + StackFlick { + id: stackFlick + + stack: currentStack + + width: view.width + + fontColor: calcScreen.fontColor + fontSize: calcScreen.fontSize + fontFamily: calcScreen.fontFamily + + dropIcon: calcScreen.dropIconPath + dropIconColor: calcScreen.dropIconColor + + elementScrollDecorator: horizontalScrollDecorator + + onPressAndHold: { + if (!view.contextMenu) + view.contextMenu = contextMenuComponent.createObject(view); + + view.contextMenu.showOptionsForItem(myListItem, stackFlick); + } + } + } + + + Component { + id: contextMenuComponent + + ContextMenu { + id: menu + + property Item currentItem + property int toDrop: -1 + property int toPick: -1 + onClosed: { + if(toDrop != -1){ + stackDropUIIndex(toDrop); + toDrop = -1; + } + + if(toPick != -1){ + stackPickUIIndex(toPick); + toPick = -1; + } + } + + function showOptionsForItem(showItem, item){ + menu.currentItem = item; + menu.show(showItem); + } + + Row { + width: parent ? parent.width : Screen.width + height: calcScreen.fontSize + CustomBackgroundItem { + width: parent.width / 3 + height: Theme.itemSizeSmall + Label{ + text: "Pick" + anchors.centerIn: parent + } + onClicked: { + if(menu.currentItem){ + menu.toPick = menu.currentItem.invertedIndex; // do not drop immediately, wait after menu is closed. + } + + menu.hide(); + } + } + CustomBackgroundItem { + width: parent.width / 3 + height: Theme.itemSizeSmall + Label{ + text: "Drop" + anchors.centerIn: parent + } + onClicked: { + if(menu.currentItem){ + menu.toDrop = menu.currentItem.invertedIndex; // do not drop immediately, wait after menu is closed. + } + + menu.hide(); + } + } + CustomBackgroundItem { + width: parent.width / 3 + height: Theme.itemSizeSmall + Label{ + text: "Copy" + anchors.centerIn: parent + } + onClicked: { + copyToClipboard(menu.currentItem.text); + menu.hide(); + popup.notify("Copied to clipboard !"); + } + } + } + } + } + } + + + CustomGlassItem { + id: divider2 + + anchors.bottom: listView.bottom + anchors.horizontalCenter: parent.horizontalCenter + + objectName: "menuitem" + + height: scrollIndicatorHeight + width: parent.width + + color: calcScreen.glassItemColor + opacity: listView.atYEnd ? 0.0 : 1.0 + + Behavior on opacity { NumberAnimation {duration: 500} } + + //cache: false + } + +} diff --git a/SailfishOS/qml/elements/CustomBackgroundItem.qml b/SailfishOS/qml/elements/CustomBackgroundItem.qml new file mode 100644 index 0000000..5a3ea9d --- /dev/null +++ b/SailfishOS/qml/elements/CustomBackgroundItem.qml @@ -0,0 +1,25 @@ +import QtQuick 2.0 +import Sailfish.Silica 1.0 + +MouseArea { + property bool highlighted: false + property color color: "black" + property real highlightedOpacity: 0.3 + + Rectangle { + anchors.fill: parent + + color: parent.color + + opacity: highlighted ? highlightedOpacity : 0.0 + } + + onPressed: { + highlighted = true; + } + + onReleased: { + highlighted = false; + } + +} diff --git a/SailfishOS/qml/elements/CustomGlassItem.qml b/SailfishOS/qml/elements/CustomGlassItem.qml new file mode 100644 index 0000000..03a6146 --- /dev/null +++ b/SailfishOS/qml/elements/CustomGlassItem.qml @@ -0,0 +1,6 @@ +import QtQuick 2.0 +import Sailfish.Silica 1.0 + +Rectangle { + +} diff --git a/SailfishOS/qml/elements/KeyboardButton.qml b/SailfishOS/qml/elements/KeyboardButton.qml new file mode 100644 index 0000000..9eea907 --- /dev/null +++ b/SailfishOS/qml/elements/KeyboardButton.qml @@ -0,0 +1,94 @@ +import QtQuick 2.0 +import Sailfish.Silica 1.0 + +MouseArea { + id: buttonRect + + width: buttonWidth + height: buttonHeigth + + property string rectColor: "transparent" + property color rectBorderColor: "white" + property int rectBorderWidth: 1 + property real rectOpacity: 1 + + property int fontSize: mainLabel.font.pixelSize + property int secondaryFontSize: fontSize / 2 + property color fontColor: "black" + property color fontColorLeftOption: "orange" + property color fontColorRightOption: "lightblue" + + property string text; + property variant actions: [{text: ' ', visual:'', engine:'', type:'', enabled: false}, + {text: ' ', visual:'', engine:'', type:'', enabled: false}, + {text: ' ', visual:'', engine:'', type:'', enabled: false}]; + + property int mode: 0 + property real disabledOpacity: 0.1 + enabled: actions[mode].enabled + opacity: enabled ? 1: disabledOpacity + + Behavior on opacity { NumberAnimation { duration: 500 } } + + Label{ + id: orangeLabel + + anchors.top: parent.top + anchors.left: parent.left + width: parent.width / 2 + height: secondaryFontSize.height + + horizontalAlignment: Text.AlignLeft + font.pixelSize: secondaryFontSize - 2 + + color: buttonRect.fontColorLeftOption + text: actions[1].text + } + + Label{ + id: blueLabel + + anchors.top: parent.top + anchors.right: parent.right + width: parent.width / 2 + height: secondaryFontSize.height + + horizontalAlignment: Text.AlignRight + font.pixelSize: secondaryFontSize - 2 + + color: buttonRect.fontColorRightOption + text: actions[2].text + } + + Rectangle { + //anchors.fill: parent + id: rect + width: parent.width + height: parent.height - blueLabel.paintedHeight + anchors.bottom: parent.bottom + color: parent.rectColor + border.width: rectBorderWidth + border.color: rectBorderColor + radius: 10 + opacity: parent.rectOpacity + } + + Label{ + id: mainLabel + //anchors.fill: parent + anchors.horizontalCenter: parent.horizontalCenter + anchors.verticalCenter: rect.verticalCenter + text: actions[0].text + + font.pixelSize: fontSize + color: buttonRect.fontColor + } + + /* + onClicked: { + if(settings.vibration()){ + vibration.start(); + } + } + */ +} diff --git a/SailfishOS/qml/elements/Memory.qml b/SailfishOS/qml/elements/Memory.qml new file mode 100644 index 0000000..1a0c66a --- /dev/null +++ b/SailfishOS/qml/elements/Memory.qml @@ -0,0 +1,7 @@ +import QtQuick 2.0 + +ListModel { + id: memory + + property var stack +} diff --git a/SailfishOS/qml/elements/OperandEditor.qml b/SailfishOS/qml/elements/OperandEditor.qml new file mode 100644 index 0000000..f0123d9 --- /dev/null +++ b/SailfishOS/qml/elements/OperandEditor.qml @@ -0,0 +1,155 @@ +import QtQuick 2.0 +import Sailfish.Silica 1.0 +import QtGraphicalEffects 1.0 + +Item{ + id: operandEditor + + property bool operandInvalid: false + property alias operand: operandLabel.text + + property alias backButton: backBtn + + height: backBtn.height + + property int flickableSize: width - flickable.anchors.rightMargin - backBtn.width - 10 + + property string backIcon: "" + property color backIconColor: "white" + + property int fontSize: 10 + property string fontFamily: "helvetica" + property color fontColor: "black" + property color invalidFontColor: "red" + + property Component horizontalScrollDecorator: Item{} + property int horizontalScrollPadding: 10 + +/* + IconButton{ + id: kbdBtn + width: height + height: Theme.fontSizeExtraLarge + 10 + icon.source: "image://Theme/icon-l-dialpad" + onClicked: { + expressionInput.focus = expressionInput.focus ? false : true; + //if(settings.vibration()){ + // vibration.start(); + //} + } + } + + TextField { + id: expressionInput + visible: true + anchors.top: parent.top + + inputMethodHints: Qt.ImhNoAutoUppercase | Qt.ImhNoPredictiveText + + background: Rectangle{ + color: "transparent" + } + + EnterKey.enabled: page.engineLoaded + EnterKey.text: "ENTER" + + EnterKey.onClicked: { + if(currentOperandValid){ + page.formulaPush('', 'enter', 'stack'); + expressionInput.focus = false; + }else{ + //long vibration + } + } + } + } +*/ + + Flickable { + id: flickable + + height: fontSize + + width: operandEditor.flickableSize + + anchors.right: backBtn.left + anchors.rightMargin: 10 + anchors.verticalCenter: parent.verticalCenter + + contentHeight: height + contentWidth: flicked.width + + clip: true + + function flickToRightEdge(){ + if((operandLabel.paintedWidth > operandEditor.flickableSize) && !atXEnd){ + console.log("flick !!"); + contentX = operandLabel.paintedWidth - flickable.width; + } + } + + Loader{ + sourceComponent: horizontalScrollDecorator + } + + Item { + id: flicked + + anchors.verticalCenter: parent.verticalCenter + + width: Math.max(operandLabel.paintedWidth, operandEditor.flickableSize) + height: fontSize + 10 + + Label { + id: operandLabel + + anchors.right: parent.right + anchors.verticalCenter: parent.verticalCenter + + height: fontSize + 10 + + horizontalAlignment: Text.AlignRight + verticalAlignment: Text.AlignVCenter + font.family: fontFamily + font.pixelSize: fontSize + //truncationMode: TruncationMode.Fade + + color: operandEditor.operandInvalid ? operandEditor.invalidFontColor : operandEditor.fontColor + + text: "" + + onTextChanged: { + flickable.flickToRightEdge(); + } + } + } + } + + MouseArea{ + id: backBtn + + anchors.right: parent.right + anchors.verticalCenter: parent.verticalCenter + + width: height + height: fontSize + 10 + + Item { + anchors.fill: parent + + Image { + id: icon + source: backIcon + sourceSize: Qt.size(parent.width, parent.height) + smooth: true + visible: false + } + + ColorOverlay { + anchors.fill: icon + source: icon + color: backIconColor + } + } + } +} diff --git a/SailfishOS/qml/elements/Popup.qml b/SailfishOS/qml/elements/Popup.qml new file mode 100644 index 0000000..9deea6d --- /dev/null +++ b/SailfishOS/qml/elements/Popup.qml @@ -0,0 +1,83 @@ +import QtQuick 2.0 +import Sailfish.Silica 1.0 + +MouseArea { + id: popup + anchors.top: parent.top + + property int padding: 5 + property int labelMargin: 5 + + width: parent.width + height: message.paintedHeight + padding + + property alias title: message.text + property alias timeout: hideTimer.interval + property alias background: bg.color + + property color defaultColor: "cyan" + property color textColor: "white" + + property real rectOpacity: 0.9 + property int pixelSize: 32 + + visible: opacity > 0 + opacity: 0.0 + + Behavior on opacity { + //FadeAnimation {} + } + + Rectangle { + id: bg + anchors.fill: parent + } + + Timer { + id: hideTimer + triggeredOnStart: false + repeat: false + interval: 5000 + onTriggered: popup.hide() + } + + function hide() { + if (hideTimer.running) + hideTimer.stop() + popup.opacity = 0.0 + } + + function show() { + popup.opacity = 1.0 + hideTimer.restart() + } + + function notify(text, color) { + popup.title = text + if (color && (typeof(color) != "undefined")) + bg.color = color + else + bg.color = Qt.rgba(defaultColor.r, defaultColor.g, defaultColor.b , rectOpacity) + show() + } + + Label { + id: message + + anchors.verticalCenter: popup.verticalCenter + + anchors.left: parent.left + anchors.leftMargin: labelMargin + anchors.right: parent.right + anchors.rightMargin: labelMargin + + horizontalAlignment: Text.AlignHCenter + elide: Text.ElideRight + wrapMode: Text.Wrap + + font.pixelSize: popup.pixelSize + color: textColor + } + + onClicked: hide() +} diff --git a/SailfishOS/qml/elements/PythonGlue.qml b/SailfishOS/qml/elements/PythonGlue.qml new file mode 100644 index 0000000..bd53046 --- /dev/null +++ b/SailfishOS/qml/elements/PythonGlue.qml @@ -0,0 +1,194 @@ +import QtQuick 2.2 +import io.thp.pyotherside 1.3 +import QtGraphicalEffects 1.0 + +Python { + id: python + + property var screenObj + property var notificationObj + property var stackObj + property var memoryObj + property var settingsObj + + Component.onCompleted: { + addImportPath(Qt.resolvedUrl('../../python')); + + setHandler('currentOperand', currentOperandHandler); + setHandler('newStack', newStackHandler); + setHandler('stackPopPush', stackPopPushHandler); + setHandler('stackPop', stackPopHandler); + setHandler('NotEnoughOperandsException', notEnoughOperandsExceptionHandler); + setHandler('WrongOperandsException', wrongOperandsExceptionHandler); + setHandler('ExpressionNotValidException', expressionNotValidExceptionHandler); + setHandler('BackendException', backendExceptionHandler); + setHandler('EngineLoaded', engineLoadedHandler); + setHandler('symbolsPush', symbolsPushHandler); + + + importModule('rpncalc_engine', function () { + console.log("Module successfully imported. Loading engine."); + changeTrigonometricUnit(settingsObj.angleUnit); + changeReprFloatPrecision(settingsObj.reprFloatPrecision); + newStackHandler([]); + + // this was sailfish only + //stackObj.pushAttached(Qt.resolvedUrl("../pages/Settings.qml")); + }); + } + + function engineLoadedHandler(){ + notificationObj.notify("Symbolic engine loaded"); + root.engineLoaded = true; + + changeTrigonometricUnit(settingsObj.angleUnit); + changeReprFloatPrecision(settingsObj.reprFloatPrecision); + enableSymbolicMode(settingsObj.symbolicMode); + enableAutoSimplify(settingsObj.autoSimplify); + } + + function expressionNotValidExceptionHandler(){ + notificationObj.notify("Expression not valid."); + } + + function backendExceptionHandler(){ + notificationObj.notify("Error."); + } + + function notEnoughOperandsExceptionHandler(nbExpected, nbAvailabled){ + notificationObj.notify("Not enough operands. Expecting " + nbExpected + "."); + } + + function wrongOperandsExceptionHandler(expectedOperands, nb){ + if(nb > 0){ + notificationObj.notify("Wrongs operands. Expected " + nb + " " + operandTypeToString(expectedOperands) + "."); + }else{ + notificationObj.notify("Wrongs operands. Expected " + operandTypeToString(expectedOperands) + "."); + } + } + + function enableSymbolicMode(enabled){ + call("rpncalc_engine.engine.setSymbolicMode", [enabled], function (){}); + } + + function enableRationalMode(enabled){ + call("rpncalc_engine.engine.setRationalMode", [enabled], function (){}); + } + + function enableAutoSimplify(enabled){ + call("rpncalc_engine.engine.setAutoSimplify", [enabled], function (){}); + } + + function changeTrigonometricUnit(unit){ + call("rpncalc_engine.engine.changeTrigonometricUnit", [unit], function (){}); + } + + function changeReprFloatPrecision(prec){ + call("rpncalc_engine.engine.setBeautifierPrecision", [prec], function (){}); + } + + function operandTypeToString(operands){ + var i = 0; + var rstr = ""; + for(i=0; i< operands.length; i++){ + switch(Number(operands[i])){ + case 1: + rstr += "Integer,"; + break; + case 2: + rstr += "Float,"; + break; + } + } + rstr = rstr.substring(0, rstr.length-1); + + if(operands.length > 1){ + rstr = "(" + rstr + ")"; + } + return rstr; + } + + + function currentOperandHandler(operand, valid){ + root.currentOperand = operand; + root.currentOperandValid = valid; + } + + function newStackHandler(stack){ + memoryObj.clear(); + var i=0; + for(i=stack.length-1; i>=0 ; i--){ + memoryObj.append({isLastItem: i == stack.length ? true : false, value: stack[i]["expr"]}) + } + + updateFakeFirstElements(); + + screenObj.view.positionViewAtEnd(); + + currentStack = stack; + } + + function stackPopPushHandler(pop, el){ + if(pop > 0){ + memoryObj.remove(memoryObj.count - pop, pop); + }else if(pop < 0){ + memoryObj.clear(); + } + + memoryObj.append({isLastItem: true, value: el["expr"]}); + updateFakeFirstElements(); + screenObj.view.positionViewAtEnd(); + } + + function stackPopHandler(nb){ + if(nb > 0){ + memoryObj.remove(memoryObj.count - nb, nb); + }else if(nb < 0){ + memoryObj.clear(); + } + + updateFakeFirstElements(); + } + + function updateFakeFirstElements(){ + if(memoryObj.count == 0){ + memoryObj.insert(0, {isLastItem: true, value: ""}); + }else{ + if(memoryObj.get(0).value == ""){ + memoryObj.remove(0); + } + } + } + + function processInput(input, type){ + call("rpncalc_engine.engine.processInput", [input, type], function (){}); + } + + function clearCurrentOperand(){ + call("rpncalc_engine.engine.clearCurrentOperand", function(){}); + } + + function delLastOperandCharacter(){ + call("rpncalc_engine.engine.delLastOperandCharacter", function(){}); + } + + function dropFirstStackOperand(){ + call("rpncalc_engine.engine.stackDropFirst", function(){}); + } + + function dropAllStackOperand(){ + call("rpncalc_engine.engine.stackDropAll", function(){}); + } + + function dropStackOperand(idx){ + call("rpncalc_engine.engine.stackDrop", [idx], function(){}); + } + + function pickStackOperand(idx){ + call("rpncalc_engine.engine.stackPick", [idx], function(){}); + } + + function symbolsPushHandler(pageName, symbols){ + stackObj.push(Qt.resolvedUrl("../pages/SymbolPage.qml"), {"mainPage": stackObj.currentPage, "pageName": pageName, "symbols": symbols}); + } +} diff --git a/SailfishOS/qml/elements/StackFlick.qml b/SailfishOS/qml/elements/StackFlick.qml new file mode 100644 index 0000000..08db0c6 --- /dev/null +++ b/SailfishOS/qml/elements/StackFlick.qml @@ -0,0 +1,194 @@ +import QtQuick 2.0 +import Sailfish.Silica 1.0 + +import QtGraphicalEffects 1.0 + +Item{ + id: root + height: columnA.height + transformOrigin: Item.Bottom + state: "current" + + property var stack; + property int invertedIndex: memory.count - index + property string text: value + + property alias highlighted : bg.highlighted + + property int fontSize: 10 + property string fontFamily: "helvetica" + property color fontColor: "black" + + property Component elementScrollDecorator: Item{} + + property string dropIcon: "" + property color dropIconColor: "white" + + signal pressAndHold() + signal clicked() + + Column { + id: columnA + + width: parent.width + + anchors{ + top: parent.top + left: parent.left + } + + spacing: 10 + + CustomBackgroundItem { + id: bg + + width: parent.width + height: root.fontSize + + property int flickableSize: bg.width - 10 - idLabel.width - 10 - flickable.anchors.rightMargin - (dropBtn.visible ? dropBtn.width + 10 : 0) + + Label { + id: idLabel + + anchors.left: parent.left + anchors.verticalCenter: parent.verticalCenter + anchors.leftMargin: 10 + + height: root.fontSize + 10 + + horizontalAlignment: Text.AlignLeft + verticalAlignment: Text.AlignVCenter + font.family: root.fontFamily + font.pixelSize: root.fontSize + + text: String(invertedIndex) + ":" + color: root.fontColor + } + + Flickable { + id: flickable + + height: root.fontSize + + width: bg.flickableSize + + anchors.right: dropBtn.visible ? dropBtn.left : parent.right + anchors.rightMargin: dropBtn.visible ? 10 : 20 + anchors.verticalCenter: parent.verticalCenter + + contentHeight: height + contentWidth: flicked.width + + clip: true + + Loader { + sourceComponent: elementScrollDecorator + } + + Item { + id: flicked + + anchors.verticalCenter: parent.verticalCenter + + width: Math.max(valueLabel.paintedWidth, bg.flickableSize) + height: root.fontSize + 10 + + Label { + id: valueLabel + + anchors.right: parent.right + anchors.verticalCenter: parent.verticalCenter + + height: root.fontSize + 10 + + horizontalAlignment: Text.AlignRight + verticalAlignment: Text.AlignVCenter + font.family: root.fontFamily + font.pixelSize: root.fontSize + //truncationMode: TruncationMode.Fade + + text: value + color: root.fontColor + } + + MouseArea { + id: mouseA + anchors.fill: parent + + onPressed: { + bg.highlighted = true; + } + + onReleased: { + bg.highlighted = false; + } + + onCanceled: { + bg.highlighted = false; + } + + onClicked: { + root.clicked(); + } + + onPressAndHold: { + bg.highlighted = false; + root.pressAndHold(); + } + } + } + } + + + Item{ + id: dropBtn + anchors.verticalCenter: parent.verticalCenter + anchors.right: parent.right + anchors.rightMargin: 10 + + width: height + height: root.fontSize + 10 + + visible: invertedIndex === 1 + + Image{ + id: dropImg + + + source: dropIcon + + sourceSize: Qt.size(parent.width, parent.height) + smooth: true + visible: false + + } + + ColorOverlay { + anchors.fill: dropImg + source: dropImg + color: dropIconColor + } + + MouseArea{ + anchors.fill: parent + + onClicked: { + stackDropFirst(); + + if(settings.vibration()){ + // vibration.start(); + } + + } + onPressAndHold: { + stackDropAll(); + if(settings.vibration()){ + //longVibration.start(); + } + } + } + } + } + + } +} diff --git a/SailfishOS/qml/elements/StdKeyboard.qml b/SailfishOS/qml/elements/StdKeyboard.qml new file mode 100644 index 0000000..09885b1 --- /dev/null +++ b/SailfishOS/qml/elements/StdKeyboard.qml @@ -0,0 +1,840 @@ +import QtQuick 2.0 +import Sailfish.Silica 1.0 + +Item { + id: kbdItem + + width: parent.width + height: keyboard.height + 5 + + property int buttonWidth: 85 + property int buttonHeigth: 80 + + property alias action: keyboard.action + + property int rowSpacing: 10 + property alias columnSpacing: keyboard.spacing + + property color keyboardButtonFontColor: "black" + property color keyboardButtonLeftFontColor: "orange" + property color keyboardButtonRightFontColor: "lightblue" + + property color keyboardButtonBorderColor: "white" + property int keyboardButtonFontSize: 11 + property int keyboardButtonSecondaryFontSize: 8 + + Column{ + id: keyboard + anchors.horizontalCenter: parent.horizontalCenter + anchors.bottom: parent.bottom + spacing: Theme.paddingSmall + + property int action: 0 + + Row{ + spacing: kbdItem.rowSpacing + anchors.horizontalCenter: parent.horizontalCenter + KeyboardButton { + actions: [{text: '√x', visual:'', engine:'sqrt', type:'function', enabled: true}, + {text: 'ˣ√y', visual:'', engine:'nthroot', type:'function', enabled: true}, + {text: ' ', visual:'', engine:'', type:'', enabled: false}] + + mode: keyboard.action + rectBorderColor: keyboardButtonBorderColor + fontSize: keyboardButtonFontSize + secondaryFontSize: keyboardButtonSecondaryFontSize + + fontColor: kbdItem.keyboardButtonFontColor + fontColorLeftOption: kbdItem.keyboardButtonLeftFontColor + fontColorRightOption: kbdItem.keyboardButtonRightFontColor + + onClicked: { + formulaPush(actions[keyboard.action].visual, + actions[keyboard.action].engine, + actions[keyboard.action].type); + keyboard.action = 0; + } + } + + KeyboardButton { + actions: [{text: 'eˣ', visual:'', engine:'e^x', type:'function', enabled: true}, + {text: 'ln', visual:'', engine:'ln', type:'function', enabled: true}, + {text: ' ', visual:'', engine:'', type:'', enabled: false}] + + mode: keyboard.action + rectBorderColor: keyboardButtonBorderColor + fontSize: keyboardButtonFontSize + secondaryFontSize: keyboardButtonSecondaryFontSize + + fontColor: kbdItem.keyboardButtonFontColor + fontColorLeftOption: kbdItem.keyboardButtonLeftFontColor + fontColorRightOption: kbdItem.keyboardButtonRightFontColor + + onClicked: { + formulaPush(actions[keyboard.action].visual, + actions[keyboard.action].engine, + actions[keyboard.action].type); + keyboard.action = 0; + } + } + + KeyboardButton { + actions: [{text: '10ˣ', visual:'', engine:'10^x', type:'operation', enabled: true}, + {text: 'log', visual:'', engine:'log', type:'function', enabled: true}, + {text: ' ', visual:'', engine:'', type:'', enabled: false}] + + mode: keyboard.action + rectBorderColor: keyboardButtonBorderColor + fontSize: keyboardButtonFontSize + secondaryFontSize: keyboardButtonSecondaryFontSize + + fontColor: kbdItem.keyboardButtonFontColor + fontColorLeftOption: kbdItem.keyboardButtonLeftFontColor + fontColorRightOption: kbdItem.keyboardButtonRightFontColor + + onClicked: { + formulaPush(actions[keyboard.action].visual, + actions[keyboard.action].engine, + actions[keyboard.action].type); + keyboard.action = 0; + } + } + + KeyboardButton { + actions: [{text: "yˣ", visual:'', engine:'^', type:'operation', enabled: true}, + {text: 'x²', visual:'', engine:'x^2', type:'operation', enabled: true}, + {text: ' ', visual:'', engine:'', type:'', enabled: false}] + + mode: keyboard.action + rectBorderColor: keyboardButtonBorderColor + fontSize: keyboardButtonFontSize + secondaryFontSize: keyboardButtonSecondaryFontSize + + fontColor: kbdItem.keyboardButtonFontColor + fontColorLeftOption: kbdItem.keyboardButtonLeftFontColor + fontColorRightOption: kbdItem.keyboardButtonRightFontColor + + onClicked: { + formulaPush(actions[keyboard.action].visual, + actions[keyboard.action].engine, + actions[keyboard.action].type); + keyboard.action = 0; + } + } + + KeyboardButton { + actions: [{text: '1/x', visual:'', engine:'inv', type:'function', enabled: true}, + {text: 'x!', visual:'', engine:'factorial', type:'function', enabled: true}, + {text: ' ', visual:'', engine:'', type:'', enabled: false}] + + mode: keyboard.action + rectBorderColor: keyboardButtonBorderColor + fontSize: keyboardButtonFontSize + secondaryFontSize: keyboardButtonSecondaryFontSize + + fontColor: kbdItem.keyboardButtonFontColor + fontColorLeftOption: kbdItem.keyboardButtonLeftFontColor + fontColorRightOption: kbdItem.keyboardButtonRightFontColor + + onClicked: { + formulaPush(actions[keyboard.action].visual, + actions[keyboard.action].engine, + actions[keyboard.action].type); + keyboard.action = 0; + } + } + + } + + Row{ + spacing: kbdItem.rowSpacing + anchors.horizontalCenter: parent.horizontalCenter + + KeyboardButton { + actions: [{text: 'Σ+', visual:'', engine:'addall', type:'operation', enabled: true}, + {text: 'Σ-', visual:'', engine:'suball', type:'operation', enabled: true}, + {text: ' ', visual:'', engine:'', type:'', enabled: false}] + + mode: keyboard.action + rectBorderColor: keyboardButtonBorderColor + fontSize: keyboardButtonFontSize + secondaryFontSize: keyboardButtonSecondaryFontSize + + fontColor: kbdItem.keyboardButtonFontColor + fontColorLeftOption: kbdItem.keyboardButtonLeftFontColor + fontColorRightOption: kbdItem.keyboardButtonRightFontColor + + onClicked: { + formulaPush(actions[keyboard.action].visual, + actions[keyboard.action].engine, + actions[keyboard.action].type); + keyboard.action = 0; + } + } + + KeyboardButton { + actions: [{text: 'R↓', visual:'', engine:'R-', type:'stack', enabled: true}, + {text: 'R↑', visual:'', engine:'R+', type:'stack', enabled: true}, + {text: ' ', visual:'', engine:'', type:'', enabled: false}] + + mode: keyboard.action + rectBorderColor: keyboardButtonBorderColor + fontSize: keyboardButtonFontSize + secondaryFontSize: keyboardButtonSecondaryFontSize + + fontColor: kbdItem.keyboardButtonFontColor + fontColorLeftOption: kbdItem.keyboardButtonLeftFontColor + fontColorRightOption: kbdItem.keyboardButtonRightFontColor + + onClicked: { + formulaPush(actions[keyboard.action].visual, + actions[keyboard.action].engine, + actions[keyboard.action].type); + keyboard.action = 0; + } + } + + KeyboardButton { + actions: [{text: 'sin', visual:'', engine:'sin', type:'function', enabled: true}, + {text: 'asin', visual:'', engine:'asin', type:'function', enabled: true}, + {text: ' ', visual:'', engine:'', type:'', enabled: false}] + + mode: keyboard.action + rectBorderColor: keyboardButtonBorderColor + fontSize: keyboardButtonFontSize + secondaryFontSize: keyboardButtonSecondaryFontSize + + fontColor: kbdItem.keyboardButtonFontColor + fontColorLeftOption: kbdItem.keyboardButtonLeftFontColor + fontColorRightOption: kbdItem.keyboardButtonRightFontColor + + onClicked: { + formulaPush(actions[keyboard.action].visual, + actions[keyboard.action].engine, + actions[keyboard.action].type); + keyboard.action = 0; + } + } + + KeyboardButton { + actions: [{text: 'cos', visual:'', engine:'cos', type:'function', enabled: true}, + {text: 'acos', visual:'', engine:'acos', type:'function', enabled: true}, + {text: ' ', visual:'', engine:'', type:'', enabled: false}] + + mode: keyboard.action + rectBorderColor: keyboardButtonBorderColor + fontSize: keyboardButtonFontSize + secondaryFontSize: keyboardButtonSecondaryFontSize + + fontColor: kbdItem.keyboardButtonFontColor + fontColorLeftOption: kbdItem.keyboardButtonLeftFontColor + fontColorRightOption: kbdItem.keyboardButtonRightFontColor + + onClicked: { + formulaPush(actions[keyboard.action].visual, + actions[keyboard.action].engine, + actions[keyboard.action].type); + keyboard.action = 0; + } + } + + KeyboardButton { + actions: [{text: 'tan', visual:'', engine:'tan', type:'function', enabled: true}, + {text: 'atan', visual:'', engine:'atan', type:'function', enabled: true}, + {text: ' ', visual:'', engine:'', type:'', enabled: false}] + + mode: keyboard.action + rectBorderColor: keyboardButtonBorderColor + fontSize: keyboardButtonFontSize + secondaryFontSize: keyboardButtonSecondaryFontSize + + fontColor: kbdItem.keyboardButtonFontColor + fontColorLeftOption: kbdItem.keyboardButtonLeftFontColor + fontColorRightOption: kbdItem.keyboardButtonRightFontColor + + onClicked: { + formulaPush(actions[keyboard.action].visual, + actions[keyboard.action].engine, + actions[keyboard.action].type); + keyboard.action = 0; + } + } + + } + + Row{ + spacing: kbdItem.rowSpacing + anchors.horizontalCenter: parent.horizontalCenter + + KeyboardButton { + width: buttonWidth*2 + parent.spacing + actions: [{text: 'ENTER', visual:'', engine:'enter', type:'stack', enabled: true}, + {text: '=', visual:'', engine:'=', type:'operation', enabled: engineLoaded}, + {text: 'simplify', visual:'', engine:'simplify', type:'function', enabled: engineLoaded}] + + mode: keyboard.action + rectBorderColor: keyboardButtonBorderColor + fontSize: keyboardButtonFontSize + secondaryFontSize: keyboardButtonSecondaryFontSize + + fontColor: kbdItem.keyboardButtonFontColor + fontColorLeftOption: kbdItem.keyboardButtonLeftFontColor + fontColorRightOption: kbdItem.keyboardButtonRightFontColor + + onClicked: { + formulaPush(actions[keyboard.action].visual, + actions[keyboard.action].engine, + actions[keyboard.action].type); + keyboard.action = 0; + } + } + + KeyboardButton { + actions: [{text: 'x↔y', visual:'', engine:'swap', type:'stack', enabled: true}, + {text: '8bit', visual:'', engine:'u8bit', type:'operation', enabled: engineLoaded}, + {text: '16bit', visual:'', engine:'u16bit', type:'operation', enabled: engineLoaded}] + + mode: keyboard.action + rectBorderColor: keyboardButtonBorderColor + fontSize: keyboardButtonFontSize + secondaryFontSize: keyboardButtonSecondaryFontSize + + fontColor: kbdItem.keyboardButtonFontColor + fontColorLeftOption: kbdItem.keyboardButtonLeftFontColor + fontColorRightOption: kbdItem.keyboardButtonRightFontColor + + onClicked: { + formulaPush(actions[keyboard.action].visual, + actions[keyboard.action].engine, + actions[keyboard.action].type); + keyboard.action = 0; + } + } + + + KeyboardButton { + actions: [{text: '+/-', visual:'', engine:'neg', type:'operation', enabled: true}, + {text: 'SHL', visual:'', engine:'shl', type:'operation', enabled: engineLoaded}, + {text: 'SHR', visual:'', engine:'shr', type:'operation', enabled: engineLoaded}] + + mode: keyboard.action + rectBorderColor: keyboardButtonBorderColor + fontSize: keyboardButtonFontSize + secondaryFontSize: keyboardButtonSecondaryFontSize + + fontColor: kbdItem.keyboardButtonFontColor + fontColorLeftOption: kbdItem.keyboardButtonLeftFontColor + fontColorRightOption: kbdItem.keyboardButtonRightFontColor + + onClicked: { + formulaPush(actions[keyboard.action].visual, + actions[keyboard.action].engine, + actions[keyboard.action].type); + keyboard.action = 0; + } + } + + KeyboardButton { + actions: [{text: 'DROP', visual:'', engine:'drop', type:'stack', enabled: true}, + {text: 'CLR', visual:'', engine:'clr', type:'stack', enabled: true}, + {text: 'UNDO', visual:'', engine:'undo', type:'stack', enabled: true}] + + mode: keyboard.action + rectBorderColor: keyboardButtonBorderColor + fontSize: keyboardButtonFontSize + secondaryFontSize: keyboardButtonSecondaryFontSize + + fontColor: kbdItem.keyboardButtonFontColor + fontColorLeftOption: kbdItem.keyboardButtonLeftFontColor + fontColorRightOption: kbdItem.keyboardButtonRightFontColor + + onClicked: { + formulaPush(actions[keyboard.action].visual, + actions[keyboard.action].engine, + actions[keyboard.action].type); + keyboard.action = 0; + } + } + } + + + Row{ + spacing: kbdItem.rowSpacing + anchors.horizontalCenter: parent.horizontalCenter + + KeyboardButton { + actions: [{text: 'EEX', visual:'e', engine:'e', type:'exp', enabled: true}, + {text: '%', visual:'', engine:'%', type:'function', enabled: true}, + {text: ' ', visual:'', engine:'', type:'', enabled: false}] + + mode: keyboard.action + rectBorderColor: keyboardButtonBorderColor + fontSize: keyboardButtonFontSize + secondaryFontSize: keyboardButtonSecondaryFontSize + + fontColor: kbdItem.keyboardButtonFontColor + fontColorLeftOption: kbdItem.keyboardButtonLeftFontColor + fontColorRightOption: kbdItem.keyboardButtonRightFontColor + + onClicked: { + formulaPush(actions[keyboard.action].visual, + actions[keyboard.action].engine, + actions[keyboard.action].type); + keyboard.action = 0; + } + } + + KeyboardButton { + actions: [{text: '7', visual:'7', engine:'7', type:'number', enabled: true}, + {text: ' ', visual:'', engine:'', type:'', enabled: false}, + {text: 'x', visual:'', engine:'x', type:'symbol', enabled: engineLoaded}] + + mode: keyboard.action + rectBorderColor: keyboardButtonBorderColor + fontSize: keyboardButtonFontSize + secondaryFontSize: keyboardButtonSecondaryFontSize + + fontColor: kbdItem.keyboardButtonFontColor + fontColorLeftOption: kbdItem.keyboardButtonLeftFontColor + fontColorRightOption: kbdItem.keyboardButtonRightFontColor + + onClicked: { + formulaPush(actions[keyboard.action].visual, + actions[keyboard.action].engine, + actions[keyboard.action].type); + keyboard.action = 0; + } + } + + KeyboardButton { + actions: [{text: '8', visual:'8', engine:'8', type:'number', enabled: true}, + {text: ' ', visual:'', engine:'', type:'', enabled: false}, + {text: 'y', visual:'', engine:'y', type:'symbol', enabled: engineLoaded}] + + mode: keyboard.action + rectBorderColor: keyboardButtonBorderColor + fontSize: keyboardButtonFontSize + secondaryFontSize: keyboardButtonSecondaryFontSize + + fontColor: kbdItem.keyboardButtonFontColor + fontColorLeftOption: kbdItem.keyboardButtonLeftFontColor + fontColorRightOption: kbdItem.keyboardButtonRightFontColor + + onClicked: { + formulaPush(actions[keyboard.action].visual, + actions[keyboard.action].engine, + actions[keyboard.action].type); + keyboard.action = 0; + } + } + + KeyboardButton { + actions: [{text: '9', visual:'9', engine:'9', type:'number', enabled: true}, + {text: ' ', visual:'', engine:'', type:'', enabled: false}, + {text: 'z', visual:'', engine:'z', type:'symbol', enabled: engineLoaded}] + + mode: keyboard.action + rectBorderColor: keyboardButtonBorderColor + fontSize: keyboardButtonFontSize + secondaryFontSize: keyboardButtonSecondaryFontSize + + fontColor: kbdItem.keyboardButtonFontColor + fontColorLeftOption: kbdItem.keyboardButtonLeftFontColor + fontColorRightOption: kbdItem.keyboardButtonRightFontColor + + onClicked: { + formulaPush(actions[keyboard.action].visual, + actions[keyboard.action].engine, + actions[keyboard.action].type); + keyboard.action = 0; + } + } + + KeyboardButton { + actions: [{text: '÷', visual:'', engine:'div', type:'operation', enabled: true}, + {text: 'AND', visual:'', engine:'_and', type:'operation', enabled: engineLoaded}, + {text: 'NAND', visual:'', engine:'_nand', type:'operation', enabled: engineLoaded}] + + mode: keyboard.action + rectBorderColor: keyboardButtonBorderColor + fontSize: keyboardButtonFontSize + secondaryFontSize: keyboardButtonSecondaryFontSize + + fontColor: kbdItem.keyboardButtonFontColor + fontColorLeftOption: kbdItem.keyboardButtonLeftFontColor + fontColorRightOption: kbdItem.keyboardButtonRightFontColor + + onClicked: { + formulaPush(actions[keyboard.action].visual, + actions[keyboard.action].engine, + actions[keyboard.action].type); + keyboard.action = 0; + } + } + + + } + + Row{ + spacing: kbdItem.rowSpacing + anchors.horizontalCenter: parent.horizontalCenter + + KeyboardButton { + rectColor: kbdItem.keyboardButtonLeftFontColor + rectOpacity: keyboard.action == 1 ? 0.7 : 0.3 + + mode: keyboard.action + rectBorderColor: keyboardButtonBorderColor + fontSize: keyboardButtonFontSize + secondaryFontSize: keyboardButtonSecondaryFontSize + + fontColor: kbdItem.keyboardButtonFontColor + fontColorLeftOption: kbdItem.keyboardButtonLeftFontColor + fontColorRightOption: kbdItem.keyboardButtonRightFontColor + + actions: [{text: '', visual:'', engine:'', type:'', enabled: true}, + {text: ' ', visual:'', engine:'', type:'', enabled: true}, + {text: ' ', visual:'', engine:'', type:'', enabled: true}] + + onClicked: { + if(keyboard.action == 0){ + keyboard.action = 1; + }else if(keyboard.action == 1){ + keyboard.action = 0; + } + } + } + + KeyboardButton { + actions: [{text: '4', visual:'4', engine:'4', type:'number', enabled: true}, + {text: ' ', visual:'', engine:'', type:'', enabled: false}, + {text: ' ', visual:'', engine:'', type:'', enabled: false}] + + mode: keyboard.action + rectBorderColor: keyboardButtonBorderColor + fontSize: keyboardButtonFontSize + secondaryFontSize: keyboardButtonSecondaryFontSize + + fontColor: kbdItem.keyboardButtonFontColor + fontColorLeftOption: kbdItem.keyboardButtonLeftFontColor + fontColorRightOption: kbdItem.keyboardButtonRightFontColor + + onClicked: { + formulaPush(actions[keyboard.action].visual, + actions[keyboard.action].engine, + actions[keyboard.action].type); + keyboard.action = 0; + } + } + + KeyboardButton { + actions: [{text: '5', visual:'5', engine:'5', type:'number', enabled: true}, + {text: ' ', visual:'', engine:'', type:'', enabled: false}, + {text: ' ', visual:'', engine:'', type:'', enabled: false}] + + mode: keyboard.action + rectBorderColor: keyboardButtonBorderColor + fontSize: keyboardButtonFontSize + secondaryFontSize: keyboardButtonSecondaryFontSize + + fontColor: kbdItem.keyboardButtonFontColor + fontColorLeftOption: kbdItem.keyboardButtonLeftFontColor + fontColorRightOption: kbdItem.keyboardButtonRightFontColor + + onClicked: { + formulaPush(actions[keyboard.action].visual, + actions[keyboard.action].engine, + actions[keyboard.action].type); + keyboard.action = 0; + } + } + + KeyboardButton { + actions: [{text: '6', visual:'6', engine:'6', type:'number', enabled: true}, + {text: ' ', visual:'', engine:'', type:'', enabled: false}, + {text: ' ', visual:'', engine:'', type:'', enabled: false}] + + mode: keyboard.action + rectBorderColor: keyboardButtonBorderColor + fontSize: keyboardButtonFontSize + secondaryFontSize: keyboardButtonSecondaryFontSize + + fontColor: kbdItem.keyboardButtonFontColor + fontColorLeftOption: kbdItem.keyboardButtonLeftFontColor + fontColorRightOption: kbdItem.keyboardButtonRightFontColor + + onClicked: { + formulaPush(actions[keyboard.action].visual, + actions[keyboard.action].engine, + actions[keyboard.action].type); + keyboard.action = 0; + } + } + + KeyboardButton { + actions: [{text: '×', visual:'', engine:'mul', type:'operation', enabled: true}, + {text: 'OR', visual:'', engine:'_or', type:'operation', enabled: engineLoaded}, + {text: 'NOR', visual:'', engine:'_nor', type:'operation', enabled: engineLoaded}] + + mode: keyboard.action + rectBorderColor: keyboardButtonBorderColor + fontSize: keyboardButtonFontSize + secondaryFontSize: keyboardButtonSecondaryFontSize + + fontColor: kbdItem.keyboardButtonFontColor + fontColorLeftOption: kbdItem.keyboardButtonLeftFontColor + fontColorRightOption: kbdItem.keyboardButtonRightFontColor + + onClicked: { + formulaPush(actions[keyboard.action].visual, + actions[keyboard.action].engine, + actions[keyboard.action].type); + keyboard.action = 0; + } + } + + + } + + Row{ + spacing: kbdItem.rowSpacing + anchors.horizontalCenter: parent.horizontalCenter + + KeyboardButton { + rectColor: kbdItem.keyboardButtonRightFontColor + rectOpacity: keyboard.action == 2 ? 0.7 : 0.3 + + actions: [{text: '', visual:'', engine:'', type:'', enabled: true}, + {text: ' ', visual:'', engine:'', type:'', enabled: true}, + {text: ' ', visual:'', engine:'', type:'', enabled: true}] + + mode: keyboard.action + rectBorderColor: keyboardButtonBorderColor + fontSize: keyboardButtonFontSize + secondaryFontSize: keyboardButtonSecondaryFontSize + + fontColor: kbdItem.keyboardButtonFontColor + fontColorLeftOption: kbdItem.keyboardButtonLeftFontColor + fontColorRightOption: kbdItem.keyboardButtonRightFontColor + + onClicked: { + if(keyboard.action == 0){ + keyboard.action = 2; + }else if(keyboard.action == 2){ + keyboard.action = 0; + } + } + } + + KeyboardButton { + actions: [{text: '1', visual:'1', engine:'1', type:'number', enabled: true}, + {text: ' ', visual:'', engine:'', type:'', enabled: false}, + {text: ' ', visual:'', engine:'', type:'', enabled: false}] + + mode: keyboard.action + rectBorderColor: keyboardButtonBorderColor + fontSize: keyboardButtonFontSize + secondaryFontSize: keyboardButtonSecondaryFontSize + + fontColor: kbdItem.keyboardButtonFontColor + fontColorLeftOption: kbdItem.keyboardButtonLeftFontColor + fontColorRightOption: kbdItem.keyboardButtonRightFontColor + + onClicked: { + formulaPush(actions[keyboard.action].visual, + actions[keyboard.action].engine, + actions[keyboard.action].type); + keyboard.action = 0; + } + } + + KeyboardButton { + actions: [{text: '2', visual:'2', engine:'2', type:'number', enabled: true}, + {text: ' ', visual:'', engine:'', type:'', enabled: false}, + {text: ' ', visual:'', engine:'', type:'', enabled: false}] + + mode: keyboard.action + rectBorderColor: keyboardButtonBorderColor + fontSize: keyboardButtonFontSize + secondaryFontSize: keyboardButtonSecondaryFontSize + + fontColor: kbdItem.keyboardButtonFontColor + fontColorLeftOption: kbdItem.keyboardButtonLeftFontColor + fontColorRightOption: kbdItem.keyboardButtonRightFontColor + + onClicked: { + formulaPush(actions[keyboard.action].visual, + actions[keyboard.action].engine, + actions[keyboard.action].type); + keyboard.action = 0; + } + } + + KeyboardButton { + actions: [{text: '3', visual:'3', engine:'3', type:'number', enabled: true}, + {text: ' ', visual:'', engine:'', type:'', enabled: false}, + {text: ' ', visual:'', engine:'', type:'', enabled: false}] + + mode: keyboard.action + rectBorderColor: keyboardButtonBorderColor + fontSize: keyboardButtonFontSize + secondaryFontSize: keyboardButtonSecondaryFontSize + + fontColor: kbdItem.keyboardButtonFontColor + fontColorLeftOption: kbdItem.keyboardButtonLeftFontColor + fontColorRightOption: kbdItem.keyboardButtonRightFontColor + + onClicked: { + formulaPush(actions[keyboard.action].visual, + actions[keyboard.action].engine, + actions[keyboard.action].type); + keyboard.action = 0; + } + } + + KeyboardButton { + actions: [{text: '−', visual:'', engine:'-', type:'operation', enabled: true}, + {text: 'XOR', visual:'', engine:'_xor', type:'operation', enabled: engineLoaded}, + {text: 'XNOR', visual:'', engine:'_xnor', type:'operation', enabled: engineLoaded}] + + mode: keyboard.action + rectBorderColor: keyboardButtonBorderColor + fontSize: keyboardButtonFontSize + secondaryFontSize: keyboardButtonSecondaryFontSize + + fontColor: kbdItem.keyboardButtonFontColor + fontColorLeftOption: kbdItem.keyboardButtonLeftFontColor + fontColorRightOption: kbdItem.keyboardButtonRightFontColor + + onClicked: { + formulaPush(actions[keyboard.action].visual, + actions[keyboard.action].engine, + actions[keyboard.action].type); + keyboard.action = 0; + } + } + + } + + Row { + spacing: kbdItem.rowSpacing + anchors.horizontalCenter: parent.horizontalCenter + + KeyboardButton { + actions: [{text: 'C', visual:'', engine:'', type:'', enabled: true}, + {text: 'dice', visual:'', engine:'dice', type:'dice', enabled: engineLoaded}, + {text: ' ', visual:'', engine:'', type:'', enabled: false}] + + mode: keyboard.action + rectBorderColor: keyboardButtonBorderColor + fontSize: keyboardButtonFontSize + secondaryFontSize: keyboardButtonSecondaryFontSize + + fontColor: kbdItem.keyboardButtonFontColor + fontColorLeftOption: kbdItem.keyboardButtonLeftFontColor + fontColorRightOption: kbdItem.keyboardButtonRightFontColor + + onClicked: { + if(keyboard.action == 0){ + formulaPop() + }else{ + formulaPush(actions[keyboard.action].visual, + actions[keyboard.action].engine, + actions[keyboard.action].type); + } + } + } + + KeyboardButton { + text: "0" + actions: [{text: '0', visual:'0', engine:'0', type:'number', enabled: true}, + {text: ' ', visual:'', engine:'', type:'', enabled: false}, + {text: ' ', visual:'', engine:'', type:'', enabled: false}] + + mode: keyboard.action + rectBorderColor: keyboardButtonBorderColor + fontSize: keyboardButtonFontSize + secondaryFontSize: keyboardButtonSecondaryFontSize + + fontColor: kbdItem.keyboardButtonFontColor + fontColorLeftOption: kbdItem.keyboardButtonLeftFontColor + fontColorRightOption: kbdItem.keyboardButtonRightFontColor + + onClicked: { + formulaPush(actions[keyboard.action].visual, + actions[keyboard.action].engine, + actions[keyboard.action].type); + keyboard.action = 0; + } + } + + KeyboardButton { + actions: [{text: '.', visual:'.', engine:'.', type:'real', enabled: true}, + {text: ' ', visual:'', engine:'', type:'', enabled: false}, + {text: ' ', visual:'', engine:'', type:'', enabled: false}] + + mode: keyboard.action + rectBorderColor: keyboardButtonBorderColor + fontSize: keyboardButtonFontSize + secondaryFontSize: keyboardButtonSecondaryFontSize + + fontColor: kbdItem.keyboardButtonFontColor + fontColorLeftOption: kbdItem.keyboardButtonLeftFontColor + fontColorRightOption: kbdItem.keyboardButtonRightFontColor + + onClicked: { + formulaPush(actions[keyboard.action].visual, + actions[keyboard.action].engine, + actions[keyboard.action].type); + keyboard.action = 0; + } + } + + KeyboardButton { + actions: [{text: 'π', visual:'π', engine:'pi', type:'constant', enabled: true}, + {text: ' ', visual:'', engine:'', type:'', enabled: false}, + {text: 'const', visual:'', engine:'constantList', type:'constantList', enabled: engineLoaded}] + + mode: keyboard.action + rectBorderColor: keyboardButtonBorderColor + fontSize: keyboardButtonFontSize + secondaryFontSize: keyboardButtonSecondaryFontSize + + fontColor: kbdItem.keyboardButtonFontColor + fontColorLeftOption: kbdItem.keyboardButtonLeftFontColor + fontColorRightOption: kbdItem.keyboardButtonRightFontColor + + onClicked: { + formulaPush(actions[keyboard.action].visual, + actions[keyboard.action].engine, + actions[keyboard.action].type); + keyboard.action = 0; + } + } + + KeyboardButton { + actions: [{text: '+', visual:'', engine:'+', type:'operation', enabled: true}, + {text: 'NOT', visual:'', engine:'_not', type:'operation', enabled: engineLoaded}, + {text: '2CMP', visual:'', engine:'_2cmp', type:'operation', enabled: engineLoaded}] + + mode: keyboard.action + rectBorderColor: keyboardButtonBorderColor + fontSize: keyboardButtonFontSize + secondaryFontSize: keyboardButtonSecondaryFontSize + + fontColor: kbdItem.keyboardButtonFontColor + fontColorLeftOption: kbdItem.keyboardButtonLeftFontColor + fontColorRightOption: kbdItem.keyboardButtonRightFontColor + + onClicked: { + formulaPush(actions[keyboard.action].visual, + actions[keyboard.action].engine, + actions[keyboard.action].type); + keyboard.action = 0; + } + } + + } + } + +} diff --git a/SailfishOS/qml/elements/Style.qml b/SailfishOS/qml/elements/Style.qml new file mode 100644 index 0000000..fc64959 --- /dev/null +++ b/SailfishOS/qml/elements/Style.qml @@ -0,0 +1,7 @@ +pragma Singleton + +import QtQuick 2.0 + +QtObject { + // property int itemSizeSmall: 72 +}