mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
Compare commits
258 Commits
O1.22.1-E1
...
upsilon-de
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2abc1d116a | ||
|
|
63d1e0ee4e | ||
|
|
84d88a3e8d | ||
|
|
00b5d4b9fe | ||
|
|
2aee07ae55 | ||
|
|
41b2b64d80 | ||
|
|
473b0bbfcb | ||
|
|
58ef8cb95d | ||
|
|
5dce215165 | ||
|
|
f2f44f0f6f | ||
|
|
fbe542e5bf | ||
|
|
0a1b3bcaee | ||
|
|
f6e937a927 | ||
|
|
c4ed8f84d3 | ||
|
|
8e1b311be0 | ||
|
|
89e51166e7 | ||
|
|
e4961563e9 | ||
|
|
e72b0f633e | ||
|
|
0550b66c03 | ||
|
|
e41910e2f8 | ||
|
|
d91ae29607 | ||
|
|
3b90969b42 | ||
|
|
bd207cb845 | ||
|
|
917ba7ce83 | ||
|
|
9c9758fcb6 | ||
|
|
83ce9d5e86 | ||
|
|
d4f0c7d3e8 | ||
|
|
2837b240e9 | ||
|
|
0906dc919b | ||
|
|
9cda9d9e59 | ||
|
|
553f3fc682 | ||
|
|
9fdedecbff | ||
|
|
83c63a7011 | ||
|
|
9636964cb9 | ||
|
|
69d6ad5205 | ||
|
|
f9a123cc08 | ||
|
|
56f735e302 | ||
|
|
0a5e9e0889 | ||
|
|
8c949d7048 | ||
|
|
2f7edc5024 | ||
|
|
cd40938b26 | ||
|
|
0b54bf13f4 | ||
|
|
f5f11c6478 | ||
|
|
efda561425 | ||
|
|
15c96cefa6 | ||
|
|
400d03ebdb | ||
|
|
6f48adde7d | ||
|
|
3a573b1204 | ||
|
|
48598296cf | ||
|
|
a54d60644f | ||
|
|
d579e9d14c | ||
|
|
db0ae2f7a0 | ||
|
|
2a66fbb75d | ||
|
|
feb94af827 | ||
|
|
0b564510e7 | ||
|
|
05227184a1 | ||
|
|
e551c69d06 | ||
|
|
37c7b85da8 | ||
|
|
0bed38576a | ||
|
|
7c02c9e72f | ||
|
|
a5584634e5 | ||
|
|
62e5b3e135 | ||
|
|
62f43f393d | ||
|
|
3318780d7d | ||
|
|
a9fc3b7850 | ||
|
|
959efdc995 | ||
|
|
fa278b0d78 | ||
|
|
e8044f938e | ||
|
|
02f4f6fe74 | ||
|
|
fe973b0535 | ||
|
|
71a764277f | ||
|
|
f6379d16fd | ||
|
|
2156ca7e42 | ||
|
|
2f3339dff7 | ||
|
|
48a0da8a95 | ||
|
|
3460e9ffd8 | ||
|
|
1487acbe38 | ||
|
|
367f64dac8 | ||
|
|
19ee32986f | ||
|
|
7f0b8170d4 | ||
|
|
bba7408e6c | ||
|
|
838ee83a8c | ||
|
|
74c500df01 | ||
|
|
98b665ac4b | ||
|
|
0f4502ebce | ||
|
|
9eb81a6daf | ||
|
|
a15c682e3e | ||
|
|
74635f8d88 | ||
|
|
ebe6a7cc5f | ||
|
|
3a4e33a1a7 | ||
|
|
dd757969f3 | ||
|
|
0df76f1680 | ||
|
|
788e75eb4a | ||
|
|
7b4a94296b | ||
|
|
86511cc59d | ||
|
|
d90af0323e | ||
|
|
c0739b0e06 | ||
|
|
210a83b04d | ||
|
|
fb4fc4862d | ||
|
|
74c6bea8f8 | ||
|
|
7c1dc4d5c3 | ||
|
|
eb02fb5baa | ||
|
|
6fcab3952f | ||
|
|
5a6dfd8a20 | ||
|
|
c8afdcacab | ||
|
|
ef45fab63d | ||
|
|
0366c4cd00 | ||
|
|
dc8a1d48d9 | ||
|
|
649f48919e | ||
|
|
c3b752d6cc | ||
|
|
c5ca1e916a | ||
|
|
24f3ccf007 | ||
|
|
25b74ea2f8 | ||
|
|
0e7db3ce8a | ||
|
|
786a3273da | ||
|
|
ed54927c5b | ||
|
|
2ee86ce52f | ||
|
|
a3720d3d76 | ||
|
|
837fcd9bcc | ||
|
|
b0befbdbc5 | ||
|
|
cf9142b5a2 | ||
|
|
80587f35f1 | ||
|
|
ba94c7db00 | ||
|
|
4c29b05b53 | ||
|
|
85f8f4fedd | ||
|
|
e62c328661 | ||
|
|
080ac51aae | ||
|
|
bf5f24f96c | ||
|
|
7e24502414 | ||
|
|
dd45419006 | ||
|
|
aba2388253 | ||
|
|
5fca77a8f8 | ||
|
|
f258da16f1 | ||
|
|
35e4146551 | ||
|
|
76dad83aec | ||
|
|
f999c796c3 | ||
|
|
f86c22f10b | ||
|
|
c841362a63 | ||
|
|
33ad74e1be | ||
|
|
e4aa82e62a | ||
|
|
f40fe27b68 | ||
|
|
3e071a59fe | ||
|
|
f50f22081c | ||
|
|
313b5ed222 | ||
|
|
f8798aa561 | ||
|
|
46acd4eb61 | ||
|
|
018ea07796 | ||
|
|
d7f41e306c | ||
|
|
029dc2be5e | ||
|
|
bf99a2976b | ||
|
|
03c85c0b0e | ||
|
|
bd0c7de2bf | ||
|
|
08f351fe31 | ||
|
|
0282104086 | ||
|
|
ed95b46c5b | ||
|
|
b8727bc256 | ||
|
|
5ccf8d6b97 | ||
|
|
b80daf70d3 | ||
|
|
36655f1c19 | ||
|
|
ed18f1e95f | ||
|
|
cbb435d656 | ||
|
|
00b74430cd | ||
|
|
8705ddaf8a | ||
|
|
ddae6607f9 | ||
|
|
c4ef2016ba | ||
|
|
524a7d9619 | ||
|
|
e456667d5e | ||
|
|
3000431f3b | ||
|
|
50a32b470d | ||
|
|
3746354f26 | ||
|
|
8fae36bcd3 | ||
|
|
9e9c088e9e | ||
|
|
a635ecf59b | ||
|
|
a6ae1957d1 | ||
|
|
3686f819d6 | ||
|
|
382c303bd2 | ||
|
|
402858739e | ||
|
|
192794e299 | ||
|
|
58602544e2 | ||
|
|
ed03aae9ed | ||
|
|
ece6aa5f27 | ||
|
|
30cfa022d1 | ||
|
|
23f3407267 | ||
|
|
1006b951b9 | ||
|
|
43b7f767ee | ||
|
|
eb0ca7b118 | ||
|
|
0cdfc44c6f | ||
|
|
2ebff40c62 | ||
|
|
c66db8c98d | ||
|
|
a6b13185ab | ||
|
|
e8956f4293 | ||
|
|
36a40faaaf | ||
|
|
2554ec666e | ||
|
|
1aac2a1d4d | ||
|
|
32d591317b | ||
|
|
2703f9a506 | ||
|
|
497e4890b1 | ||
|
|
6c389c9a1d | ||
|
|
699cf22023 | ||
|
|
543d3d540e | ||
|
|
2f2e45a6a5 | ||
|
|
a834c954b8 | ||
|
|
2bee7eb267 | ||
|
|
6d18c33068 | ||
|
|
8242113641 | ||
|
|
7c8c7f79f6 | ||
|
|
f578c24af1 | ||
|
|
8059821025 | ||
|
|
b32497da23 | ||
|
|
c3c7651ca8 | ||
|
|
e8f1ea6aa5 | ||
|
|
ba3109e47a | ||
|
|
c2f8bbaf3c | ||
|
|
0587e41b3c | ||
|
|
ab1df4fbef | ||
|
|
a4213dcca8 | ||
|
|
2cf6f15dde | ||
|
|
f37008d8d7 | ||
|
|
3740e0f135 | ||
|
|
cb3a6694a5 | ||
|
|
cba596dde7 | ||
|
|
11f2b92e5d | ||
|
|
a69fc679a9 | ||
|
|
f4905c59a2 | ||
|
|
22b6990e63 | ||
|
|
09a7b9daca | ||
|
|
0116dc2e07 | ||
|
|
37b8c56b3d | ||
|
|
1a4cb3ad37 | ||
|
|
d4984722cf | ||
|
|
cbc3951ab1 | ||
|
|
62aafa7597 | ||
|
|
baf8b8cbf0 | ||
|
|
90b25ecf51 | ||
|
|
d02ce2dd16 | ||
|
|
79985a0199 | ||
|
|
f10cd19616 | ||
|
|
945a7b8d56 | ||
|
|
784234690c | ||
|
|
fd0284756f | ||
|
|
4f2ea99c85 | ||
|
|
bef8719ce0 | ||
|
|
ba64458660 | ||
|
|
73172f8d0c | ||
|
|
5a20d914df | ||
|
|
05e6fbbcca | ||
|
|
890592854a | ||
|
|
6c6f8b581c | ||
|
|
92ee632ce2 | ||
|
|
3e2b5178ed | ||
|
|
5b21c57e4c | ||
|
|
76beed20da | ||
|
|
86985a4aef | ||
|
|
aacd1a6f32 | ||
|
|
dd258a7975 | ||
|
|
b4e9ceed18 | ||
|
|
c37b4bd1f4 | ||
|
|
a0acdc171b |
4
.github/ISSUE_TEMPLATE/bug_report.md
vendored
4
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Omega is not working like it should? Let us know!
|
||||
about: Upsilon is not working like it should? Let us know!
|
||||
title: ''
|
||||
labels: 'Status: Triage, Type: Bug'
|
||||
assignees: ''
|
||||
@@ -24,4 +24,4 @@ A clear and concise description of what you expected to happen.
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Desktop (please complete the following information):**
|
||||
- Omega Version: [go to settings > about > Omega Version and type the version here]
|
||||
- Upsilon Version: [go to settings > about > Upsilon Version and type the version here]
|
||||
|
||||
2
.github/ISSUE_TEMPLATE/feature_request.md
vendored
2
.github/ISSUE_TEMPLATE/feature_request.md
vendored
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for Omega
|
||||
about: Suggest an idea for Upsilon
|
||||
title: ''
|
||||
labels: 'Status: Triage, Type: Feature'
|
||||
assignees: ''
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
---
|
||||
name: OMEGA BETA ONLY - Bug report
|
||||
about: Omega 1.21 is not working like it should? Let us know!
|
||||
title: "[BETA-1.21] …"
|
||||
labels: 'Status: Triage, Type: Bug'
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Desktop (please complete the following information):**
|
||||
- Omega Version: [go to settings > about > Omega Version and type the version here]
|
||||
- Discord username: ..........#....
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: Problems during installation
|
||||
about: Need help to install Omega?
|
||||
about: Need help to install Upsilon?
|
||||
title: ''
|
||||
labels: 'Status: Triage, Type: Installation issue'
|
||||
assignees: ''
|
||||
@@ -16,4 +16,4 @@ Copy/paste the logs here (If you have some)
|
||||
```
|
||||
|
||||
**Environment**
|
||||
- Omega Version: {go to settings > about > Omega Version and type the version here}
|
||||
- Upsilon Version: {go to settings > about > Upsilon Version and type the version here}
|
||||
|
||||
10
.github/workflows/ci-workflow.yml
vendored
10
.github/workflows/ci-workflow.yml
vendored
@@ -129,6 +129,8 @@ jobs:
|
||||
submodules: 'recursive'
|
||||
- run: pacman -S --noconfirm mingw-w64-x86_64-gcc mingw-w64-x86_64-freetype mingw-w64-x86_64-pkg-config make mingw-w64-x86_64-python3 mingw-w64-x86_64-libjpeg-turbo mingw-w64-x86_64-libpng
|
||||
- run: make -j2 PLATFORM=simulator
|
||||
- run: make -j2 PLATFORM=simulator test.exe
|
||||
- run: cmd /c output\release\simulator\windows\test.exe --headless
|
||||
- uses: actions/upload-artifact@master
|
||||
with:
|
||||
name: epsilon-windows.exe
|
||||
@@ -138,11 +140,13 @@ jobs:
|
||||
steps:
|
||||
- uses: numworks/setup-emscripten@v1
|
||||
with:
|
||||
sdk: latest-upstream
|
||||
sdk: 1.40.1-fastcomp
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
- run: make -j2 PLATFORM=simulator TARGET=web
|
||||
- run: make -j2 PLATFORM=simulator TARGET=web test.js
|
||||
- run: node output/release/simulator/web/test.js --headless
|
||||
- uses: actions/upload-artifact@master
|
||||
with:
|
||||
name: epsilon-web.zip
|
||||
@@ -155,6 +159,8 @@ jobs:
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
- run: make -j2 PLATFORM=simulator
|
||||
- run: make -j2 PLATFORM=simulator test.bin
|
||||
- run: output/release/simulator/linux/test.bin --headless
|
||||
- uses: actions/upload-artifact@master
|
||||
with:
|
||||
name: epsilon-linux.bin
|
||||
@@ -168,6 +174,8 @@ jobs:
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
- run: make -j2 PLATFORM=simulator
|
||||
- run: make -j2 PLATFORM=simulator ARCH=x86_64 test.bin
|
||||
- run: output/release/simulator/macos/x86_64/test.bin --headless
|
||||
- uses: actions/upload-artifact@master
|
||||
with:
|
||||
name: epsilon-macos.zip
|
||||
|
||||
1
.github/workflows/metric-workflow.yml
vendored
1
.github/workflows/metric-workflow.yml
vendored
@@ -31,7 +31,6 @@ jobs:
|
||||
- name: Add comment
|
||||
uses: actions/github-script@v3.0.0
|
||||
with:
|
||||
github-token: ${{ secrets.OMEGA_ROBOT_TOKEN }}
|
||||
script: |
|
||||
await github.issues.createComment({
|
||||
owner: context.repo.owner,
|
||||
|
||||
14
.github/workflows/unit-workflow.yml
vendored
14
.github/workflows/unit-workflow.yml
vendored
@@ -1,14 +0,0 @@
|
||||
name: Unit tests
|
||||
on: [pull_request_target]
|
||||
|
||||
jobs:
|
||||
units:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: sudo apt-get install build-essential imagemagick libfreetype6-dev libjpeg-dev libpng-dev pkg-config
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
- run: make -j2 PLATFORM=simulator test.headless.bin
|
||||
- run: output/release/simulator/linux/test.headless.bin
|
||||
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -6,3 +6,5 @@ epsilon.map
|
||||
.vscode
|
||||
.DS_Store
|
||||
.gradle
|
||||
.idea/
|
||||
.vs
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
image: gcc
|
||||
|
||||
stages:
|
||||
- build
|
||||
|
||||
job:build:
|
||||
stage: build
|
||||
before_script:
|
||||
- "echo 'deb http://httpredir.debian.org/debian jessie main contrib \n deb-src http://httpredir.debian.org/debian jessie main contrib \n deb http://httpredir.debian.org/debian jessie-updates main contrib \n deb-src http://httpredir.debian.org/debian jessie-updates main contrib \n deb http://security.debian.org/ jessie/updates main contrib \n deb-src http://security.debian.org/ jessie/updates main contrib ' > /etc/apt/source.list"
|
||||
- "apt-get update"
|
||||
- "apt -y install build-essential git imagemagick libx11-dev libxext-dev libfreetype6-dev libpng-dev libjpeg-dev pkg-config fltk1.3-dev gcc-arm-none-eabi nodejs npm"
|
||||
- "git submodule update --init --recursive"
|
||||
- "git clone https://github.com/RedGl0w/omega-auto-increment"
|
||||
- "cd omega-auto-increment"
|
||||
- "npm i request exeq"
|
||||
- "PrivateToken=$PrivateToken node index.js"
|
||||
- "cd .."
|
||||
script:
|
||||
- make clean
|
||||
- make MODEL=n0100 epsilon.bin
|
||||
artifacts:
|
||||
paths:
|
||||
- output/release/device/n0100/epsilon.bin
|
||||
- omega-auto-increment/version.txt
|
||||
name: artifact:build:simulator
|
||||
|
||||
4
.gitmodules
vendored
4
.gitmodules
vendored
@@ -1,6 +1,6 @@
|
||||
[submodule "apps/rpn"]
|
||||
path = apps/rpn
|
||||
url = https://github.com/Omega-Numworks/Omega-RPN.git
|
||||
url = https://github.com/Lauryy06/Upsilon-RPN.git
|
||||
[submodule "apps/atomic"]
|
||||
path = apps/atomic
|
||||
url = https://github.com/Omega-Numworks/Omega-Atomic.git
|
||||
url = https://github.com/Lauryy06/atomic
|
||||
|
||||
19
Makefile
19
Makefile
@@ -12,6 +12,21 @@ include build/toolchain.$(TOOLCHAIN).mak
|
||||
include build/variants.mak
|
||||
include build/helpers.mk
|
||||
|
||||
ifeq (${MODEL}, n0100)
|
||||
ifeq ($(filter reader,$(apps_list)),)
|
||||
$(warning reader app included, removing it on n0100. )
|
||||
EPSILON_APPS := $(filter-out reader,$(EPSILON_APPS))
|
||||
endif
|
||||
ifneq ($(words $(EPSILON_I18N)), 1)
|
||||
$(warning Only use 1 language on n0100, defaulting to en. )
|
||||
EPSILON_I18N := en
|
||||
endif
|
||||
ifeq ($(INCLUDE_ULAB), 1)
|
||||
$(warning Removing uLab on n0100. )
|
||||
INCLUDE_ULAB := 0
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq (${MODEL}, n0110)
|
||||
apps_list = ${EPSILON_APPS}
|
||||
else
|
||||
@@ -22,6 +37,10 @@ ifdef FORCE_EXTERNAL
|
||||
apps_list = ${EPSILON_APPS}
|
||||
endif
|
||||
|
||||
ifeq ($(INCLUDE_ULAB), 1)
|
||||
SFLAGS += -DINCLUDE_ULAB
|
||||
endif
|
||||
|
||||
ifdef HOME_DISPLAY_EXTERNALS
|
||||
ifneq ($(filter external,$(apps_list)),)
|
||||
SFLAGS += -DHOME_DISPLAY_EXTERNALS
|
||||
|
||||
82
README.fr.md
82
README.fr.md
@@ -1,37 +1,34 @@
|
||||
<p align="center"><img src="https://user-images.githubusercontent.com/12123721/111199951-80bd3d00-85c1-11eb-936c-28cf590208b8.png" /></p>
|
||||
<p align="center"><img src="https://github.com/Laporte12974/UpsilonDesign/blob/89a15953ae128aef8aa7d066dcaaf8d5c70f02a5/UPSILogo.png" /></p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://creativecommons.org/licenses/by-nc-sa/4.0/"><img alt="cc by-nc-sa 4.0" src="https://img.shields.io/badge/License-CC%20BY--NC--SA%204.0-525252.svg?labelColor=292929&logo=creative%20commons&style=for-the-badge" /></a>
|
||||
<a href="https://github.com/Omega-Numworks/Omega/issues"><img alt="Issues" src="https://img.shields.io/github/issues/Omega-Numworks/Omega.svg?labelColor=292929&logo=git&style=for-the-badge" /></a>
|
||||
<a href="https://github.com/Lauryy06/Upsilon/issues"><img alt="Issues" src="https://img.shields.io/github/issues/Lauryy06/Upsilon.svg?labelColor=292929&logo=git&style=for-the-badge" /></a>
|
||||
<br/>
|
||||
<a href="https://discord.gg/X2TWhh9"><img alt="Discord" src="https://img.shields.io/discord/663420259851567114?color=blue&labelColor=292929&label=chat%20-%20discord&logo=discord&style=for-the-badge" /></a>
|
||||
<a href="https://discord.gg/Q9buEMduXG"><img alt="Discord" src="https://img.shields.io/discord/663420259851567114?color=blue&labelColor=292929&label=chat%20-%20discord&logo=discord&style=for-the-badge" /></a>
|
||||
</p>
|
||||
|
||||
> Don't understand french ? speak english ? here's the [english README](./README.md) !
|
||||
|
||||
## À propos
|
||||
|
||||
Omega est un fork d'Epsilon, l'OS de Numworks tournant sur les calculatrices du même nom, qui apporte beaucoup de fonctionnalités en plus. Omega est fait pour ceux qui aimeraient ajouter certaines fonctionnalités ayant été rejetées par Numworks à leurs calculatrices (pour des raisons 100% compréhensibles !). [Essayez en ligne](https://getomega.web.app/simulator).
|
||||
Upsilon est un fork d'Omega, un fork d'Epsilon, l'OS de Numworks tournant sur les calculatrices du même nom, qui apporte beaucoup de fonctionnalités en plus, mais qui fut archivé et fermé pour des raisons légales après un changement de politique de Numworks. Upsilon est fait pour ceux qui aimeraient voir un futur pour les OS créées par les utilisateurs pour Numworks, même après l'arrèt du projet initial.
|
||||
|
||||
### Quelques fonctionnalités supplémentaires
|
||||
- Retour du calcul littéral
|
||||
- Une application RPN
|
||||
- Application Externes
|
||||
- Des thèmes
|
||||
- Python amélioré (module os, méthode open...)
|
||||
- Un tableau périodique et toutes les masses molaires des éléments dans la toolbox
|
||||
- *Ainsi que d'autres à découvrir...* [Changelogs complets](https://github.com/Omega-Numworks/Omega/wiki/Changelog) | [Fonctionnalités princpales & captures d'écran](https://github.com/Omega-Numworks/Omega/wiki/Main-features).
|
||||
- Un module python kandinsky amélioré
|
||||
- Un support pour fonds d'écrans personnalisés
|
||||
- Des applications externes
|
||||
- Un thème Upsilon
|
||||
- La surcharge des opérateurs en python
|
||||
- Un tableau périodique légèrement amélioré
|
||||
- L'utilisation possible du signe "=" dans les calculs
|
||||
- *Ainsi que tout ce qui a été ajouté sur Omega, et bien plus...* [Changelogs complets d'Omega](https://github.com/Omega-Numworks/Omega/wiki/Changelog) | [Fonctionnalités principales d'Omega & captures d'écran](https://github.com/Omega-Numworks/Omega/wiki/Main-features).
|
||||
|
||||
## Installation
|
||||
|
||||
### Automatique
|
||||
|
||||
Vous pouvez installer Omega automatiquement depuis [notre site](https://getomega.web.app/) sur la page "installer".
|
||||
|
||||
<a href="https://getomega.web.app"><p align="center"><img alt="Omega Banner Discord" src="https://user-images.githubusercontent.com/12123721/86352956-e9000480-bc66-11ea-82b7-79fd7e56fa27.png" /></p></a>
|
||||
|
||||
### Manuelle
|
||||
|
||||
*A l'heure actuelle, seule l'installation manuelle est possible.*
|
||||
|
||||
Tout d'abord, suivez **la première étape** [ici](https://www.numworks.com/resources/engineering/software/build/), puis :
|
||||
|
||||
<details>
|
||||
@@ -40,15 +37,15 @@ Tout d'abord, suivez **la première étape** [ici](https://www.numworks.com/reso
|
||||
(note : vous pouvez changer `EPSILON_I18N=fr` en `en`, `nl`, `pt`, `it`, `de`, `es` ou `hu`).
|
||||
|
||||
```bash
|
||||
git clone --recursive https://github.com/Omega-Numworks/Omega.git
|
||||
cd Omega
|
||||
git clone --recursive https://github.com/Lauryy06/Upsilon.git
|
||||
cd Upsilon
|
||||
git checkout omega-master
|
||||
make MODEL=n0100 clean
|
||||
make MODEL=n0100 EPSILON_I18N=fr OMEGA_USERNAME="{Votre nom ici, 15 caractères max}" -j4
|
||||
make MODEL=n0100 epsilon_flash
|
||||
```
|
||||
|
||||
Important : N'oubliez pas l'argument `--recursive`, Omega a besoin de sous-modules.
|
||||
Important : N'oubliez pas l'argument `--recursive`, Upsilon a besoin de sous-modules.
|
||||
Vous pouvez aussi changer le nombre de processus parallèles pendant la compilation en changeant la valeur suivant `-j`.
|
||||
|
||||
</details>
|
||||
@@ -57,15 +54,15 @@ Vous pouvez aussi changer le nombre de processus parallèles pendant la compilat
|
||||
<summary><b>Modèle n0110</b></summary>
|
||||
|
||||
```bash
|
||||
git clone --recursive https://github.com/Omega-Numworks/Omega.git
|
||||
cd Omega
|
||||
git clone --recursive https://github.com/Lauryy06/Upsilon.git
|
||||
cd Upsilon
|
||||
git checkout omega-master
|
||||
make clean
|
||||
make OMEGA_USERNAME="{Votre nom ici, 15 caractères max}" -j4
|
||||
make epsilon_flash
|
||||
```
|
||||
|
||||
Important : N'oubliez pas l'argument `--recursive`, Omega a besoin de sous-modules.
|
||||
Important : N'oubliez pas l'argument `--recursive`, Upsilon a besoin de sous-modules.
|
||||
Vous pouvez aussi changer le nombre de processus parallèles pendant la compilation en changeant la valeur suivant `-j`.
|
||||
|
||||
</details>
|
||||
@@ -73,11 +70,11 @@ Vous pouvez aussi changer le nombre de processus parallèles pendant la compilat
|
||||
<details>
|
||||
<summary><b>Fichiers binaires</b></summary>
|
||||
|
||||
Ces fichiers peuvent être utilisés pour distribuer Omega (pour que tout le monde puisse le flasher via [Webdfu_Numworks](https://ti-planet.github.io/webdfu_numworks/)).
|
||||
Ces fichiers peuvent être utilisés pour distribuer Upsilon (pour que tout le monde puisse le flasher via [Webdfu_Numworks](https://ti-planet.github.io/webdfu_numworks/)).
|
||||
|
||||
```bash
|
||||
git clone --recursive https://github.com/Omega-Numworks/Omega.git
|
||||
cd Omega
|
||||
git clone --recursive https://github.com/Lauryy06/Upsilon.git
|
||||
cd Upsilon
|
||||
git checkout omega-master
|
||||
make clean
|
||||
make MODEL=n0100 OMEGA_USERNAME="" -j8
|
||||
@@ -86,7 +83,7 @@ make OMEGA_USERNAME="" -j8
|
||||
make OMEGA_USERNAME="" binpack -j8
|
||||
```
|
||||
|
||||
Important : N'oubliez pas l'argument `--recursive`, Omega a besoin de sous-modules.
|
||||
Important : N'oubliez pas l'argument `--recursive`, Upsilon a besoin de sous-modules.
|
||||
Vous pouvez aussi changer le nombre de processus parallèles pendant la compilation en changeant la valeur suivant `-j`.
|
||||
|
||||
</details>
|
||||
@@ -104,11 +101,11 @@ cd emsdk
|
||||
source emsdk_env.sh
|
||||
```
|
||||
|
||||
Puis, compilez Omega :
|
||||
Puis, compilez Upsilon :
|
||||
|
||||
```bash
|
||||
git clone --recursive https://github.com/Omega-Numworks/Omega.git
|
||||
cd Omega
|
||||
git clone --recursive https://github.com/Lauryy06/Upsilon.git
|
||||
cd Upsilon
|
||||
git checkout omega-master
|
||||
make clean
|
||||
make PLATFORM=simulator TARGET=web OMEGA_USERNAME="{Votre nom ici, 15 caractères max}" -j4
|
||||
@@ -116,7 +113,7 @@ make PLATFORM=simulator TARGET=web OMEGA_USERNAME="{Votre nom ici, 15 caractère
|
||||
|
||||
Le simulateur se trouve dans `output/release/simulator/web/simulator.zip`
|
||||
|
||||
Important : N'oubliez pas l'argument `--recursive`, Omega a besoin de sous-modules.
|
||||
Important : N'oubliez pas l'argument `--recursive`, Upsilon a besoin de sous-modules.
|
||||
Vous pouvez aussi changer le nombre de processus parallèles pendant la compilation en changeant la valeur suivant `-j`.
|
||||
|
||||
</details>
|
||||
@@ -127,9 +124,9 @@ Vous pouvez aussi changer le nombre de processus parallèles pendant la compilat
|
||||
Vous aurez besoin de devkitPro et de devkitARM disponible dans votre `$PATH` (instructions [ici](https://devkitpro.org/wiki/Getting_Started) (en anglais))
|
||||
|
||||
```bash
|
||||
git clone --recursive https://github.com/Omega-Numworks/Omega.git
|
||||
cd Omega
|
||||
git checkout --recursive omega-dev
|
||||
git clone --recursive https://github.com/Lauryy06/Upsilon.git
|
||||
cd Upsilon
|
||||
git checkout --recursive upsilon-dev
|
||||
make PLATFORM=simulator TARGET=3ds -j
|
||||
```
|
||||
|
||||
@@ -141,16 +138,22 @@ Vous pouvez ensuite copier epsilon.3dsx sur une carte SD pour l'exécuter depuis
|
||||
|
||||
</details>
|
||||
|
||||
Si vous avez besoin d'aide, n'hésitez pas à rejoindre notre serveur discord : https://discord.gg/X2TWhh9
|
||||
Si vous avez besoin d'aide, n'hésitez pas à rejoindre notre serveur discord : https://discord.gg/Q9buEMduXG
|
||||
|
||||
<a href="https://discord.gg/X2TWhh9"><p align="center"><img alt="Omega Banner Discord" src="https://user-images.githubusercontent.com/12123721/86287349-54ef5800-bbe8-11ea-80c1-34eb1f93eebd.png" /></p></a>
|
||||
<a href="https://discord.gg/Q9buEMduXG"><p align="center"><img alt="Omega Banner Discord" src="https://user-images.githubusercontent.com/12123721/86287349-54ef5800-bbe8-11ea-80c1-34eb1f93eebd.png" /></p></a>
|
||||
---
|
||||
|
||||
## Liens utiles
|
||||
* [Upsilon external (pour installer des applications supplémentaires et des fonds d'écran)](https://lauryy06.github.io/Upsilon-External/)
|
||||
* [Documentation d'ulab](https://micropython-ulab.readthedocs.io/en/latest/)
|
||||
|
||||
## Contribution
|
||||
|
||||
Pour contribuer, merci de lire le [Wiki](https://github.com/Omega-Numworks/Omega/wiki/Contributing)
|
||||
Pour contribuer, merci de lire le [Wiki d'Omega](https://github.com/Omega-Numworks/Omega/wiki/Contributing), les mêmes règles s'appliquent ici.
|
||||
|
||||
## Nos autres projets
|
||||
## Les autres projets
|
||||
|
||||
Les anciens projets d'Omega, avant sa fermeture, qui ont été utilisés pour ce projet
|
||||
|
||||
* [Omega Themes](https://github.com/Omega-Numworks/Omega-Themes)
|
||||
* [Omega Website](https://github.com/Omega-Numworks/Omega-Website)
|
||||
@@ -163,6 +166,8 @@ Pour contribuer, merci de lire le [Wiki](https://github.com/Omega-Numworks/Omega
|
||||
|
||||
## À propos d'Epsilon
|
||||
|
||||
Upsilon est un fork d'Omega, visant a continuer le projet des OS utilisateurs pour Numworks
|
||||
|
||||
Omega est un fork d'Epsilon, un système d'exploitation performant pour calculatrices graphiques. Il inclut huit applications pour les mathématiques de lycée et d'études supérieurs
|
||||
|
||||
Vous pouvez essayer Epsilon depuis votre navigateur sur le [simulateur en ligne](https://www.numworks.com/simulator/).
|
||||
@@ -175,3 +180,4 @@ NumWorks SAS et Nintendo of America Inc ne sont en aucun cas associés avec ce p
|
||||
|
||||
* NumWorks Epsilon est disponible sous [Lisense CC BY-NC-SA](https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode).
|
||||
* Omega est disponible sous [Lisense CC BY-NC-SA](https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode).
|
||||
* Upsilon est disponible sous [Lisense CC BY-NC-SA](https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode).
|
||||
|
||||
249
README.md
249
README.md
@@ -1,38 +1,156 @@
|
||||
<p align="center"><img src="https://user-images.githubusercontent.com/12123721/111199951-80bd3d00-85c1-11eb-936c-28cf590208b8.png" /></p>
|
||||
<p align="center"><img src="https://github.com/Laporte12974/UpsilonDesign/blob/89a15953ae128aef8aa7d066dcaaf8d5c70f02a5/UPSILogo.png" /></p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://creativecommons.org/licenses/by-nc-sa/4.0/"><img alt="cc by-nc-sa 4.0" src="https://img.shields.io/badge/License-CC%20BY--NC--SA%204.0-525252.svg?labelColor=292929&logo=creative%20commons&style=for-the-badge" /></a>
|
||||
<a href="https://github.com/Omega-Numworks/Omega/issues"><img alt="Issues" src="https://img.shields.io/github/issues/Omega-Numworks/Omega.svg?labelColor=292929&logo=git&style=for-the-badge" /></a>
|
||||
<a href="https://github.com/Lauryy06/Upsilon/issues"><img alt="Issues" src="https://img.shields.io/github/issues/Lauryy06/Upsilon.svg?labelColor=292929&logo=git&style=for-the-badge" /></a>
|
||||
<br/>
|
||||
<a href="https://discord.gg/X2TWhh9"><img alt="Discord" src="https://img.shields.io/discord/663420259851567114?color=blue&labelColor=292929&label=chat%20-%20discord&logo=discord&style=for-the-badge" /></a>
|
||||
<a href="https://discord.gg/Q9buEMduXG"><img alt="Discord" src="https://img.shields.io/discord/663420259851567114?color=blue&labelColor=292929&label=chat%20-%20discord&logo=discord&style=for-the-badge" /></a>
|
||||
</p>
|
||||
|
||||
> Vous ne comprenez pas l'anglais ? vous êtes francophone ? Regardez le [*LISEZ-MOI* français](./README.fr.md) !
|
||||
> Vous ne comprenez pas l'anglais ? Vous êtes francophone ? Regardez le [*LISEZ-MOI* français](./README.fr.md) !
|
||||
|
||||
## About
|
||||
|
||||
Omega is a fork of Numworks' Epsilon, the OS that runs on their calculator, which brings many features to it. Omega is for the people who want to add features to the calculator, but cannot because they have been rejected by Numworks (for reasons that are 100% understandable!). [Try it online](https://getomega.web.app/simulator).
|
||||
Upsilon is a fork of Omega, an user-made OS that runs on the Numworks calculator, which brings many features to it, but was discontinued because of a policy change from Numworks. Upsilon is for the people who want to see a future for user-made OSes for Numworks, even after the closure and archiving of Omega.
|
||||
|
||||
|
||||
|
||||
|
||||
### Some new features
|
||||
- Adding symbolic calculation back into the calculator
|
||||
- An app for RPN
|
||||
- Enhancements for the Kandinsky python module
|
||||
- Support for wallpapers
|
||||
- Exernal apps
|
||||
- A theme engine
|
||||
- New python features (os module, open method...)
|
||||
- A periodic table app + all of the molar masses for the elements in the toolbox
|
||||
- *And much more to discover...* [Complete changelog](https://github.com/Omega-Numworks/Omega/wiki/Changelog) | [Main new features + screenshots](https://github.com/Omega-Numworks/Omega/wiki/Main-features).
|
||||
- A custom theme
|
||||
- Operator overload for python
|
||||
- Improvements for the Periodic table application
|
||||
- *And everything that has been added to Omega before its termination!* [See Omega's changelog here](https://github.com/Omega-Numworks/Omega/wiki/Changelog) | [Main Omega features + screenshots](https://github.com/Omega-Numworks/Omega/wiki/Main-features).
|
||||
|
||||
<br>
|
||||
|
||||
## Installation
|
||||
|
||||
### Automatic
|
||||
|
||||
You can install Omega automatically on our website [here](https://getomega.web.app/) in the "install" page.
|
||||
|
||||
<a href="https://getomega.web.app"><p align="center"><img alt="Omega Banner Discord" src="https://user-images.githubusercontent.com/12123721/86352956-e9000480-bc66-11ea-82b7-79fd7e56fa27.png" /></p></a>
|
||||
|
||||
### Manual
|
||||
|
||||
First of all, follow **step 1** [here](https://www.numworks.com/resources/engineering/software/build/). Then:
|
||||
*As of today, only the manual installation is available. You can refer to this [website](https://www.numworks.com/resources/engineering/software/build/) for the first step if you get errors.*
|
||||
|
||||
|
||||
|
||||
### 1. Install SDK
|
||||
|
||||
<br>
|
||||
|
||||
<details>
|
||||
<summary><b>1.1 Linux</b></summary>
|
||||
|
||||
<br>
|
||||
|
||||
|
||||
<details>
|
||||
<summary>Debian or Ubuntu</summary>
|
||||
|
||||
<br>
|
||||
|
||||
You just have to install dependencies by running these command with superuser privileges in a Terminal:
|
||||
|
||||
```bash
|
||||
apt-get install build-essential git imagemagick libx11-dev libxext-dev libfreetype6-dev libpng-dev libjpeg-dev pkg-config gcc-arm-none-eabi binutils-arm-none-eabi
|
||||
```
|
||||
|
||||
And there you can go to step 2!
|
||||
|
||||
<br>
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Fedora</summary>
|
||||
|
||||
<br>
|
||||
|
||||
First install basics dev tools.
|
||||
|
||||
```bash
|
||||
dnf install make automake gcc gcc-c++ kernel-devel
|
||||
```
|
||||
|
||||
Then install required packages.
|
||||
|
||||
```bash
|
||||
dnf install git ImageMagick libX11-devel libXext-devel freetype-devel libpng-devel libjpeg-devel pkg-config
|
||||
```
|
||||
|
||||
Then, install GCC cross compiler for ARM.
|
||||
|
||||
```bash
|
||||
dnf install arm-none-eabi-gcc-cs arm-none-eabi-gcc-cs-c++
|
||||
```
|
||||
|
||||
<br>
|
||||
|
||||
</details>
|
||||
|
||||
<br>
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><b>1.2 Mac</b></summary>
|
||||
|
||||
<br>
|
||||
|
||||
It's recommended to use [Homebrew](https://brew.sh/). Once it's installed, just run:
|
||||
```bash
|
||||
brew install numworks/tap/epsilon-sdk
|
||||
```
|
||||
and it will install all dependencies.
|
||||
|
||||
<br>
|
||||
|
||||
And there you can go to step 2!
|
||||
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><b>1.3 Windows</b></summary>
|
||||
|
||||
<br>
|
||||
|
||||
[Msys2](https://www.msys2.org/) environment is recommended to get most of the required tools on Windows easily. It's where you'll paste all the commands of this tutorial. Once it's installed, paste these commands into the Msys2 terminal.
|
||||
|
||||
```bash
|
||||
pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-freetype mingw-w64-x86_64-pkg-config mingw-w64-x86_64-libusb git make python
|
||||
echo "export PATH=/mingw64/bin:$PATH" >> .bashrc
|
||||
```
|
||||
|
||||
Next, you'll need to install the [GCC toolchain for ARM](https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads). When prompted for an install location, choose `C:\msys64\home\User\gcc-arm\`. You'll then need to add this folder to your $PATH. Just enter:
|
||||
|
||||
```bash
|
||||
echo "export PATH=$PATH:$HOME/gcc-arm/bin" >> .bashrc
|
||||
```
|
||||
Just restart and you can go to step 2!
|
||||
</details>
|
||||
|
||||
<br>
|
||||
|
||||
### 2. Set up repo
|
||||
|
||||
|
||||
Clone repo and use 'upsilon-dev' branch by pasting these two commands:
|
||||
|
||||
```bash
|
||||
git clone --recursive https://github.com/Lauryy06/Upsilon.git
|
||||
cd Upsilon
|
||||
git checkout upsilon-dev
|
||||
```
|
||||
<br>
|
||||
|
||||
|
||||
### 3. Choose the target
|
||||
|
||||
|
||||
<details>
|
||||
<summary><b>Model n0100</b></summary>
|
||||
@@ -40,55 +158,53 @@ First of all, follow **step 1** [here](https://www.numworks.com/resources/engine
|
||||
(note: you can change the `EPSILON_I18N=en` flag to `fr`, `nl`, `pt`, `it`, `de`, `es` or `hu`).
|
||||
|
||||
```bash
|
||||
git clone --recursive https://github.com/Omega-Numworks/Omega.git
|
||||
cd Omega
|
||||
git checkout omega-master
|
||||
make MODEL=n0100 clean
|
||||
make MODEL=n0100 EPSILON_I18N=en OMEGA_USERNAME="{Your name, max 15 characters}" -j4
|
||||
make MODEL=n0100 epsilon_flash
|
||||
```
|
||||
|
||||
Important: Don't forget the `--recursive` tag, because Omega relies on submodules.
|
||||
Also, you can change the number of processes that run in parallel during the build by changing the value of the `-j` flag.
|
||||
Now, run either:
|
||||
|
||||
```bash
|
||||
make MODEL=n0100 epsilon_flash
|
||||
```
|
||||
to directly flash the calculator after pressing simultaneously `reset` and `6` buttons and pluging in.
|
||||
|
||||
<br>
|
||||
|
||||
or:
|
||||
|
||||
```bash
|
||||
make MODEL=n0100 OMEGA_USERNAME="" binpack -j4
|
||||
```
|
||||
to make binpack wich you can flash to the caculator from [Ti-planet's webDFU](https://ti-planet.github.io/webdfu_numworks/n0100/). Binpacks are a great way to share a custom build of Upsilon to friends.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><b>Model n0110</b></summary>
|
||||
|
||||
|
||||
```bash
|
||||
git clone --recursive https://github.com/Omega-Numworks/Omega.git
|
||||
cd Omega
|
||||
git checkout omega-master
|
||||
make clean
|
||||
make OMEGA_USERNAME="{Your name, max 15 characters}" -j4
|
||||
make epsilon_flash
|
||||
```
|
||||
|
||||
Important: Don't forget the `--recursive` tag, because Omega relies on submodules.
|
||||
Also, you can change the number of processes that run in parallel during the build by changing the value of the `-j` flag.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><b>Bin files</b></summary>
|
||||
|
||||
These can be used to distribute Omega (so that it can be flashed by anyone with [Webdfu_Numworks](https://ti-planet.github.io/webdfu_numworks/)).
|
||||
Now, run either:
|
||||
|
||||
```bash
|
||||
git clone --recursive https://github.com/Omega-Numworks/Omega.git
|
||||
cd Omega
|
||||
git checkout omega-master
|
||||
make clean
|
||||
make MODEL=n0100 OMEGA_USERNAME="" -j8
|
||||
make MODEL=n0100 OMEGA_USERNAME="" binpack -j8
|
||||
make OMEGA_USERNAME="" -j8
|
||||
make OMEGA_USERNAME="" binpack -j8
|
||||
make epsilon_flash
|
||||
```
|
||||
to directly flash the calculator after pressing simultaneously `reset` and `6` buttons and pluging in.
|
||||
|
||||
<br>
|
||||
|
||||
or:
|
||||
|
||||
```bash
|
||||
make OMEGA_USERNAME="" binpack -j4
|
||||
```
|
||||
to make binpack wich you can flash to the caculator from [Ti-planet's webDFU](https://ti-planet.github.io/webdfu_numworks/n0110/). Binpacks are a great way to share a custom build of Upsilon to friends.
|
||||
|
||||
Important: Don't forget the `--recursive` tag, because Omega relies on submodules.
|
||||
Also, you can change the number of processes that run in parallel during the build by changing the value of the `-j` flag.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
@@ -104,20 +220,15 @@ cd emsdk
|
||||
source emsdk_env.sh
|
||||
```
|
||||
|
||||
Then, compile Omega :
|
||||
Then, compile Upsilon :
|
||||
|
||||
```bash
|
||||
git clone --recursive https://github.com/Omega-Numworks/Omega.git
|
||||
cd Omega
|
||||
git checkout omega-master
|
||||
make clean
|
||||
make PLATFORM=simulator TARGET=web OMEGA_USERNAME="{Your name, max 15 characters}" -j4
|
||||
```
|
||||
|
||||
The simulator is now in `output/release/simulator/web/simulator.zip`
|
||||
|
||||
Important: Don't forget the `--recursive` tag, because Omega relies on submodules.
|
||||
Also, you can change the number of processes that run in parallel during the build by changing the value of the `-j` flag.
|
||||
|
||||
</details>
|
||||
|
||||
@@ -127,9 +238,9 @@ Also, you can change the number of processes that run in parallel during the bui
|
||||
You need devkitPro and devkitARM installed and in your path (instructions [here](https://devkitpro.org/wiki/Getting_Started))
|
||||
|
||||
```bash
|
||||
git clone --recursive https://github.com/Omega-Numworks/Omega.git
|
||||
cd Omega
|
||||
git checkout --recursive omega-dev
|
||||
git clone --recursive https://github.com/Lauryy06/Upsilon.git
|
||||
cd Upsilon
|
||||
git checkout --recursive upsilon-dev
|
||||
make PLATFORM=simulator TARGET=3ds -j
|
||||
```
|
||||
You can then put epsilon.3dsx on a SD card to run it from the HBC or use 3dslink to launch it over the network:
|
||||
@@ -140,17 +251,30 @@ You can then put epsilon.3dsx on a SD card to run it from the HBC or use 3dslink
|
||||
|
||||
</details>
|
||||
|
||||
If you need help, you can join our Discord server here : https://discord.gg/X2TWhh9
|
||||
<br>
|
||||
|
||||
<a href="https://discord.gg/X2TWhh9"><p align="center"><img alt="Omega Banner Discord" src="https://user-images.githubusercontent.com/12123721/86287349-54ef5800-bbe8-11ea-80c1-34eb1f93eebd.png" /></p></a>
|
||||
Important: Don't forget the `--recursive` tag, because Upsilon relies on submodules.
|
||||
Also, you can change the number of processes that run in parallel during the build by changing the value of the `-j` flag.
|
||||
Don't forget to put your pseudo instead of `{your pseudo, max 15 char}`. If you don't want one, just remove the `OMEGA_USERNAME=""` argument.
|
||||
|
||||
<br>
|
||||
|
||||
If you need help, you can join our Discord server here : https://discord.gg/NFvzdCBTQn
|
||||
|
||||
<a href="https://discord.gg/NFvzdCBTQn"><p align="center"><img alt="Omega Banner Discord" src="https://user-images.githubusercontent.com/12123721/86287349-54ef5800-bbe8-11ea-80c1-34eb1f93eebd.png" /></p></a>
|
||||
---
|
||||
## Useful links
|
||||
* [Upsilon external (to install additional apps and wallpapers)](https://lauryy06.github.io/Upsilon-External/)
|
||||
* [Ulab documentation](https://micropython-ulab.readthedocs.io/en/latest/)
|
||||
|
||||
## Contributing
|
||||
|
||||
To contribute, please refer to the [Wiki](https://github.com/Omega-Numworks/Omega/wiki/Contributing)
|
||||
|
||||
To contribute, please refer to [Omega's Wiki](https://github.com/Omega-Numworks/Omega/wiki/Contributing), the same rules apply here.
|
||||
|
||||
## Related repositories
|
||||
|
||||
Here are the main links toward Omega's different websites and repositories, that have been used for the creation of Upsilon.
|
||||
|
||||
* [Omega Themes](https://github.com/Omega-Numworks/Omega-Themes)
|
||||
* [Omega Website](https://github.com/Omega-Numworks/Omega-Website)
|
||||
* [Omega RPN `APP`](https://github.com/Omega-Numworks/Omega-RPN)
|
||||
@@ -162,6 +286,8 @@ To contribute, please refer to the [Wiki](https://github.com/Omega-Numworks/Omeg
|
||||
|
||||
## About Epsilon
|
||||
|
||||
Upsilon is a fork of Omega, after the project's discontinuation.
|
||||
|
||||
Omega is a fork of Epsilon, a high-performance graphing calculator operating system. It includes eight apps that cover the high school mathematics curriculum.
|
||||
|
||||
You can try Epsilon straight from your browser in the [online simulator](https://www.numworks.com/simulator/).
|
||||
@@ -174,3 +300,4 @@ NumWorks SAS and Nintendo of America Inc aren't associated in any shape or form
|
||||
|
||||
* NumWorks Epsilon is released under a [CC BY-NC-SA License](https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode).
|
||||
* Omega is released under a [CC BY-NC-SA License](https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode).
|
||||
* Upsilon is released under a [CC BY-NC-SA License](https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode).
|
||||
|
||||
@@ -85,9 +85,6 @@ language_preferences = apps/language_preferences.csv
|
||||
SFLAGS += -I$(BUILD_DIR)
|
||||
|
||||
i18n_files += $(addprefix apps/language_,$(addsuffix .universal.i18n, $(EPSILON_I18N)))
|
||||
ifeq ($(EPSILON_GETOPT),1)
|
||||
i18n_files += $(addprefix apps/language_,$(addsuffix _iso6391.universal.i18n, $(EPSILON_I18N)))
|
||||
endif
|
||||
|
||||
i18n_files += $(call i18n_with_universal_for,shared)
|
||||
i18n_files += $(call i18n_with_universal_for,toolbox)
|
||||
@@ -97,7 +94,7 @@ $(eval $(call rule_for, \
|
||||
I18N, \
|
||||
apps/i18n.cpp, \
|
||||
$(i18n_files), \
|
||||
$$(PYTHON) apps/i18n.py --codepoints $(code_points) --countrypreferences $(country_preferences) --languagepreferences $(language_preferences) --header $$(subst .cpp,.h,$$@) --implementation $$@ --locales $$(EPSILON_I18N) --countries $$(EPSILON_COUNTRIES) --files $$^ --generateISO6391locales $$(EPSILON_GETOPT), \
|
||||
$$(PYTHON) apps/i18n.py --codepoints $(code_points) --countrypreferences $(country_preferences) --languagepreferences $(language_preferences) --header $$(subst .cpp,.h,$$@) --implementation $$@ --locales $$(EPSILON_I18N) --countries $$(EPSILON_COUNTRIES) --files $$^, \
|
||||
global \
|
||||
))
|
||||
|
||||
@@ -113,6 +110,8 @@ $(call object_for,$(apps_src) $(tests_src)): $(BUILD_DIR)/apps/i18n.h
|
||||
$(call object_for,$(apps_src) $(tests_src)): $(BUILD_DIR)/apps/home/apps_layout.h
|
||||
$(call object_for,$(apps_src) $(tests_src)): $(BUILD_DIR)/python/port/genhdr/qstrdefs.generated.h
|
||||
|
||||
$(call object_for,$(apps_src)): $(BUILD_DIR)/apps/home/apps_layout.h
|
||||
|
||||
apps_tests_src = $(app_calculation_test_src) $(app_code_test_src) $(app_graph_test_src) $(app_probability_test_src) $(app_regression_test_src) $(app_sequence_test_src) $(app_shared_test_src) $(app_statistics_test_src) $(app_settings_test_src) $(app_solver_test_src)
|
||||
|
||||
apps_tests_src += $(addprefix apps/,\
|
||||
|
||||
@@ -29,7 +29,7 @@ AppsContainer::AppsContainer() :
|
||||
m_globalContext(),
|
||||
m_variableBoxController(),
|
||||
m_examPopUpController(this),
|
||||
m_promptController(k_promptMessages, k_promptColors, k_promptNumberOfMessages),
|
||||
m_promptController(k_promptMessages, k_promptFGColors, k_promptBGColors, k_promptNumberOfMessages),
|
||||
m_batteryTimer(),
|
||||
m_suspendTimer(),
|
||||
m_backlightDimmingTimer(),
|
||||
|
||||
@@ -66,7 +66,8 @@ private:
|
||||
bool updateAlphaLock();
|
||||
|
||||
static I18n::Message k_promptMessages[];
|
||||
static KDColor k_promptColors[];
|
||||
static KDColor const * k_promptFGColors[];
|
||||
static KDColor const * k_promptBGColors[];
|
||||
static int k_promptNumberOfMessages;
|
||||
AppsWindow m_window;
|
||||
EmptyBatteryWindow m_emptyBatteryWindow;
|
||||
|
||||
@@ -10,14 +10,24 @@ I18n::Message AppsContainer::k_promptMessages[] = {
|
||||
I18n::Message::BetaVersionMessage5,
|
||||
I18n::Message::BetaVersionMessage6};
|
||||
|
||||
KDColor AppsContainer::k_promptColors[] = {
|
||||
KDColorBlack,
|
||||
KDColorBlack,
|
||||
KDColorBlack,
|
||||
KDColorBlack,
|
||||
KDColorWhite,
|
||||
KDColorBlack,
|
||||
KDColorBlack,
|
||||
Palette::AccentText};
|
||||
KDColor AppsContainer::k_promptFGColors[] = {
|
||||
&KDColorBlack,
|
||||
&KDColorBlack,
|
||||
&KDColorBlack,
|
||||
&KDColorBlack,
|
||||
&KDColorWhite,
|
||||
&KDColorBlack,
|
||||
&KDColorBlack,
|
||||
*Palette::AccentText};
|
||||
|
||||
KDColor AppsContainer::k_promptBGColors[] = {
|
||||
KDColorWhite,
|
||||
KDColorWhite,
|
||||
KDColorWhite,
|
||||
KDColorWhite,
|
||||
KDColorWhite,
|
||||
KDColorWhite,
|
||||
KDColorWhite,
|
||||
KDColorWhite};
|
||||
|
||||
int AppsContainer::k_promptNumberOfMessages = 8;
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
|
||||
I18n::Message AppsContainer::k_promptMessages[] = {};
|
||||
|
||||
KDColor AppsContainer::k_promptColors[] = {};
|
||||
KDColor const * AppsContainer::k_promptFGColors[] = {};
|
||||
KDColor const * AppsContainer::k_promptBGColors[] = {};
|
||||
|
||||
int AppsContainer::k_promptNumberOfMessages = 0;
|
||||
|
||||
|
||||
@@ -8,12 +8,20 @@ I18n::Message AppsContainer::k_promptMessages[] = {
|
||||
I18n::Message::UpdateMessage3,
|
||||
I18n::Message::UpdateMessage4};
|
||||
|
||||
KDColor AppsContainer::k_promptColors[] = {
|
||||
KDColorBlack,
|
||||
KDColorBlack,
|
||||
KDColorBlack,
|
||||
KDColorWhite,
|
||||
KDColorBlack,
|
||||
Palette::AccentText};
|
||||
KDColor const * AppsContainer::k_promptFGColors[] = {
|
||||
&KDColorBlack,
|
||||
&KDColorBlack,
|
||||
&KDColorBlack,
|
||||
&KDColorWhite,
|
||||
&KDColorBlack,
|
||||
*Palette::AccentText};
|
||||
|
||||
KDColor const * AppsContainer::k_promptBGColors[] = {
|
||||
KDColorWhite,
|
||||
KDColorWhite,
|
||||
KDColorWhite,
|
||||
KDColorBlack,
|
||||
KDColorWhite,
|
||||
KDColorBlack};
|
||||
|
||||
int AppsContainer::k_promptNumberOfMessages = 6;
|
||||
|
||||
Submodule apps/atomic updated: 64f2e38ed1...ffafaaf311
@@ -60,43 +60,43 @@ void BatteryView::drawRect(KDContext * ctx, KDRect rect) const {
|
||||
*'content' depends on the charge */
|
||||
|
||||
// Draw the left part
|
||||
ctx->fillRect(KDRect(0, 0, k_elementWidth, k_batteryHeight), Palette::Battery);
|
||||
ctx->fillRect(KDRect(0, 0, k_elementWidth, k_batteryHeight), *Palette::Battery);
|
||||
|
||||
// Draw the middle part
|
||||
constexpr KDCoordinate batteryInsideX = k_elementWidth+k_separatorThickness;
|
||||
constexpr KDCoordinate batteryInsideWidth = k_batteryWidth-3*k_elementWidth-2*k_separatorThickness;
|
||||
if (m_isCharging) {
|
||||
// Charging: Yellow background with flash
|
||||
ctx->fillRect(KDRect(batteryInsideX, 0, batteryInsideWidth, k_batteryHeight), Palette::BatteryInCharge);
|
||||
ctx->fillRect(KDRect(batteryInsideX, 0, batteryInsideWidth, k_batteryHeight), *Palette::BatteryInCharge);
|
||||
KDRect frame((k_batteryWidth-k_flashWidth)/2, 0, k_flashWidth, k_flashHeight);
|
||||
KDColor flashWorkingBuffer[BatteryView::k_flashHeight*BatteryView::k_flashWidth];
|
||||
ctx->blendRectWithMask(frame, Palette::Battery, (const uint8_t *)flashMask, flashWorkingBuffer);
|
||||
ctx->blendRectWithMask(frame, *Palette::Battery, (const uint8_t *)flashMask, flashWorkingBuffer);
|
||||
} else if (m_chargeState == Ion::Battery::Charge::LOW) {
|
||||
assert(!m_isPlugged);
|
||||
// Low: Quite empty battery
|
||||
ctx->fillRect(KDRect(batteryInsideX, 0, 2*k_elementWidth, k_batteryHeight), Palette::BatteryLow);
|
||||
ctx->fillRect(KDRect(3*k_elementWidth+k_separatorThickness, 0, k_batteryWidth-5*k_elementWidth-2*k_separatorThickness, k_batteryHeight), Palette::BatteryInCharge);
|
||||
ctx->fillRect(KDRect(batteryInsideX, 0, 2*k_elementWidth, k_batteryHeight), *Palette::BatteryLow);
|
||||
ctx->fillRect(KDRect(3*k_elementWidth+k_separatorThickness, 0, k_batteryWidth-5*k_elementWidth-2*k_separatorThickness, k_batteryHeight), KDColor::blend(*Palette::Toolbar, *Palette::Battery, 128));
|
||||
} else if (m_chargeState == Ion::Battery::Charge::SOMEWHERE_INBETWEEN) {
|
||||
assert(!m_isPlugged);
|
||||
// Middle: Half full battery
|
||||
constexpr KDCoordinate middleChargeWidth = batteryInsideWidth/2;
|
||||
ctx->fillRect(KDRect(batteryInsideX, 0, middleChargeWidth, k_batteryHeight), Palette::Battery);
|
||||
ctx->fillRect(KDRect(batteryInsideX+middleChargeWidth, 0, middleChargeWidth, k_batteryHeight), Palette::BatteryInCharge);
|
||||
ctx->fillRect(KDRect(batteryInsideX, 0, middleChargeWidth, k_batteryHeight), *Palette::Battery);
|
||||
ctx->fillRect(KDRect(batteryInsideX+middleChargeWidth, 0, middleChargeWidth, k_batteryHeight), KDColor::blend(*Palette::Toolbar, *Palette::Battery, 128));
|
||||
} else {
|
||||
assert(m_chargeState == Ion::Battery::Charge::FULL);
|
||||
// Full but not plugged: Full battery
|
||||
ctx->fillRect(KDRect(batteryInsideX, 0, batteryInsideWidth, k_batteryHeight), Palette::Battery);
|
||||
ctx->fillRect(KDRect(batteryInsideX, 0, batteryInsideWidth, k_batteryHeight), *Palette::Battery);
|
||||
if (m_isPlugged) {
|
||||
// Plugged and full: Full battery with tick
|
||||
KDRect frame((k_batteryWidth-k_tickWidth)/2, (k_batteryHeight-k_tickHeight)/2, k_tickWidth, k_tickHeight);
|
||||
KDColor tickWorkingBuffer[BatteryView::k_tickHeight*BatteryView::k_tickWidth];
|
||||
ctx->blendRectWithMask(frame, Palette::Toolbar, (const uint8_t *)tickMask, tickWorkingBuffer);
|
||||
ctx->blendRectWithMask(frame, *Palette::Toolbar, (const uint8_t *)tickMask, tickWorkingBuffer);
|
||||
}
|
||||
}
|
||||
|
||||
// Draw the right part
|
||||
ctx->fillRect(KDRect(k_batteryWidth-2*k_elementWidth, 0, k_elementWidth, k_batteryHeight), Palette::Battery);
|
||||
ctx->fillRect(KDRect(k_batteryWidth-k_elementWidth, (k_batteryHeight-k_capHeight)/2, k_elementWidth, k_capHeight), Palette::Battery);
|
||||
ctx->fillRect(KDRect(k_batteryWidth-2*k_elementWidth, 0, k_elementWidth, k_batteryHeight), *Palette::Battery);
|
||||
ctx->fillRect(KDRect(k_batteryWidth-k_elementWidth, (k_batteryHeight-k_capHeight)/2, k_elementWidth, k_capHeight), *Palette::Battery);
|
||||
}
|
||||
|
||||
KDSize BatteryView::minimalSizeForOptimalDisplay() const {
|
||||
|
||||
@@ -19,6 +19,7 @@ app_calculation_src = $(addprefix apps/calculation/,\
|
||||
additional_outputs/list_controller.cpp \
|
||||
additional_outputs/matrix_list_controller.cpp \
|
||||
additional_outputs/rational_list_controller.cpp \
|
||||
additional_outputs/second_degree_list_controller.cpp \
|
||||
additional_outputs/trigonometry_graph_cell.cpp \
|
||||
additional_outputs/trigonometry_list_controller.cpp \
|
||||
additional_outputs/trigonometry_model.cpp \
|
||||
|
||||
@@ -13,7 +13,7 @@ ComplexGraphView::ComplexGraphView(ComplexModel * complexModel) :
|
||||
}
|
||||
|
||||
void ComplexGraphView::drawRect(KDContext * ctx, KDRect rect) const {
|
||||
ctx->fillRect(rect, Palette::BackgroundApps);
|
||||
ctx->fillRect(rect, *Palette::BackgroundApps);
|
||||
|
||||
// Draw grid, axes and graduations
|
||||
drawGrid(ctx, rect);
|
||||
@@ -26,7 +26,7 @@ void ComplexGraphView::drawRect(KDContext * ctx, KDRect rect) const {
|
||||
|
||||
assert(!std::isnan(real) && !std::isnan(imag) && !std::isinf(real) && !std::isinf(imag));
|
||||
// Draw the segment from the origin to the dot (real, imag)
|
||||
drawSegment(ctx, rect, 0.0f, 0.0f, m_complex->real(), m_complex->imag(), Palette::SecondaryText, false);
|
||||
drawSegment(ctx, rect, 0.0f, 0.0f, m_complex->real(), m_complex->imag(), *Palette::SecondaryText, false);
|
||||
|
||||
/* Draw the partial ellipse indicating the angle θ
|
||||
* - the ellipse parameters are a = |real|/5 and b = |imag|/5,
|
||||
@@ -59,27 +59,27 @@ void ComplexGraphView::drawRect(KDContext * ctx, KDRect rect) const {
|
||||
float a = parameters.real();
|
||||
float b = parameters.imag();
|
||||
return Poincare::Coordinate2D<float>(a*std::cos(t*th), b*std::sin(t*th));
|
||||
}, ¶meters, &th, false, Palette::SecondaryText, false);
|
||||
}, ¶meters, &th, false, *Palette::SecondaryText, false);
|
||||
|
||||
// Draw dashed segment to indicate real and imaginary
|
||||
drawHorizontalOrVerticalSegment(ctx, rect, Axis::Vertical, real, 0.0f, imag, Palette::CalculationTrigoAndComplexForeground, 1, 3);
|
||||
drawHorizontalOrVerticalSegment(ctx, rect, Axis::Horizontal, imag, 0.0f, real, Palette::CalculationTrigoAndComplexForeground, 1, 3);
|
||||
drawHorizontalOrVerticalSegment(ctx, rect, Axis::Vertical, real, 0.0f, imag, *Palette::CalculationTrigoAndComplexForeground, 1, 3);
|
||||
drawHorizontalOrVerticalSegment(ctx, rect, Axis::Horizontal, imag, 0.0f, real, *Palette::CalculationTrigoAndComplexForeground, 1, 3);
|
||||
|
||||
// Draw complex position on the plan
|
||||
drawDot(ctx, rect, real, imag, Palette::CalculationTrigoAndComplexForeground, Size::Large);
|
||||
drawDot(ctx, rect, real, imag, *Palette::CalculationTrigoAndComplexForeground, Size::Large);
|
||||
|
||||
// Draw labels
|
||||
// 're(z)' label
|
||||
drawLabel(ctx, rect, real, 0.0f, "re(z)", Palette::CalculationTrigoAndComplexForeground, CurveView::RelativePosition::None, imag >= 0.0f ? CurveView::RelativePosition::Before : CurveView::RelativePosition::After);
|
||||
drawLabel(ctx, rect, real, 0.0f, "re(z)", *Palette::CalculationTrigoAndComplexForeground, CurveView::RelativePosition::None, imag >= 0.0f ? CurveView::RelativePosition::Before : CurveView::RelativePosition::After);
|
||||
// 'im(z)' label
|
||||
drawLabel(ctx, rect, 0.0f, imag, "im(z)", Palette::CalculationTrigoAndComplexForeground, real >= 0.0f ? CurveView::RelativePosition::Before : CurveView::RelativePosition::After, CurveView::RelativePosition::None);
|
||||
drawLabel(ctx, rect, 0.0f, imag, "im(z)", *Palette::CalculationTrigoAndComplexForeground, real >= 0.0f ? CurveView::RelativePosition::Before : CurveView::RelativePosition::After, CurveView::RelativePosition::None);
|
||||
// '|z|' label, the relative horizontal position of this label depends on the quadrant
|
||||
CurveView::RelativePosition verticalPosition = real*imag < 0.0f ? CurveView::RelativePosition::Before : CurveView::RelativePosition::After;
|
||||
if (real == 0.0f) {
|
||||
// Edge case: pure imaginary
|
||||
verticalPosition = CurveView::RelativePosition::None;
|
||||
}
|
||||
drawLabel(ctx, rect, real/2.0f, imag/2.0f, "|z|", Palette::CalculationTrigoAndComplexForeground, CurveView::RelativePosition::None, verticalPosition);
|
||||
drawLabel(ctx, rect, real/2.0f, imag/2.0f, "|z|", *Palette::CalculationTrigoAndComplexForeground, CurveView::RelativePosition::None, verticalPosition);
|
||||
// 'arg(z)' label, the absolute and relative horizontal/vertical positions of this label depends on the quadrant
|
||||
CurveView::RelativePosition horizontalPosition = real >= 0.0f ? CurveView::RelativePosition::After : CurveView::RelativePosition::None;
|
||||
verticalPosition = imag >= 0.0f ? CurveView::RelativePosition::After : CurveView::RelativePosition::Before;
|
||||
@@ -88,7 +88,7 @@ void ComplexGraphView::drawRect(KDContext * ctx, KDRect rect) const {
|
||||
* and for the left half plan, we position the label at the half angle. The
|
||||
* relative position is chosen accordingly. */
|
||||
float anglePositionRatio = real >= 0.0f ? 0.0f : 0.5f;
|
||||
drawLabel(ctx, rect, a*std::cos(anglePositionRatio*th), b*std::sin(anglePositionRatio*th), "arg(z)", Palette::CalculationTrigoAndComplexForeground, horizontalPosition, verticalPosition);
|
||||
drawLabel(ctx, rect, a*std::cos(anglePositionRatio*th), b*std::sin(anglePositionRatio*th), "arg(z)", *Palette::CalculationTrigoAndComplexForeground, horizontalPosition, verticalPosition);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ void ExpressionWithEqualSignView::drawRect(KDContext * ctx, KDRect rect) const {
|
||||
// Do not color the whole background to avoid coloring behind the equal symbol
|
||||
KDSize expressionSize = ExpressionView::minimalSizeForOptimalDisplay();
|
||||
ctx->fillRect(KDRect(0, 0, expressionSize), m_backgroundColor);
|
||||
m_layout.draw(ctx, drawingOrigin(), m_textColor, m_backgroundColor, m_selectionStart, m_selectionEnd, Palette::Select);
|
||||
m_layout.draw(ctx, drawingOrigin(), m_textColor, m_backgroundColor, m_selectionStart, m_selectionEnd, *Palette::Select);
|
||||
}
|
||||
|
||||
View * ExpressionWithEqualSignView::subviewAtIndex(int index) {
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace Calculation {
|
||||
class ExpressionWithEqualSignView : public ExpressionView {
|
||||
public:
|
||||
ExpressionWithEqualSignView() :
|
||||
m_equalSign(KDFont::LargeFont, I18n::Message::Equal, 0.5f, 0.5f, Palette::PrimaryText)
|
||||
m_equalSign(KDFont::LargeFont, I18n::Message::Equal, 0.5f, 0.5f, *Palette::PrimaryText)
|
||||
{}
|
||||
KDSize minimalSizeForOptimalDisplay() const override;
|
||||
void drawRect(KDContext * ctx, KDRect rect) const override;
|
||||
|
||||
@@ -10,7 +10,7 @@ void IllustrationCell::layoutSubviews(bool force) {
|
||||
}
|
||||
|
||||
void IllustrationCell::drawRect(KDContext * ctx, KDRect rect) const {
|
||||
drawBorderOfRect(ctx, bounds(), Palette::ListCellBorder);
|
||||
drawBorderOfRect(ctx, bounds(), *Palette::ListCellBorder);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ void ListController::InnerListController::didBecomeFirstResponder() {
|
||||
/* List Controller */
|
||||
|
||||
ListController::ListController(EditExpressionController * editExpressionController, SelectableTableViewDelegate * delegate) :
|
||||
StackViewController(nullptr, &m_listController, Palette::ToolboxHeaderText, Palette::ToolboxHeaderBackground, Palette::ToolboxHeaderBorder),
|
||||
StackViewController(nullptr, &m_listController, *Palette::ToolboxHeaderText, *Palette::ToolboxHeaderBackground, *Palette::ToolboxHeaderBorder),
|
||||
m_listController(this, delegate),
|
||||
m_editExpressionController(editExpressionController)
|
||||
{
|
||||
|
||||
@@ -17,7 +17,7 @@ public:
|
||||
static constexpr KDCoordinate k_margin = Metric::CommonSmallMargin;
|
||||
ScrollableThreeExpressionsView(Responder * parentResponder) : Shared::AbstractScrollableMultipleExpressionsView(parentResponder, &m_contentCell), m_contentCell() {
|
||||
setMargins(k_margin, k_margin, k_margin, k_margin); // Left Right margins are already added by TableCell
|
||||
setBackgroundColor(Palette::BackgroundApps);
|
||||
setBackgroundColor(*Palette::BackgroundApps);
|
||||
}
|
||||
void resetMemoization();
|
||||
void setCalculation(Calculation * calculation, bool canChangeDisplayOutput);
|
||||
@@ -28,7 +28,7 @@ private:
|
||||
class ContentCell : public Shared::AbstractScrollableMultipleExpressionsView::ContentCell {
|
||||
public:
|
||||
ContentCell() : m_leftExpressionView() {}
|
||||
KDColor backgroundColor() const override { return Palette::BackgroundApps; }
|
||||
KDColor backgroundColor() const override { return *Palette::BackgroundApps; }
|
||||
void setEven(bool even) override { return; }
|
||||
ExpressionView * leftExpressionView() const override { return const_cast<ExpressionWithEqualSignView *>(&m_leftExpressionView); }
|
||||
private:
|
||||
|
||||
@@ -0,0 +1,312 @@
|
||||
#include "../app.h"
|
||||
#include <apps/global_preferences.h>
|
||||
#include "../../shared/poincare_helpers.h"
|
||||
#include <poincare/layout_helper.h>
|
||||
#include <poincare/code_point_layout.h>
|
||||
#include <poincare/rational.h>
|
||||
#include <poincare/opposite.h>
|
||||
#include <poincare/addition.h>
|
||||
#include <poincare/parenthesis.h>
|
||||
#include <poincare/equal.h>
|
||||
#include <poincare/subtraction.h>
|
||||
#include <poincare/multiplication.h>
|
||||
#include <poincare/division.h>
|
||||
#include <poincare/square_root.h>
|
||||
#include <poincare/symbol.h>
|
||||
#include <poincare/power.h>
|
||||
#include "second_degree_list_controller.h"
|
||||
|
||||
using namespace Poincare;
|
||||
using namespace Shared;
|
||||
|
||||
namespace Calculation {
|
||||
|
||||
void SecondDegreeListController::setExpression(Poincare::Expression e) {
|
||||
ExpressionsListController::setExpression(e);
|
||||
assert(!m_expression.isUninitialized());
|
||||
|
||||
Expression polynomialCoefficients[Expression::k_maxNumberOfPolynomialCoefficients];
|
||||
|
||||
Context * context = App::app()->localContext();
|
||||
Preferences * preferences = Preferences::sharedPreferences();
|
||||
Poincare::ExpressionNode::ReductionContext reductionContext = Poincare::ExpressionNode::ReductionContext(context,
|
||||
preferences->complexFormat(), preferences->angleUnit(),
|
||||
GlobalPreferences::sharedGlobalPreferences()->unitFormat(),
|
||||
ExpressionNode::ReductionTarget::SystemForApproximation,
|
||||
ExpressionNode::SymbolicComputation::ReplaceAllDefinedSymbolsWithDefinition,
|
||||
Poincare::ExpressionNode::UnitConversion::Default);
|
||||
|
||||
PoincareHelpers::Reduce(&m_expression, context, ExpressionNode::ReductionTarget::SystemForAnalysis);
|
||||
|
||||
int degree = m_expression.getPolynomialReducedCoefficients(
|
||||
"x",
|
||||
polynomialCoefficients,
|
||||
context,
|
||||
Expression::UpdatedComplexFormatWithExpressionInput(preferences->complexFormat(), m_expression, context),
|
||||
preferences->angleUnit(),
|
||||
GlobalPreferences::sharedGlobalPreferences()->unitFormat(),
|
||||
ExpressionNode::SymbolicComputation::ReplaceAllDefinedSymbolsWithDefinition);
|
||||
|
||||
assert(degree == 2);
|
||||
|
||||
Expression a = polynomialCoefficients[2];
|
||||
Expression b = polynomialCoefficients[1];
|
||||
Expression c = polynomialCoefficients[0];
|
||||
|
||||
Expression delta = Subtraction::Builder(Power::Builder(b.clone(), Rational::Builder(2)), Multiplication::Builder(Rational::Builder(4), a.clone(), c.clone()));
|
||||
PoincareHelpers::Simplify(&delta, context, ExpressionNode::ReductionTarget::SystemForApproximation);
|
||||
|
||||
// Alpha is -b/2a, but because after we use -α, we immediately store -α=-(-b/2a)=b/2a.
|
||||
Expression minusAlpha = Division::Builder(b.clone(), Multiplication::Builder(Rational::Builder(2), a.clone()));
|
||||
PoincareHelpers::Reduce(&minusAlpha, context, ExpressionNode::ReductionTarget::SystemForApproximation);
|
||||
|
||||
// Same thing for β
|
||||
Expression minusBeta = Division::Builder(delta.clone(), Multiplication::Builder(Rational::Builder(4), a.clone()));
|
||||
PoincareHelpers::Reduce(&minusBeta, context, ExpressionNode::ReductionTarget::SystemForApproximation);
|
||||
|
||||
enum MultiplicationTypeForA {
|
||||
Nothing,
|
||||
Minus,
|
||||
Parenthesis,
|
||||
Normal
|
||||
};
|
||||
|
||||
MultiplicationTypeForA multiplicationTypeForA;
|
||||
|
||||
if (a.type() == ExpressionNode::Type::Rational && static_cast<const Rational &>(a).isOne()) {
|
||||
multiplicationTypeForA = MultiplicationTypeForA::Nothing;
|
||||
}
|
||||
else if(a.type() == ExpressionNode::Type::Rational && static_cast<const Rational &>(a).isMinusOne()){
|
||||
multiplicationTypeForA = MultiplicationTypeForA::Minus;
|
||||
}
|
||||
else if (a.type() == ExpressionNode::Type::Addition) {
|
||||
multiplicationTypeForA = MultiplicationTypeForA::Parenthesis;
|
||||
}
|
||||
else {
|
||||
multiplicationTypeForA = MultiplicationTypeForA::Normal;
|
||||
}
|
||||
|
||||
PoincareHelpers::Simplify(&a, context, ExpressionNode::ReductionTarget::User);
|
||||
|
||||
/*
|
||||
* Because when can't apply reduce or simplify to keep the
|
||||
* canonized form we must beautify the expression manually
|
||||
*/
|
||||
|
||||
Expression xMinusAlphaPowerTwo;
|
||||
Expression alpha = getOppositeIfExists(minusAlpha, &reductionContext);
|
||||
|
||||
if (alpha.isUninitialized()) {
|
||||
PoincareHelpers::Simplify(&minusAlpha, context, ExpressionNode::ReductionTarget::User);
|
||||
xMinusAlphaPowerTwo = Power::Builder(Parenthesis::Builder(Addition::Builder(Symbol::Builder("x", strlen("x")), minusAlpha)), Rational::Builder(2));
|
||||
}
|
||||
else {
|
||||
PoincareHelpers::Simplify(&alpha, context, ExpressionNode::ReductionTarget::User);
|
||||
xMinusAlphaPowerTwo = Power::Builder(Parenthesis::Builder(Subtraction::Builder(Symbol::Builder("x", strlen("x")), alpha)), Rational::Builder(2));
|
||||
}
|
||||
|
||||
Expression xMinusAlphaPowerTwoWithFactor;
|
||||
|
||||
switch (multiplicationTypeForA)
|
||||
{
|
||||
case MultiplicationTypeForA::Nothing:
|
||||
xMinusAlphaPowerTwoWithFactor = xMinusAlphaPowerTwo;
|
||||
break;
|
||||
case MultiplicationTypeForA::Minus:
|
||||
xMinusAlphaPowerTwoWithFactor = Multiplication::Builder(a.clone(), xMinusAlphaPowerTwo);
|
||||
break;
|
||||
case MultiplicationTypeForA::Parenthesis:
|
||||
xMinusAlphaPowerTwoWithFactor = Multiplication::Builder(Parenthesis::Builder(a.clone()), xMinusAlphaPowerTwo);
|
||||
break;
|
||||
case MultiplicationTypeForA::Normal:
|
||||
xMinusAlphaPowerTwoWithFactor = Multiplication::Builder(a.clone(), xMinusAlphaPowerTwo);
|
||||
break;
|
||||
default:
|
||||
assert(false);
|
||||
break;
|
||||
}
|
||||
|
||||
Expression canonized;
|
||||
Expression beta = getOppositeIfExists(minusBeta, &reductionContext);
|
||||
if (beta.isUninitialized()) {
|
||||
PoincareHelpers::Simplify(&minusBeta, context, ExpressionNode::ReductionTarget::User);
|
||||
canonized = Subtraction::Builder(xMinusAlphaPowerTwoWithFactor, minusBeta);
|
||||
}
|
||||
else {
|
||||
PoincareHelpers::Simplify(&beta, context, ExpressionNode::ReductionTarget::User);
|
||||
canonized = Addition::Builder(xMinusAlphaPowerTwoWithFactor, beta);
|
||||
}
|
||||
|
||||
Expression x0;
|
||||
Expression x1;
|
||||
|
||||
if (delta.nullStatus(context) == ExpressionNode::NullStatus::Null) {
|
||||
// x0 = x1 = -b/(2a)
|
||||
x0 = Division::Builder(Opposite::Builder(b.clone()), Multiplication::Builder(Rational::Builder(2), a.clone()));
|
||||
m_numberOfSolutions = 1;
|
||||
PoincareHelpers::Simplify(&x0, context, ExpressionNode::ReductionTarget::SystemForApproximation);
|
||||
}
|
||||
else {
|
||||
// x0 = (-b-sqrt(delta))/(2a)
|
||||
x0 = Division::Builder(Subtraction::Builder(Opposite::Builder(b.clone()), SquareRoot::Builder(delta.clone())), Multiplication::Builder(Rational::Builder(2), a.clone()));
|
||||
// x1 = (-b+sqrt(delta))/(2a)
|
||||
x1 = Division::Builder(Addition::Builder(Opposite::Builder(b.clone()), SquareRoot::Builder(delta.clone())), Multiplication::Builder(Rational::Builder(2), a.clone()));
|
||||
m_numberOfSolutions = 2;
|
||||
PoincareHelpers::Simplify(&x0, context, ExpressionNode::ReductionTarget::SystemForApproximation);
|
||||
PoincareHelpers::Simplify(&x1, context, ExpressionNode::ReductionTarget::SystemForApproximation);
|
||||
if (x0.type() == ExpressionNode::Type::Unreal) {
|
||||
assert(x1.type() == ExpressionNode::Type::Unreal);
|
||||
m_numberOfSolutions = 0;
|
||||
}
|
||||
}
|
||||
|
||||
Expression factorized;
|
||||
|
||||
if (m_numberOfSolutions == 2) {
|
||||
Expression firstFactor;
|
||||
Expression secondFactor;
|
||||
|
||||
Expression x0Opposite = getOppositeIfExists(x0, &reductionContext);
|
||||
if (x0Opposite.isUninitialized()) {
|
||||
PoincareHelpers::Simplify(&x0, context, ExpressionNode::ReductionTarget::User);
|
||||
firstFactor = Subtraction::Builder(Symbol::Builder("x", strlen("x")), x0);
|
||||
}
|
||||
else {
|
||||
PoincareHelpers::Simplify(&x0Opposite, context, ExpressionNode::ReductionTarget::User);
|
||||
firstFactor = Addition::Builder(Symbol::Builder("x", strlen("x")), x0Opposite);
|
||||
}
|
||||
if (x0.type() == ExpressionNode::Type::Opposite) {
|
||||
factorized = Parenthesis::Builder(Addition::Builder(Symbol::Builder("x", strlen("x")), x0.childAtIndex(0).clone()));
|
||||
}
|
||||
|
||||
Expression x1Opposite = getOppositeIfExists(x1, &reductionContext);
|
||||
if (x1Opposite.isUninitialized()) {
|
||||
PoincareHelpers::Simplify(&x1, context, ExpressionNode::ReductionTarget::User);
|
||||
secondFactor = Subtraction::Builder(Symbol::Builder("x", strlen("x")), x1);
|
||||
}
|
||||
else {
|
||||
PoincareHelpers::Simplify(&x1Opposite, context, ExpressionNode::ReductionTarget::User);
|
||||
secondFactor = Addition::Builder(Symbol::Builder("x", strlen("x")), x1Opposite);
|
||||
}
|
||||
|
||||
Expression solutionProduct = Multiplication::Builder(Parenthesis::Builder(firstFactor), Parenthesis::Builder(secondFactor));
|
||||
switch (multiplicationTypeForA)
|
||||
{
|
||||
case MultiplicationTypeForA::Nothing:
|
||||
factorized = solutionProduct;
|
||||
break;
|
||||
case MultiplicationTypeForA::Minus:
|
||||
factorized = Multiplication::Builder(a.clone(), solutionProduct);
|
||||
break;
|
||||
case MultiplicationTypeForA::Parenthesis:
|
||||
factorized = Multiplication::Builder(Parenthesis::Builder(a.clone()), solutionProduct);
|
||||
break;
|
||||
case MultiplicationTypeForA::Normal:
|
||||
factorized = Multiplication::Builder(a.clone(), solutionProduct);
|
||||
break;
|
||||
default:
|
||||
assert(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (m_numberOfSolutions == 1) {
|
||||
Expression x0Opposite = getOppositeIfExists(x0, &reductionContext);
|
||||
Expression factor;
|
||||
if (x0Opposite.isUninitialized()) {
|
||||
PoincareHelpers::Simplify(&x0, context, ExpressionNode::ReductionTarget::User);
|
||||
factor = Subtraction::Builder(Symbol::Builder("x", strlen("x")), x0);
|
||||
}
|
||||
else {
|
||||
PoincareHelpers::Simplify(&x0Opposite, context, ExpressionNode::ReductionTarget::User);
|
||||
factor = Addition::Builder(Symbol::Builder("x", strlen("x")), x0Opposite);
|
||||
}
|
||||
Expression solutionProduct = Power::Builder(Parenthesis::Builder(factor), Rational::Builder(2));
|
||||
switch (multiplicationTypeForA)
|
||||
{
|
||||
case MultiplicationTypeForA::Nothing:
|
||||
factorized = solutionProduct;
|
||||
break;
|
||||
case MultiplicationTypeForA::Minus:
|
||||
factorized = Multiplication::Builder(a.clone(), solutionProduct);
|
||||
break;
|
||||
case MultiplicationTypeForA::Parenthesis:
|
||||
factorized = Multiplication::Builder(Parenthesis::Builder(a.clone()), solutionProduct);
|
||||
break;
|
||||
case MultiplicationTypeForA::Normal:
|
||||
factorized = Multiplication::Builder(a.clone(), solutionProduct);
|
||||
break;
|
||||
default:
|
||||
assert(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
PoincareHelpers::Simplify(&delta, context, ExpressionNode::ReductionTarget::User);
|
||||
|
||||
m_layouts[0] = PoincareHelpers::CreateLayout(canonized);
|
||||
if (m_numberOfSolutions > 0) {
|
||||
m_layouts[1] = PoincareHelpers::CreateLayout(factorized);
|
||||
m_layouts[2] = PoincareHelpers::CreateLayout(delta);
|
||||
m_layouts[3] = PoincareHelpers::CreateLayout(x0);
|
||||
if (m_numberOfSolutions > 1) {
|
||||
m_layouts[4] = PoincareHelpers::CreateLayout(x1);
|
||||
}
|
||||
}
|
||||
else {
|
||||
m_layouts[1] = PoincareHelpers::CreateLayout(delta);
|
||||
}
|
||||
}
|
||||
|
||||
Expression SecondDegreeListController::getOppositeIfExists(Expression e, Poincare::ExpressionNode::ReductionContext * reductionContext) {
|
||||
if (e.isNumber() && e.sign(reductionContext->context()) == ExpressionNode::Sign::Negative) {
|
||||
Number n = static_cast<Number&>(e);
|
||||
return std::move(n.setSign(ExpressionNode::Sign::Positive));
|
||||
}
|
||||
else if (e.type() == ExpressionNode::Type::Multiplication && e.numberOfChildren() > 0 && e.childAtIndex(0).isNumber() && e.childAtIndex(0).sign(reductionContext->context()) == ExpressionNode::Sign::Negative) {
|
||||
Multiplication m = static_cast<Multiplication&>(e);
|
||||
if (m.childAtIndex(0).type() == ExpressionNode::Type::Rational && static_cast<Rational&>(e).isMinusOne()) {
|
||||
// The negative numeral factor is -1, we just remove it
|
||||
m.removeChildAtIndexInPlace(0);
|
||||
} else {
|
||||
Expression firstChild = m.childAtIndex(0);
|
||||
Number n = static_cast<Number&>(firstChild);
|
||||
m.childAtIndex(0).setChildrenInPlace(n.setSign(ExpressionNode::Sign::Positive));
|
||||
}
|
||||
PoincareHelpers::Simplify(&m, reductionContext->context(), ExpressionNode::ReductionTarget::User);
|
||||
return std::move(m);
|
||||
}
|
||||
return Expression();
|
||||
}
|
||||
|
||||
I18n::Message SecondDegreeListController::messageAtIndex(int index) {
|
||||
if (m_numberOfSolutions > 0) {
|
||||
if (index == 0) {
|
||||
return I18n::Message::CanonicalForm;
|
||||
}
|
||||
if (index == 1) {
|
||||
return I18n::Message::FactorizedForm;
|
||||
}
|
||||
if (index == 2) {
|
||||
return I18n::Message::Discriminant;
|
||||
}
|
||||
if (index == 3) {
|
||||
if (m_numberOfSolutions == 1) {
|
||||
return I18n::Message::OnlyRoot;
|
||||
}
|
||||
else {
|
||||
return I18n::Message::FirstRoot;
|
||||
}
|
||||
}
|
||||
return I18n::Message::SecondRoot;
|
||||
}
|
||||
else {
|
||||
switch (index) {
|
||||
case 0:
|
||||
return I18n::Message::CanonicalForm;
|
||||
default:
|
||||
return I18n::Message::Discriminant;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
#ifndef CALCULATION_ADDITIONAL_OUTPUTS_SECOND_DEGREE_CONTROLLER_H
|
||||
#define CALCULATION_ADDITIONAL_OUTPUTS_SECOND_DEGREE_CONTROLLER_H
|
||||
|
||||
#include "expressions_list_controller.h"
|
||||
|
||||
namespace Calculation {
|
||||
|
||||
class SecondDegreeListController : public ExpressionsListController {
|
||||
public:
|
||||
SecondDegreeListController(EditExpressionController * editExpressionController) :
|
||||
ExpressionsListController(editExpressionController),
|
||||
m_numberOfSolutions(0) {}
|
||||
|
||||
void setExpression(Poincare::Expression e) override;
|
||||
|
||||
private:
|
||||
Poincare::Expression getOppositeIfExists(Poincare::Expression e, Poincare::ExpressionNode::ReductionContext * reductionContext);
|
||||
I18n::Message messageAtIndex(int index) override;
|
||||
int m_numberOfSolutions;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -15,24 +15,24 @@ TrigonometryGraphView::TrigonometryGraphView(TrigonometryModel * model) :
|
||||
void TrigonometryGraphView::drawRect(KDContext * ctx, KDRect rect) const {
|
||||
float s = std::sin(m_model->angle());
|
||||
float c = std::cos(m_model->angle());
|
||||
ctx->fillRect(rect, Palette::BackgroundApps);
|
||||
ctx->fillRect(rect, *Palette::BackgroundApps);
|
||||
drawGrid(ctx, rect);
|
||||
drawAxes(ctx, rect);
|
||||
// Draw the circle
|
||||
drawCurve(ctx, rect, 0.0f, 2.0f*M_PI, M_PI/180.0f, [](float t, void * model, void * context) {
|
||||
return Poincare::Coordinate2D<float>(std::cos(t), std::sin(t));
|
||||
}, nullptr, nullptr, true, Palette::SecondaryText, false);
|
||||
}, nullptr, nullptr, true, *Palette::SecondaryText, false);
|
||||
// Draw dashed segment to indicate sine and cosine
|
||||
drawHorizontalOrVerticalSegment(ctx, rect, Axis::Vertical, c, 0.0f, s, Palette::CalculationTrigoAndComplexForeground, 1, 3);
|
||||
drawHorizontalOrVerticalSegment(ctx, rect, Axis::Horizontal, s, 0.0f, c, Palette::CalculationTrigoAndComplexForeground, 1, 3);
|
||||
drawHorizontalOrVerticalSegment(ctx, rect, Axis::Vertical, c, 0.0f, s, *Palette::CalculationTrigoAndComplexForeground, 1, 3);
|
||||
drawHorizontalOrVerticalSegment(ctx, rect, Axis::Horizontal, s, 0.0f, c, *Palette::CalculationTrigoAndComplexForeground, 1, 3);
|
||||
// Draw angle position on the circle
|
||||
drawDot(ctx, rect, c, s, Palette::CalculationTrigoAndComplexForeground, Size::Large);
|
||||
drawDot(ctx, rect, c, s, *Palette::CalculationTrigoAndComplexForeground, Size::Large);
|
||||
// Draw graduations
|
||||
drawLabelsAndGraduations(ctx, rect, Axis::Vertical, false, true);
|
||||
drawLabelsAndGraduations(ctx, rect, Axis::Horizontal, false, true);
|
||||
// Draw labels
|
||||
drawLabel(ctx, rect, 0.0f, s, "sin(θ)", Palette::CalculationTrigoAndComplexForeground, c >= 0.0f ? CurveView::RelativePosition::Before : CurveView::RelativePosition::After, CurveView::RelativePosition::None);
|
||||
drawLabel(ctx, rect, c, 0.0f, "cos(θ)", Palette::CalculationTrigoAndComplexForeground, CurveView::RelativePosition::None, s >= 0.0f ? CurveView::RelativePosition::Before : CurveView::RelativePosition::After);
|
||||
drawLabel(ctx, rect, 0.0f, s, "sin(θ)", *Palette::CalculationTrigoAndComplexForeground, c >= 0.0f ? CurveView::RelativePosition::Before : CurveView::RelativePosition::After, CurveView::RelativePosition::None);
|
||||
drawLabel(ctx, rect, c, 0.0f, "cos(θ)", *Palette::CalculationTrigoAndComplexForeground, CurveView::RelativePosition::None, s >= 0.0f ? CurveView::RelativePosition::Before : CurveView::RelativePosition::After);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ bool App::isAcceptableExpression(const Poincare::Expression expression) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return !(expression.isUninitialized() || expression.type() == ExpressionNode::Type::Equal);
|
||||
return !expression.isUninitialized();
|
||||
}
|
||||
|
||||
void App::didBecomeActive(Window * window) {
|
||||
|
||||
@@ -11,4 +11,10 @@ AdditionalDeterminant = "Determinante"
|
||||
AdditionalInverse = "Inverse"
|
||||
AdditionalRowEchelonForm = "Stufenform"
|
||||
AdditionalReducedRowEchelonForm = "Reduzierte Stufenform"
|
||||
AdditionalTrace = "Spur"
|
||||
AdditionalTrace = "Spur"
|
||||
CanonicalForm = "Kanonische Form"
|
||||
FactorizedForm = "Factorisierte Form"
|
||||
Discriminant = "Diskriminante"
|
||||
OnlyRoot = "Wurzel"
|
||||
FirstRoot = "Erste Wurzel"
|
||||
SecondRoot = "Zweite Wurzel"
|
||||
@@ -12,3 +12,9 @@ AdditionalInverse = "Inverse"
|
||||
AdditionalRowEchelonForm = "Row echelon form"
|
||||
AdditionalReducedRowEchelonForm = "Reduced row echelon form"
|
||||
AdditionalTrace = "Trace"
|
||||
CanonicalForm = "Canonical form"
|
||||
FactorizedForm = "Factorized form"
|
||||
Discriminant = "Discriminant"
|
||||
OnlyRoot = "Root"
|
||||
FirstRoot = "First root"
|
||||
SecondRoot = "Second root"
|
||||
@@ -11,4 +11,10 @@ AdditionalDeterminant = "Determinante"
|
||||
AdditionalInverse = "Inversa"
|
||||
AdditionalRowEchelonForm = "Matriz escalonada"
|
||||
AdditionalReducedRowEchelonForm = "Matriz escalonada reducida"
|
||||
AdditionalTrace = "Traza"
|
||||
AdditionalTrace = "Traza"
|
||||
CanonicalForm = "Forma canónica"
|
||||
FactorizedForm = "Forma factorizada"
|
||||
Discriminant = "Discriminante"
|
||||
OnlyRoot = "Raíz"
|
||||
FirstRoot = "Primera raíz"
|
||||
SecondRoot = "Segunda raíz"
|
||||
@@ -11,4 +11,10 @@ AdditionalDeterminant = "Déterminant"
|
||||
AdditionalInverse = "Inverse"
|
||||
AdditionalRowEchelonForm = "Forme échelonnée"
|
||||
AdditionalReducedRowEchelonForm = "Forme échelonnée réduite"
|
||||
AdditionalTrace = "Trace"
|
||||
AdditionalTrace = "Trace"
|
||||
CanonicalForm = "Forme canonique"
|
||||
FactorizedForm = "Forme factorisée"
|
||||
Discriminant = "Discriminant"
|
||||
OnlyRoot = "Racine"
|
||||
FirstRoot = "Première racine"
|
||||
SecondRoot = "Seconde racine"
|
||||
@@ -12,3 +12,9 @@ AdditionalInverse = "inverz"
|
||||
AdditionalRowEchelonForm = "Sor echelon forma"
|
||||
AdditionalReducedRowEchelonForm = "Csökkentett sorú Echelon forma"
|
||||
AdditionalTrace = "Nyomkövetés"
|
||||
CanonicalForm = "Kanonikus forma"
|
||||
FactorizedForm = "Factorizált forma"
|
||||
Discriminant = "Discriminant"
|
||||
OnlyRoot = "Gyökér"
|
||||
FirstRoot = "Első gyökér"
|
||||
SecondRoot = "Második gyökér"
|
||||
@@ -11,4 +11,10 @@ AdditionalDeterminant = "Determinante"
|
||||
AdditionalInverse = "Inversa"
|
||||
AdditionalRowEchelonForm = "Matrice a scalini"
|
||||
AdditionalReducedRowEchelonForm = "Matrice ridotta a scalini"
|
||||
AdditionalTrace = "Traccia"
|
||||
AdditionalTrace = "Traccia"
|
||||
CanonicalForm = "Forma canonica"
|
||||
FactorizedForm = "Forma fattorizzata"
|
||||
Discriminant = "Discriminante"
|
||||
OnlyRoot = "Radice"
|
||||
FirstRoot = "Prima radice"
|
||||
SecondRoot = "Seconda radice"
|
||||
@@ -11,4 +11,10 @@ AdditionalDeterminant = "Determinant"
|
||||
AdditionalInverse = "Inverse"
|
||||
AdditionalRowEchelonForm = "Echelonvorm"
|
||||
AdditionalReducedRowEchelonForm = "Gereduceerde echelonvorm"
|
||||
AdditionalTrace = "Spoor"
|
||||
AdditionalTrace = "Spoor"
|
||||
CanonicalForm = "Canonische vorm"
|
||||
FactorizedForm = "Factorized vorm"
|
||||
Discriminant = "Discriminant"
|
||||
OnlyRoot = "Wortel"
|
||||
FirstRoot = "Eerste wortel"
|
||||
SecondRoot = "Tweede wortel"
|
||||
@@ -11,4 +11,10 @@ AdditionalDeterminant = "Determinante"
|
||||
AdditionalInverse = "Matriz inversa"
|
||||
AdditionalRowEchelonForm = "Matriz escalonada"
|
||||
AdditionalReducedRowEchelonForm = "Matriz escalonada reduzida"
|
||||
AdditionalTrace = "Traço"
|
||||
AdditionalTrace = "Traço"
|
||||
CanonicalForm = "Forma canónica"
|
||||
FactorizedForm = "Factorized form"
|
||||
Discriminant = "Discriminante"
|
||||
OnlyRoot = "Raiz"
|
||||
FirstRoot = "Primeira raiz"
|
||||
SecondRoot = "Segunda raiz"
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <poincare/undefined.h>
|
||||
#include <poincare/unit.h>
|
||||
#include <poincare/unreal.h>
|
||||
#include <poincare/symbol_abstract.h>
|
||||
#include <string.h>
|
||||
#include <cmath>
|
||||
#include <algorithm>
|
||||
@@ -272,6 +273,9 @@ Calculation::AdditionalInformationType Calculation::additionalInformationType(Co
|
||||
if (o.type() == ExpressionNode::Type::Matrix) {
|
||||
return AdditionalInformationType::Matrix;
|
||||
}
|
||||
if (o.polynomialDegree(context, "x") == 2) {
|
||||
return AdditionalInformationType::SecondDegree;
|
||||
}
|
||||
return AdditionalInformationType::None;
|
||||
}
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@ public:
|
||||
None = 0,
|
||||
Integer,
|
||||
Rational,
|
||||
SecondDegree,
|
||||
Trigonometry,
|
||||
Unit,
|
||||
Matrix,
|
||||
|
||||
@@ -16,6 +16,7 @@ HistoryController::HistoryController(EditExpressionController * editExpressionCo
|
||||
m_complexController(editExpressionController),
|
||||
m_integerController(editExpressionController),
|
||||
m_rationalController(editExpressionController),
|
||||
m_secondDegreeController(editExpressionController),
|
||||
m_trigonometryController(editExpressionController),
|
||||
m_unitController(editExpressionController),
|
||||
m_matrixController(editExpressionController)
|
||||
@@ -100,6 +101,8 @@ bool HistoryController::handleEvent(Ion::Events::Event event) {
|
||||
Expression e = calculationAtIndex(focusRow)->exactOutput();
|
||||
if (additionalInfoType == Calculation::AdditionalInformationType::Complex) {
|
||||
vc = &m_complexController;
|
||||
} else if (additionalInfoType == Calculation::AdditionalInformationType::SecondDegree) {
|
||||
vc = &m_secondDegreeController;
|
||||
} else if (additionalInfoType == Calculation::AdditionalInformationType::Trigonometry) {
|
||||
vc = &m_trigonometryController;
|
||||
// Find which of the input or output is the cosine/sine
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "additional_outputs/complex_list_controller.h"
|
||||
#include "additional_outputs/integer_list_controller.h"
|
||||
#include "additional_outputs/rational_list_controller.h"
|
||||
#include "additional_outputs/second_degree_list_controller.h"
|
||||
#include "additional_outputs/trigonometry_list_controller.h"
|
||||
#include "additional_outputs/unit_list_controller.h"
|
||||
#include "additional_outputs/matrix_list_controller.h"
|
||||
@@ -47,6 +48,7 @@ private:
|
||||
ComplexListController m_complexController;
|
||||
IntegerListController m_integerController;
|
||||
RationalListController m_rationalController;
|
||||
SecondDegreeListController m_secondDegreeController;
|
||||
TrigonometryListController m_trigonometryController;
|
||||
UnitListController m_unitController;
|
||||
MatrixListController m_matrixController;
|
||||
|
||||
@@ -81,7 +81,7 @@ void HistoryViewCell::reloadSubviewHighlight() {
|
||||
m_ellipsis.setHighlighted(false);
|
||||
if (isHighlighted()) {
|
||||
if (m_dataSource->selectedSubviewType() == HistoryViewCellDataSource::SubviewType::Input) {
|
||||
m_inputView.setExpressionBackgroundColor(Palette::ListCellBackgroundSelected);
|
||||
m_inputView.setExpressionBackgroundColor(*Palette::Select);
|
||||
} else if (m_dataSource->selectedSubviewType() == HistoryViewCellDataSource::SubviewType::Output) {
|
||||
m_scrollableOutputView.evenOddCell()->setHighlighted(true);
|
||||
} else {
|
||||
|
||||
@@ -49,7 +49,7 @@ public:
|
||||
return this;
|
||||
}
|
||||
Poincare::Layout layout() const override;
|
||||
KDColor backgroundColor() const override { return m_even ? Palette::CalculationBackgroundEven : Palette::CalculationBackgroundOdd; }
|
||||
KDColor backgroundColor() const override { return m_even ? *Palette::CalculationBackgroundEven : *Palette::CalculationBackgroundOdd; }
|
||||
void resetMemoization();
|
||||
void setCalculation(Calculation * calculation, bool expanded, bool canChangeDisplayOutput = false);
|
||||
int numberOfSubviews() const override { return 2 + displayedEllipsis(); }
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
apps += Code::App
|
||||
app_headers += apps/code/app.h
|
||||
|
||||
SFLAGS += -DHAS_CODE
|
||||
|
||||
app_code_src = $(addprefix apps/code/,\
|
||||
app.cpp \
|
||||
console_controller.cpp \
|
||||
@@ -30,6 +32,7 @@ app_code_test_src = $(addprefix apps/code/,\
|
||||
|
||||
tests_src += $(addprefix apps/code/test/,\
|
||||
variable_box_controller.cpp\
|
||||
toolbox_ion_keys_dummy.cpp \
|
||||
)
|
||||
|
||||
app_code_src += $(app_code_test_src)
|
||||
|
||||
@@ -124,10 +124,6 @@ Toolbox * App::toolboxForInputEventHandler(InputEventHandler * textInput) {
|
||||
return &m_toolbox;
|
||||
}
|
||||
|
||||
Code::toolboxIonKeys * App::toolboxIonKeys() {
|
||||
return &m_toolboxIonKeys;
|
||||
}
|
||||
|
||||
VariableBoxController * App::variableBoxForInputEventHandler(InputEventHandler * textInput) {
|
||||
return &m_variableBoxController;
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
#include "python_toolbox.h"
|
||||
#include "variable_box_controller.h"
|
||||
#include "../shared/shared_app.h"
|
||||
#include "toolbox_ion_keys.h"
|
||||
|
||||
namespace Code {
|
||||
|
||||
@@ -76,9 +75,7 @@ public:
|
||||
|
||||
VariableBoxController * variableBoxController() { return &m_variableBoxController; }
|
||||
|
||||
static constexpr int k_pythonHeapSize = 100000;
|
||||
|
||||
Code::toolboxIonKeys * toolboxIonKeys();
|
||||
static constexpr int k_pythonHeapSize = 67000;
|
||||
|
||||
private:
|
||||
/* Python delegate:
|
||||
@@ -96,7 +93,6 @@ private:
|
||||
StackViewController m_codeStackViewController;
|
||||
PythonToolbox m_toolbox;
|
||||
VariableBoxController m_variableBoxController;
|
||||
Code::toolboxIonKeys m_toolboxIonKeys;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
AddScript = "Skript hinzufügen"
|
||||
AllowedCharactersaz09 = "Erlaubte Zeichen: a-z, 0-9, _"
|
||||
Autocomplete = "Autovervollständigung"
|
||||
AutoImportScript = "Automatischer Import in Konsole"
|
||||
BuiltinsAndKeywords = "Native Funktionen und Schlüsselwörter"
|
||||
AutoImportScript = "Automatischer Import in die Konsole"
|
||||
BuiltinsAndKeywords = "Native Funktionen & Schlüsselwörter"
|
||||
Console = "Interaktive Konsole"
|
||||
DeleteScript = "Skript löschen"
|
||||
DuplicateScript = "Skript duplizieren"
|
||||
ExecuteScript = "Skript ausführen"
|
||||
FunctionsAndVariables = "Funktionen und Variablen"
|
||||
ImportedModulesAndScripts = "Importierte Module und Skripte"
|
||||
NoWordAvailableHere = "Kein Wort ist hier verfübar."
|
||||
ScriptInProgress = "Aktuelle Skript"
|
||||
NoWordAvailableHere = "Hier ist kein Wort verfügbar."
|
||||
ScriptInProgress = "Aktuelles Skript"
|
||||
ScriptOptions = "Skriptoptionen"
|
||||
ScriptSize = "Script size"
|
||||
ScriptSize = "Skriptgröße"
|
||||
|
||||
@@ -3,175 +3,208 @@ PythonPercent = "Modulo"
|
||||
Python1J = "Imaginäres i"
|
||||
PythonLF = "Zeilenvorschub"
|
||||
PythonTab = "Tabulator"
|
||||
PythonAmpersand = "Bitweise und"
|
||||
PythonSymbolExp = "Bitweise exklusiv oder"
|
||||
PythonVerticalBar = "Bitweise oder"
|
||||
PythonAmpersand = "Bitweises und"
|
||||
PythonSymbolExp = "Bitweises exklusives oder"
|
||||
PythonVerticalBar = "Bitweises oder"
|
||||
PythonImag = "Imaginärteil von z"
|
||||
PythonReal = "Realteil von z"
|
||||
PythonSingleQuote = "Einfaches Anführungszeichen"
|
||||
PythonAbs = "Absolute/r Wert/Größe"
|
||||
PythonAcos = "Arkuskosinus"
|
||||
PythonAcosh = "Hyperbelkosinus"
|
||||
PythonAppend = "Hängt x an das Ende der Liste"
|
||||
PythonArrow = "Arrow from (x,y) to (x+dx,y+dy)"
|
||||
PythonAsin = "Arkussinus"
|
||||
PythonAsinh = "Hyperbelsinus"
|
||||
PythonAbs = "Absoluter Wert/Absolute Größe"
|
||||
PythonAcos = "Bogenkosinus"
|
||||
PythonAcosh = "Bogenhyperbolischer Kosinus"
|
||||
PythonAppend = "x an das Ende der Liste anfügen"
|
||||
PythonArrow = "Pfeil von (x,y) nach (x+dx,y+dy)"
|
||||
PythonAsin = "Sinusbogen"
|
||||
PythonAsinh = "Kreisbogen hyperbolischer Sinus"
|
||||
PythonAtan = "Arkustangens"
|
||||
PythonAtan2 = "Gib atan(y/x)"
|
||||
PythonAtan2 = "Rückgabe atan(y/x)"
|
||||
PythonAtanh = "Hyperbeltangens"
|
||||
PythonAxis = "Set axes to (xmin,xmax,ymin,ymax)"
|
||||
PythonBar = "Draw a bar plot with x values"
|
||||
PythonBin = "Ganzzahl nach binär konvertieren"
|
||||
PythonCeil = "Aufrundung"
|
||||
PythonChoice = "Zufallszahl aus der Liste"
|
||||
PythonClear = "Leere die Liste"
|
||||
PythonAxis = "Achsen auf (xmin,xmax,ymin,ymax)"
|
||||
PythonBar = "Balkendiagramm mit x-Werten"
|
||||
PythonBin = "Ganzzahl in Binärwert umwandeln"
|
||||
PythonCeil = "Aufrunden"
|
||||
PythonChoice = "Zufällige Zahl in der Liste"
|
||||
PythonClear = "Liste leeren"
|
||||
PythonCmathFunction = "cmath-Modul-Funktionspräfix"
|
||||
PythonColor = "Definiere eine RGB-Farbe"
|
||||
PythonColorBlack = "Black color"
|
||||
PythonColorBlue = "Blue color"
|
||||
PythonColorBrown = "Brown color"
|
||||
PythonColorGray = "Gray color"
|
||||
PythonColorGreen = "Green color"
|
||||
PythonColorOrange = "Orange color"
|
||||
PythonColorPink = "Pink color"
|
||||
PythonColorPurple = "Purple color"
|
||||
PythonColorRed = "Red color"
|
||||
PythonColorWhite = "White color"
|
||||
PythonColorYellow = "Yellow color"
|
||||
PythonComplex = "a+ib zurückgeben"
|
||||
PythonCopySign = "x mit dem Vorzeichen von y"
|
||||
PythonColor = "Eine RGB-Farbe definieren"
|
||||
PythonColorBlack = "Farbe Schwarz"
|
||||
PythonColorBlue = "Farbe Blau"
|
||||
PythonColorBrown = "Farbe Braun"
|
||||
PythonColorGray = "Farbe Grau"
|
||||
PythonColorGreen = "Farbe Grün"
|
||||
PythonColorOrange = "Farbe Orange"
|
||||
PythonColorPink = "Farbe Rosa"
|
||||
PythonColorPurple = "Farbe Violett"
|
||||
PythonColorRed = "Farbe Rot"
|
||||
PythonColorWhite = "Farbe Weiß"
|
||||
PythonColorYellow = "Farbe Gelb"
|
||||
PythonComplex = "Gib a+ib zurück"
|
||||
PythonCopySign = "Gib x mit Vorzeichen von y zurück"
|
||||
PythonCos = "Kosinus"
|
||||
PythonCosh = "Hyperbolic cosine"
|
||||
PythonCount = "Zählt wie oft x vorkommt"
|
||||
PythonDegrees = "x von Radian zu Grad umwandeln"
|
||||
PythonCosh = "Hyperbolischer Kosinus"
|
||||
PythonCount = "Zählt die Vorkommen von x"
|
||||
PythonDegrees = "x von Bogenmaß in Grad umrechnen"
|
||||
PythonDivMod = "Quotient und Rest"
|
||||
PythonDrawLine = "Draw a line"
|
||||
PythonDrawString = "Schreibt Text bei (x,y)"
|
||||
PythonDrawCircle = "Zeichne einen Kreis"
|
||||
PythonDrawLine = "Eine Linie zeichnen"
|
||||
PythonDrawString = "Text bei Pixel (x,y) darstellen"
|
||||
PythonErf = "Fehlerfunktion"
|
||||
PythonErfc = "Complementary error function"
|
||||
PythonEval = "Return the evaluated expression"
|
||||
PythonErfc = "Komplementäre Fehlerfunktion"
|
||||
PythonEval = "Rückgabe ausgewerteter Ausdruck"
|
||||
PythonExp = "Exponentialfunktion"
|
||||
PythonExpm1 = "Berechne exp(x)-1"
|
||||
PythonFabs = "Absoluter Wert"
|
||||
PythonFillRect = "Malt ein Rechteck bei Pixel (x,y)"
|
||||
PythonFloat = "Wandelt x zu float um"
|
||||
PythonFloor = "Floor"
|
||||
PythonFillRect = "Gefülltes Rechteck bei Pixel (x,y)"
|
||||
PythonFillCircle = "Füllt einen Kreis"
|
||||
PythonFillPolygon = "Füllt ein Polygon"
|
||||
PythonFloat = "x in einen Fließkommawert umwandeln"
|
||||
PythonFloor = "Abrunden"
|
||||
PythonFmod = "a modulo b"
|
||||
PythonFrExp = "Mantissa and exponent of x: (m,e)"
|
||||
PythonGamma = "Gamma function"
|
||||
PythonGetPixel = "Return pixel (x,y) color"
|
||||
PythonGetrandbits = "Integer with k random bits"
|
||||
PythonGrid = "Toggle the visibility of the grid"
|
||||
PythonHex = "Ganzzahl zu Hexadecimal"
|
||||
PythonHist = "Draw the histogram of x"
|
||||
PythonImportCmath = "cmath Modul importieren"
|
||||
PythonImportIon = "ion Modul importieren"
|
||||
PythonImportKandinsky = "kandinsky Modul importieren"
|
||||
PythonImportRandom = "random Modul importieren"
|
||||
PythonImportMath = "math Modul importieren"
|
||||
PythonImportMatplotlibPyplot = "Import matplotlib.pyplot module"
|
||||
PythonImportOs = "os Modul importieren"
|
||||
PythonOsUname = "Informieren Sie sich über das System"
|
||||
PythonFrExp = "Mantisse und Exponent von x: (m,e)"
|
||||
PythonGamma = "Gamma-Funktion"
|
||||
PythonGetKeys = "Gedrückte Tasten erhalten"
|
||||
PythonGetPalette = "Themenpalette erhalten"
|
||||
PythonGetPixel = "Farbe von Pixel (x,y) zurückgeben"
|
||||
PythonGetrandbits = "Ganzzahl mit k Zufallsbits"
|
||||
PythonGrid = "Sichtbarkeit des Gitters umschalten"
|
||||
PythonHex = "Ganzzahl in Hexadezimal umwandeln"
|
||||
PythonHist = "Zeichnet das Histogramm von x"
|
||||
PythonImportCmath = "cmath-Modul importieren"
|
||||
PythonImportIon = "Ion-Modul importieren"
|
||||
PythonImportKandinsky = "Kandinsky-Modul importieren"
|
||||
PythonImportRandom = "Random-Modul importieren"
|
||||
PythonImportMath = "Math-Modul importieren"
|
||||
PythonImportMatplotlibPyplot = "Matplotlib.pyplot-Modul importieren"
|
||||
PythonImportNumpy = "Ulab.numpy-Modul importieren"
|
||||
PythonImportScipy = "Ulab.scipy-Modul importieren"
|
||||
PythonImportOs = "OS-Modul importieren"
|
||||
PythonImportSys = "SYS-Modul importieren"
|
||||
PythonOsUname = "Informationen über das System holen"
|
||||
PythonOsGetlogin = "Benutzernamen holen"
|
||||
PythonOsRemove = "Datei namens Dateiname entfernen"
|
||||
PythonOsRename = "Datei mit altem Namen in neuen Namen umbenennen"
|
||||
PythonOsRename = "Datei umbenennen von Alt nach Neu"
|
||||
PythonOsListdir = "Dateien im Speicher auflisten"
|
||||
PythonImportTime = "time Modul importieren"
|
||||
PythonImportTurtle = "turtle Modul importieren"
|
||||
PythonIndex = "Index, bei dem x zuerst vorkommt"
|
||||
PythonInput = "Eingabeaufforderung"
|
||||
PythonInsert = "x bei index i in der Liste einsetzen"
|
||||
PythonInt = "x zu Ganzzahl"
|
||||
PythonIonFunction = "ion module function prefix"
|
||||
PythonIsFinite = "Prüft ob x endlich ist"
|
||||
PythonIsInfinite = "Prüft ob x unendlich ist"
|
||||
PythonIsNaN = "Prüft ob x NaN ist"
|
||||
PythonIsKeyDown = "true wenn k gedrückt ist"
|
||||
PythonKandinskyFunction = "kandinsky module function prefix"
|
||||
PythonLdexp = "Return x*(2**i), inverse of frexp"
|
||||
PythonLength = "Length of an object"
|
||||
PythonLgamma = "Log-gamma function"
|
||||
PythonLog = "Logarithm to base a"
|
||||
PythonLog10 = "Logarithm to base 10"
|
||||
PythonLog2 = "Logarithm to base 2"
|
||||
PythonMathFunction = "math module function prefix"
|
||||
PythonMatplotlibPyplotFunction = "matplotlib.pyplot module prefix"
|
||||
PythonSysExit = "Terminate current program"
|
||||
PythonSysPrintexception = "Print exception"
|
||||
PythonSysByteorder = "The byte order of the system"
|
||||
PythonSysImplementation = "Information about Python"
|
||||
PythonSysModules = "Dictionary of loaded modules"
|
||||
PythonSysVersion = "Python language version (string)"
|
||||
PythonSysVersioninfo = "Python language version (tuple)"
|
||||
PythonImportTime = "Time-Modul importieren"
|
||||
PythonImportTurtle = "Turtle-Modul importieren"
|
||||
PythonIndex = "Index des ersten x-Vorkommens"
|
||||
PythonInput = "Einen Wert abfragen"
|
||||
PythonInsert = "x an Index i in die Liste einfügen"
|
||||
PythonInt = "x in eine ganze Zahl umwandeln"
|
||||
PythonIonFunction = "Ion-Modul-Funktionspräfix"
|
||||
PythonIsFinite = "Prüfen, ob x endlich ist"
|
||||
PythonIsInfinite = "Prüfen, ob x unendlich ist"
|
||||
PythonIsNaN = "Prüfen, ob x keine Zahl ist"
|
||||
PythonIsKeyDown = "Wahr, wenn die Taste k gedrückt ist"
|
||||
PythonBattery = "Return battery voltage"
|
||||
PythonBatteryLevel = "Return battery level"
|
||||
PythonBatteryIscharging = "Return if battery is charging"
|
||||
PythonKandinskyFunction = "Kandinsky-Modul Funktionspräfix"
|
||||
PythonLdexp = "Liefert x*(2**i), Inverse von frexp"
|
||||
PythonLength = "Länge eines Objekts"
|
||||
PythonLgamma = "Log-Gamma-Funktion"
|
||||
PythonLog = "Logarithmus zur Basis a"
|
||||
PythonLog10 = "Logarithmus zur Basis 10"
|
||||
PythonLog2 = "Logarithmus zur Basis 2"
|
||||
PythonMathFunction = "Funktionspräfix des Math-Moduls"
|
||||
PythonMatplotlibPyplotFunction = "matplotlib.pyplot Modul-Präfix"
|
||||
PythonMax = "Maximum"
|
||||
PythonMin = "Minimum"
|
||||
PythonModf = "Fractional and integer parts of x"
|
||||
PythonMonotonic = "Value of a monotonic clock"
|
||||
PythonOct = "Convert integer to octal"
|
||||
PythonPhase = "Phase of z"
|
||||
PythonPlot = "Plot y versus x as lines"
|
||||
PythonPolar = "z in polar coordinates"
|
||||
PythonPop = "Remove and return the last item"
|
||||
PythonPower = "x raised to the power y"
|
||||
PythonPrint = "Print object"
|
||||
PythonRadians = "Convert x from degrees to radians"
|
||||
PythonRandint = "Random integer in [a,b]"
|
||||
PythonRandom = "Floating point number in [0,1["
|
||||
PythonRandomFunction = "random module function prefix"
|
||||
PythonRandrange = "Random number in range(start,stop)"
|
||||
PythonRangeStartStop = "List from start to stop-1"
|
||||
PythonRangeStop = "List from 0 to stop-1"
|
||||
PythonRect = "Convert to cartesian coordinates"
|
||||
PythonRemove = "Remove the first occurrence of x"
|
||||
PythonReverse = "Reverse the elements of the list"
|
||||
PythonRound = "Round to n digits"
|
||||
PythonScatter = "Draw a scatter plot of y versus x"
|
||||
PythonSeed = "Initialize random number generator"
|
||||
PythonSetPixel = "Color pixel (x,y)"
|
||||
PythonShow = "Display the figure"
|
||||
PythonSin = "Sine"
|
||||
PythonSinh = "Hyperbolic sine"
|
||||
PythonSleep = "Suspend the execution for t seconds"
|
||||
PythonSort = "Sort the list"
|
||||
PythonSqrt = "Wurzel"
|
||||
PythonSum = "Sum the items of a list"
|
||||
PythonModf = "Bruch- und Ganzzahl-Anteile von x"
|
||||
PythonMonotonic = "Wert einer monotonen Uhr"
|
||||
PythonNumpyFunction = "numpy Modul-Präfix"
|
||||
PythonNumpyFftFunction = "numpy.fft Modul-Präfix"
|
||||
PythonNumpyLinalgFunction = "numpy.linalg Modul-Präfix"
|
||||
PythonScipyFunction = "scipy Modul-Präfix"
|
||||
PythonScipyLinalgFunction = "scipy.linalg Modul-Präfix"
|
||||
PythonScipyOptimizeFunction = "scipy.optimize Modul-Präfix"
|
||||
PythonScipySignalFunction = "scipy.signal Modul-Präfix"
|
||||
PythonScipySpecialFunction = "scipy.special Modul-Präfix"
|
||||
PythonOct = "Ganzzahl in Oktal umwandeln"
|
||||
PythonPhase = "Phase von z"
|
||||
PythonPlot = "Plotten von y gegen x als Linien"
|
||||
PythonPolar = "z in Polarkoordinaten"
|
||||
PythonPop = "Letztes Element abnehmen"
|
||||
PythonPower = "x erhöht mit der Potenz y"
|
||||
PythonPrint = "Objekt drucken"
|
||||
PythonRadians = "x von Grad in Bogenmaß umrechnen"
|
||||
PythonRandint = "Zufällige Ganzzahl in [a,b]"
|
||||
PythonRandom = "Fließkommazahl in [0,1]"
|
||||
PythonRandomFunction = "Random-Modul Funktionspräfix"
|
||||
PythonRandrange = "Zufallszahl im Bereich(start,stop)"
|
||||
PythonRangeStartStop = "Liste von Start bis Stop-1"
|
||||
PythonRangeStop = "Liste von 0 bis Stop-1"
|
||||
PythonRect = "In kartesische Koordinaten"
|
||||
PythonRemove = "Entferne das erste Vorkommen von x"
|
||||
PythonReverse = "Kehrt die Elemente der Liste um"
|
||||
PythonRound = "Runden auf n Stellen"
|
||||
PythonScatter = "Streudiagramm von y gg. x zeichnen"
|
||||
PythonSeed = "Zufallszahlengenerator initiieren"
|
||||
PythonSetPixel = "Pixel (x,y) einfärben"
|
||||
PythonShow = "Figur anzeigen"
|
||||
PythonSin = "Sinus"
|
||||
PythonSinh = "Hyperbolischer Sinus"
|
||||
PythonSleep = "Ausführung aussetzen für t Sekunden"
|
||||
PythonLocalTime = "Zeit in Tupel umwandeln"
|
||||
PythonMktime = "Tupel in Zeit umwandeln"
|
||||
PythonTime = "Abrufen des aktuellen Zeitstempels"
|
||||
PythonSetLocaltime = "Zeit aus einem Tupel einstellen"
|
||||
PythonRTCmode = "Aktuellen RTC-Modus abrufen"
|
||||
PythonSetRTCmode = "RTC-Modus festlegen"
|
||||
PythonSort = "Die Liste sortieren"
|
||||
PythonSqrt = "Quadratwurzel"
|
||||
PythonSum = "Summe der Elemente einer Liste"
|
||||
PythonTan = "Tangens"
|
||||
PythonTanh = "Hyperbolic tangent"
|
||||
PythonText = "Display a text at (x,y) coordinates"
|
||||
PythonTimeFunction = "time module function prefix"
|
||||
PythonTrunc = "x truncated to an integer"
|
||||
PythonTurtleBackward = "Move backward by x pixels"
|
||||
PythonTurtleCircle = "Circle of radius r pixels"
|
||||
PythonTurtleColor = "Stiftfarbe setzen"
|
||||
PythonTurtleColorMode = "Set the color mode to 1.0 or 255"
|
||||
PythonTurtleForward = "Move forward by x pixels"
|
||||
PythonTurtleFunction = "turtle module function prefix"
|
||||
PythonTurtleGoto = "Move to (x,y) coordinates"
|
||||
PythonTurtleHeading = "Return the current heading"
|
||||
PythonTurtleHideturtle = "Hide the turtle"
|
||||
PythonTurtleIsdown = "Return True if the pen is down"
|
||||
PythonTurtleLeft = "Turn left by a degrees"
|
||||
PythonTurtlePendown = "Pull the pen down"
|
||||
PythonTurtlePensize = "Set the line thickness to x pixels"
|
||||
PythonTurtlePenup = "Pull the pen up"
|
||||
PythonTurtlePosition = "Return the current (x,y) location"
|
||||
PythonTurtleReset = "Reset the drawing"
|
||||
PythonTurtleRight = "Turn right by a degrees"
|
||||
PythonTurtleSetheading = "Set the orientation to a degrees"
|
||||
PythonTurtleSetposition = "Positionne la tortue"
|
||||
PythonTurtleShowturtle = "Show the turtle"
|
||||
PythonTurtleSpeed = "Drawing speed between 0 and 10"
|
||||
PythonTurtleWrite = "Display a text"
|
||||
PythonUniform = "Floating point number in [a,b]"
|
||||
PythonImportTime = "Import time module"
|
||||
PythonTimePrefix = "time module function prefix"
|
||||
PythonTimeSleep = "Wait for n second"
|
||||
PythonMonotonic = "Return monotonic time"
|
||||
PythonTanh = "Hyperbolischer Tangens"
|
||||
PythonText = "Text an (x,y) Koordinaten anzeigen"
|
||||
PythonTimeFunction = "Time-Modul-Funktionspräfix"
|
||||
PythonTrunc = "x abgeschnitten auf eine ganze Zahl"
|
||||
PythonTurtleBackward = "Um x Pixel rückwärts bewegen"
|
||||
PythonTurtleCircle = "Kreis mit Radius r Pixel"
|
||||
PythonTurtleColor = "Setzt die Stiftfarbe"
|
||||
PythonTurtleColorMode = "Setzt Farbmodus auf 1.0 oder 255"
|
||||
PythonTurtleForward = "Um x Pixel vorwärts bewegen"
|
||||
PythonTurtleFunction = "Turtle-Modul-Funktionspräfix"
|
||||
PythonTurtleGoto = "Bewegen zu (x,y) Koordinaten"
|
||||
PythonTurtleHeading = "Liefert den aktuellen Kurs"
|
||||
PythonTurtleHideturtle = "Versteckt den Igel"
|
||||
PythonTurtleIsdown = "Wahr, wenn der Stift unten ist"
|
||||
PythonTurtleLeft = "Nach links um ein Grad drehen"
|
||||
PythonTurtlePendown = "Den Stift nach unten ziehen"
|
||||
PythonTurtlePensize = "Linienstärke auf x Pixel setzen"
|
||||
PythonTurtlePenup = "Den Stift nach oben ziehen"
|
||||
PythonTurtlePosition = "Aktuelle (x,y) Position zurückgeben"
|
||||
PythonTurtleReset = "Die Zeichnung zurücksetzen"
|
||||
PythonTurtleRight = "Um ein Grad nach rechts drehen"
|
||||
PythonTurtleSetheading = "Ausrichtung auf einen Grad setzen"
|
||||
PythonTurtleSetposition = "Den Igel auf Position setzen"
|
||||
PythonTurtleShowturtle = "Den Igel anzeigen"
|
||||
PythonTurtleSpeed = "Zeichengeschwindigkeit von 0 bis 10"
|
||||
PythonTurtleWrite = "Einen Text anzeigen"
|
||||
PythonUniform = "Fließkommazahl in [a,b]"
|
||||
PythonImportTime = "Time-Modul importieren"
|
||||
PythonTimePrefix = "Zeitmodul-Funktionspräfix"
|
||||
PythonTimeSleep = "Warte für n Sekunden"
|
||||
PythonMonotonic = "Monotone Zeit zurückgeben"
|
||||
PythonFileOpen = "Öffnet eine Datei"
|
||||
PythonFileSeekable = "Ist eine Datei durchsuchbar?"
|
||||
PythonFileSeek = "Dateicursor verschieben"
|
||||
PythonFileTell = "Cursorposition der Datei abrufen"
|
||||
PythonFileSeekable = "Kann Datei durchsucht werden?"
|
||||
PythonFileSeek = "Bewegt den Cursor einer Datei"
|
||||
PythonFileTell = "Position des Cursors ermitteln"
|
||||
PythonFileClose = "Schließt eine Datei"
|
||||
PythonFileClosed = "Wenn Datei geschlossen wurde"
|
||||
PythonFileRead = "Bis zu size Bytes lesen"
|
||||
PythonFileWrite = "Schreibe b in die Datei"
|
||||
PythonFileReadline = "Lies eine Zeile"
|
||||
PythonFileClosed = "Wahr, wenn Datei geschlossen wurde"
|
||||
PythonFileRead = "Lesen bis zu einer Größe von Bytes"
|
||||
PythonFileWrite = "Schreibe b in Datei"
|
||||
PythonFileReadline = "Liest Zeile oder Anzahl Bytes"
|
||||
PythonFileReadlines = "Liest eine Liste von Zeilen"
|
||||
PythonFileTruncate = "Größe der Datei ändern"
|
||||
PythonFileTruncate = "Verkleinert die Datei auf Größe"
|
||||
PythonFileWritelines = "Schreibt eine Liste von Zeilen"
|
||||
PythonFileName = "Dateiname"
|
||||
PythonFileMode = "Dateiöffnungsmodus"
|
||||
PythonFileReadable = "Ist die Datei lesbar?"
|
||||
PythonFileWritable = "Ist die Datei beschreibbar?"
|
||||
PythonFileName = "Enthält den Namen der Datei"
|
||||
PythonFileMode = "Enthält den Öffnungsmodus der Datei"
|
||||
PythonFileReadable = "Kann Datei gelesen werden?"
|
||||
PythonFileWritable = "Kann Datei geschrieben werden?"
|
||||
|
||||
@@ -45,6 +45,7 @@ PythonCosh = "Hyperbolic cosine"
|
||||
PythonCount = "Count the occurrences of x"
|
||||
PythonDegrees = "Convert x from radians to degrees"
|
||||
PythonDivMod = "Quotient and remainder"
|
||||
PythonDrawCircle = "Draw a circle"
|
||||
PythonDrawLine = "Draw a line"
|
||||
PythonDrawString = "Display a text from pixel (x,y)"
|
||||
PythonErf = "Error function"
|
||||
@@ -53,12 +54,16 @@ PythonEval = "Return the evaluated expression"
|
||||
PythonExp = "Exponential function"
|
||||
PythonExpm1 = "Compute exp(x)-1"
|
||||
PythonFabs = "Absolute value"
|
||||
PythonFillCircle = "Fill a circle"
|
||||
PythonFillPolygon = "Fill a polygon"
|
||||
PythonFillRect = "Fill a rectangle at pixel (x,y)"
|
||||
PythonFloat = "Convert x to a float"
|
||||
PythonFloor = "Floor"
|
||||
PythonFmod = "a modulo b"
|
||||
PythonFrExp = "Mantissa and exponent of x: (m,e)"
|
||||
PythonGamma = "Gamma function"
|
||||
PythonGetKeys = "Get keys pressed"
|
||||
PythonGetPalette = "Get theme palette"
|
||||
PythonGetPixel = "Return pixel (x,y) color"
|
||||
PythonGetrandbits = "Integer with k random bits"
|
||||
PythonGrid = "Toggle the visibility of the grid"
|
||||
@@ -70,6 +75,8 @@ PythonImportKandinsky = "Import kandinsky module"
|
||||
PythonImportRandom = "Import random module"
|
||||
PythonImportMath = "Import math module"
|
||||
PythonImportMatplotlibPyplot = "Import matplotlib.pyplot module"
|
||||
PythonImportNumpy = "Import ulab.numpy module"
|
||||
PythonImportScipy = "Import ulab.scipy module"
|
||||
PythonImportTime = "Import time module"
|
||||
PythonImportTurtle = "Import turtle module"
|
||||
PythonIndex = "Index of the first x occurrence"
|
||||
@@ -80,6 +87,9 @@ PythonIonFunction = "ion module function prefix"
|
||||
PythonIsFinite = "Check if x is finite"
|
||||
PythonIsInfinite = "Check if x is infinity"
|
||||
PythonIsKeyDown = "Return True if the k key is down"
|
||||
PythonBattery = "Return battery voltage"
|
||||
PythonBatteryLevel = "Return battery level"
|
||||
PythonBatteryIscharging = "Return if battery is charging"
|
||||
PythonIsNaN = "Check if x is a NaN"
|
||||
PythonKandinskyFunction = "kandinsky module function prefix"
|
||||
PythonLdexp = "Return x*(2**i), inverse of frexp"
|
||||
@@ -94,6 +104,14 @@ PythonMax = "Maximum"
|
||||
PythonMin = "Minimum"
|
||||
PythonModf = "Fractional and integer parts of x"
|
||||
PythonMonotonic = "Value of a monotonic clock"
|
||||
PythonNumpyFunction = "numpy module prefix"
|
||||
PythonNumpyFftFunction = "numpy.fft module prefix"
|
||||
PythonNumpyLinalgFunction = "numpy.linalg module prefix"
|
||||
PythonScipyFunction = "scipy module prefix"
|
||||
PythonScipyLinalgFunction = "scipy.linalg module prefix"
|
||||
PythonScipyOptimizeFunction = "scipy.optimize module prefix"
|
||||
PythonScipySignalFunction = "scipy.signal module prefix"
|
||||
PythonScipySpecialFunction = "scipy.special module prefix"
|
||||
PythonOct = "Convert integer to octal"
|
||||
PythonPhase = "Phase of z"
|
||||
PythonPlot = "Plot y versus x as lines"
|
||||
@@ -103,7 +121,7 @@ PythonPower = "x raised to the power y"
|
||||
PythonPrint = "Print object"
|
||||
PythonRadians = "Convert x from degrees to radians"
|
||||
PythonRandint = "Random integer in [a,b]"
|
||||
PythonRandom = "Floating point number in [0,1["
|
||||
PythonRandom = "Floating point number in [0,1]"
|
||||
PythonRandomFunction = "random module function prefix"
|
||||
PythonRandrange = "Random number in range(start,stop)"
|
||||
PythonRangeStartStop = "List from start to stop-1"
|
||||
@@ -119,6 +137,12 @@ PythonShow = "Display the figure"
|
||||
PythonSin = "Sine"
|
||||
PythonSinh = "Hyperbolic sine"
|
||||
PythonSleep = "Suspend the execution for t seconds"
|
||||
PythonLocalTime = "Convert time into tuple"
|
||||
PythonMktime = "Convert tuple into time"
|
||||
PythonTime = "Get the current timestamp"
|
||||
PythonSetLocaltime = "Set time from a tuple"
|
||||
PythonRTCmode = "Get current RTC mode"
|
||||
PythonSetRTCmode = "Set RTC mode"
|
||||
PythonSort = "Sort the list"
|
||||
PythonSqrt = "Square root"
|
||||
PythonSum = "Sum the items of a list"
|
||||
@@ -152,10 +176,19 @@ PythonTurtleWrite = "Display a text"
|
||||
PythonUniform = "Floating point number in [a,b]"
|
||||
PythonImportTime = "Import time module"
|
||||
PythonImportOs = "Import os module"
|
||||
PythonImportSys = "Import sys module"
|
||||
PythonOsUname = "Get infos about the system"
|
||||
PythonOsGetlogin = "Get username"
|
||||
PythonOsRemove = "Remove file named filename"
|
||||
PythonOsRename = "Rename file oldname to newname"
|
||||
PythonOsListdir = "List files in memory"
|
||||
PythonSysExit = "Terminate current program"
|
||||
PythonSysPrintexception = "Print exception"
|
||||
PythonSysByteorder = "The byte order of the system"
|
||||
PythonSysImplementation = "Information about Python"
|
||||
PythonSysModules = "Dictionary of loaded modules"
|
||||
PythonSysVersion = "Python language version (string)"
|
||||
PythonSysVersioninfo = "Python language version (tuple)"
|
||||
PythonTimePrefix = "time module function prefix"
|
||||
PythonTimeSleep = "Wait for n second"
|
||||
PythonMonotonic = "Return monotonic time"
|
||||
|
||||
@@ -45,6 +45,7 @@ PythonCosh = "Hyperbolic cosine"
|
||||
PythonCount = "Count the occurrences of x"
|
||||
PythonDegrees = "Convert x from radians to degrees"
|
||||
PythonDivMod = "Quotient and remainder"
|
||||
PythonDrawCircle = "Draw a circle"
|
||||
PythonDrawLine = "Draw a line"
|
||||
PythonDrawString = "Display a text from pixel (x,y)"
|
||||
PythonErf = "Error function"
|
||||
@@ -53,12 +54,16 @@ PythonEval = "Return the evaluated expression"
|
||||
PythonExp = "Exponential function"
|
||||
PythonExpm1 = "Compute exp(x)-1"
|
||||
PythonFabs = "Absolute value"
|
||||
PythonFillCircle = "Fill a circle"
|
||||
PythonFillPolygon = "Fill a polygon"
|
||||
PythonFillRect = "Fill a rectangle at pixel (x,y)"
|
||||
PythonFloat = "Convert x to a float"
|
||||
PythonFloor = "Floor"
|
||||
PythonFmod = "a modulo b"
|
||||
PythonFrExp = "Mantissa and exponent of x: (m,e)"
|
||||
PythonGamma = "Gamma function"
|
||||
PythonGetKeys = "Obtener teclas presionadas"
|
||||
PythonGetPalette = "Get theme palette"
|
||||
PythonGetPixel = "Return pixel (x,y) color"
|
||||
PythonGetrandbits = "Integer with k random bits"
|
||||
PythonGrid = "Toggle the visibility of the grid"
|
||||
@@ -70,6 +75,8 @@ PythonImportKandinsky = "Import kandinsky module"
|
||||
PythonImportRandom = "Import random module"
|
||||
PythonImportMath = "Import math module"
|
||||
PythonImportMatplotlibPyplot = "Import matplotlib.pyplot module"
|
||||
PythonImportNumpy = "Import ulab.numpy module"
|
||||
PythonImportScipy = "Import ulab.scipy module"
|
||||
PythonImportTime = "Import time module"
|
||||
PythonImportTurtle = "Import turtle module"
|
||||
PythonIndex = "Index of the first x occurrence"
|
||||
@@ -80,6 +87,9 @@ PythonIonFunction = "ion module function prefix"
|
||||
PythonIsFinite = "Check if x is finite"
|
||||
PythonIsInfinite = "Check if x is infinity"
|
||||
PythonIsKeyDown = "Return True if the k key is down"
|
||||
PythonBattery = "Return battery voltage"
|
||||
PythonBatteryLevel = "Return battery level"
|
||||
PythonBatteryIscharging = "Return if battery is charging"
|
||||
PythonIsNaN = "Check if x is a NaN"
|
||||
PythonKandinskyFunction = "kandinsky module function prefix"
|
||||
PythonLdexp = "Return x*(2**i), inverse of frexp"
|
||||
@@ -94,6 +104,14 @@ PythonMax = "Maximum"
|
||||
PythonMin = "Minimum"
|
||||
PythonModf = "Fractional and integer parts of x"
|
||||
PythonMonotonic = "Value of a monotonic clock"
|
||||
PythonNumpyFunction = "numpy module prefix"
|
||||
PythonNumpyFftFunction = "numpy.fft module prefix"
|
||||
PythonNumpyLinalgFunction = "numpy.linalg module prefix"
|
||||
PythonScipyFunction = "scipy module prefix"
|
||||
PythonScipyLinalgFunction = "scipy.linalg module prefix"
|
||||
PythonScipyOptimizeFunction = "scipy.optimize module prefix"
|
||||
PythonScipySignalFunction = "scipy.signal module prefix"
|
||||
PythonScipySpecialFunction = "scipy.special module prefix"
|
||||
PythonOct = "Convert integer to octal"
|
||||
PythonPhase = "Phase of z"
|
||||
PythonPlot = "Plot y versus x as lines"
|
||||
@@ -119,6 +137,12 @@ PythonShow = "Display the figure"
|
||||
PythonSin = "Sine"
|
||||
PythonSinh = "Hyperbolic sine"
|
||||
PythonSleep = "Suspend the execution for t seconds"
|
||||
PythonLocalTime = "Convertir el tiempo en tupla"
|
||||
PythonMktime = "Convertir tupla en tiempo"
|
||||
PythonTime = "Obtener la marca de tiempo actual"
|
||||
PythonSetLocaltime = "Establecer tiempo desde una tupla"
|
||||
PythonRTCmode = "Obtener el modo RTC actual"
|
||||
PythonSetRTCmode = "Establecer modo RTC"
|
||||
PythonSort = "Sort the list"
|
||||
PythonSqrt = "Square root"
|
||||
PythonSum = "Sum the items of a list"
|
||||
@@ -152,10 +176,19 @@ PythonTurtleWrite = "Display a text"
|
||||
PythonUniform = "Floating point number in [a,b]"
|
||||
PythonImportTime = "Import time module"
|
||||
PythonImportOs = "Import os module"
|
||||
PythonImportSys = "Import sys module"
|
||||
PythonOsUname = " Información del sistema "
|
||||
PythonOsGetlogin = "Get username"
|
||||
PythonOsRemove = "Eliminar un archivo"
|
||||
PythonOsRename = "Renombrar archivo"
|
||||
PythonOsListdir = "Archivos de la lista"
|
||||
PythonSysExit = "Terminate current program"
|
||||
PythonSysPrintexception = "Print exception"
|
||||
PythonSysByteorder = "The byte order of the system"
|
||||
PythonSysImplementation = "Information about Python"
|
||||
PythonSysModules = "Dictionary of loaded modules"
|
||||
PythonSysVersion = "Python language version (string)"
|
||||
PythonSysVersioninfo = "Python language version (tuple)"
|
||||
PythonTimePrefix = "time module function prefix"
|
||||
PythonTimeSleep = "Esperar n segundos"
|
||||
PythonMonotonic = "Tiempo monótono de retorno"
|
||||
|
||||
@@ -45,6 +45,7 @@ PythonCosh = "Cosinus hyperbolique"
|
||||
PythonCount = "Compte les occurrences de x"
|
||||
PythonDegrees = "Conversion de radians en degrés"
|
||||
PythonDivMod = "Quotient et reste"
|
||||
PythonDrawCircle = "Trace un cercle"
|
||||
PythonDrawLine = "Trace une ligne"
|
||||
PythonDrawString = "Affiche un texte au pixel (x,y)"
|
||||
PythonErf = "Fonction d'erreur"
|
||||
@@ -53,12 +54,16 @@ PythonEval = "Evalue l'expression en argument "
|
||||
PythonExp = "Fonction exponentielle"
|
||||
PythonExpm1 = "Calcul de exp(x)-1"
|
||||
PythonFabs = "Valeur absolue"
|
||||
PythonFillCircle = "Remplit un cercle"
|
||||
PythonFillPolygon = "Remplit un polygone"
|
||||
PythonFillRect = "Remplit un rectangle"
|
||||
PythonFloat = "Conversion en flottant"
|
||||
PythonFloor = "Partie entière"
|
||||
PythonFmod = "a modulo b"
|
||||
PythonFrExp = "Mantisse et exposant de x : (m,e)"
|
||||
PythonGamma = "Fonction gamma"
|
||||
PythonGetKeys = "Obtenir les touches pressées"
|
||||
PythonGetPalette = "Obtient la palette du thème"
|
||||
PythonGetPixel = "Renvoie la couleur du pixel (x,y)"
|
||||
PythonGetrandbits = "Nombre aléatoire sur k bits"
|
||||
PythonGrid = "Affiche ou masque la grille"
|
||||
@@ -70,6 +75,8 @@ PythonImportKandinsky = "Importation du module kandinsky"
|
||||
PythonImportRandom = "Importation du module random"
|
||||
PythonImportMath = "Importation du module math"
|
||||
PythonImportMatplotlibPyplot = "Importation de matplotlib.pyplot"
|
||||
PythonImportNumpy = "Importation de ulab.numpy"
|
||||
PythonImportScipy = "Importation de ulab.scipy"
|
||||
PythonImportTurtle = "Importation du module turtle"
|
||||
PythonImportTime = "Importation du module time"
|
||||
PythonIndex = "Indice première occurrence de x"
|
||||
@@ -80,6 +87,9 @@ PythonIonFunction = "Préfixe fonction module ion"
|
||||
PythonIsFinite = "Teste si x est fini"
|
||||
PythonIsInfinite = "Teste si x est infini"
|
||||
PythonIsKeyDown = "Renvoie True si touche k enfoncée"
|
||||
PythonBattery = "Renvoie le voltage de la batterie"
|
||||
PythonBatteryLevel = "Renvoie le niveau de la batterie"
|
||||
PythonBatteryIscharging = "Chargement en cours"
|
||||
PythonIsNaN = "Teste si x est NaN"
|
||||
PythonKandinskyFunction = "Préfixe fonction module kandinsky"
|
||||
PythonLdexp = "Inverse de frexp : x*(2**i)"
|
||||
@@ -94,6 +104,14 @@ PythonMax = "Maximum"
|
||||
PythonMin = "Minimum"
|
||||
PythonModf = "Parties fractionnaire et entière"
|
||||
PythonMonotonic = "Renvoie la valeur de l'horloge"
|
||||
PythonNumpyFunction = "Préfixe fonction du module numpy"
|
||||
PythonNumpyFftFunction = "Préfixe fonction du module numpy.fft"
|
||||
PythonNumpyLinalgFunction = "Préfixe fonction du module numpy.linalg"
|
||||
PythonScipyFunction = "Préfixe fonction du module scipy"
|
||||
PythonScipyLinalgFunction = "Préfixe fonction du module scipy.linalg"
|
||||
PythonScipyOptimizeFunction = "Préfixe fonction du module scipy.optimize"
|
||||
PythonScipySignalFunction = "Préfixe fonction du module scipy.signal"
|
||||
PythonScipySpecialFunction = "Préfixe fonction du module scipy.special"
|
||||
PythonOct = "Conversion en octal"
|
||||
PythonPhase = "Argument de z"
|
||||
PythonPlot = "Trace y en fonction de x"
|
||||
@@ -119,6 +137,12 @@ PythonShow = "Affiche la figure"
|
||||
PythonSin = "Sinus"
|
||||
PythonSinh = "Sinus hyperbolique"
|
||||
PythonSleep = "Suspend l'exécution t secondes"
|
||||
PythonLocalTime = "Convertir le temps en tuple"
|
||||
PythonMktime = "Convertir le tuple en temps"
|
||||
PythonTime = "Obtenir l'horodatage actuel"
|
||||
PythonSetLocaltime = "Définir l'heure à partir d'un tuple"
|
||||
PythonRTCmode = "Obtenir le mode RTC actuel"
|
||||
PythonSetRTCmode = "Définir le mode RTC"
|
||||
PythonSort = "Trie la liste"
|
||||
PythonSqrt = "Racine carrée"
|
||||
PythonSum = "Somme des éléments de la liste"
|
||||
@@ -152,10 +176,19 @@ PythonTurtleWrite = "Affiche un texte"
|
||||
PythonUniform = "Nombre décimal dans [a,b]"
|
||||
PythonImportTime = "Importation du module temps"
|
||||
PythonImportOs = "Importation du module os"
|
||||
PythonImportSys = "Importation du module sys"
|
||||
PythonOsUname = "Donne des infos sur le système"
|
||||
PythonOsGetlogin = "Donne le nom d'utilisateur"
|
||||
PythonOsRemove = "Supprime le fichier nommé filename"
|
||||
PythonOsRename = "Renomme oldname en newname"
|
||||
PythonOsListdir = "Liste les fichiers"
|
||||
PythonSysExit = "Termine le programme"
|
||||
PythonSysPrintexception = "Imprime une exception"
|
||||
PythonSysByteorder = "L'ordre des octets du système"
|
||||
PythonSysImplementation = "Information sur Python"
|
||||
PythonSysModules = "Dictionnaire des modules chargés"
|
||||
PythonSysVersion = "Version du langage Python (string)"
|
||||
PythonSysVersioninfo = "Version du langage Python (tuple)"
|
||||
PythonTimePrefix = "Préfixe fonction du module temps"
|
||||
PythonTimeSleep = "Attendre n secondes"
|
||||
PythonMonotonic = "Retourne le temps monotone"
|
||||
|
||||
@@ -45,6 +45,7 @@ PythonCosh = "Hiperbolikus koszinusz"
|
||||
PythonCount = "Számolja az x elöfordulását"
|
||||
PythonDegrees = "x konvertálása radiánokrol fokokra"
|
||||
PythonDivMod = "Hányados és maradék"
|
||||
PythonDrawCircle = "Rajzolj egy kört"
|
||||
PythonDrawLine = "Húzzon egy vonalat "
|
||||
PythonDrawString = "Szöveg megjelenítése (x, y)-en"
|
||||
PythonErf = "Hiba funkció"
|
||||
@@ -54,11 +55,15 @@ PythonExp = "Exponenciális függvény"
|
||||
PythonExpm1 = "exp(x)-1 sámitása"
|
||||
PythonFabs = "Abszolút érték"
|
||||
PythonFillRect = "Téglalap töltése"
|
||||
PythonFillCircle = "Kitölti a kört"
|
||||
PythonFillPolygon = "Kitölti a poligont"
|
||||
PythonFloat = "Konvertálása tizedes számra"
|
||||
PythonFloor = "Egész része"
|
||||
PythonFmod = "a modulo b"
|
||||
PythonFrExp = "X mantissája és kiállítója"
|
||||
PythonGamma = "Gamma funkció"
|
||||
PythonGetKeys = "Billentyűk lenyomva"
|
||||
PythonGetPalette = "Téma paletta beszerzése"
|
||||
PythonGetPixel = "Visszatéríti (x,y) színét"
|
||||
PythonGetrandbits = "Váletlenszám visszatérítése k biten"
|
||||
PythonGrid = "Rács megjelenítése/elrejtése"
|
||||
@@ -70,6 +75,8 @@ PythonImportKandinsky = "Kandinsky modul importálása"
|
||||
PythonImportRandom = "Véletlenszerü modul importálása"
|
||||
PythonImportMath = "math modul importálása"
|
||||
PythonImportMatplotlibPyplot = "matplotlib.pyplot modul importálása"
|
||||
PythonImportNumpy = "ulab.numpy modul importálása"
|
||||
PythonImportScipy = "ulab.scipy modul importálása"
|
||||
PythonImportTurtle = "turtle modul importálása"
|
||||
PythonImportTime = "time modul importálása"
|
||||
PythonIndex = "Az elsö x esemény indexe"
|
||||
@@ -80,6 +87,9 @@ PythonIonFunction = "ion modul funkció elötag"
|
||||
PythonIsFinite = "x véges-e"
|
||||
PythonIsInfinite = "x végtelen-e"
|
||||
PythonIsKeyDown = "True-t válaszol ha a k gomb le van nyomva"
|
||||
PythonBattery = "Return battery voltage"
|
||||
PythonBatteryLevel = "Return battery level"
|
||||
PythonBatteryIscharging = "Return if battery is charging"
|
||||
PythonIsNaN = "Ellenörizze hogy x nem NaN"
|
||||
PythonKandinskyFunction = "kandinsky modul funkció elötag"
|
||||
PythonLdexp = "frexp ellentéte : x*(2**i)"
|
||||
@@ -94,6 +104,14 @@ PythonMax = "Maximum"
|
||||
PythonMin = "Minimum"
|
||||
PythonModf = "x-nek tört és egész részei"
|
||||
PythonMonotonic = "Az óra értékét adja vissza"
|
||||
PythonNumpyFunction = "numpy elötag"
|
||||
PythonNumpyFftFunction = "numpy.fft elötag"
|
||||
PythonNumpyLinalgFunction = "numpy.linalg elötag"
|
||||
PythonScipyFunction = "scipy elötag"
|
||||
PythonScipyLinalgFunction = "scipy.linalg elötag"
|
||||
PythonScipyOptimizeFunction = "scipy.optimize elötag"
|
||||
PythonScipySignalFunction = "scipy.signal elötag"
|
||||
PythonScipySpecialFunction = "scipy.special elötag"
|
||||
PythonOct = "Decimális szám konvertálása octális számra"
|
||||
PythonPhase = "z fázisa"
|
||||
PythonPlot = "y-t jelöli x függvényében"
|
||||
@@ -119,6 +137,12 @@ PythonShow = "Mutassa az ábrát"
|
||||
PythonSin = "Szinusz"
|
||||
PythonSinh = "Hiperbolikus szinusz"
|
||||
PythonSleep = "t másodpercre meg állitani a programmot"
|
||||
PythonLocalTime = "Idő konvertálása csomóvá"
|
||||
PythonMktime = "A tuple konvertálása az időben"
|
||||
PythonTime = "Az aktuális időbélyeg letöltése"
|
||||
PythonSetLocaltime = "Idő beállítása egy csomóból"
|
||||
PythonRTCmode = "Aktuális RTC mód"
|
||||
PythonSetRTCmode = "RTC mód beállítása"
|
||||
PythonSort = "A listát rendezni"
|
||||
PythonSqrt = "Négyzetgyök"
|
||||
PythonSum = "Összeadni a lista elemeit"
|
||||
@@ -172,6 +196,15 @@ PythonFileReadable = "read-et lehete használni"
|
||||
PythonFileWritable = "write-ot lehete használni"
|
||||
PythonImportOs = "os modul importálása"
|
||||
PythonOsUname = "Rendszer informaciók"
|
||||
PythonOsGetlogin = "Get username"
|
||||
PythonOsRemove = "Fájl törlése"
|
||||
PythonOsRename = "Fájl átnevezése"
|
||||
PythonOsListdir = "Fájlok listája"
|
||||
PythonImportSys = "sys modul importálása"
|
||||
PythonSysExit = "Terminate current program"
|
||||
PythonSysPrintexception = "Print exception"
|
||||
PythonSysByteorder = "The byte order of the system"
|
||||
PythonSysImplementation = "Information about Python"
|
||||
PythonSysModules = "Dictionary of loaded modules"
|
||||
PythonSysVersion = "Python language version (string)"
|
||||
PythonSysVersioninfo = "Python language version (tuple)"
|
||||
|
||||
@@ -45,6 +45,7 @@ PythonCosh = "Coseno iperbolico"
|
||||
PythonCount = "Conta le ricorrenze di x"
|
||||
PythonDegrees = "Conversione di radianti in gradi"
|
||||
PythonDivMod = "Quoziente e resto"
|
||||
PythonDrawCircle = "Disegnare un cerchio"
|
||||
PythonDrawLine = "Disegna una linea"
|
||||
PythonDrawString = "Visualizza il testo dal pixel x,y"
|
||||
PythonErf = "Funzione d'errore"
|
||||
@@ -53,12 +54,16 @@ PythonEval = "Valuta l'espressione nell'argomento "
|
||||
PythonExp = "Funzione esponenziale"
|
||||
PythonExpm1 = "Calcola exp(x)-1"
|
||||
PythonFabs = "Valore assoluto"
|
||||
PythonFillCircle = "Riempire un cerchio"
|
||||
PythonFillPolygon = "Riempire un poligono"
|
||||
PythonFillRect = "Riempie un rettangolo"
|
||||
PythonFloat = "Conversione in flottanti"
|
||||
PythonFloor = "Parte intera"
|
||||
PythonFmod = "a modulo b"
|
||||
PythonFrExp = "Mantissa ed esponente di x : (m,e)"
|
||||
PythonGamma = "Funzione gamma"
|
||||
PythonGetKeys = "Premere i tasti"
|
||||
PythonGetPalette = "Ottieni la tavolozza del tema"
|
||||
PythonGetPixel = "Restituisce colore del pixel(x,y)"
|
||||
PythonGetrandbits = "Numero aleatorio con k bit"
|
||||
PythonGrid = "Attiva la visibilità della griglia"
|
||||
@@ -70,13 +75,24 @@ PythonImportKandinsky = "Importa modulo kandinsky"
|
||||
PythonImportRandom = "Importa modulo random"
|
||||
PythonImportMath = "Importa modulo math"
|
||||
PythonImportMatplotlibPyplot = "Importa modulo matplotlib.pyplot"
|
||||
PythonImportNumpy = "Importa modulo ulab.numpy"
|
||||
PythonImportScipy = "Importa modulo ulab.scipy"
|
||||
PythonImportTurtle = "Importa del modulo turtle"
|
||||
PythonImportTime = "Importa del modulo time"
|
||||
PythonImportOs = "Importa modulo os"
|
||||
PythonOsUname = "Ottieni informazioni sul sistema"
|
||||
PythonOsGetlogin = "Get username"
|
||||
PythonOsRemove = "Rimuovere un file"
|
||||
PythonOsRename = "Rinomina file"
|
||||
PythonOsListdir = "Elenca file"
|
||||
PythonImportSys = "Importa modulo sys"
|
||||
PythonSysExit = "Terminate current program"
|
||||
PythonSysPrintexception = "Print exception"
|
||||
PythonSysByteorder = "The byte order of the system"
|
||||
PythonSysImplementation = "Information about Python"
|
||||
PythonSysModules = "Dictionary of loaded modules"
|
||||
PythonSysVersion = "Python language version (string)"
|
||||
PythonSysVersioninfo = "Python language version (tuple)"
|
||||
PythonIndex = "Indice prima occorrenza di x"
|
||||
PythonInput = "Inserire un valore"
|
||||
PythonInsert = "Inserire x in posizione i-esima"
|
||||
@@ -85,6 +101,9 @@ PythonIonFunction = "Prefisso di funzione modulo ion"
|
||||
PythonIsFinite = "Testa se x è finito"
|
||||
PythonIsInfinite = "Testa se x est infinito"
|
||||
PythonIsKeyDown = "Restituisce True premendo tasto k"
|
||||
PythonBattery = "Return battery voltage"
|
||||
PythonBatteryLevel = "Return battery level"
|
||||
PythonBatteryIscharging = "Return if battery is charging"
|
||||
PythonIsNaN = "Testa se x è NaN"
|
||||
PythonKandinskyFunction = "Prefisso funzione modulo kandinsky"
|
||||
PythonLdexp = "Inversa di frexp : x*(2**i)"
|
||||
@@ -99,6 +118,14 @@ PythonMax = "Massimo"
|
||||
PythonMin = "Minimo"
|
||||
PythonModf = "Parti frazionarie e intere"
|
||||
PythonMonotonic = "Restituisce il valore dell'orologio"
|
||||
PythonNumpyFunction = "Prefisso modulo numpy"
|
||||
PythonNumpyFftFunction = "Prefisso modulo numpy.fft"
|
||||
PythonNumpyLinalgFunction = "Prefisso modulo numpy.linalg"
|
||||
PythonScipyFunction = "Prefisso modulo scipy"
|
||||
PythonScipyLinalgFunction = "Prefisso modulo scipy.linalg"
|
||||
PythonScipyOptimizeFunction = "Prefisso modulo scipy.optimize"
|
||||
PythonScipySignalFunction = "Prefisso modulo scipy.signal"
|
||||
PythonScipySpecialFunction = "Prefisso modulo scipy.special"
|
||||
PythonOct = "Conversione in ottale"
|
||||
PythonPhase = "Argomento di z"
|
||||
PythonPlot = "Disegna y in f. di x come linee"
|
||||
@@ -124,6 +151,12 @@ PythonShow = "Mostra la figura"
|
||||
PythonSin = "Seno"
|
||||
PythonSinh = "Seno iperbolico"
|
||||
PythonSleep = "Sospende l'esecuzione t secondi"
|
||||
PythonLocalTime = "Converti il tempo in tuple"
|
||||
PythonMktime = "Converti tuple in tempo"
|
||||
PythonTime = "Ottieni il timestamp corrente"
|
||||
PythonSetLocaltime = "Imposta il tempo da una tupla"
|
||||
PythonRTCmode = "Ottieni la modalità RTC corrente"
|
||||
PythonSetRTCmode = "Imposta modalità RTC"
|
||||
PythonSort = "Ordina l'elenco"
|
||||
PythonSqrt = "Radice quadrata"
|
||||
PythonSum = "Somma degli elementi della lista"
|
||||
|
||||
@@ -45,6 +45,7 @@ PythonCosh = "Cosinus hyperbolicus"
|
||||
PythonCount = "Tel voorkomen van x"
|
||||
PythonDegrees = "Zet x om van radialen naar graden"
|
||||
PythonDivMod = "Quotiënt en rest"
|
||||
PythonDrawCircle = "Teken een cirkel"
|
||||
PythonDrawLine = "Teken een lijn"
|
||||
PythonDrawString = "Geef een tekst weer van pixel (x,y)"
|
||||
PythonErf = "Error functie"
|
||||
@@ -53,12 +54,16 @@ PythonEval = "Geef de geëvalueerde uitdrukking"
|
||||
PythonExp = "Exponentiële functie"
|
||||
PythonExpm1 = "Bereken exp(x)-1"
|
||||
PythonFabs = "Absolute waarde"
|
||||
PythonFillCircle = "Vul een cirkel"
|
||||
PythonFillPolygon = "Vul een veelhoek"
|
||||
PythonFillRect = "Vul een rechthoek bij pixel (x,y)"
|
||||
PythonFloat = "Zet x om in een float"
|
||||
PythonFloor = "Vloer"
|
||||
PythonFmod = "a modulo b"
|
||||
PythonFrExp = "Mantisse en exponent van x: (m,e)"
|
||||
PythonGamma = "Gammafunctie"
|
||||
PythonGetKeys = "Get toetsen ingedrukt"
|
||||
PythonGetPalette = "Thema palet krijgen"
|
||||
PythonGetPixel = "Geef pixel (x,y) kleur (rgb)"
|
||||
PythonGetrandbits = "Integer met k willekeurige bits"
|
||||
PythonGrid = "Verander zichtbaarheid raster"
|
||||
@@ -70,12 +75,24 @@ PythonImportKandinsky = "Importeer kandinsky module"
|
||||
PythonImportRandom = "Importeer random module"
|
||||
PythonImportMath = "Importeer math module"
|
||||
PythonImportMatplotlibPyplot = "Importeer matplotlib.pyplot module"
|
||||
PythonImportNumpy = "Importeer ulab.numpy module"
|
||||
PythonImportScipy = "Importeer ulab.scipy module"
|
||||
PythonImportTime = "Importeer time module"
|
||||
PythonImportOs = "Importeer os module"
|
||||
PythonOsUname = " Krijg systeeminfo"
|
||||
PythonOsGetlogin = "Get username"
|
||||
PythonOsRemove = "Een bestand verwijderen"
|
||||
PythonOsRename = "Hernoem bestand"
|
||||
PythonOsListdir = "Lijstbestanden"
|
||||
PythonImportSys = "Importeer sys module"
|
||||
PythonImportSys = "Importeer sys module"
|
||||
PythonSysExit = "Terminate current program"
|
||||
PythonSysPrintexception = "Print exception"
|
||||
PythonSysByteorder = "The byte order of the system"
|
||||
PythonSysImplementation = "Information about Python"
|
||||
PythonSysModules = "Dictionary of loaded modules"
|
||||
PythonSysVersion = "Python language version (string)"
|
||||
PythonSysVersioninfo = "Python language version (tuple)"
|
||||
PythonImportTurtle = "Importeer turtle module"
|
||||
PythonIndex = "Index van de eerste x aanwezigheden"
|
||||
PythonInput = "Wijs een waarde toe"
|
||||
@@ -85,6 +102,9 @@ PythonIonFunction = "ion module voorvoegsel"
|
||||
PythonIsFinite = "Controleer of x eindig is"
|
||||
PythonIsInfinite = "Controleer of x oneindig is"
|
||||
PythonIsKeyDown = "Geef True als k toets omlaag is"
|
||||
PythonBattery = "Return battery voltage"
|
||||
PythonBatteryLevel = "Return battery level"
|
||||
PythonBatteryIscharging = "Return if battery is charging"
|
||||
PythonIsNaN = "Controleer of x geen getal is"
|
||||
PythonKandinskyFunction = "kandinsky module voorvoegsel"
|
||||
PythonLdexp = "Geeft x*(2**i), inversie van frexp"
|
||||
@@ -99,6 +119,14 @@ PythonMax = "Maximum"
|
||||
PythonMin = "Minimum"
|
||||
PythonModf = "Fractionele en gehele delen van x"
|
||||
PythonMonotonic = "Waarde van een monotone klok"
|
||||
PythonNumpyFunction = "numpy module prefix"
|
||||
PythonNumpyFftFunction = "numpy.fft module prefix"
|
||||
PythonNumpyLinalgFunction = "numpy.linalg module prefix"
|
||||
PythonScipyFunction = "scipy module prefix"
|
||||
PythonScipyLinalgFunction = "scipy.linalg module prefix"
|
||||
PythonScipyOptimizeFunction = "scipy.optimize module prefix"
|
||||
PythonScipySignalFunction = "scipy.signal module prefix"
|
||||
PythonScipySpecialFunction = "scipy.special module prefix"
|
||||
PythonOct = "Integer omzetten naar octaal"
|
||||
PythonPhase = "Fase van z in radialen"
|
||||
PythonPlot = "Plot y versus x als lijnen"
|
||||
@@ -124,6 +152,12 @@ PythonShow = "Figuur weergeven"
|
||||
PythonSin= "Sinus"
|
||||
PythonSinh = "Sinus hyperbolicus"
|
||||
PythonSleep = "Stel executie voor t seconden uit"
|
||||
PythonLocalTime = "Zet tijd om in tuple"
|
||||
PythonMktime = "Tuple omzetten in tijd"
|
||||
PythonTime = "Haal de huidige tijdstempel"
|
||||
PythonSetLocaltime = "Stel de tijd in vanaf een tuple"
|
||||
PythonRTCmode = "Huidige RTC-modus kregen"
|
||||
PythonSetRTCmode = "RTC-modus instellen"
|
||||
PythonSort = "Sorteer de lijst"
|
||||
PythonSqrt = "Vierkantswortel"
|
||||
PythonSum = "Sommeer de items van een lijst"
|
||||
|
||||
@@ -45,6 +45,7 @@ PythonCosh = "Cosseno hiperbólico"
|
||||
PythonCount = "Contar as ocorrências de x"
|
||||
PythonDegrees = "Converter x de radianos para graus"
|
||||
PythonDivMod = "Quociente e resto"
|
||||
PythonDrawCircle = "Desenha um círculo"
|
||||
PythonDrawLine = "Desenhe uma linha"
|
||||
PythonDrawString = "Mostrar o texto do pixel (x,y)"
|
||||
PythonErf = "Função erro"
|
||||
@@ -53,12 +54,16 @@ PythonEval = "Devolve a expressão avaliada"
|
||||
PythonExp = "Função exponencial"
|
||||
PythonExpm1 = "Calcular exp(x)-1"
|
||||
PythonFabs = "Valor absoluto"
|
||||
PythonFillCircle = "Preencher um círculo"
|
||||
PythonFillPolygon = "Preencher um polígono"
|
||||
PythonFillRect = "Preencher um retângulo em (x,y)"
|
||||
PythonFloat = "Converter x num flutuante"
|
||||
PythonFloor = "Parte inteira"
|
||||
PythonFmod = "a módulo b"
|
||||
PythonFrExp = "Coeficiente e expoente de x: (m, e)"
|
||||
PythonGamma = "Função gama"
|
||||
PythonGetKeys = "Obter teclas pressionadas"
|
||||
PythonGetPalette = "Obter paleta temática"
|
||||
PythonGetPixel = "Devolve a cor do pixel (x,y)"
|
||||
PythonGetrandbits = "Número inteiro aleatório com k bits"
|
||||
PythonGrid = "Alterar visibilidade da grelha"
|
||||
@@ -70,6 +75,8 @@ PythonImportKandinsky = "Importar módulo kandinsky"
|
||||
PythonImportRandom = "Importar módulo random"
|
||||
PythonImportMath = "Importar módulo math"
|
||||
PythonImportMatplotlibPyplot = "Importar módulo matplotlib.pyplot"
|
||||
PythonImportNumpy = "Importar módulo ulab.numpy"
|
||||
PythonImportScipy = "Importar módulo ulab.scipy"
|
||||
PythonImportTime = "Importar módulo time"
|
||||
PythonImportTurtle = "Importar módulo turtle"
|
||||
PythonIndex = "Índice da primeira ocorrência de x"
|
||||
@@ -80,6 +87,9 @@ PythonIonFunction = "Prefixo da função do módulo ion"
|
||||
PythonIsFinite = "Verificar se x é finito"
|
||||
PythonIsInfinite = "Verificar se x é infinito"
|
||||
PythonIsKeyDown = "Devolve True se tecla k pressionada"
|
||||
PythonBattery = "Return battery voltage"
|
||||
PythonBatteryLevel = "Return battery level"
|
||||
PythonBatteryIscharging = "Return if battery is charging"
|
||||
PythonIsNaN = "Verificar se x é um NaN"
|
||||
PythonKandinskyFunction = "Prefixo da função do módulo kandinsky"
|
||||
PythonLdexp = "Devolve x*(2**i), inverso de frexp"
|
||||
@@ -94,6 +104,14 @@ PythonMax = "Máximo"
|
||||
PythonMin = "Mínimo"
|
||||
PythonModf = "Partes inteira e frácionária de x"
|
||||
PythonMonotonic = "Devolve o valor do relógio"
|
||||
PythonNumpyFunction = "Prefixo do módulo numpy"
|
||||
PythonNumpyFftFunction = "Prefixo do módulo numpy.fft"
|
||||
PythonNumpyLinalgFunction = "Prefixo do módulo numpy.linalg"
|
||||
PythonScipyFunction = "Prefixo do módulo scipy"
|
||||
PythonScipyLinalgFunction = "Prefixo do módulo scipy.linalg"
|
||||
PythonScipyOptimizeFunction = "Prefixo do módulo scipy.optimize"
|
||||
PythonScipySignalFunction = "Prefixo do módulo scipy.signal"
|
||||
PythonScipySpecialFunction = "Prefixo do módulo scipy.special"
|
||||
PythonOct = "Converter número inteiro em octal"
|
||||
PythonPhase = "Argumento de z"
|
||||
PythonPlot = "Desenhar y em função de x"
|
||||
@@ -119,6 +137,12 @@ PythonShow = "Mostrar a figura"
|
||||
PythonSin = "Seno"
|
||||
PythonSinh = "Seno hiperbólico"
|
||||
PythonSleep = "Suspender a execução por t segundos"
|
||||
PythonLocalTime = "Convert o tempo em tupla"
|
||||
PythonMktime = "Convert tuple em tempo"
|
||||
PythonTime = "Obter o estamp de tempo atual"
|
||||
PythonSetLocaltime = "Definir tempo a partir de uma tupla"
|
||||
PythonRTCmode = "Obter o modo RTC atual"
|
||||
PythonSetRTCmode = "Definir o modo RTC"
|
||||
PythonSort = "Ordenar a lista"
|
||||
PythonSqrt = "Raiz quadrada"
|
||||
PythonSum = "Soma dos itens da lista"
|
||||
@@ -153,9 +177,18 @@ PythonUniform = "Número decimal em [a,b]"
|
||||
PythonImportTime = "Import time module"
|
||||
PythonImportOs = "Import os module"
|
||||
PythonOsUname = " Obter informações do sistema"
|
||||
PythonOsGetlogin = "Get username"
|
||||
PythonOsRemove = "Remover um ficheiro"
|
||||
PythonOsRename = "Renomear ficheiro"
|
||||
PythonOsListdir = "Listar ficheiros"
|
||||
PythonImportSys = "Import sys module"
|
||||
PythonSysExit = "Terminate current program"
|
||||
PythonSysPrintexception = "Print exception"
|
||||
PythonSysByteorder = "The byte order of the system"
|
||||
PythonSysImplementation = "Information about Python"
|
||||
PythonSysModules = "Dictionary of loaded modules"
|
||||
PythonSysVersion = "Python language version (string)"
|
||||
PythonSysVersioninfo = "Python language version (tuple)"
|
||||
PythonTimePrefix = "time module function prefix"
|
||||
PythonTimeSleep = "Wait for n second"
|
||||
PythonMonotonic = "Return monotonic time"
|
||||
|
||||
@@ -50,6 +50,7 @@ PythonCommandCount = "list.count(x)"
|
||||
PythonCommandCountWithoutArg = ".count(\x11)"
|
||||
PythonCommandDegrees = "degrees(x)"
|
||||
PythonCommandDivMod = "divmod(a,b)"
|
||||
PythonCommandDrawCircle = "draw_circle(x,y,r,color)"
|
||||
PythonCommandDrawLine = "draw_line(x1,y1,x2,y2,color)"
|
||||
PythonCommandDrawString = "draw_string(\"text\",x,y)"
|
||||
PythonCommandConstantE = "e"
|
||||
@@ -60,12 +61,16 @@ PythonCommandExp = "exp(x)"
|
||||
PythonCommandExpComplex = "exp(z)"
|
||||
PythonCommandExpm1 = "expm1(x)"
|
||||
PythonCommandFabs = "fabs(x)"
|
||||
PythonCommandFillCircle = "fill_circle(x,y,r,color)"
|
||||
PythonCommandFillPolygon = "fill_polygon([(x1,y1),...],color)"
|
||||
PythonCommandFillRect = "fill_rect(x,y,width,height,color)"
|
||||
PythonCommandFloat = "float(x)"
|
||||
PythonCommandFloor = "floor(x)"
|
||||
PythonCommandFmod = "fmod(a,b)"
|
||||
PythonCommandFrExp = "frexp(x)"
|
||||
PythonCommandGamma = "gamma(x)"
|
||||
PythonCommandGetKeys = "get_keys()"
|
||||
PythonCommandGetPalette = "get_palette()"
|
||||
PythonCommandGetPixel = "get_pixel(x,y)"
|
||||
PythonCommandGetrandbits = "getrandbits(k)"
|
||||
PythonCommandGrid = "grid()"
|
||||
@@ -86,9 +91,13 @@ PythonCommandImportIon = "import ion"
|
||||
PythonCommandImportKandinsky = "import kandinsky"
|
||||
PythonCommandImportMath = "import math"
|
||||
PythonCommandImportMatplotlibPyplot = "import matplotlib.pyplot"
|
||||
PythonCommandImportFromNumpy = "from ulab import numpy as np"
|
||||
PythonCommandImportFromScipy = "from ulab import scipy as spy"
|
||||
PythonCommandImportRandom = "import random"
|
||||
PythonCommandImportOs = "import os"
|
||||
PythonCommandImportFromOs = "from os import *"
|
||||
PythonCommandImportSys = "import sys"
|
||||
PythonCommandImportFromSys = "from sys import *"
|
||||
PythonCommandImportTime = "import time"
|
||||
PythonCommandImportTurtle = "import turtle"
|
||||
PythonCommandIndex = "list.index(x)"
|
||||
@@ -151,6 +160,9 @@ PythonCommandKeyEe = "KEY_EE"
|
||||
PythonCommandKeyAns = "KEY_ANS"
|
||||
PythonCommandKeyExe = "KEY_EXE"
|
||||
PythonCommandIsKeyDown = "keydown(k)"
|
||||
PythonCommandBattery = "battery()"
|
||||
PythonCommandBatteryLevel = "battery_level()"
|
||||
PythonCommandBatteryIscharging = "battery_ischarging()"
|
||||
PythonCommandLdexp = "ldexp(x,i)"
|
||||
PythonCommandLength = "len(object)"
|
||||
PythonCommandLgamma = "lgamma(x)"
|
||||
@@ -166,6 +178,120 @@ PythonCommandMax = "max(list)"
|
||||
PythonCommandMin = "min(list)"
|
||||
PythonCommandModf = "modf(x)"
|
||||
PythonCommandMonotonic = "monotonic()"
|
||||
PythonCommandNumpyArray = "np.array(a)"
|
||||
PythonCommandNumpyArange = "np.arange(i)"
|
||||
PythonCommandNumpyConcatenate = "np.concatenate(a,b)"
|
||||
PythonCommandNumpyDiag = "np.diag(a)"
|
||||
PythonCommandNumpyZeros = "np.zeros(s)"
|
||||
PythonCommandNumpyOnes = "np.ones(s)"
|
||||
PythonCommandNumpyEmpty = "np.empty(s)"
|
||||
PythonCommandNumpyEye = "np.eye(n, m)"
|
||||
PythonCommandNumpyFull = "np.full(s, v)"
|
||||
PythonCommandNumpyLinspace = "np.linspace(s, e)"
|
||||
PythonCommandNumpyLogspace = "np.logspace(s, e)"
|
||||
PythonCommandNumpyCopy = "ndarray.copy()"
|
||||
PythonCommandNumpyCopyWithoutArg = ".copy()"
|
||||
PythonCommandNumpyDtype = "ndarray.dtype"
|
||||
PythonCommandNumpyDtypeWithoutArg = ".dtype"
|
||||
PythonCommandNumpyFlat = "ndarray.flat"
|
||||
PythonCommandNumpyFlatWithoutArg = ".flat"
|
||||
PythonCommandNumpyFlatten = "ndarray.flatten()"
|
||||
PythonCommandNumpyFlattenWithoutArg = ".flatten()"
|
||||
PythonCommandNumpyShape = "ndarray.shape"
|
||||
PythonCommandNumpyShapeWithoutArg = ".shape"
|
||||
PythonCommandNumpyReshape = "ndarray.reshape(s)"
|
||||
PythonCommandNumpyReshapeWithoutArg = ".reshape(\x11)"
|
||||
PythonCommandNumpySize = "ndarray.size"
|
||||
PythonCommandNumpySizeWithoutArg = ".size"
|
||||
PythonCommandNumpyTranspose = "ndarray.transpose()"
|
||||
PythonCommandNumpyTransposeWithoutArg = ".transpose()"
|
||||
PythonCommandNumpySort = "ndarray.sort()"
|
||||
PythonCommandNumpySortWithoutArg = ".sort()"
|
||||
PythonCommandNumpyFromBuffer = "ndarray.frombuffer(b)"
|
||||
PythonCommandNumpyToBytes = "ndarray.tobytes()"
|
||||
PythonCommandNumpyToBytesWithoutArg = ".tobytes()"
|
||||
PythonCommandNumpySetPrintOptions = "np.set_printoptions()"
|
||||
PythonCommandNumpyGetPrintOptions = "np.get_printoptions()"
|
||||
PythonCommandNumpyNdinfo = "np.ndinfo(a)"
|
||||
PythonCommandNumpyAll = "np.all(a)"
|
||||
PythonCommandNumpyAny = "np.any(a)"
|
||||
PythonCommandNumpyArgmax = "np.argmax(a)"
|
||||
PythonCommandNumpyArgmin = "np.argmin(a)"
|
||||
PythonCommandNumpyArgsort = "np.argsort(a)"
|
||||
PythonCommandNumpyClip = "np.clip(a, min, max)"
|
||||
PythonCommandNumpyConvolve = "np.convolve(a, b)"
|
||||
PythonCommandNumpyDiff = "np.diff(a)"
|
||||
PythonCommandNumpyInterp = "np.interp(a)"
|
||||
PythonCommandNumpyDot = "np.dot(a, b)"
|
||||
PythonCommandNumpyCross = "np.cross(a, b)"
|
||||
PythonCommandNumpyEqual = "np.equal(a, b)"
|
||||
PythonCommandNumpyNot_equal = "np.not_equal(a, b)"
|
||||
PythonCommandNumpyFlip = "np.flip(a)"
|
||||
PythonCommandNumpyIsfinite = "np.isfinite(a)"
|
||||
PythonCommandNumpyIsinf = "np.isinf(a)"
|
||||
PythonCommandNumpyMean = "np.mean(a)"
|
||||
PythonCommandNumpyMin = "np.min(a)"
|
||||
PythonCommandNumpyMax = "np.max(a)"
|
||||
PythonCommandNumpyMedian = "np.median(a)"
|
||||
PythonCommandNumpyMinimum = "np.minimum(a, b)"
|
||||
PythonCommandNumpyMaximum = "np.maximum(a, b)"
|
||||
PythonCommandNumpyPolyfit = "np.polyfit(a, b, y)"
|
||||
PythonCommandNumpyPolyval = "np.polyval(p, x)"
|
||||
PythonCommandNumpyRoll = "np.roll(a, n)"
|
||||
PythonCommandNumpySortWithArguments = "np.sort(a)"
|
||||
PythonCommandNumpyStd = "np.std(a)"
|
||||
PythonCommandNumpySum = "np.sum(a)"
|
||||
PythonCommandNumpyTrace = "np.trace(a)"
|
||||
PythonCommandNumpyTrapz = "np.trapz(y)"
|
||||
PythonCommandNumpyWhere = "np.where(c, x, y)"
|
||||
PythonCommandNumpyVectorize = "np.vectorize(f)"
|
||||
PythonCommandNumpyAcos = "np.acos(a)"
|
||||
PythonCommandNumpyAcosh = "np.acosh(a)"
|
||||
PythonCommandNumpyArctan2 = "np.arctan2(a)"
|
||||
PythonCommandNumpyAround = "np.around(a)"
|
||||
PythonCommandNumpyAsin = "np.asin(a)"
|
||||
PythonCommandNumpyAsinh = "np.asinh(a)"
|
||||
PythonCommandNumpyAtan = "np.atan(a)"
|
||||
PythonCommandNumpyAtanh = "np.atanh(a)"
|
||||
PythonCommandNumpyCeil = "np.ceil(a)"
|
||||
PythonCommandNumpyCos = "np.cos(a)"
|
||||
PythonCommandNumpyCosh = "np.cosh(a)"
|
||||
PythonCommandNumpyDegrees = "np.degrees(a)"
|
||||
PythonCommandNumpyExp = "np.exp(a)"
|
||||
PythonCommandNumpyExpm1 = "np.expm1(a)"
|
||||
PythonCommandNumpyFloor = "np.floor(a)"
|
||||
PythonCommandNumpyLog = "np.log(a)"
|
||||
PythonCommandNumpyLog10 = "np.log10(a)"
|
||||
PythonCommandNumpyLog2 = "np.log2(a)"
|
||||
PythonCommandNumpyRadians = "np.radians(a)"
|
||||
PythonCommandNumpySin = "np.sin(a)"
|
||||
PythonCommandNumpySinh = "np.sinh(a)"
|
||||
PythonCommandNumpySqrt = "np.sqrt(a)"
|
||||
PythonCommandNumpyTan = "np.tan(a)"
|
||||
PythonCommandNumpyTanh = "np.tanh(a)"
|
||||
PythonCommandNumpyBool = "np.bool"
|
||||
PythonCommandNumpyFloat = "np.float"
|
||||
PythonCommandNumpyUint8 = "np.uint8"
|
||||
PythonCommandNumpyInt8 = "np.int8"
|
||||
PythonCommandNumpyUint16 = "np.uint16"
|
||||
PythonCommandNumpyInt16 = "np.int16"
|
||||
PythonCommandNumpyNan = "np.nan"
|
||||
PythonCommandNumpyInf = "np.inf"
|
||||
PythonCommandNumpyE = "np.e"
|
||||
PythonCommandNumpyPi = "np.pi"
|
||||
PythonCommandNumpyFft = "np.fft.fft(a)"
|
||||
PythonCommandNumpyIfft = "np.fft.ifft(a)"
|
||||
PythonCommandNumpyDet = "np.linalg.det(a)"
|
||||
PythonCommandNumpyEig = "np.linalg.eig(a)"
|
||||
PythonCommandNumpyCholesky = "np.linalg.cholesky(a)"
|
||||
PythonCommandNumpyInv = "np.linalg.inv(a)"
|
||||
PythonCommandNumpyNorm = "np.linalg.norm(a)"
|
||||
PythonCommandNumpyFunction = "np.function"
|
||||
PythonCommandNumpyFunctionWithoutArg = "np.\x11"
|
||||
PythonCommandNumpyFftFunction = "np.fft.function"
|
||||
PythonCommandNumpyFftFunctionWithoutArg = "np.fft.\x11"
|
||||
PythonCommandNumpyLinalgFunction = "np.linalg.function"
|
||||
PythonCommandNumpyLinalgFunctionWithoutArg = "np.linalg.\x11"
|
||||
PythonCommandOct = "oct(x)"
|
||||
PythonCommandPhase = "phase(z)"
|
||||
PythonCommandPlot = "plot(x,y,color)"
|
||||
@@ -192,12 +318,39 @@ PythonCommandReverseWithoutArg = ".reverse()"
|
||||
PythonCommandRound = "round(x,n)"
|
||||
PythonCommandScatter = "scatter(x,y)"
|
||||
PythonCommandSeed = "seed(x)"
|
||||
PythonCommandScipyFunction = "spy.function"
|
||||
PythonCommandScipyFunctionWithoutArg = "spy.\x11"
|
||||
PythonCommandScipyLinalgFunction = "spy.linalg.function"
|
||||
PythonCommandScipyLinalgFunctionWithoutArg = "spy.linalg.\x11"
|
||||
PythonCommandScipyOptimizeFunction = "spy.optimize.function"
|
||||
PythonCommandScipyOptimizeFunctionWithoutArg = "spy.optimize.\x11"
|
||||
PythonCommandScipySignalFunction = "spy.signal.function"
|
||||
PythonCommandScipySignalFunctionWithoutArg = "spy.signal.\x11"
|
||||
PythonCommandScipySpecialFunction = "spy.special.function"
|
||||
PythonCommandScipySpecialFunctionWithoutArg = "spy.special.\x11"
|
||||
PythonCommandScipyLinalgChoSolve = "spy.linalg.cho_solve(a, b)"
|
||||
PythonCommandScipyLinalgSolveTriangular = "spy.linalg.solve_triangular(a, b)"
|
||||
PythonCommandScipyOptimizeBisect = "spy.optimize.bisect(f, a, b)"
|
||||
PythonCommandScipyOptimizeFmin = "spy.optimize.fmin(f, x0)"
|
||||
PythonCommandScipyOptimizeNewton = "spy.optimize.newton(f, x0)"
|
||||
PythonCommandScipySignalSosfilt = "spy.signal.sosfilt(sos, x)"
|
||||
PythonCommandScipySignalSpectrogram = "spy.signal.spectrogram(y)"
|
||||
PythonCommandScipySpecialErf = "spy.erf(a)"
|
||||
PythonCommandScipySpecialErfc = "spy.erfc(a)"
|
||||
PythonCommandScipySpecialGamma = "spy.gamma(a)"
|
||||
PythonCommandScipySpecialGammaln = "spy.gammaln(a)"
|
||||
PythonCommandSetPixel = "set_pixel(x,y,color)"
|
||||
PythonCommandShow = "show()"
|
||||
PythonCommandSin = "sin(x)"
|
||||
PythonCommandSinComplex = "sin(z)"
|
||||
PythonCommandSinh = "sinh(x)"
|
||||
PythonCommandSleep = "sleep(t)"
|
||||
PythonCommandLocalTime = "localtime([timestamp])"
|
||||
PythonCommandMktime = "mktime(tm)"
|
||||
PythonCommandTime = "time()"
|
||||
PythonCommandSetLocaltime = "setlocaltime(tm)"
|
||||
PythonCommandRTCmode = "rtcmode()"
|
||||
PythonCommandSetRTCmode = "setrtcmode(mode)"
|
||||
PythonCommandSort = "list.sort()"
|
||||
PythonCommandSortWithoutArg = ".sort()"
|
||||
PythonCommandSorted = "sorted(list)"
|
||||
@@ -216,11 +369,20 @@ PythonCommandUniform = "uniform(a,b)"
|
||||
PythonConstantE = "2.718281828459045"
|
||||
PythonConstantPi = "3.141592653589793"
|
||||
PythonOsCommandUname = "uname()"
|
||||
PythonOsCommandGetlogin = "getlogin()"
|
||||
PythonOsCommandRemove = "remove(filename)"
|
||||
PythonOsCommandRename = "rename(oldname, newname)"
|
||||
PythonOsCommandRemoveWithoutArg = "remove(\x11)"
|
||||
PythonOsCommandRenameWithoutArg = "rename(\x11,)"
|
||||
PythonOsCommandListdir = "listdir()"
|
||||
PythonSysCommandExit = "exit()"
|
||||
PythonSysCommandPrintexception = "print_exception(exc)"
|
||||
PythonSysCommandPrintexceptionWithoutArg = "print_exception(\x11)"
|
||||
PythonSysCommandByteorder = "byteorder"
|
||||
PythonSysCommandImplementation = "implementation"
|
||||
PythonSysCommandModules = "modules"
|
||||
PythonSysCommandVersion = "version"
|
||||
PythonSysCommandVersioninfo = "version_info"
|
||||
PythonTurtleCommandBackward = "backward(x)"
|
||||
PythonTurtleCommandCircle = "circle(r)"
|
||||
PythonTurtleCommandColor = "color('c')"
|
||||
|
||||
@@ -40,7 +40,7 @@ ConsoleController::ConsoleController(Responder * parentResponder, App * pythonDe
|
||||
#endif
|
||||
{
|
||||
m_selectableTableView.setMargins(0, Metric::CommonRightMargin, 0, Metric::TitleBarExternHorizontalMargin);
|
||||
m_selectableTableView.setBackgroundColor(Palette::CodeBackground);
|
||||
m_selectableTableView.setBackgroundColor(*Palette::CodeBackground);
|
||||
m_editCell.setPrompt(sStandardPromptText);
|
||||
for (int i = 0; i < k_numberOfLineCells; i++) {
|
||||
m_cells[i].setParentResponder(&m_selectableTableView);
|
||||
|
||||
@@ -18,8 +18,8 @@ void ConsoleLineCell::ScrollableConsoleLineView::ConsoleLineView::setLine(Consol
|
||||
}
|
||||
|
||||
void ConsoleLineCell::ScrollableConsoleLineView::ConsoleLineView::drawRect(KDContext * ctx, KDRect rect) const {
|
||||
ctx->fillRect(bounds(), Palette::CodeBackground);
|
||||
ctx->drawString(m_line->text(), KDPointZero, GlobalPreferences::sharedGlobalPreferences()->font(), textColor(m_line), isHighlighted()? Palette::Select : Palette::BackgroundApps);
|
||||
ctx->fillRect(bounds(), *Palette::CodeBackground);
|
||||
ctx->drawString(m_line->text(), KDPointZero, GlobalPreferences::sharedGlobalPreferences()->font(), textColor(m_line), isHighlighted()? *Palette::Select : *Palette::BackgroundApps);
|
||||
}
|
||||
|
||||
KDSize ConsoleLineCell::ScrollableConsoleLineView::ConsoleLineView::minimalSizeForOptimalDisplay() const {
|
||||
|
||||
@@ -53,7 +53,7 @@ private:
|
||||
ConsoleLineView m_consoleLineView;
|
||||
};
|
||||
static KDColor textColor(ConsoleLine * line) {
|
||||
return line->isFromCurrentSession() ? Palette::CodeText : Palette::SecondaryText;
|
||||
return line->isFromCurrentSession() ? *Palette::CodeText : *Palette::SecondaryText;
|
||||
}
|
||||
MessageTextView m_promptView;
|
||||
ScrollableConsoleLineView m_scrollableView;
|
||||
|
||||
@@ -57,8 +57,8 @@ void EditorView::layoutSubviews(bool force) {
|
||||
/* EditorView::GutterView */
|
||||
|
||||
void EditorView::GutterView::drawRect(KDContext * ctx, KDRect rect) const {
|
||||
KDColor textColor = Palette::PrimaryText;
|
||||
KDColor backgroundColor = Palette::CodeGutterViewBackground;
|
||||
KDColor textColor = *Palette::PrimaryText;
|
||||
KDColor backgroundColor = *Palette::CodeGutterViewBackground;
|
||||
|
||||
ctx->fillRect(rect, backgroundColor);
|
||||
|
||||
@@ -102,7 +102,7 @@ void EditorView::GutterView::setOffset(KDCoordinate offset) {
|
||||
|
||||
KDSize EditorView::GutterView::minimalSizeForOptimalDisplay() const {
|
||||
int numberOfChars = 2; // TODO: Could be computed
|
||||
return KDSize(2 * k_margin + numberOfChars * Poincare::Preferences::sharedPreferences()->KDPythonFont()->glyphSize().width(), 0);
|
||||
return KDSize(2 * k_margin + numberOfChars * m_font->glyphSize().width(), 0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include <escher/palette.h>
|
||||
#include <ion/unicode/utf8_helper.h>
|
||||
#include <python/port/port.h>
|
||||
#include "../global_preferences.h"
|
||||
|
||||
extern "C" {
|
||||
#include "py/nlr.h"
|
||||
@@ -13,22 +14,12 @@ extern "C" {
|
||||
|
||||
namespace Code {
|
||||
|
||||
constexpr KDColor CommentColor = Palette::CodeComment;
|
||||
constexpr KDColor NumberColor = Palette::CodeNumber;
|
||||
constexpr KDColor KeywordColor = Palette::CodeKeyword;
|
||||
// constexpr KDColor BuiltinColor = KDColor::RGB24(0x0086B3);
|
||||
constexpr KDColor OperatorColor = Palette::CodeOperator;
|
||||
constexpr KDColor StringColor = Palette::CodeString;
|
||||
constexpr KDColor BackgroundColor = Palette::CodeBackground;
|
||||
constexpr KDColor HighlightColor = Palette::CodeBackgroundSelected;
|
||||
constexpr KDColor AutocompleteColor = KDColor::RGB24(0xC6C6C6); // TODO Palette change
|
||||
|
||||
static inline KDColor TokenColor(mp_token_kind_t tokenKind) {
|
||||
if (tokenKind == MP_TOKEN_STRING) {
|
||||
return StringColor;
|
||||
return *Palette::CodeString;
|
||||
}
|
||||
if (tokenKind == MP_TOKEN_INTEGER || tokenKind == MP_TOKEN_FLOAT_OR_IMAG) {
|
||||
return NumberColor;
|
||||
return *Palette::CodeNumber;
|
||||
}
|
||||
static_assert(MP_TOKEN_ELLIPSIS + 1 == MP_TOKEN_KW_FALSE
|
||||
&& MP_TOKEN_KW_FALSE + 1 == MP_TOKEN_KW_NONE
|
||||
@@ -68,7 +59,7 @@ static inline KDColor TokenColor(mp_token_kind_t tokenKind) {
|
||||
&& MP_TOKEN_KW_YIELD + 1 == MP_TOKEN_OP_TILDE,
|
||||
"MP_TOKEN order changed, so Code::PythonTextArea::TokenColor might need to change too.");
|
||||
if (tokenKind >= MP_TOKEN_KW_FALSE && tokenKind <= MP_TOKEN_KW_YIELD) {
|
||||
return KeywordColor;
|
||||
return *Palette::CodeKeyword;
|
||||
}
|
||||
static_assert(MP_TOKEN_OP_TILDE + 1 == MP_TOKEN_OP_LESS
|
||||
&& MP_TOKEN_OP_LESS + 1 == MP_TOKEN_OP_MORE
|
||||
@@ -120,9 +111,9 @@ static inline KDColor TokenColor(mp_token_kind_t tokenKind) {
|
||||
|| tokenKind == MP_TOKEN_DEL_EQUAL
|
||||
|| tokenKind == MP_TOKEN_DEL_MINUS_MORE)
|
||||
{
|
||||
return OperatorColor;
|
||||
return *Palette::CodeOperator;
|
||||
}
|
||||
return Palette::CodeText;
|
||||
return *Palette::CodeText;
|
||||
}
|
||||
|
||||
static inline size_t TokenLength(mp_lexer_t * lex, const char * tokenPosition) {
|
||||
@@ -215,7 +206,7 @@ void PythonTextArea::ContentView::unloadSyntaxHighlighter() {
|
||||
}
|
||||
|
||||
void PythonTextArea::ContentView::clearRect(KDContext * ctx, KDRect rect) const {
|
||||
ctx->fillRect(rect, BackgroundColor);
|
||||
ctx->fillRect(rect, *Palette::CodeBackground);
|
||||
}
|
||||
|
||||
#define LOG_DRAWING 0
|
||||
@@ -245,11 +236,11 @@ void PythonTextArea::ContentView::drawLine(KDContext * ctx, int line, const char
|
||||
fromColumn,
|
||||
spacesStart,
|
||||
std::min(text + byteLength, firstNonSpace) - spacesStart,
|
||||
StringColor,
|
||||
BackgroundColor,
|
||||
*Palette::CodeString,
|
||||
*Palette::CodeBackground,
|
||||
selectionStart,
|
||||
selectionEnd,
|
||||
HighlightColor);
|
||||
*Palette::CodeBackgroundSelected);
|
||||
}
|
||||
if (UTF8Helper::CodePointIs(firstNonSpace, UCodePointNull)) {
|
||||
return;
|
||||
@@ -275,17 +266,17 @@ void PythonTextArea::ContentView::drawLine(KDContext * ctx, int line, const char
|
||||
UTF8Helper::GlyphOffsetAtCodePoint(text, tokenEnd),
|
||||
tokenEnd,
|
||||
std::min(text + byteLength, tokenFrom) - tokenEnd,
|
||||
StringColor,
|
||||
BackgroundColor,
|
||||
*Palette::CodeString,
|
||||
*Palette::CodeBackground,
|
||||
selectionStart,
|
||||
selectionEnd,
|
||||
HighlightColor);
|
||||
*Palette::CodeBackgroundSelected);
|
||||
}
|
||||
tokenLength = TokenLength(lex, tokenFrom);
|
||||
tokenEnd = tokenFrom + tokenLength;
|
||||
|
||||
// If the token is being autocompleted, use DefaultColor
|
||||
KDColor color = (tokenFrom <= autocompleteStart && autocompleteStart < tokenEnd) ? Palette::CodeText : TokenColor(lex->tok_kind);
|
||||
KDColor color = (tokenFrom <= autocompleteStart && autocompleteStart < tokenEnd) ? *Palette::CodeText : TokenColor(lex->tok_kind);
|
||||
|
||||
LOG_DRAW("Draw \"%.*s\" for token %d\n", tokenLength, tokenFrom, lex->tok_kind);
|
||||
drawStringAt(ctx, line,
|
||||
@@ -293,10 +284,10 @@ void PythonTextArea::ContentView::drawLine(KDContext * ctx, int line, const char
|
||||
tokenFrom,
|
||||
tokenLength,
|
||||
color,
|
||||
BackgroundColor,
|
||||
*Palette::CodeBackground,
|
||||
selectionStart,
|
||||
selectionEnd,
|
||||
HighlightColor);
|
||||
*Palette::CodeBackgroundSelected);
|
||||
|
||||
mp_lexer_to_next(lex);
|
||||
LOG_DRAW("Pop token %d\n", lex->tok_kind);
|
||||
@@ -304,18 +295,18 @@ void PythonTextArea::ContentView::drawLine(KDContext * ctx, int line, const char
|
||||
|
||||
tokenFrom += tokenLength;
|
||||
|
||||
// Even if the token is being autocompleted, use CommentColor
|
||||
// Even if the token is being autocompleted, use *Palette::CodeComment
|
||||
if (tokenFrom < text + byteLength) {
|
||||
LOG_DRAW("Draw comment \"%.*s\" from %d\n", byteLength - (tokenFrom - text), firstNonSpace, tokenFrom);
|
||||
drawStringAt(ctx, line,
|
||||
UTF8Helper::GlyphOffsetAtCodePoint(text, tokenFrom),
|
||||
tokenFrom,
|
||||
text + byteLength - tokenFrom,
|
||||
CommentColor,
|
||||
BackgroundColor,
|
||||
*Palette::CodeComment,
|
||||
*Palette::CodeBackground,
|
||||
selectionStart,
|
||||
selectionEnd,
|
||||
HighlightColor);
|
||||
*Palette::CodeBackgroundSelected);
|
||||
}
|
||||
|
||||
mp_lexer_free(lex);
|
||||
@@ -331,11 +322,11 @@ void PythonTextArea::ContentView::drawLine(KDContext * ctx, int line, const char
|
||||
UTF8Helper::GlyphOffsetAtCodePoint(text, autocompleteStart),
|
||||
autocompleteStart,
|
||||
std::min(text + byteLength, m_autocompletionEnd) - autocompleteStart,
|
||||
AutocompleteColor,
|
||||
BackgroundColor,
|
||||
KDColor::RGB24(0xC6C6C6),
|
||||
*Palette::CodeBackground,
|
||||
nullptr,
|
||||
nullptr,
|
||||
HighlightColor);
|
||||
*Palette::CodeBackgroundSelected);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -444,6 +435,11 @@ void PythonTextArea::addAutocompletion() {
|
||||
}
|
||||
|
||||
bool PythonTextArea::addAutocompletionTextAtIndex(int nextIndex, int * currentIndexToUpdate) {
|
||||
// If Autocomplete disable, skip this step
|
||||
if(!GlobalPreferences::sharedGlobalPreferences()->autocomplete()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// The variable box should be loaded at this point
|
||||
const char * autocompletionTokenBeginning = nullptr;
|
||||
const char * autocompletionLocation = const_cast<char *>(cursorLocation());
|
||||
|
||||
@@ -135,6 +135,173 @@ const ToolboxMessageTree MatplotlibPyplotModuleChildren[] = {
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandColorGray, I18n::Message::PythonColorGray, false)
|
||||
};
|
||||
|
||||
#if defined(INCLUDE_ULAB)
|
||||
|
||||
const ToolboxMessageTree NumpyNdarrayModuleChildren[] = {
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyArray),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyArange),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyConcatenate),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyDiag),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyZeros),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyOnes),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyEmpty),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyEye),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyFull),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyLinspace),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyLogspace),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyFromBuffer),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyCopy, I18n::Message::Default, false, I18n::Message::PythonCommandNumpyCopyWithoutArg),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyDtype, I18n::Message::Default, false, I18n::Message::PythonCommandNumpyDtypeWithoutArg),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyFlat, I18n::Message::Default, false, I18n::Message::PythonCommandNumpyFlatWithoutArg),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyFlatten, I18n::Message::Default, false, I18n::Message::PythonCommandNumpyFlattenWithoutArg),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyShape, I18n::Message::Default, false, I18n::Message::PythonCommandNumpyShapeWithoutArg),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyReshape, I18n::Message::Default, false, I18n::Message::PythonCommandNumpyReshapeWithoutArg),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpySize, I18n::Message::Default, false, I18n::Message::PythonCommandNumpySizeWithoutArg),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyTranspose, I18n::Message::Default, false, I18n::Message::PythonCommandNumpyTransposeWithoutArg),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpySort, I18n::Message::Default, false, I18n::Message::PythonCommandNumpySortWithoutArg),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyToBytes, I18n::Message::Default, false, I18n::Message::PythonCommandNumpyToBytesWithoutArg)
|
||||
};
|
||||
|
||||
const ToolboxMessageTree NumpyFunctionsModuleChildren[] = {
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyNdinfo),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyAll),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyAny),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyArgmax),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyArgmin),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyArgsort),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyClip),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyConvolve),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyDiff),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyInterp),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyDot),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyCross),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyEqual),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyNot_equal),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyFlip),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyIsfinite),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyIsinf),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyMean),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyMin),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyMax),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyMedian),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyMinimum),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyMaximum),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyPolyfit),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyPolyval),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyRoll),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpySortWithArguments),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyStd),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpySum),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyTrace),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyTrapz),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyWhere),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyVectorize),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyAcos),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyAcosh),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyArctan2),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyAround),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyAsin),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyAsinh),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyAtan),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyAtanh),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyCeil),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyCos),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyCosh),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyDegrees),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyExp),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyExpm1),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyFloor),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyLog),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyLog10),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyLog2),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyRadians),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpySin),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpySinh),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpySqrt),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyTan),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyTanh),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyBool),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyFloat),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyUint8),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyInt8),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyUint16),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyInt16),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyNan),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyInf),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyE),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyPi),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpySetPrintOptions),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyGetPrintOptions)
|
||||
};
|
||||
|
||||
const ToolboxMessageTree NumpyFftModuleChildren[] = {
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyFftFunction, I18n::Message::PythonNumpyFftFunction, false, I18n::Message::PythonCommandNumpyFftFunctionWithoutArg),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyFft),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyIfft)
|
||||
};
|
||||
|
||||
const ToolboxMessageTree NumpyLinalgModuleChildren[] = {
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyLinalgFunction, I18n::Message::PythonNumpyLinalgFunction, false, I18n::Message::PythonCommandNumpyLinalgFunctionWithoutArg),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyDet),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyEig),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyCholesky),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyInv),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyNorm)
|
||||
};
|
||||
|
||||
const ToolboxMessageTree NumpyModuleChildren[] = {
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandImportFromNumpy, I18n::Message::PythonImportNumpy, false),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyFunction, I18n::Message::PythonNumpyFunction, false, I18n::Message::PythonCommandNumpyFunctionWithoutArg),
|
||||
ToolboxMessageTree::Node(I18n::Message::NumpyNdarray, NumpyNdarrayModuleChildren),
|
||||
ToolboxMessageTree::Node(I18n::Message::Functions, NumpyFunctionsModuleChildren),
|
||||
ToolboxMessageTree::Node(I18n::Message::NumpyFftModule, NumpyFftModuleChildren),
|
||||
ToolboxMessageTree::Node(I18n::Message::NumpyLinalgModule, NumpyLinalgModuleChildren)
|
||||
};
|
||||
|
||||
const ToolboxMessageTree ScipyLinalgModuleChildren[] = {
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandScipyLinalgFunction, I18n::Message::PythonScipyLinalgFunction, false, I18n::Message::PythonCommandScipyLinalgFunctionWithoutArg),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandScipyLinalgChoSolve),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandScipyLinalgSolveTriangular)
|
||||
};
|
||||
|
||||
const ToolboxMessageTree ScipyOptimizeModuleChildren[] = {
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandScipyOptimizeFunction, I18n::Message::PythonScipyOptimizeFunction, false, I18n::Message::PythonCommandScipyOptimizeFunctionWithoutArg),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandScipyOptimizeBisect),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandScipyOptimizeFmin),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandScipyOptimizeNewton)
|
||||
};
|
||||
|
||||
const ToolboxMessageTree ScipySignalModuleChildren[] = {
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandScipySignalFunction, I18n::Message::PythonScipySignalFunction, false, I18n::Message::PythonCommandScipySignalFunctionWithoutArg),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandScipySignalSosfilt),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandScipySignalSpectrogram)
|
||||
};
|
||||
|
||||
const ToolboxMessageTree ScipySpecialModuleChildren[] = {
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandScipySpecialFunction, I18n::Message::PythonScipySpecialFunction, false, I18n::Message::PythonCommandScipySpecialFunctionWithoutArg),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandScipySpecialErf),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandScipySpecialErfc),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandScipySpecialGamma),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandScipySpecialGammaln),
|
||||
};
|
||||
|
||||
const ToolboxMessageTree ScipyModuleChildren[] = {
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandImportFromScipy, I18n::Message::PythonImportScipy, false),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandScipyFunction, I18n::Message::PythonScipyFunction, false, I18n::Message::PythonCommandScipyFunctionWithoutArg),
|
||||
ToolboxMessageTree::Node(I18n::Message::ScipyLinalgModule, ScipyLinalgModuleChildren),
|
||||
ToolboxMessageTree::Node(I18n::Message::ScipyOptimizeModule, ScipyOptimizeModuleChildren),
|
||||
ToolboxMessageTree::Node(I18n::Message::ScipySignalModule, ScipySignalModuleChildren),
|
||||
ToolboxMessageTree::Node(I18n::Message::ScipySpecialModule, ScipySpecialModuleChildren),
|
||||
};
|
||||
|
||||
const ToolboxMessageTree UlabModuleChildren[] = {
|
||||
ToolboxMessageTree::Node(I18n::Message::NumpyModule, NumpyModuleChildren),
|
||||
ToolboxMessageTree::Node(I18n::Message::ScipyModule, ScipyModuleChildren),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::UlabDocumentation, I18n::Message::UlabDocumentationLink)
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
const ToolboxMessageTree TurtleModuleChildren[] = {
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandImportTurtle, I18n::Message::PythonImportTurtle, false),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandImportFromTurtle, I18n::Message::PythonImportTurtle, false),
|
||||
@@ -194,14 +361,21 @@ const ToolboxMessageTree KandinskyModuleChildren[] = {
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandColor, I18n::Message::PythonColor),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandDrawString, I18n::Message::PythonDrawString),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandDrawLine, I18n::Message::PythonDrawLine),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandFillRect, I18n::Message::PythonFillRect)
|
||||
};
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandDrawCircle, I18n::Message::PythonDrawCircle),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandFillRect, I18n::Message::PythonFillRect),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandFillCircle, I18n::Message::PythonFillCircle),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandFillPolygon, I18n::Message::PythonFillPolygon),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandGetKeys, I18n::Message::PythonGetKeys),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandGetPalette, I18n::Message::PythonGetPalette)};
|
||||
|
||||
const ToolboxMessageTree IonModuleChildren[] = {
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandImportIon, I18n::Message::PythonImportIon, false),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandImportFromIon, I18n::Message::PythonImportIon, false),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandIonFunction, I18n::Message::PythonIonFunction, false, I18n::Message::PythonCommandIonFunctionWithoutArg),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandIsKeyDown, I18n::Message::PythonIsKeyDown),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandBattery, I18n::Message::PythonBattery),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandBatteryLevel, I18n::Message::PythonBatteryLevel),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandBatteryIscharging, I18n::Message::PythonBatteryIscharging),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::IonSelector, I18n::Message::IonSelector)
|
||||
};
|
||||
|
||||
@@ -209,28 +383,51 @@ const ToolboxMessageTree TimeModuleChildren[] = {
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandImportTime, I18n::Message::PythonImportTime, false),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandImportFromTime, I18n::Message::PythonImportTime, false),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandTimeFunction, I18n::Message::PythonTimeFunction, false, I18n::Message::PythonCommandTimeFunctionWithoutArg),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandTime, I18n::Message::PythonTime),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandMonotonic, I18n::Message::PythonMonotonic, false),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandSleep, I18n::Message::PythonSleep)
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandSleep, I18n::Message::PythonSleep),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandLocalTime, I18n::Message::PythonLocalTime),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandMktime, I18n::Message::PythonMktime),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandSetLocaltime, I18n::Message::PythonSetLocaltime),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandRTCmode, I18n::Message::PythonRTCmode),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandSetRTCmode, I18n::Message::PythonSetRTCmode),
|
||||
};
|
||||
|
||||
const ToolboxMessageTree OsModuleChildren[] = {
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandImportOs, I18n::Message::PythonImportOs, false),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandImportFromOs, I18n::Message::PythonImportOs, false),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonOsCommandUname, I18n::Message::PythonOsUname, false),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonOsCommandGetlogin, I18n::Message::PythonOsGetlogin, false),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonOsCommandRemove, I18n::Message::PythonOsRemove, false, I18n::Message::PythonOsCommandRemoveWithoutArg),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonOsCommandRename, I18n::Message::PythonOsRename, false, I18n::Message::PythonOsCommandRenameWithoutArg),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonOsCommandListdir, I18n::Message::PythonOsListdir, false)
|
||||
};
|
||||
|
||||
const ToolboxMessageTree SysModuleChildren[] = {
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandImportSys, I18n::Message::PythonImportSys, false),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandImportFromSys, I18n::Message::PythonImportSys, false),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonSysCommandExit, I18n::Message::PythonSysExit, false),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonSysCommandPrintexception, I18n::Message::PythonSysPrintexception, false, I18n::Message::PythonSysCommandPrintexceptionWithoutArg),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonSysCommandByteorder, I18n::Message::PythonSysByteorder, false),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonSysCommandImplementation, I18n::Message::PythonSysImplementation, false),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonSysCommandModules, I18n::Message::PythonSysModules, false),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonSysCommandVersion, I18n::Message::PythonSysVersion, false),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonSysCommandVersioninfo, I18n::Message::PythonSysVersioninfo, false)
|
||||
};
|
||||
|
||||
const ToolboxMessageTree modulesChildren[] = {
|
||||
ToolboxMessageTree::Node(I18n::Message::MathModule, MathModuleChildren),
|
||||
ToolboxMessageTree::Node(I18n::Message::CmathModule, CMathModuleChildren),
|
||||
ToolboxMessageTree::Node(I18n::Message::MatplotlibPyplotModule, MatplotlibPyplotModuleChildren),
|
||||
#if defined(INCLUDE_ULAB)
|
||||
ToolboxMessageTree::Node(I18n::Message::UlabModule, UlabModuleChildren),
|
||||
#endif
|
||||
ToolboxMessageTree::Node(I18n::Message::TurtleModule, TurtleModuleChildren),
|
||||
ToolboxMessageTree::Node(I18n::Message::RandomModule, RandomModuleChildren),
|
||||
ToolboxMessageTree::Node(I18n::Message::KandinskyModule, KandinskyModuleChildren),
|
||||
ToolboxMessageTree::Node(I18n::Message::IonModule, IonModuleChildren),
|
||||
ToolboxMessageTree::Node(I18n::Message::OsModule, OsModuleChildren),
|
||||
ToolboxMessageTree::Node(I18n::Message::SysModule, SysModuleChildren),
|
||||
ToolboxMessageTree::Node(I18n::Message::TimeModule, TimeModuleChildren)
|
||||
};
|
||||
|
||||
@@ -272,6 +469,7 @@ const ToolboxMessageTree catalogChildren[] = {
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandCosh, I18n::Message::PythonCosh),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandDegrees, I18n::Message::PythonDegrees),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandDivMod, I18n::Message::PythonDivMod),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandDrawCircle, I18n::Message::PythonDrawCircle),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandDrawLine, I18n::Message::PythonDrawLine),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandDrawString, I18n::Message::PythonDrawString),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandConstantE, I18n::Message::PythonConstantE, false),
|
||||
@@ -281,6 +479,8 @@ const ToolboxMessageTree catalogChildren[] = {
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandExp, I18n::Message::PythonExp),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandExpm1, I18n::Message::PythonExpm1),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandFabs, I18n::Message::PythonFabs),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandFillCircle, I18n::Message::PythonFillCircle),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandFillPolygon, I18n::Message::PythonFillPolygon),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandFillRect, I18n::Message::PythonFillRect),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandFloat, I18n::Message::PythonFloat),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandFloor, I18n::Message::PythonFloor),
|
||||
@@ -323,6 +523,7 @@ const ToolboxMessageTree catalogChildren[] = {
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandIsNaN, I18n::Message::PythonIsNaN),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandKandinskyFunction, I18n::Message::PythonKandinskyFunction, false, I18n::Message::PythonCommandKandinskyFunctionWithoutArg),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandIsKeyDown, I18n::Message::PythonIsKeyDown),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandBattery, I18n::Message::PythonBattery),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandLdexp, I18n::Message::PythonLdexp),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonTurtleCommandLeft, I18n::Message::PythonTurtleLeft),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandLength, I18n::Message::PythonLength),
|
||||
@@ -492,11 +693,16 @@ KDCoordinate PythonToolbox::rowHeight(int j) {
|
||||
}
|
||||
|
||||
bool PythonToolbox::selectLeaf(int selectedRow) {
|
||||
m_selectableTableView.deselectTable();
|
||||
ToolboxMessageTree * node = (ToolboxMessageTree *)m_messageTreeModel->childAtIndex(selectedRow);
|
||||
#if defined(INCLUDE_ULAB)
|
||||
if(node->text() == I18n::Message::UlabDocumentationLink){
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
m_selectableTableView.deselectTable();
|
||||
if(node->insertedText() == I18n::Message::IonSelector){
|
||||
App::app()->toolboxIonKeys()->setSender(sender());
|
||||
Container::activeApp()->displayModalViewController(static_cast<ViewController*>(App::app()->toolboxIonKeys()), 0.f, 0.f, Metric::PopUpTopMargin, Metric::PopUpLeftMargin, 0, Metric::PopUpRightMargin);
|
||||
m_ionKeys.setSender(sender());
|
||||
Container::activeApp()->displayModalViewController(static_cast<ViewController*>(&m_ionKeys), 0.f, 0.f, Metric::PopUpTopMargin, Metric::PopUpLeftMargin, 0, Metric::PopUpRightMargin);
|
||||
return true;
|
||||
}
|
||||
const char * editedText = I18n::translate(node->insertedText());
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include <escher.h>
|
||||
#include <ion/events.h>
|
||||
#include <kandinsky/font.h>
|
||||
#include "toolbox_ion_keys.h"
|
||||
|
||||
namespace Code {
|
||||
|
||||
@@ -32,6 +33,7 @@ private:
|
||||
void scrollToAndSelectChild(int i);
|
||||
MessageTableCellWithMessage m_leafCells[k_maxNumberOfDisplayedRows];
|
||||
MessageTableCellWithChevron m_nodeCells[k_maxNumberOfDisplayedRows];
|
||||
toolboxIonKeys m_ionKeys;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace Code {
|
||||
|
||||
SandboxController::SandboxController(Responder * parentResponder) :
|
||||
ViewController(parentResponder),
|
||||
m_solidColorView(Palette::CodeBackground)
|
||||
m_solidColorView(*Palette::CodeBackground)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -8,12 +8,12 @@ constexpr char ScriptNodeCell::k_parentheses[];
|
||||
constexpr char ScriptNodeCell::k_parenthesesWithEmpty[];
|
||||
|
||||
void ScriptNodeCell::ScriptNodeView::drawRect(KDContext * ctx, KDRect rect) const {
|
||||
const KDColor backgroundColor = isHighlighted()? Palette::CodeBackgroundSelected : Palette::CodeBackground;
|
||||
const KDColor backgroundColor = isHighlighted()? *Palette::CodeBackgroundSelected : *Palette::CodeBackground;
|
||||
|
||||
// If it exists, draw the description name.
|
||||
const char * descriptionName = m_scriptNode->description();
|
||||
if (descriptionName != nullptr) {
|
||||
ctx->drawString(descriptionName, KDPoint(0, m_frame.height() - k_bottomMargin - k_font->glyphSize().height()), k_font, Palette::GrayDark, backgroundColor);
|
||||
ctx->drawString(descriptionName, KDPoint(0, m_frame.height() - k_bottomMargin - k_font->glyphSize().height()), k_font, *Palette::GrayDark, backgroundColor);
|
||||
}
|
||||
|
||||
// Draw the node name
|
||||
@@ -21,10 +21,10 @@ void ScriptNodeCell::ScriptNodeView::drawRect(KDContext * ctx, KDRect rect) cons
|
||||
const int nodeNameLength = m_scriptNode->nameLength();
|
||||
KDSize nameSize = k_font->stringSize(nodeName, nodeNameLength);
|
||||
const KDCoordinate nodeNameY = k_topMargin;
|
||||
ctx->drawString(nodeName, KDPoint(0, nodeNameY), k_font, KDColorBlack, backgroundColor, nodeNameLength);
|
||||
ctx->drawString(nodeName, KDPoint(0, nodeNameY), k_font, *Palette::PrimaryText, backgroundColor, nodeNameLength);
|
||||
// If it is needed, draw the parentheses
|
||||
if (m_scriptNode->type() == ScriptNode::Type::WithParentheses) {
|
||||
ctx->drawString(ScriptNodeCell::k_parentheses, KDPoint(nameSize.width(), nodeNameY), k_font, KDColorBlack, backgroundColor);
|
||||
ctx->drawString(ScriptNodeCell::k_parentheses, KDPoint(nameSize.width(), nodeNameY), k_font, *Palette::PrimaryText, backgroundColor);
|
||||
}
|
||||
|
||||
/* If it exists, draw the source name. If it did not fit, we would have put
|
||||
@@ -32,7 +32,7 @@ void ScriptNodeCell::ScriptNodeView::drawRect(KDContext * ctx, KDRect rect) cons
|
||||
const char * sourceName = m_scriptNode->nodeSourceName();
|
||||
if (sourceName != nullptr) {
|
||||
KDSize sourceNameSize = k_font->stringSize(sourceName);
|
||||
ctx->drawString(sourceName, KDPoint(m_frame.width() - sourceNameSize.width(), nodeNameY), k_font, Palette::CodeText, backgroundColor);
|
||||
ctx->drawString(sourceName, KDPoint(m_frame.width() - sourceNameSize.width(), nodeNameY), k_font, *Palette::CodeText, backgroundColor);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@ void ScriptParameterController::willDisplayCellForIndex(HighlightCell * cell, in
|
||||
MessageTableCellWithBuffer * myCell = (MessageTableCellWithBuffer *)cell;
|
||||
GetScriptSize(myCell);
|
||||
myCell->setAccessoryFont(KDFont::SmallFont);
|
||||
myCell->setAccessoryTextColor(Palette::SecondaryText);
|
||||
myCell->setAccessoryTextColor(*Palette::SecondaryText);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,11 +8,9 @@ bool ScriptStore::ScriptNameIsFree(const char * baseName) {
|
||||
return ScriptBaseNamed(baseName).isNull();
|
||||
}
|
||||
|
||||
// Here we add "base" script
|
||||
ScriptStore::ScriptStore() {
|
||||
addScriptFromTemplate(ScriptTemplate::Squares());
|
||||
addScriptFromTemplate(ScriptTemplate::Parabola());
|
||||
addScriptFromTemplate(ScriptTemplate::Mandelbrot());
|
||||
addScriptFromTemplate(ScriptTemplate::Polynomial());
|
||||
|
||||
}
|
||||
|
||||
void ScriptStore::deleteAllScripts() {
|
||||
|
||||
@@ -5,103 +5,9 @@ namespace Code {
|
||||
constexpr ScriptTemplate emptyScriptTemplate(".py", "\x01" R"(from math import *
|
||||
)");
|
||||
|
||||
constexpr ScriptTemplate squaresScriptTemplate("squares.py", "\x01" R"(from math import *
|
||||
from turtle import *
|
||||
def squares(angle=0.5):
|
||||
reset()
|
||||
L=330
|
||||
speed(10)
|
||||
penup()
|
||||
goto(-L/2,-L/2)
|
||||
pendown()
|
||||
for i in range(660):
|
||||
forward(L)
|
||||
left(90+angle)
|
||||
L=L-L*sin(angle*pi/180)
|
||||
hideturtle())");
|
||||
|
||||
constexpr ScriptTemplate mandelbrotScriptTemplate("mandelbrot.py", "\x01" R"(# This script draws a Mandelbrot fractal set
|
||||
# N_iteration: degree of precision
|
||||
import kandinsky
|
||||
def mandelbrot(N_iteration):
|
||||
for x in range(320):
|
||||
for y in range(222):
|
||||
# Compute the mandelbrot sequence for the point c = (c_r, c_i) with start value z = (z_r, z_i)
|
||||
z = complex(0,0)
|
||||
# Rescale to fit the drawing screen 320x222
|
||||
c = complex(3.5*x/319-2.5, -2.5*y/221+1.25)
|
||||
i = 0
|
||||
while (i < N_iteration) and abs(z) < 2:
|
||||
i = i + 1
|
||||
z = z*z+c
|
||||
# Choose the color of the dot from the Mandelbrot sequence
|
||||
rgb = int(255*i/N_iteration)
|
||||
col = kandinsky.color(int(rgb*0.82),int(rgb*0.13),int(rgb*0.18))
|
||||
# Draw a pixel colored in 'col' at position (x,y)
|
||||
kandinsky.set_pixel(x,y,col))");
|
||||
|
||||
constexpr ScriptTemplate polynomialScriptTemplate("polynomial.py", "\x01" R"(from math import *
|
||||
# roots(a,b,c) computes the solutions of the equation a*x**2+b*x+c=0
|
||||
def roots(a,b,c):
|
||||
delta = b*b-4*a*c
|
||||
if delta == 0:
|
||||
return -b/(2*a)
|
||||
elif delta > 0:
|
||||
x_1 = (-b-sqrt(delta))/(2*a)
|
||||
x_2 = (-b+sqrt(delta))/(2*a)
|
||||
return x_1, x_2
|
||||
else:
|
||||
return None)");
|
||||
|
||||
constexpr ScriptTemplate parabolaScriptTemplate("parabola.py", "\x01" R"(from matplotlib.pyplot import *
|
||||
from math import *
|
||||
|
||||
g=9.81
|
||||
|
||||
def x(t,v_0,alpha):
|
||||
return v_0*cos(alpha)*t
|
||||
def y(t,v_0,alpha,h_0):
|
||||
return -0.5*g*t**2+v_0*sin(alpha)*t+h_0
|
||||
|
||||
def vx(v_0,alpha):
|
||||
return v_0*cos(alpha)
|
||||
def vy(t,v_0,alpha):
|
||||
return -g*t+v_0*sin(alpha)
|
||||
|
||||
def t_max(v_0,alpha,h_0):
|
||||
return (v_0*sin(alpha)+sqrt((v_0**2)*(sin(alpha)**2)+2*g*h_0))/g
|
||||
|
||||
def simulation(v_0=15,alpha=pi/4,h_0=2):
|
||||
tMax=t_max(v_0,alpha,h_0)
|
||||
accuracy=1/10**(floor(log10(tMax))-1)
|
||||
T_MAX=floor(tMax*accuracy)+1
|
||||
X=[x(t/accuracy,v_0,alpha) for t in range(T_MAX)]
|
||||
Y=[y(t/accuracy,v_0,alpha,h_0) for t in range(T_MAX)]
|
||||
VX=[vx(v_0,alpha) for t in range(T_MAX)]
|
||||
VY=[vy(t/accuracy,v_0,alpha) for t in range(T_MAX)]
|
||||
for i in range(T_MAX):
|
||||
arrow(X[i],Y[i],VX[i]/accuracy,VY[i]/accuracy)
|
||||
grid()
|
||||
show())");
|
||||
|
||||
const ScriptTemplate * ScriptTemplate::Empty() {
|
||||
return &emptyScriptTemplate;
|
||||
}
|
||||
|
||||
const ScriptTemplate * ScriptTemplate::Squares() {
|
||||
return &squaresScriptTemplate;
|
||||
}
|
||||
|
||||
const ScriptTemplate * ScriptTemplate::Mandelbrot() {
|
||||
return &mandelbrotScriptTemplate;
|
||||
}
|
||||
|
||||
const ScriptTemplate * ScriptTemplate::Polynomial() {
|
||||
return &polynomialScriptTemplate;
|
||||
}
|
||||
|
||||
const ScriptTemplate * ScriptTemplate::Parabola() {
|
||||
return ¶bolaScriptTemplate;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -9,10 +9,6 @@ class ScriptTemplate {
|
||||
public:
|
||||
constexpr ScriptTemplate(const char * name, const char * value) : m_name(name), m_value(value) {}
|
||||
static const ScriptTemplate * Empty();
|
||||
static const ScriptTemplate * Squares();
|
||||
static const ScriptTemplate * Mandelbrot();
|
||||
static const ScriptTemplate * Polynomial();
|
||||
static const ScriptTemplate * Parabola();
|
||||
const char * name() const { return m_name; }
|
||||
const char * content() const { return m_value + Script::StatusSize(); }
|
||||
const char * value() const { return m_value; }
|
||||
|
||||
27
apps/code/test/toolbox_ion_keys_dummy.cpp
Normal file
27
apps/code/test/toolbox_ion_keys_dummy.cpp
Normal file
@@ -0,0 +1,27 @@
|
||||
#include "../toolbox_ion_keys.h"
|
||||
|
||||
namespace Code {
|
||||
toolboxIonKeys::toolboxIonKeys() :
|
||||
ViewController(nullptr),
|
||||
m_view()
|
||||
{
|
||||
}
|
||||
|
||||
bool toolboxIonKeys::handleEvent(Ion::Events::Event e) {
|
||||
return false;
|
||||
}
|
||||
|
||||
toolboxIonKeys::toolboxIonView::toolboxIonView():
|
||||
View()
|
||||
{
|
||||
}
|
||||
|
||||
void toolboxIonKeys::toolboxIonView::drawRect(KDContext * ctx, KDRect rect) const {
|
||||
return;
|
||||
}
|
||||
|
||||
View * toolboxIonKeys::view(){
|
||||
return &m_view;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4,3 +4,4 @@ Modules = "Module"
|
||||
LoopsAndTests = "Schleifen und Tests"
|
||||
Files = "Dateien"
|
||||
Exceptions = "Ausnahmen"
|
||||
UlabDocumentation = "Dokumentation"
|
||||
|
||||
@@ -4,3 +4,4 @@ Modules = "Modules"
|
||||
LoopsAndTests = "Loops and tests"
|
||||
Files = "Files"
|
||||
Exceptions = "Exceptions"
|
||||
UlabDocumentation = "Documentation"
|
||||
|
||||
@@ -4,3 +4,4 @@ Modules = "Modules"
|
||||
LoopsAndTests = "Loops and tests"
|
||||
Files = "Files"
|
||||
Exceptions = "Exceptions"
|
||||
UlabDocumentation = "Documentación"
|
||||
|
||||
@@ -4,3 +4,4 @@ Modules = "Modules"
|
||||
LoopsAndTests = "Boucles et tests"
|
||||
Files = "Fichiers"
|
||||
Exceptions = "Exceptions"
|
||||
UlabDocumentation = "Documentation"
|
||||
|
||||
@@ -4,3 +4,4 @@ Modules = "Modulok"
|
||||
LoopsAndTests = "Hurkok és tesztek"
|
||||
Files = "Fájlok"
|
||||
Exceptions = "Kivételek"
|
||||
UlabDocumentation = "Dokumentáció"
|
||||
|
||||
@@ -4,3 +4,4 @@ Modules = "Moduli"
|
||||
LoopsAndTests = "Cicli e test"
|
||||
Files = "Files"
|
||||
Exceptions = "Exceptions"
|
||||
UlabDocumentation = "Documentazione"
|
||||
|
||||
@@ -4,3 +4,4 @@ Modules = "Modules"
|
||||
LoopsAndTests = "Herhalingen en testen"
|
||||
Files = "Files"
|
||||
Exceptions = "Exceptions"
|
||||
UlabDocumentation = "Documentatie"
|
||||
|
||||
@@ -4,3 +4,4 @@ Modules = "Módulos"
|
||||
LoopsAndTests = "Laços e testes"
|
||||
Files = "Files"
|
||||
Exceptions = "Exceptions"
|
||||
UlabDocumentation = "Documentação"
|
||||
|
||||
@@ -3,9 +3,20 @@ IonModule = "ion"
|
||||
KandinskyModule = "kandinsky"
|
||||
MathModule = "math"
|
||||
MatplotlibPyplotModule = "matplotlib.pyplot"
|
||||
NumpyModule = "numpy"
|
||||
NumpyFftModule = "fft"
|
||||
NumpyLinalgModule = "linalg"
|
||||
ScipyModule = "scipy"
|
||||
ScipyLinalgModule = "linalg"
|
||||
ScipyOptimizeModule = "optimize"
|
||||
ScipySignalModule = "signal"
|
||||
ScipySpecialModule = "special"
|
||||
NumpyNdarray = "ndarray"
|
||||
OsModule = "os"
|
||||
SysModule = "sys"
|
||||
TimeModule = "time"
|
||||
TurtleModule = "turtle"
|
||||
UlabModule = "ulab"
|
||||
ForLoopMenu = "For"
|
||||
IfStatementMenu = "If"
|
||||
WhileLoopMenu = "While"
|
||||
@@ -59,3 +70,4 @@ PythonCommandReturn = "return "
|
||||
RandomModule = "random"
|
||||
IonSelector = "Key selector"
|
||||
PressAKey = "Press a key"
|
||||
UlabDocumentationLink = "micropython-ulab.readthedocs.io"
|
||||
|
||||
@@ -37,10 +37,10 @@ namespace Code {
|
||||
}
|
||||
|
||||
void toolboxIonKeys::toolboxIonView::drawRect(KDContext * ctx, KDRect rect) const {
|
||||
ctx->fillRect(rect, Palette::GrayBright);
|
||||
ctx->strokeRect(rect, Palette::GrayDark);
|
||||
ctx->drawString(I18n::translate(I18n::Message::PressAKey),KDPoint(rect.left()+80, rect.top()+20));
|
||||
|
||||
ctx->fillRect(rect, *Palette::WallScreen);
|
||||
ctx->strokeRect(rect, *Palette::ListCellBorder);
|
||||
ctx->drawString(I18n::translate(I18n::Message::PressAKey),KDPoint(rect.left()+80, rect.top()+20),KDFont::LargeFont,*Palette::PrimaryText,*Palette::WallScreen);
|
||||
|
||||
}
|
||||
|
||||
View * toolboxIonKeys::view(){
|
||||
|
||||
@@ -44,8 +44,8 @@ VariableBoxController::VariableBoxController(ScriptStore * scriptStore) :
|
||||
m_importedNodesCount(0)
|
||||
{
|
||||
for (int i = 0; i < k_scriptOriginsCount; i++) {
|
||||
m_subtitleCells[i].setBackgroundColor(Palette::WallScreen);
|
||||
m_subtitleCells[i].setTextColor(Palette::SecondaryText);
|
||||
m_subtitleCells[i].setBackgroundColor(*Palette::WallScreen);
|
||||
m_subtitleCells[i].setTextColor(*Palette::SecondaryText);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -43,9 +43,9 @@ public:
|
||||
|
||||
private:
|
||||
constexpr static size_t k_maxNumberOfDisplayedItems = (Ion::Display::Height - Metric::TitleBarHeight - Metric::PopUpTopMargin) / ScriptNodeCell::k_simpleItemHeight + 2; // +2 if the cells are cropped on top and at the bottom
|
||||
constexpr static size_t k_maxScriptNodesCount = 32; // Chosen without particular reasons
|
||||
constexpr static size_t k_maxScriptNodesCount = 64; // Chosen without particular reasons (Number of functions in the variables box)
|
||||
constexpr static int k_totalBuiltinNodesCount = 107;
|
||||
constexpr static uint8_t k_scriptOriginsCount = 3;
|
||||
constexpr static uint8_t k_scriptOriginsCount = 8; // Number of scripts loaded in the variable box
|
||||
constexpr static uint8_t k_subtitleCellType = NodeCellType; // We don't care as it is not selectable
|
||||
constexpr static uint8_t k_itemCellType = LeafCellType; // So that upper class NestedMenuController knows it's a leaf
|
||||
constexpr static KDCoordinate k_subtitleRowHeight = 23;
|
||||
|
||||
12
apps/external/base.de.i18n
vendored
12
apps/external/base.de.i18n
vendored
@@ -1,9 +1,9 @@
|
||||
ExternalApp = "External"
|
||||
ExternalAppCapital = "EXTERNAL"
|
||||
ExternalAppApiMismatch = "API mismatch"
|
||||
ExternalAppExecError = "Cannot execute file"
|
||||
ExternalNotCompatible = "External ist nicht kompatibel"
|
||||
ExternalAppApiMismatch = "API stimmt nicht überein"
|
||||
ExternalAppExecError = "Datei kann nicht ausgeführt werden"
|
||||
ExternalNotCompatible = "Externe App ist nicht kompatibel"
|
||||
WithSimulator = "mit dem Simulator"
|
||||
WithN0100 = "mit n0100"
|
||||
GetMoreAppsAt = "Weitere Apps erhalten Sie auf"
|
||||
NoAppsInstalled = "Keine Apps installiert"
|
||||
WithN0100 = "mit N0100"
|
||||
GetMoreAppsAt = "Weitere Apps abrufen bei"
|
||||
NoAppsInstalled = "Keine Apps installiert"
|
||||
16
apps/external/main_controller.cpp
vendored
16
apps/external/main_controller.cpp
vendored
@@ -90,40 +90,40 @@ void MainController::willDisplayCellForIndex(HighlightCell * cell, int index) {
|
||||
#if defined(DEVICE_N0100) && !defined(EXTERNAL_BUILTIN)
|
||||
if(index == 0){
|
||||
myTextCell->setText(I18n::translate(I18n::Message::ExternalNotCompatible));
|
||||
myTextCell->setTextColor(Palette::Red);
|
||||
myTextCell->setTextColor(*Palette::Red);
|
||||
} else {
|
||||
myTextCell->setText(I18n::translate(I18n::Message::WithN0100));
|
||||
myTextCell->setTextColor(Palette::Red);
|
||||
myTextCell->setTextColor(*Palette::Red);
|
||||
}
|
||||
#else
|
||||
if(index == k_numberOfCells-1){
|
||||
myTextCell->setText(I18n::translate(I18n::Message::URL));
|
||||
myTextCell->setTextColor(Palette::AccentText);
|
||||
myTextCell->setTextColor(*Palette::AccentText);
|
||||
return;
|
||||
}
|
||||
if(index == k_numberOfCells-2){
|
||||
myTextCell->setText(I18n::translate(I18n::Message::GetMoreAppsAt));
|
||||
myTextCell->setTextColor(Palette::AccentText);
|
||||
myTextCell->setTextColor(*Palette::AccentText);
|
||||
return;
|
||||
}
|
||||
if(index == 0 && numberOfFiles() == 0){
|
||||
myTextCell->setText(I18n::translate(I18n::Message::NoAppsInstalled));
|
||||
myTextCell->setTextColor(Palette::Red);
|
||||
myTextCell->setTextColor(*Palette::Red);
|
||||
}
|
||||
if(numberOfFiles() > 0){
|
||||
if(fileAtIndex(index, f)) {
|
||||
myTextCell->setText(f.name);
|
||||
myTextCell->setTextColor(f.isExecutable ? Palette::PrimaryText : Palette::Palette::SecondaryText);
|
||||
myTextCell->setTextColor(f.isExecutable ? *Palette::PrimaryText : *Palette::Palette::SecondaryText);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#else
|
||||
if(index == 0){
|
||||
myTextCell->setText(I18n::translate(I18n::Message::ExternalNotCompatible));
|
||||
myTextCell->setTextColor(Palette::Red);
|
||||
myTextCell->setTextColor(*Palette::Red);
|
||||
} else {
|
||||
myTextCell->setText(I18n::translate(I18n::Message::WithSimulator));
|
||||
myTextCell->setTextColor(Palette::Red);
|
||||
myTextCell->setTextColor(*Palette::Red);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
2
apps/external/pointer_text_table_cell.cpp
vendored
2
apps/external/pointer_text_table_cell.cpp
vendored
@@ -19,7 +19,7 @@ const char * PointerTextTableCell::text() const {
|
||||
|
||||
void PointerTextTableCell::setHighlighted(bool highlight) {
|
||||
HighlightCell::setHighlighted(highlight);
|
||||
KDColor backgroundColor = highlight? Palette::ListCellBackgroundSelected : Palette::ListCellBackground;
|
||||
KDColor backgroundColor = highlight? *Palette::ListCellBackgroundSelected : *Palette::ListCellBackground;
|
||||
m_pointerTextView.setBackgroundColor(backgroundColor);
|
||||
}
|
||||
|
||||
|
||||
@@ -30,6 +30,8 @@ public:
|
||||
void setTempExamMode(ExamMode examMode);
|
||||
bool showPopUp() const { return m_showPopUp; }
|
||||
void setShowPopUp(bool showPopUp) { m_showPopUp = showPopUp; }
|
||||
bool autocomplete() const { return m_autoComplete; }
|
||||
void setAutocomplete(bool autocomple) { m_autoComplete = autocomple; }
|
||||
int brightnessLevel() const { return m_brightnessLevel; }
|
||||
void setBrightnessLevel(int brightnessLevel);
|
||||
const KDFont * font() const { return m_font; }
|
||||
@@ -44,6 +46,7 @@ private:
|
||||
m_examMode(ExamMode::Unknown),
|
||||
m_tempExamMode(ExamMode::Standard),
|
||||
m_showPopUp(true),
|
||||
m_autoComplete(true),
|
||||
m_brightnessLevel(Ion::Backlight::MaxBrightness),
|
||||
m_font(KDFont::LargeFont) {}
|
||||
I18n::Language m_language;
|
||||
@@ -53,6 +56,7 @@ private:
|
||||
mutable ExamMode m_examMode;
|
||||
mutable ExamMode m_tempExamMode;
|
||||
bool m_showPopUp;
|
||||
bool m_autoComplete;
|
||||
int m_brightnessLevel;
|
||||
const KDFont * m_font;
|
||||
};
|
||||
|
||||
@@ -29,5 +29,5 @@ NoIntersectionFound = "Kein Schnittpunkt gefunden"
|
||||
NoPreimageFound = "Kein Urbild gefunden"
|
||||
DerivativeFunctionColumn = "Spalte der Ableitungsfunktion"
|
||||
HideDerivativeColumn = "Ableitungsfunktion ausblenden"
|
||||
AllowedCharactersAZaz09 = "Erlaubte Zeichen: A..Z, a..z, 0..9, _"
|
||||
AllowedCharactersAZaz09 = "Erlaubt: A..Z, a..z, 0..9, _"
|
||||
ReservedName = "Reserviertes Wort"
|
||||
|
||||
@@ -75,7 +75,7 @@ void GraphView::drawRect(KDContext * ctx, KDRect rect) const {
|
||||
// To represent the tangent, we draw segment from and to abscissas at the extremity of the drawn rect
|
||||
float minAbscissa = pixelToFloat(Axis::Horizontal, rect.left());
|
||||
float maxAbscissa = pixelToFloat(Axis::Horizontal, rect.right());
|
||||
drawSegment(ctx, rect, minAbscissa, tangentParameterA*minAbscissa+tangentParameterB, maxAbscissa, tangentParameterA*maxAbscissa+tangentParameterB, Palette::GraphTangent, false);
|
||||
drawSegment(ctx, rect, minAbscissa, tangentParameterA*minAbscissa+tangentParameterB, maxAbscissa, tangentParameterA*maxAbscissa+tangentParameterB, *Palette::GraphTangent, false);
|
||||
}
|
||||
} else if (type == Shared::ContinuousFunction::PlotType::Polar) {
|
||||
// Polar
|
||||
|
||||
@@ -167,7 +167,7 @@ void ListController::willDisplayTitleCellAtIndex(HighlightCell * cell, int j) {
|
||||
// Set name and color if the name is not being edited
|
||||
ExpiringPointer<ContinuousFunction> function = modelStore()->modelForRecord(modelStore()->recordAtIndex(j));
|
||||
setFunctionNameInTextField(function, titleCell->textField());
|
||||
KDColor functionNameColor = function->isActive() ? function->color() : Palette::SecondaryText;
|
||||
KDColor functionNameColor = function->isActive() ? function->color() : *Palette::SecondaryText;
|
||||
titleCell->setColor(functionNameColor);
|
||||
}
|
||||
}
|
||||
@@ -178,7 +178,7 @@ void ListController::willDisplayExpressionCellAtIndex(HighlightCell * cell, int
|
||||
Shared::FunctionListController::willDisplayExpressionCellAtIndex(cell, j);
|
||||
FunctionExpressionCell * myCell = (FunctionExpressionCell *)cell;
|
||||
ExpiringPointer<ContinuousFunction> f = modelStore()->modelForRecord(modelStore()->recordAtIndex(j));
|
||||
KDColor textColor = f->isActive() ? Palette::PrimaryText : Palette::SecondaryText;
|
||||
KDColor textColor = f->isActive() ? *Palette::PrimaryText : *Palette::SecondaryText;
|
||||
myCell->setTextColor(textColor);
|
||||
}
|
||||
|
||||
|
||||
@@ -17,8 +17,8 @@ public:
|
||||
const KDFont * size = KDFont::LargeFont,
|
||||
float horizontalAlignment = 0.0f,
|
||||
float verticalAlignment = 0.5f,
|
||||
KDColor textColor = Palette::PrimaryText,
|
||||
KDColor backgroundColor = Palette::BackgroundHard) :
|
||||
KDColor textColor = *Palette::PrimaryText,
|
||||
KDColor backgroundColor = *Palette::BackgroundHard) :
|
||||
TextFieldWithExtension(extensionLength, parentResponder, textBuffer, textBufferSize, draftTextBufferSize, inputEventHandlerDelegate, delegate, size, horizontalAlignment, verticalAlignment, textColor, backgroundColor) {}
|
||||
void setDraftTextBufferSize(size_t size) { m_contentView.setDraftTextBufferSize(size); }
|
||||
};
|
||||
|
||||
@@ -30,7 +30,7 @@ const uint8_t arrowDownMask[10][9] = {
|
||||
|
||||
ArrowView::ArrowView() :
|
||||
m_directionIsUp(true),
|
||||
m_color(Palette::PrimaryText)
|
||||
m_color(*Palette::PrimaryText)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ void ArrowView::setColor(KDColor color) {
|
||||
|
||||
void ArrowView::drawRect(KDContext * ctx, KDRect rect) const {
|
||||
KDColor arrowWorkingBuffer[10*9];
|
||||
ctx->fillRect(bounds(), Palette::BackgroundHard);
|
||||
ctx->fillRect(bounds(), *Palette::BackgroundHard);
|
||||
KDCoordinate startLine = m_directionIsUp ? k_arrowHeight : 0;
|
||||
KDCoordinate startArrow = m_directionIsUp ? 0 : bounds().height()-k_arrowHeight;
|
||||
ctx->fillRect(KDRect((Ion::Display::Width-k_arrowThickness)/2, startLine, k_arrowThickness, bounds().height()-k_arrowHeight), m_color);
|
||||
|
||||
@@ -59,7 +59,7 @@ void KeyboardView::drawKey(int keyIndex, KDContext * ctx, KDRect rect) const {
|
||||
|
||||
KDColor KeyboardView::keyColor(Ion::Keyboard::Key key) const {
|
||||
if (!m_keyboardModel.belongsToTestedKeysSubset(key)) {
|
||||
return Palette::ListCellBorder;
|
||||
return *Palette::ListCellBorder;
|
||||
}
|
||||
if (m_keyboardModel.testedKey() == key) {
|
||||
return KDColorBlue;
|
||||
|
||||
@@ -3,6 +3,7 @@ app_home_src = $(addprefix apps/home/,\
|
||||
app_cell.cpp \
|
||||
apps_layout.py \
|
||||
controller.cpp \
|
||||
selectable_table_view_with_background.cpp \
|
||||
)
|
||||
|
||||
apps_src += $(app_home_src)
|
||||
|
||||
@@ -7,7 +7,8 @@ namespace Home {
|
||||
|
||||
AppCell::AppCell() :
|
||||
HighlightCell(),
|
||||
m_nameView(KDFont::SmallFont, (I18n::Message)0, 0.5f, 0.5f, Palette::HomeCellText, Palette::HomeCellBackground),
|
||||
m_nameView(KDFont::SmallFont, (I18n::Message)0, 0.5f, 0.5f, *Palette::HomeCellText, *Palette::HomeCellBackground),
|
||||
m_backgroundView(nullptr),
|
||||
m_visible(true), m_external_app(false)
|
||||
{
|
||||
}
|
||||
@@ -15,8 +16,8 @@ AppCell::AppCell() :
|
||||
|
||||
void AppCell::drawRect(KDContext * ctx, KDRect rect) const {
|
||||
KDSize nameSize = m_nameView.minimalSizeForOptimalDisplay();
|
||||
ctx->fillRect(KDRect(0, bounds().height()-nameSize.height() - 2*k_nameHeightMargin, bounds().width(), nameSize.height()+2*k_nameHeightMargin), Palette::HomeBackground);
|
||||
}
|
||||
m_backgroundView->drawRect(ctx, KDRect(0, bounds().height()-nameSize.height() - 2*k_nameHeightMargin, bounds().width(), nameSize.height()+2*k_nameHeightMargin));
|
||||
}
|
||||
|
||||
int AppCell::numberOfSubviews() const {
|
||||
return m_visible ? 2 : 0;
|
||||
@@ -38,7 +39,7 @@ void AppCell::setExtAppDescriptor(const char* name, const uint8_t *icon, size_t
|
||||
m_iconView.setImage(icon, iconLength);
|
||||
m_iconView.setImage(nullptr);
|
||||
m_nameView.setText(name);
|
||||
m_nameView.setTextColor(Palette::HomeCellTextExternal);
|
||||
m_nameView.setTextColor(*Palette::HomeCellTextExternal);
|
||||
m_nameView.setMessage(I18n::Message::Default);
|
||||
layoutSubviews();
|
||||
}
|
||||
@@ -48,7 +49,7 @@ void AppCell::setExtAppDescriptor(const char* name, const Image* icon) {
|
||||
m_iconView.setImage(icon);
|
||||
m_iconView.setImage(nullptr, 0);
|
||||
m_nameView.setText(name);
|
||||
m_nameView.setTextColor(Palette::HomeCellTextExternal);
|
||||
m_nameView.setTextColor(*Palette::HomeCellTextExternal);
|
||||
m_nameView.setMessage(I18n::Message::Default);
|
||||
layoutSubviews();
|
||||
}
|
||||
@@ -58,7 +59,7 @@ void AppCell::setAppDescriptor(::App::Descriptor * descriptor) {
|
||||
m_iconView.setImage(descriptor->icon());
|
||||
m_iconView.setImage(nullptr, 0);
|
||||
m_nameView.setMessage(descriptor->name());
|
||||
m_nameView.setTextColor(Palette::HomeCellText);
|
||||
m_nameView.setTextColor(*Palette::HomeCellText);
|
||||
m_nameView.setText(nullptr);
|
||||
layoutSubviews();
|
||||
}
|
||||
@@ -70,9 +71,13 @@ void AppCell::setVisible(bool visible) {
|
||||
}
|
||||
}
|
||||
|
||||
void AppCell::setBackgroundView(const BackgroundView * backgroundView) {
|
||||
m_backgroundView = backgroundView;
|
||||
}
|
||||
|
||||
void AppCell::reloadCell() {
|
||||
m_nameView.setTextColor(isHighlighted() ? (m_external_app ? Palette::HomeCellTextExternalActive : Palette::HomeCellTextActive) : (m_external_app ? Palette::HomeCellTextExternal : Palette::HomeCellText));
|
||||
m_nameView.setBackgroundColor(isHighlighted() ? Palette::HomeCellBackgroundActive : Palette::HomeCellBackground);
|
||||
m_nameView.setTextColor(isHighlighted() ? (m_external_app ? *Palette::HomeCellTextExternalActive : *Palette::HomeCellTextActive) : (m_external_app ? *Palette::HomeCellTextExternal : *Palette::HomeCellText));
|
||||
m_nameView.setBackgroundColor(isHighlighted() ? *Palette::HomeCellBackgroundActive : *Palette::HomeCellBackground);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ public:
|
||||
void layoutSubviews(bool force = false) override;
|
||||
|
||||
void setVisible(bool visible);
|
||||
void setBackgroundView(const BackgroundView * backgroundView);
|
||||
void reloadCell() override;
|
||||
void setAppDescriptor(::App::Descriptor * appDescriptor);
|
||||
void setExtAppDescriptor(const char* name, const Image* icon);
|
||||
@@ -25,8 +26,9 @@ private:
|
||||
static constexpr KDCoordinate k_iconHeight = 56;
|
||||
static constexpr KDCoordinate k_nameWidthMargin = 4;
|
||||
static constexpr KDCoordinate k_nameHeightMargin = 1;
|
||||
ImageView m_iconView;
|
||||
IconView m_iconView;
|
||||
MessageTextView m_nameView;
|
||||
const BackgroundView * m_backgroundView;
|
||||
bool m_visible;
|
||||
bool m_external_app;
|
||||
};
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
Default,calculation,rpn,graph,code,statistics,probability,solver,atomic,sequence,regression,settings
|
||||
HidePython,calculation,rpn,graph,code,statistics,probability,solver,atomic,sequence,regression,settings
|
||||
Default,calculation,rpn,graph,code,statistics,probability,solver,atomic,sequence,regression,reader,settings
|
||||
HidePython,calculation,rpn,graph,code,statistics,probability,solver,atomic,sequence,regression,reader,settings
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
Apps = "Anwendungen"
|
||||
AppsCapital = "OMEGA"
|
||||
AppsCapital = "UPSILON"
|
||||
ForbidenAppInExamMode1 = "Diese Anwendung ist im"
|
||||
ForbidenAppInExamMode2 = "Prüfungsmodus nicht erlaubt."
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user