mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 08:47:28 +01:00
Compare commits
81 Commits
omega-dev
...
upsilon-de
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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 | ||
|
|
dc8a1d48d9 | ||
|
|
649f48919e | ||
|
|
837fcd9bcc | ||
|
|
b0befbdbc5 | ||
|
|
cf9142b5a2 | ||
|
|
80587f35f1 | ||
|
|
6f797833b2 | ||
|
|
58ff19858f | ||
|
|
9eff895a95 | ||
|
|
f052ad7bf8 | ||
|
|
116cbf7df4 | ||
|
|
890592854a | ||
|
|
6c6f8b581c | ||
|
|
92ee632ce2 | ||
|
|
3e2b5178ed | ||
|
|
5b21c57e4c | ||
|
|
76beed20da | ||
|
|
86985a4aef | ||
|
|
aacd1a6f32 | ||
|
|
dd258a7975 | ||
|
|
b4e9ceed18 | ||
|
|
c37b4bd1f4 | ||
|
|
a0acdc171b | ||
|
|
46658f7077 | ||
|
|
0235de8010 | ||
|
|
636c5c1d24 | ||
|
|
4af76cc3ae |
21
.github/ISSUE_TEMPLATE/bug_report.md
vendored
21
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -2,13 +2,26 @@
|
||||
name: Bug report
|
||||
about: Omega is not working like it should? Let us know!
|
||||
title: ''
|
||||
labels: Bug, Triage
|
||||
labels: 'Status: Triage, Type: Bug'
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
#### Describe the bug
|
||||
**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
|
||||
|
||||
#### Environment
|
||||
- Omega Version: {go to settings > about > Omega Version and type the version here}
|
||||
**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]
|
||||
|
||||
1
.github/ISSUE_TEMPLATE/config.yml
vendored
1
.github/ISSUE_TEMPLATE/config.yml
vendored
@@ -1 +0,0 @@
|
||||
blank_issues_enabled: false
|
||||
13
.github/ISSUE_TEMPLATE/feature_request.md
vendored
13
.github/ISSUE_TEMPLATE/feature_request.md
vendored
@@ -1,10 +1,17 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for an improvement of Omega
|
||||
about: Suggest an idea for Omega
|
||||
title: ''
|
||||
labels: Feature, Triage
|
||||
labels: 'Status: Triage, Type: Feature'
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
#### What I want to see in the next version of Omega
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
||||
|
||||
28
.github/ISSUE_TEMPLATE/omega-beta-only---bug-report.md
vendored
Normal file
28
.github/ISSUE_TEMPLATE/omega-beta-only---bug-report.md
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
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: ..........#....
|
||||
4
.github/ISSUE_TEMPLATE/other.md
vendored
4
.github/ISSUE_TEMPLATE/other.md
vendored
@@ -1,8 +1,8 @@
|
||||
---
|
||||
name: Other
|
||||
about: A question? A problem? ...
|
||||
about: A question? A problem? …
|
||||
title: ''
|
||||
labels: Triage
|
||||
labels: 'Status: Triage'
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
@@ -2,18 +2,18 @@
|
||||
name: Problems during installation
|
||||
about: Need help to install Omega?
|
||||
title: ''
|
||||
labels: Installation issue, Triage
|
||||
labels: 'Status: Triage, Type: Installation issue'
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
#### Describe the problem
|
||||
**Describe the problem**
|
||||
|
||||
|
||||
#### Logs
|
||||
**Logs**
|
||||
```
|
||||
Copy/paste the logs here (If you have some)
|
||||
```
|
||||
|
||||
#### Environment
|
||||
**Environment**
|
||||
- Omega Version: {go to settings > about > Omega Version and type the version here}
|
||||
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -6,3 +6,5 @@ epsilon.map
|
||||
.vscode
|
||||
.DS_Store
|
||||
.gradle
|
||||
.idea/
|
||||
.vs
|
||||
|
||||
2
.gitmodules
vendored
2
.gitmodules
vendored
@@ -3,4 +3,4 @@
|
||||
url = https://github.com/Omega-Numworks/Omega-RPN.git
|
||||
[submodule "apps/atomic"]
|
||||
path = apps/atomic
|
||||
url = https://github.com/Omega-Numworks/Omega-Atomic.git
|
||||
url = https://github.com/Lauryy06/atomic
|
||||
|
||||
4
Makefile
4
Makefile
@@ -12,6 +12,10 @@ include build/toolchain.$(TOOLCHAIN).mak
|
||||
include build/variants.mak
|
||||
include build/helpers.mk
|
||||
|
||||
ifeq (${MODEL}, n0100)
|
||||
EPSILON_APPS := $(filter-out reader,$(EPSILON_APPS))
|
||||
endif
|
||||
|
||||
ifeq (${MODEL}, n0110)
|
||||
apps_list = ${EPSILON_APPS}
|
||||
else
|
||||
|
||||
76
README.fr.md
76
README.fr.md
@@ -1,37 +1,34 @@
|
||||
<p align="center"><img src="https://github.com/Omega-Numworks/Omega-Design/blob/master/Banners/Omega-Banner-Dev-Branch.png?raw=true" /></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,8 +124,8 @@ 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 clone --recursive https://github.com/Lauryy06/Upsilon.git
|
||||
cd Upsilon
|
||||
git checkout --recursive omega-dev
|
||||
make PLATFORM=simulator TARGET=3ds -j
|
||||
```
|
||||
@@ -141,16 +138,18 @@ 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>
|
||||
---
|
||||
|
||||
## 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 +162,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 +176,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).
|
||||
|
||||
240
README.md
240
README.md
@@ -1,38 +1,156 @@
|
||||
<p align="center"><img src="https://github.com/Omega-Numworks/Omega-Design/blob/master/Banners/Omega-Banner-Dev-Branch.png?raw=true" /></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) !
|
||||
|
||||
## 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
|
||||
- A 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,8 +238,8 @@ 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 clone --recursive https://github.com/Lauryy06/Upsilon.git
|
||||
cd Upsilon
|
||||
git checkout --recursive omega-dev
|
||||
make PLATFORM=simulator TARGET=3ds -j
|
||||
```
|
||||
@@ -140,17 +251,27 @@ 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/Q9buEMduXG
|
||||
|
||||
<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>
|
||||
---
|
||||
|
||||
## 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 +283,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 +297,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).
|
||||
|
||||
@@ -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 k_promptFGColors[];
|
||||
static KDColor k_promptBGColors[];
|
||||
static int k_promptNumberOfMessages;
|
||||
AppsWindow m_window;
|
||||
EmptyBatteryWindow m_emptyBatteryWindow;
|
||||
|
||||
@@ -10,7 +10,7 @@ I18n::Message AppsContainer::k_promptMessages[] = {
|
||||
I18n::Message::BetaVersionMessage5,
|
||||
I18n::Message::BetaVersionMessage6};
|
||||
|
||||
KDColor AppsContainer::k_promptColors[] = {
|
||||
KDColor AppsContainer::k_promptFGColors[] = {
|
||||
KDColorBlack,
|
||||
KDColorBlack,
|
||||
KDColorBlack,
|
||||
@@ -20,4 +20,14 @@ KDColor AppsContainer::k_promptColors[] = {
|
||||
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 AppsContainer::k_promptFGColors[] = {};
|
||||
KDColor AppsContainer::k_promptBGColors[] = {};
|
||||
|
||||
int AppsContainer::k_promptNumberOfMessages = 0;
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ I18n::Message AppsContainer::k_promptMessages[] = {
|
||||
I18n::Message::UpdateMessage3,
|
||||
I18n::Message::UpdateMessage4};
|
||||
|
||||
KDColor AppsContainer::k_promptColors[] = {
|
||||
KDColor AppsContainer::k_promptFGColors[] = {
|
||||
KDColorBlack,
|
||||
KDColorBlack,
|
||||
KDColorBlack,
|
||||
@@ -16,4 +16,12 @@ KDColor AppsContainer::k_promptColors[] = {
|
||||
KDColorBlack,
|
||||
Palette::AccentText};
|
||||
|
||||
KDColor AppsContainer::k_promptBGColors[] = {
|
||||
KDColorWhite,
|
||||
KDColorWhite,
|
||||
KDColorWhite,
|
||||
KDColorBlack,
|
||||
KDColorWhite,
|
||||
KDColorBlack};
|
||||
|
||||
int AppsContainer::k_promptNumberOfMessages = 6;
|
||||
|
||||
@@ -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 \
|
||||
|
||||
@@ -0,0 +1,190 @@
|
||||
#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();
|
||||
|
||||
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];
|
||||
|
||||
bool aIsNotOne = !(a.type() == ExpressionNode::Type::Rational && static_cast<const Rational &>(a).isOne());
|
||||
|
||||
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);
|
||||
|
||||
Expression alpha = Opposite::Builder(Division::Builder(b.clone(), Multiplication::Builder(Rational::Builder(2), a.clone())));
|
||||
PoincareHelpers::Simplify(&alpha, context, ExpressionNode::ReductionTarget::User);
|
||||
|
||||
Expression beta = Opposite::Builder(Division::Builder(delta.clone(), Multiplication::Builder(Rational::Builder(4), a.clone())));
|
||||
PoincareHelpers::Simplify(&beta, context, ExpressionNode::ReductionTarget::User);
|
||||
|
||||
/*
|
||||
* Because when can't apply reduce or simplify to keep the canonised
|
||||
* we must beautify the expression manually
|
||||
*/
|
||||
|
||||
Expression canonised;
|
||||
if (alpha.type() == ExpressionNode::Type::Opposite) {
|
||||
canonised = Addition::Builder(Symbol::Builder("x", strlen("x")), alpha.childAtIndex(0).clone());
|
||||
}
|
||||
else {
|
||||
canonised = Subtraction::Builder(Symbol::Builder("x", strlen("x")), alpha.clone());
|
||||
}
|
||||
canonised = Power::Builder(Parenthesis::Builder(canonised.clone()), Rational::Builder(2));
|
||||
if (aIsNotOne) {
|
||||
canonised = Multiplication::Builder(a.clone(), canonised.clone());
|
||||
}
|
||||
if (beta.type() == ExpressionNode::Type::Opposite) {
|
||||
canonised = Subtraction::Builder(canonised.clone(), beta.childAtIndex(0).clone());
|
||||
}
|
||||
else {
|
||||
canonised = Addition::Builder(canonised.clone(), beta.clone());
|
||||
}
|
||||
|
||||
|
||||
Expression x0;
|
||||
Expression x1;
|
||||
|
||||
|
||||
if (delta.nullStatus(context) == ExpressionNode::NullStatus::Null) {
|
||||
// x0 = x1 = -b/(2a)
|
||||
x0 = Division::Builder(Opposite::Builder(b), Multiplication::Builder(Rational::Builder(2), a));
|
||||
m_numberOfSolutions = 1;
|
||||
PoincareHelpers::Simplify(&x0, context, ExpressionNode::ReductionTarget::User);
|
||||
}
|
||||
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), SquareRoot::Builder(delta.clone())), Multiplication::Builder(Rational::Builder(2), a));
|
||||
m_numberOfSolutions = 2;
|
||||
PoincareHelpers::Simplify(&x0, context, ExpressionNode::ReductionTarget::User);
|
||||
PoincareHelpers::Simplify(&x1, context, ExpressionNode::ReductionTarget::User);
|
||||
if (x0.type() == ExpressionNode::Type::Unreal) {
|
||||
assert(x1.type() == ExpressionNode::Type::Unreal);
|
||||
m_numberOfSolutions = 0;
|
||||
}
|
||||
}
|
||||
|
||||
Expression factorized;
|
||||
|
||||
if (m_numberOfSolutions == 2) {
|
||||
if (x0.type() == ExpressionNode::Type::Opposite) {
|
||||
factorized = Parenthesis::Builder(Addition::Builder(Symbol::Builder("x", strlen("x")), x0.childAtIndex(0).clone()));
|
||||
}
|
||||
else {
|
||||
factorized = Parenthesis::Builder(Subtraction::Builder(Symbol::Builder("x", strlen("x")), x0.clone()));
|
||||
}
|
||||
|
||||
if (x1.type() == ExpressionNode::Type::Opposite) {
|
||||
factorized = Multiplication::Builder(factorized.clone(), Parenthesis::Builder(Addition::Builder(Symbol::Builder("x", strlen("x")), x1.childAtIndex(0).clone())));
|
||||
}
|
||||
else {
|
||||
factorized = Multiplication::Builder(factorized.clone(), Parenthesis::Builder(Subtraction::Builder(Symbol::Builder("x", strlen("x")), x1.clone())));
|
||||
}
|
||||
|
||||
if (aIsNotOne) {
|
||||
factorized = Multiplication::Builder(a.clone(), factorized.clone());
|
||||
}
|
||||
}
|
||||
else if (m_numberOfSolutions == 1) {
|
||||
if (x0.type() == ExpressionNode::Type::Opposite) {
|
||||
factorized = Power::Builder(Parenthesis::Builder(Addition::Builder(Symbol::Builder("x", strlen("x")), x0.childAtIndex(0).clone())), Rational::Builder(2));
|
||||
}
|
||||
else {
|
||||
factorized = Power::Builder(Parenthesis::Builder(Subtraction::Builder(Symbol::Builder("x", strlen("x")), x0.clone())), Rational::Builder(2));
|
||||
}
|
||||
|
||||
if (aIsNotOne) {
|
||||
factorized = Multiplication::Builder(a.clone(), factorized.clone());
|
||||
}
|
||||
}
|
||||
|
||||
PoincareHelpers::Simplify(&delta, context, ExpressionNode::ReductionTarget::User);
|
||||
|
||||
m_layouts[0] = PoincareHelpers::CreateLayout(canonised);
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
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,25 @@
|
||||
#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:
|
||||
I18n::Message messageAtIndex(int index) override;
|
||||
int m_numberOfSolutions;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -45,6 +45,7 @@ PythonCosh = "Hyperbolischer Kosinus"
|
||||
PythonCount = "Zählt die Vorkommen von x"
|
||||
PythonDegrees = "x von Bogenmaß in Grad umrechnen"
|
||||
PythonDivMod = "Quotient und Rest"
|
||||
PythonDrawCircle = "Zeichne einen Kreis"
|
||||
PythonDrawLine = "Eine Linie zeichnen"
|
||||
PythonDrawString = "Text bei Pixel (x,y) darstellen"
|
||||
PythonErf = "Fehlerfunktion"
|
||||
@@ -54,11 +55,14 @@ PythonExp = "Exponentialfunktion"
|
||||
PythonExpm1 = "Berechne exp(x)-1"
|
||||
PythonFabs = "Absoluter Wert"
|
||||
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 = "Mantisse und Exponent von x: (m,e)"
|
||||
PythonGamma = "Gamma-Funktion"
|
||||
PythonGetPalette = "Themenpalette erhalten"
|
||||
PythonGetPixel = "Farbe von Pixel (x,y) zurückgeben"
|
||||
PythonGetrandbits = "Ganzzahl mit k Zufallsbits"
|
||||
PythonGrid = "Sichtbarkeit des Gitters umschalten"
|
||||
@@ -70,6 +74,8 @@ 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"
|
||||
PythonOsUname = "Informationen über das System holen"
|
||||
PythonOsGetlogin = "Benutzernamen holen"
|
||||
@@ -87,6 +93,9 @@ 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"
|
||||
@@ -100,6 +109,14 @@ PythonMax = "Maximum"
|
||||
PythonMin = "Minimum"
|
||||
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"
|
||||
@@ -125,6 +142,12 @@ 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 von localtime()"
|
||||
PythonRTCmode = "Aktuellen RTC-Modus abrufen"
|
||||
PythonSetRTCmode = "RTC-Modus festlegen"
|
||||
PythonSort = "Die Liste sortieren"
|
||||
PythonSqrt = "Quadratwurzel"
|
||||
PythonSum = "Summe der Elemente einer Liste"
|
||||
|
||||
@@ -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,15 @@ 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"
|
||||
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 +74,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 +86,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 +103,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 +136,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 of localtime()"
|
||||
PythonRTCmode = "Get current RTC mode"
|
||||
PythonSetRTCmode = "Set RTC mode"
|
||||
PythonSort = "Sort the list"
|
||||
PythonSqrt = "Square root"
|
||||
PythonSum = "Sum the items of a list"
|
||||
|
||||
@@ -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,15 @@ 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"
|
||||
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 +74,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 +86,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 +103,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 +136,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 de localtime()"
|
||||
PythonRTCmode = "Obtener el modo RTC actual"
|
||||
PythonSetRTCmode = "Establecer modo RTC"
|
||||
PythonSort = "Sort the list"
|
||||
PythonSqrt = "Square root"
|
||||
PythonSum = "Sum the items of a list"
|
||||
|
||||
@@ -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,15 @@ 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"
|
||||
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 +74,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 +86,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 +103,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 +136,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 de localtime()"
|
||||
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"
|
||||
|
||||
@@ -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,14 @@ 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ó"
|
||||
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 +74,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 +86,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 +103,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 +136,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 = "Állítsd be az időt egy tufából a localtime()"
|
||||
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"
|
||||
|
||||
@@ -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,15 @@ 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"
|
||||
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,6 +74,8 @@ 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"
|
||||
@@ -86,6 +92,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)"
|
||||
@@ -100,6 +109,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"
|
||||
@@ -125,6 +142,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 di localtime()"
|
||||
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,15 @@ 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"
|
||||
PythonGetPalette = "Thema palet krijgen"
|
||||
PythonGetPixel = "Geef pixel (x,y) kleur (rgb)"
|
||||
PythonGetrandbits = "Integer met k willekeurige bits"
|
||||
PythonGrid = "Verander zichtbaarheid raster"
|
||||
@@ -70,6 +74,8 @@ 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"
|
||||
@@ -86,6 +92,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"
|
||||
@@ -100,6 +109,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"
|
||||
@@ -125,6 +142,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 van localtime()"
|
||||
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,15 @@ 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"
|
||||
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 +74,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 +86,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 +103,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 +136,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 de localtime()"
|
||||
PythonRTCmode = "Obter o modo RTC atual"
|
||||
PythonSetRTCmode = "Definir o modo RTC"
|
||||
PythonSort = "Ordenar a lista"
|
||||
PythonSqrt = "Raiz quadrada"
|
||||
PythonSum = "Soma dos itens da lista"
|
||||
|
||||
@@ -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,15 @@ 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)"
|
||||
PythonCommandGetPalette = "get_palette()"
|
||||
PythonCommandGetPixel = "get_pixel(x,y)"
|
||||
PythonCommandGetrandbits = "getrandbits(k)"
|
||||
PythonCommandGrid = "grid()"
|
||||
@@ -86,6 +90,8 @@ 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 *"
|
||||
@@ -151,6 +157,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 +175,117 @@ 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()"
|
||||
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 +312,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)"
|
||||
|
||||
@@ -135,6 +135,172 @@ const ToolboxMessageTree MatplotlibPyplotModuleChildren[] = {
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandColorGray, I18n::Message::PythonColorGray, false)
|
||||
};
|
||||
|
||||
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::PythonCommandNumpyCopy),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyDtype),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyFlat),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyFlatten),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyShape),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyReshape),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpySize),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpyTranspose),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandNumpySort),
|
||||
};
|
||||
|
||||
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)
|
||||
};
|
||||
|
||||
#if !defined(DEVICE_N0100)
|
||||
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),
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
const ToolboxMessageTree UlabModuleChildren[] = {
|
||||
ToolboxMessageTree::Node(I18n::Message::NumpyModule, NumpyModuleChildren),
|
||||
#if !defined(DEVICE_N0100)
|
||||
ToolboxMessageTree::Node(I18n::Message::ScipyModule, ScipyModuleChildren),
|
||||
#endif
|
||||
ToolboxMessageTree::Leaf(I18n::Message::UlabDocumentation, I18n::Message::UlabDocumentationLink)
|
||||
};
|
||||
|
||||
const ToolboxMessageTree TurtleModuleChildren[] = {
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandImportTurtle, I18n::Message::PythonImportTurtle, false),
|
||||
ToolboxMessageTree::Leaf(I18n::Message::PythonCommandImportFromTurtle, I18n::Message::PythonImportTurtle, false),
|
||||
@@ -194,7 +360,11 @@ 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::PythonCommandGetPalette, I18n::Message::PythonGetPalette)
|
||||
};
|
||||
|
||||
const ToolboxMessageTree IonModuleChildren[] = {
|
||||
@@ -202,6 +372,9 @@ const ToolboxMessageTree IonModuleChildren[] = {
|
||||
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,8 +382,14 @@ 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[] = {
|
||||
@@ -227,6 +406,7 @@ const ToolboxMessageTree modulesChildren[] = {
|
||||
ToolboxMessageTree::Node(I18n::Message::MathModule, MathModuleChildren),
|
||||
ToolboxMessageTree::Node(I18n::Message::CmathModule, CMathModuleChildren),
|
||||
ToolboxMessageTree::Node(I18n::Message::MatplotlibPyplotModule, MatplotlibPyplotModuleChildren),
|
||||
ToolboxMessageTree::Node(I18n::Message::UlabModule, UlabModuleChildren),
|
||||
ToolboxMessageTree::Node(I18n::Message::TurtleModule, TurtleModuleChildren),
|
||||
ToolboxMessageTree::Node(I18n::Message::RandomModule, RandomModuleChildren),
|
||||
ToolboxMessageTree::Node(I18n::Message::KandinskyModule, KandinskyModuleChildren),
|
||||
@@ -273,6 +453,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),
|
||||
@@ -282,6 +463,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),
|
||||
@@ -324,6 +507,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),
|
||||
@@ -493,8 +677,11 @@ KDCoordinate PythonToolbox::rowHeight(int j) {
|
||||
}
|
||||
|
||||
bool PythonToolbox::selectLeaf(int selectedRow) {
|
||||
m_selectableTableView.deselectTable();
|
||||
ToolboxMessageTree * node = (ToolboxMessageTree *)m_messageTreeModel->childAtIndex(selectedRow);
|
||||
if(node->text() == I18n::Message::UlabDocumentationLink){
|
||||
return true;
|
||||
}
|
||||
m_selectableTableView.deselectTable();
|
||||
if(node->insertedText() == I18n::Message::IonSelector){
|
||||
m_ionKeys.setSender(sender());
|
||||
Container::activeApp()->displayModalViewController(static_cast<ViewController*>(&m_ionKeys), 0.f, 0.f, Metric::PopUpTopMargin, Metric::PopUpLeftMargin, 0, Metric::PopUpRightMargin);
|
||||
|
||||
@@ -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,19 @@ 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"
|
||||
TimeModule = "time"
|
||||
TurtleModule = "turtle"
|
||||
UlabModule = "ulab"
|
||||
ForLoopMenu = "For"
|
||||
IfStatementMenu = "If"
|
||||
WhileLoopMenu = "While"
|
||||
@@ -59,3 +69,4 @@ PythonCommandReturn = "return "
|
||||
RandomModule = "random"
|
||||
IonSelector = "Key selector"
|
||||
PressAKey = "Press a key"
|
||||
UlabDocumentationLink = "micropython-ulab.readthedocs.io"
|
||||
|
||||
@@ -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."
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Apps = "Applications"
|
||||
AppsCapital = "OMEGA"
|
||||
AppsCapital = "UPSILON"
|
||||
ForbidenAppInExamMode1 = "This application is"
|
||||
ForbidenAppInExamMode2 = "forbidden in exam mode"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Apps = "Aplicaciones"
|
||||
AppsCapital = "OMEGA"
|
||||
AppsCapital = "UPSILON"
|
||||
ForbidenAppInExamMode1 = "Esta aplicación está prohibida"
|
||||
ForbidenAppInExamMode2 = "en el modo de examen"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Apps = "Applications"
|
||||
AppsCapital = "OMEGA"
|
||||
AppsCapital = "UPSILON"
|
||||
ForbidenAppInExamMode1 = "Cette application n'est"
|
||||
ForbidenAppInExamMode2 = "pas autorisée en mode examen."
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Apps = "Alkalmazások"
|
||||
AppsCapital = "OMEGA"
|
||||
AppsCapital = "UPSILON"
|
||||
ForbidenAppInExamMode1 = "Ez az alkalmazás"
|
||||
ForbidenAppInExamMode2 = "tilos vizsga módban"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Apps = "Applicazioni"
|
||||
AppsCapital = "OMEGA"
|
||||
AppsCapital = "UPSILON"
|
||||
ForbidenAppInExamMode1 = "Questa applicazione è"
|
||||
ForbidenAppInExamMode2 = "proibita nella modalità d'esame"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Apps = "Applicaties"
|
||||
AppsCapital = "OMEGA"
|
||||
AppsCapital = "UPSILON"
|
||||
ForbidenAppInExamMode1 = "Deze applicatie is"
|
||||
ForbidenAppInExamMode2 = "uitgesloten in examenstand"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Apps = "Aplicações"
|
||||
AppsCapital = "OMEGA"
|
||||
AppsCapital = "UPSILON"
|
||||
ForbidenAppInExamMode1 = "Esta aplicação é"
|
||||
ForbidenAppInExamMode2 = "proibida no Modo de Exame"
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
namespace OnBoarding {
|
||||
|
||||
PromptController::MessageViewWithSkip::MessageViewWithSkip(I18n::Message * messages, KDColor * colors, uint8_t numberOfMessages) :
|
||||
MessageView(messages, colors, numberOfMessages),
|
||||
PromptController::MessageViewWithSkip::MessageViewWithSkip(I18n::Message * messages, KDColor * fgcolors, KDColor * bgcolors, uint8_t numberOfMessages) :
|
||||
MessageView(messages, fgcolors, bgcolors, numberOfMessages),
|
||||
m_skipView(KDFont::SmallFont, I18n::Message::Skip, 1.0f, 0.5f),
|
||||
m_okView()
|
||||
{
|
||||
@@ -42,9 +42,9 @@ void PromptController::MessageViewWithSkip::layoutSubviews(bool force) {
|
||||
m_okView.setFrame(KDRect(width - okSize.width()-k_okMargin, height-okSize.height()-k_okMargin, okSize), force);
|
||||
}
|
||||
|
||||
PromptController::PromptController(I18n::Message * messages, KDColor * colors, uint8_t numberOfMessages) :
|
||||
PromptController::PromptController(I18n::Message * messages, KDColor * fgcolors, KDColor * bgcolors, uint8_t numberOfMessages) :
|
||||
ViewController(nullptr),
|
||||
m_messageViewWithSkip(messages, colors, numberOfMessages)
|
||||
m_messageViewWithSkip(messages, fgcolors, bgcolors, numberOfMessages)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -10,13 +10,13 @@ namespace OnBoarding {
|
||||
|
||||
class PromptController : public ViewController {
|
||||
public:
|
||||
PromptController(I18n::Message * messages, KDColor * colors, uint8_t numberOfMessages);
|
||||
PromptController(I18n::Message * messages, KDColor * fgcolors, KDColor * bgcolors, uint8_t numberOfMessages);
|
||||
View * view() override { return &m_messageViewWithSkip; }
|
||||
bool handleEvent(Ion::Events::Event event) override;
|
||||
private:
|
||||
class MessageViewWithSkip : public MessageView {
|
||||
public:
|
||||
MessageViewWithSkip(I18n::Message * messages, KDColor * colors, uint8_t numberOfMessages);
|
||||
MessageViewWithSkip(I18n::Message * messages, KDColor * fgcolors, KDColor * bgcolors, uint8_t numberOfMessages);
|
||||
protected:
|
||||
int numberOfSubviews() const override;
|
||||
View * subviewAtIndex(int index) override;
|
||||
|
||||
18
apps/reader/Makefile
Normal file
18
apps/reader/Makefile
Normal file
@@ -0,0 +1,18 @@
|
||||
apps += Reader::App
|
||||
app_headers += apps/reader/app.h
|
||||
|
||||
app_sreader_src = $(addprefix apps/reader/,\
|
||||
app.cpp \
|
||||
list_book_controller.cpp \
|
||||
utility.cpp \
|
||||
read_book_controller \
|
||||
word_wrap_view.cpp \
|
||||
)
|
||||
|
||||
apps_src += $(app_sreader_src)
|
||||
|
||||
app_images += apps/reader/reader_icon.png
|
||||
|
||||
i18n_files += $(call i18n_without_universal_for,reader/base)
|
||||
|
||||
$(eval $(call depends_on_image,apps/reader/app.cpp,apps/reader/reader_icon.png))
|
||||
40
apps/reader/app.cpp
Normal file
40
apps/reader/app.cpp
Normal file
@@ -0,0 +1,40 @@
|
||||
#include "app.h"
|
||||
#include "reader_icon.h"
|
||||
#include "apps/apps_container.h"
|
||||
#include "apps/i18n.h"
|
||||
|
||||
|
||||
namespace Reader {
|
||||
|
||||
I18n::Message App::Descriptor::name() {
|
||||
return I18n::Message::ReaderApp;
|
||||
}
|
||||
|
||||
I18n::Message App::Descriptor::upperName() {
|
||||
return I18n::Message::ReaderAppCapital;
|
||||
}
|
||||
|
||||
const Image * App::Descriptor::icon() {
|
||||
return ImageStore::ReaderIcon;
|
||||
}
|
||||
|
||||
|
||||
App * App::Snapshot::unpack(Container * container) {
|
||||
return new (container->currentAppBuffer()) App(this);
|
||||
}
|
||||
|
||||
App::Descriptor * App::Snapshot::descriptor() {
|
||||
static Descriptor descriptor;
|
||||
return &descriptor;
|
||||
}
|
||||
|
||||
|
||||
App::App(Snapshot * snapshot) :
|
||||
::App(snapshot, &m_stackViewController),
|
||||
m_listBookController(&m_stackViewController),
|
||||
m_alternateEmptyViewController(&m_stackViewController, &m_listBookController, &m_listBookController),
|
||||
m_stackViewController(&m_modalViewController, &m_alternateEmptyViewController)
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
31
apps/reader/app.h
Normal file
31
apps/reader/app.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#ifndef READER_H
|
||||
#define READER_H
|
||||
|
||||
#include <escher.h>
|
||||
#include "list_book_controller.h"
|
||||
|
||||
namespace Reader {
|
||||
|
||||
class App : public ::App {
|
||||
public:
|
||||
class Descriptor : public ::App::Descriptor {
|
||||
public:
|
||||
I18n::Message name() override;
|
||||
I18n::Message upperName() override;
|
||||
const Image * icon() override;
|
||||
};
|
||||
class Snapshot : public ::App::Snapshot {
|
||||
public:
|
||||
App * unpack(Container * container) override;
|
||||
Descriptor * descriptor() override;
|
||||
};
|
||||
private:
|
||||
App(Snapshot * snapshot);
|
||||
ListBookController m_listBookController;
|
||||
AlternateEmptyViewController m_alternateEmptyViewController;
|
||||
StackViewController m_stackViewController;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
3
apps/reader/base.de.i18n
Normal file
3
apps/reader/base.de.i18n
Normal file
@@ -0,0 +1,3 @@
|
||||
ReaderApp = "Leser"
|
||||
ReaderAppCapital = "LESER"
|
||||
NoFileToDisplay = "Keine Dateien zum Anzeigen"
|
||||
3
apps/reader/base.en.i18n
Normal file
3
apps/reader/base.en.i18n
Normal file
@@ -0,0 +1,3 @@
|
||||
ReaderApp = "Reader"
|
||||
ReaderAppCapital = "READER"
|
||||
NoFileToDisplay = "No file to display"
|
||||
3
apps/reader/base.es.i18n
Normal file
3
apps/reader/base.es.i18n
Normal file
@@ -0,0 +1,3 @@
|
||||
ReaderApp = "Lector"
|
||||
ReaderAppCapital = "LECTOR"
|
||||
NoFileToDisplay ="No hay archivos para mostrar"
|
||||
3
apps/reader/base.fr.i18n
Normal file
3
apps/reader/base.fr.i18n
Normal file
@@ -0,0 +1,3 @@
|
||||
ReaderApp = "Liseuse"
|
||||
ReaderAppCapital = "LISEUSE"
|
||||
NoFileToDisplay = "Aucun fichier à afficher"
|
||||
3
apps/reader/base.hu.i18n
Normal file
3
apps/reader/base.hu.i18n
Normal file
@@ -0,0 +1,3 @@
|
||||
ReaderApp = "Olvasó"
|
||||
ReaderAppCapital = "OLVASÓ"
|
||||
NoFileToDisplay = "Nincs megjeleníthető fájl"
|
||||
3
apps/reader/base.it.i18n
Normal file
3
apps/reader/base.it.i18n
Normal file
@@ -0,0 +1,3 @@
|
||||
ReaderApp = "Lettore"
|
||||
ReaderAppCapital = "LETTORE"
|
||||
NoFileToDisplay = "essun file da visualizzare"
|
||||
3
apps/reader/base.nl.i18n
Normal file
3
apps/reader/base.nl.i18n
Normal file
@@ -0,0 +1,3 @@
|
||||
ReaderApp = "Lezer"
|
||||
ReaderAppCapital = "LEZER"
|
||||
NoFileToDisplay = "Geen bestanden om weer te geven"
|
||||
3
apps/reader/base.pt.i18n
Normal file
3
apps/reader/base.pt.i18n
Normal file
@@ -0,0 +1,3 @@
|
||||
ReaderApp = "Leitor"
|
||||
ReaderAppCapital = "LEITOR"
|
||||
NoFileToDisplay = "Nenhum arquivo para exibir"
|
||||
100
apps/reader/list_book_controller.cpp
Normal file
100
apps/reader/list_book_controller.cpp
Normal file
@@ -0,0 +1,100 @@
|
||||
#include "list_book_controller.h"
|
||||
#include "utility.h"
|
||||
#include <escher/metric.h>
|
||||
#include "apps/i18n.h"
|
||||
|
||||
namespace Reader
|
||||
{
|
||||
|
||||
View* ListBookController::view() {
|
||||
return &m_tableView;
|
||||
}
|
||||
|
||||
ListBookController::ListBookController(Responder * parentResponder):
|
||||
ViewController(parentResponder),
|
||||
m_tableView(this, this, this),
|
||||
m_readBookController(this)
|
||||
{
|
||||
m_filesNumber = filesWithExtension(".txt", m_files, k_maxFilesNumber);
|
||||
cleanRemovedBookRecord();
|
||||
}
|
||||
|
||||
int ListBookController::numberOfRows() const {
|
||||
return m_filesNumber;
|
||||
}
|
||||
|
||||
KDCoordinate ListBookController::cellHeight() {
|
||||
return Metric::StoreRowHeight;
|
||||
}
|
||||
|
||||
HighlightCell * ListBookController::reusableCell(int index) {
|
||||
return &m_cells[index];
|
||||
}
|
||||
|
||||
int ListBookController::reusableCellCount() const {
|
||||
return k_cellsNumber;
|
||||
}
|
||||
|
||||
void ListBookController::willDisplayCellForIndex(HighlightCell * cell, int index) {
|
||||
MessageTableCell* myTextCell = static_cast<MessageTableCell*>(cell);
|
||||
MessageTextView* textView = static_cast<MessageTextView*>(myTextCell->labelView());
|
||||
textView->setText(m_files[index].name);
|
||||
myTextCell->setMessageFont(KDFont::LargeFont); //TODO set cell font at building ?
|
||||
}
|
||||
|
||||
void ListBookController::didBecomeFirstResponder() {
|
||||
if (selectedRow() < 0) {
|
||||
selectCellAtLocation(0, 0);
|
||||
}
|
||||
Container::activeApp()->setFirstResponder(&m_tableView);
|
||||
}
|
||||
|
||||
bool ListBookController::handleEvent(Ion::Events::Event event) {
|
||||
if (event == Ion::Events::OK || event == Ion::Events::EXE || event == Ion::Events::Right)
|
||||
{
|
||||
m_readBookController.setBook(m_files[selectedRow()]);
|
||||
static_cast<StackViewController*>(parentResponder())->push(&m_readBookController);
|
||||
Container::activeApp()->setFirstResponder(&m_readBookController);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool ListBookController::hasBook(const char* filename) const {
|
||||
for(int i=0;i<m_filesNumber;i++)
|
||||
{
|
||||
if(strcmp(m_files[i].name, filename) == 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void ListBookController::cleanRemovedBookRecord() {
|
||||
int nb = Ion::Storage::sharedStorage()->numberOfRecordsWithExtension("txt");
|
||||
for(int i=0; i<nb; i++)
|
||||
{
|
||||
Ion::Storage::Record r = Ion::Storage::sharedStorage()->recordWithExtensionAtIndex("txt", i);
|
||||
if(!hasBook(r.fullName()))
|
||||
{
|
||||
r.destroy();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool ListBookController::isEmpty() const {
|
||||
return m_filesNumber == 0;
|
||||
}
|
||||
|
||||
I18n::Message ListBookController::emptyMessage() {
|
||||
return I18n::Message::NoFileToDisplay;
|
||||
}
|
||||
|
||||
Responder * ListBookController::defaultController() {
|
||||
return parentResponder();
|
||||
}
|
||||
|
||||
}
|
||||
42
apps/reader/list_book_controller.h
Normal file
42
apps/reader/list_book_controller.h
Normal file
@@ -0,0 +1,42 @@
|
||||
#ifndef __LIST_BOOK_CONTROLLER_H__
|
||||
#define __LIST_BOOK_CONTROLLER_H__
|
||||
|
||||
#include <escher.h>
|
||||
#include <apps/external/archive.h>
|
||||
|
||||
#include "read_book_controller.h"
|
||||
|
||||
namespace Reader
|
||||
{
|
||||
|
||||
class ListBookController : public ViewController, public SimpleListViewDataSource, public SelectableTableViewDataSource, public AlternateEmptyViewDefaultDelegate
|
||||
{
|
||||
public:
|
||||
ListBookController(Responder * parentResponder);
|
||||
View* view() override;
|
||||
|
||||
int numberOfRows() const override;
|
||||
KDCoordinate cellHeight() override;
|
||||
HighlightCell * reusableCell(int index) override;
|
||||
int reusableCellCount() const override;
|
||||
void willDisplayCellForIndex(HighlightCell * cell, int index) override;
|
||||
void didBecomeFirstResponder() override;
|
||||
bool handleEvent(Ion::Events::Event event) override;
|
||||
bool hasBook(const char* filename) const;
|
||||
void cleanRemovedBookRecord();
|
||||
bool isEmpty() const override;
|
||||
I18n::Message emptyMessage() override;
|
||||
Responder * defaultController() override;
|
||||
private:
|
||||
SelectableTableView m_tableView;
|
||||
static const int k_maxFilesNumber = 20;
|
||||
External::Archive::File m_files[k_maxFilesNumber];
|
||||
int m_filesNumber = 0;
|
||||
static const int k_cellsNumber = 6;
|
||||
MessageTableCellWithChevron m_cells[k_cellsNumber];
|
||||
ReadBookController m_readBookController;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
18
apps/reader/normalize.py
Normal file
18
apps/reader/normalize.py
Normal file
@@ -0,0 +1,18 @@
|
||||
import sys
|
||||
import unicodedata
|
||||
import argparse
|
||||
import io
|
||||
import shutil
|
||||
|
||||
filename = sys.argv[1]
|
||||
|
||||
print("Normalization of "+filename)
|
||||
|
||||
output = open(filename+".tmp", "wb")
|
||||
|
||||
with io.open(filename, "r", encoding='utf-8') as file:
|
||||
for line in file:
|
||||
unicodeLine = unicodedata.normalize("NFKD", line)
|
||||
output.write(unicodeLine.encode("UTF-8"))
|
||||
output.close()
|
||||
shutil.move(filename+".tmp",filename)
|
||||
58
apps/reader/read_book_controller.cpp
Normal file
58
apps/reader/read_book_controller.cpp
Normal file
@@ -0,0 +1,58 @@
|
||||
#include "read_book_controller.h"
|
||||
|
||||
namespace Reader
|
||||
{
|
||||
|
||||
ReadBookController::ReadBookController(Responder * parentResponder) :
|
||||
ViewController(parentResponder)
|
||||
{
|
||||
}
|
||||
|
||||
View * ReadBookController::view() {
|
||||
return &m_readerView;
|
||||
}
|
||||
|
||||
void ReadBookController::setBook(const External::Archive::File& file) {
|
||||
m_file = &file;
|
||||
loadPosition();
|
||||
m_readerView.setText(reinterpret_cast<const char*>(file.data), file.dataLength);
|
||||
}
|
||||
|
||||
bool ReadBookController::handleEvent(Ion::Events::Event event) {
|
||||
if(event == Ion::Events::Down) {
|
||||
m_readerView.nextPage();
|
||||
return true;
|
||||
}
|
||||
if(event == Ion::Events::Up) {
|
||||
m_readerView.previousPage();
|
||||
return true;
|
||||
}
|
||||
if(event == Ion::Events::Back || event == Ion::Events::Home) {
|
||||
savePosition();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void ReadBookController::savePosition() const {
|
||||
int pageOffset = m_readerView.getPageOffset();
|
||||
Ion::Storage::Record::ErrorStatus status = Ion::Storage::sharedStorage()->createRecordWithFullName(m_file->name, &pageOffset, sizeof(pageOffset));
|
||||
if(Ion::Storage::Record::ErrorStatus::NameTaken == status) {
|
||||
Ion::Storage::Record::Data data;
|
||||
data.buffer = &pageOffset;
|
||||
data.size = sizeof(pageOffset);
|
||||
status = Ion::Storage::sharedStorage()->recordNamed(m_file->name).setValue(data);
|
||||
}
|
||||
}
|
||||
|
||||
void ReadBookController::loadPosition() {
|
||||
Ion::Storage::Record r = Ion::Storage::sharedStorage()->recordNamed(m_file->name);
|
||||
if(Ion::Storage::sharedStorage()->hasRecord(r)) {
|
||||
int pageOffset = *(static_cast<const int*>(r.value().buffer));
|
||||
m_readerView.setPageOffset(pageOffset);
|
||||
}
|
||||
else {
|
||||
m_readerView.setPageOffset(0);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
27
apps/reader/read_book_controller.h
Normal file
27
apps/reader/read_book_controller.h
Normal file
@@ -0,0 +1,27 @@
|
||||
#ifndef _READ_BOOK_CONTROLLER_H_
|
||||
#define _READ_BOOK_CONTROLLER_H_
|
||||
|
||||
#include <escher.h>
|
||||
#include "apps/external/archive.h"
|
||||
#include "word_wrap_view.h"
|
||||
|
||||
namespace Reader {
|
||||
|
||||
class ReadBookController : public ViewController {
|
||||
public:
|
||||
ReadBookController(Responder * parentResponder);
|
||||
View * view() override;
|
||||
|
||||
void setBook(const External::Archive::File& file);
|
||||
bool handleEvent(Ion::Events::Event event) override;
|
||||
|
||||
void savePosition() const;
|
||||
void loadPosition();
|
||||
private:
|
||||
WordWrapTextView m_readerView;
|
||||
const External::Archive::File* m_file;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
BIN
apps/reader/reader_icon.png
Normal file
BIN
apps/reader/reader_icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
113
apps/reader/utility.cpp
Normal file
113
apps/reader/utility.cpp
Normal file
@@ -0,0 +1,113 @@
|
||||
#include "utility.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#ifndef DEVICE
|
||||
#include <stdio.h>
|
||||
#include <dirent.h>
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
|
||||
namespace Reader
|
||||
{
|
||||
|
||||
bool stringEndsWith(const char* str, const char* pattern) {
|
||||
int strLength = strlen(str);
|
||||
int patternLength = strlen(pattern);
|
||||
if (patternLength > strLength) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const char* strIter = str + strlen(str);
|
||||
const char* patternIter = pattern + strlen(pattern);
|
||||
|
||||
while(*strIter == *patternIter) {
|
||||
if(patternIter == pattern) {
|
||||
return true;
|
||||
}
|
||||
strIter--;
|
||||
patternIter--;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void stringNCopy(char* dest, int max, const char* src, int len) {
|
||||
while(len>0 && max >1 && *src)
|
||||
{
|
||||
*dest = *src;
|
||||
dest++;
|
||||
src++;
|
||||
len--;
|
||||
max--;
|
||||
}
|
||||
*dest=0;
|
||||
}
|
||||
|
||||
|
||||
#ifdef DEVICE
|
||||
|
||||
int filesWithExtension(const char* extension, External::Archive::File* files, int filesSize) {
|
||||
size_t nbTotalFiles = External::Archive::numberOfFiles();
|
||||
int nbFiles = 0;
|
||||
for(size_t i=0; i < nbTotalFiles; ++i)
|
||||
{
|
||||
External::Archive::File file;
|
||||
External::Archive::fileAtIndex(i, file);
|
||||
if(stringEndsWith(file.name, ".txt"))
|
||||
{
|
||||
files[nbFiles] = file;
|
||||
nbFiles++;
|
||||
if(nbFiles == filesSize)
|
||||
break;
|
||||
}
|
||||
}
|
||||
return nbFiles;
|
||||
}
|
||||
#else
|
||||
|
||||
static void fillFileData(External::Archive::File& file) {
|
||||
file.data = nullptr;
|
||||
file.dataLength = 0;
|
||||
|
||||
struct stat info;
|
||||
if (stat(file.name, &info) != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
unsigned char* content = new unsigned char[info.st_size];
|
||||
if (content == NULL) {
|
||||
return;
|
||||
}
|
||||
FILE *fp = fopen(file.name, "rb");
|
||||
if (fp == NULL) {
|
||||
return ;
|
||||
}
|
||||
|
||||
fread(content, info.st_size, 1, fp);
|
||||
fclose(fp);
|
||||
file.data = content;
|
||||
file.dataLength = info.st_size;
|
||||
}
|
||||
|
||||
int filesWithExtension(const char* extension, External::Archive::File* files, int filesSize) {
|
||||
dirent *file;
|
||||
DIR *d = opendir(".");
|
||||
int nb = 0;
|
||||
if (d) {
|
||||
while ((file = readdir(d)) != NULL) {
|
||||
if(stringEndsWith(file->d_name, extension)) {
|
||||
files[nb].name = strdup(file->d_name);//will probably leak
|
||||
fillFileData(files[nb]);
|
||||
nb++;
|
||||
if(nb == filesSize) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
closedir(d);
|
||||
}
|
||||
return nb;
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
14
apps/reader/utility.h
Normal file
14
apps/reader/utility.h
Normal file
@@ -0,0 +1,14 @@
|
||||
#ifndef __UTILITY_H__
|
||||
#define __UTILITY_H__
|
||||
|
||||
#include <apps/external/archive.h>
|
||||
|
||||
namespace Reader
|
||||
{
|
||||
|
||||
bool stringEndsWith(const char* str, const char* end);
|
||||
int filesWithExtension(const char* extension, External::Archive::File* files, int filesSize);
|
||||
void stringNCopy(char* dest, int max, const char* src, int len);
|
||||
|
||||
}
|
||||
#endif
|
||||
151
apps/reader/word_wrap_view.cpp
Normal file
151
apps/reader/word_wrap_view.cpp
Normal file
@@ -0,0 +1,151 @@
|
||||
|
||||
#include "word_wrap_view.h"
|
||||
#include "utility.h"
|
||||
|
||||
namespace Reader
|
||||
{
|
||||
|
||||
void WordWrapTextView::nextPage() {
|
||||
if(m_nextPageOffset >= m_length) {
|
||||
return;
|
||||
}
|
||||
m_pageOffset = m_nextPageOffset;
|
||||
markRectAsDirty(bounds());
|
||||
}
|
||||
|
||||
void WordWrapTextView::setText(const char* text, int length) {
|
||||
PointerTextView::setText(text);
|
||||
m_length = length;
|
||||
}
|
||||
|
||||
void WordWrapTextView::previousPage() {
|
||||
if(m_pageOffset <= 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
const int charWidth = m_font->glyphSize().width();
|
||||
const int charHeight = m_font->glyphSize().height();
|
||||
|
||||
const char * endOfWord = text() + m_pageOffset - 1;
|
||||
const char * startOfWord = UTF8Helper::BeginningOfWord(text(), endOfWord);
|
||||
|
||||
KDPoint textEndPosition(m_frame.width() - k_margin, m_frame.height() - k_margin);
|
||||
|
||||
while(startOfWord>=text()) {
|
||||
startOfWord = UTF8Helper::BeginningOfWord(text(), endOfWord);
|
||||
endOfWord = UTF8Helper::EndOfWord(startOfWord);
|
||||
KDSize textSize = m_font->stringSizeUntil(startOfWord, endOfWord);
|
||||
KDPoint textStartPosition = KDPoint(textEndPosition.x()-textSize.width(), textEndPosition.y());
|
||||
|
||||
if(textStartPosition.x() < k_margin) {
|
||||
textEndPosition = KDPoint(m_frame.width() - k_margin, textEndPosition.y() - charHeight);
|
||||
textStartPosition = KDPoint(textEndPosition.x() - textSize.width(), textEndPosition.y());
|
||||
}
|
||||
if(textEndPosition.y() - textSize.height() < k_margin) {
|
||||
break;
|
||||
}
|
||||
|
||||
--startOfWord;
|
||||
while(startOfWord >= text() && (*startOfWord == ' ' || *startOfWord == '\n')) {
|
||||
if(*startOfWord == ' ') {
|
||||
textStartPosition = KDPoint(textStartPosition.x() - charWidth, textStartPosition.y());
|
||||
}
|
||||
else {
|
||||
textStartPosition = KDPoint(m_frame.width() - k_margin, textStartPosition.y() - charHeight);
|
||||
}
|
||||
--startOfWord;
|
||||
}
|
||||
|
||||
if(textStartPosition.y() < k_margin) { // If out of page, quit
|
||||
break;
|
||||
}
|
||||
|
||||
if(textStartPosition.y() != textEndPosition.y()) { // If line changed, x is at start of line
|
||||
textStartPosition = KDPoint(m_frame.width() - k_margin, textStartPosition.y());
|
||||
}
|
||||
if(textStartPosition.x() < k_margin) { // Go to line if left overflow
|
||||
textStartPosition = KDPoint(m_frame.width() - k_margin, textStartPosition.y() - charHeight);
|
||||
}
|
||||
|
||||
textEndPosition = textStartPosition;
|
||||
endOfWord = startOfWord + 1;
|
||||
}
|
||||
if(startOfWord + 1 == text()) {
|
||||
m_pageOffset = 0;
|
||||
}
|
||||
else {
|
||||
m_pageOffset = UTF8Helper::EndOfWord(startOfWord) - text() + 1;
|
||||
}
|
||||
markRectAsDirty(bounds());
|
||||
}
|
||||
|
||||
void WordWrapTextView::drawRect(KDContext * ctx, KDRect rect) const {
|
||||
ctx->fillRect(KDRect(0, 0, bounds().width(), bounds().height()), m_backgroundColor);
|
||||
|
||||
const char * endOfFile = text() + m_length;
|
||||
const char * startOfWord = text() + m_pageOffset;
|
||||
const char * endOfWord = UTF8Helper::EndOfWord(startOfWord);
|
||||
KDPoint textPosition(k_margin, k_margin);
|
||||
|
||||
const int wordMaxLength = 128;
|
||||
char word[wordMaxLength];
|
||||
|
||||
const int charWidth = m_font->glyphSize().width();
|
||||
const int charHeight = m_font->glyphSize().height();
|
||||
|
||||
while(startOfWord < endOfFile) {
|
||||
KDSize textSize = m_font->stringSizeUntil(startOfWord, endOfWord);
|
||||
KDPoint nextTextPosition = KDPoint(textPosition.x()+textSize.width(), textPosition.y());
|
||||
|
||||
if(nextTextPosition.x() > m_frame.width() - k_margin) { // Right overflow
|
||||
textPosition = KDPoint(k_margin, textPosition.y() + textSize.height());
|
||||
nextTextPosition = KDPoint(k_margin + textSize.width(), textPosition.y());
|
||||
}
|
||||
|
||||
if(textPosition.y() + textSize.height() > m_frame.height() - k_margin) { // Bottom overflow
|
||||
break;
|
||||
}
|
||||
|
||||
stringNCopy(word, wordMaxLength, startOfWord, endOfWord-startOfWord);
|
||||
ctx->drawString(word, textPosition, m_font, m_textColor, m_backgroundColor);
|
||||
|
||||
while(*endOfWord == ' ' || *endOfWord == '\n') {
|
||||
if(*endOfWord == ' ') {
|
||||
nextTextPosition = KDPoint(nextTextPosition.x() + charWidth, nextTextPosition.y());
|
||||
}
|
||||
else {
|
||||
nextTextPosition = KDPoint(k_margin, nextTextPosition.y() + charHeight);
|
||||
}
|
||||
++endOfWord;
|
||||
}
|
||||
|
||||
//We must change value of startOfWord now to avoid having
|
||||
//two times the same word if the break below is used
|
||||
startOfWord = endOfWord;
|
||||
|
||||
if(nextTextPosition.y() + textSize.height() > m_frame.height() - k_margin) { // If out of page, quit
|
||||
break;
|
||||
}
|
||||
if(nextTextPosition.y() != textPosition.y()) { // If line changed, x is at start of line
|
||||
nextTextPosition = KDPoint(k_margin, nextTextPosition.y());
|
||||
}
|
||||
if(nextTextPosition.x() > m_frame.width() - k_margin) { // Go to line if right overflow
|
||||
nextTextPosition = KDPoint(k_margin, nextTextPosition.y() + textSize.height());
|
||||
}
|
||||
|
||||
textPosition = nextTextPosition;
|
||||
endOfWord = UTF8Helper::EndOfWord(startOfWord);
|
||||
}
|
||||
|
||||
m_nextPageOffset = startOfWord - text();
|
||||
};
|
||||
|
||||
int WordWrapTextView::getPageOffset() const {
|
||||
return m_pageOffset;
|
||||
}
|
||||
|
||||
void WordWrapTextView::setPageOffset(int o) {
|
||||
m_pageOffset = o;
|
||||
}
|
||||
|
||||
}
|
||||
28
apps/reader/word_wrap_view.h
Normal file
28
apps/reader/word_wrap_view.h
Normal file
@@ -0,0 +1,28 @@
|
||||
#ifndef _WORD_WRAP_VIEW_H_
|
||||
#define _WORD_WRAP_VIEW_H_
|
||||
|
||||
#include <apps/global_preferences.h>
|
||||
#include <escher.h>
|
||||
|
||||
namespace Reader
|
||||
{
|
||||
|
||||
class WordWrapTextView : public PointerTextView {
|
||||
public:
|
||||
WordWrapTextView() : PointerTextView(GlobalPreferences::sharedGlobalPreferences()->font()) {};
|
||||
void drawRect(KDContext * ctx, KDRect rect) const override;
|
||||
void setText(const char*, int length);
|
||||
void nextPage();
|
||||
void previousPage();
|
||||
int getPageOffset() const;
|
||||
void setPageOffset(int o);
|
||||
protected:
|
||||
int m_pageOffset = 0;
|
||||
mutable int m_nextPageOffset = 0;
|
||||
int m_length = 0;
|
||||
static const int k_margin = 10;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -33,7 +33,7 @@ Cartesian = "Kartesisch "
|
||||
Polar = "Polar "
|
||||
Brightness = "Helligkeit"
|
||||
SoftwareVersion = "Epsilon version"
|
||||
OmegaVersion = "Omega version"
|
||||
UpsilonVersion = "Upsilon version"
|
||||
Username = "Name"
|
||||
MicroPythonVersion = "µPythonversion"
|
||||
FontSizes = "Python-Schriftgröße"
|
||||
@@ -43,6 +43,7 @@ SerialNumber = "Seriennummer"
|
||||
UpdatePopUp = "Erinnerung: Aktualisierung"
|
||||
BetaPopUp = "Erinnerung: Vorabversion"
|
||||
Contributors = "Mitwirkende"
|
||||
Battery = "Batteriestatus"
|
||||
Accessibility = "Barrierefreiheit"
|
||||
AccessibilityInvertColors = "Farbumkehrung"
|
||||
AccessibilityMagnify = "Lupe"
|
||||
|
||||
@@ -33,7 +33,7 @@ Cartesian = "Cartesian "
|
||||
Polar = "Polar "
|
||||
Brightness = "Brightness"
|
||||
SoftwareVersion = "Epsilon version"
|
||||
OmegaVersion = "Omega version"
|
||||
UpsilonVersion = "Upsilon version"
|
||||
Username = "Name"
|
||||
MicroPythonVersion = "µPython version"
|
||||
FontSizes = "Python font size"
|
||||
@@ -42,6 +42,7 @@ SmallFont = "Small "
|
||||
SerialNumber = "Serial number"
|
||||
UpdatePopUp = "Update pop-up"
|
||||
BetaPopUp = "Beta pop-up"
|
||||
Battery = "Battery"
|
||||
Contributors = "Contributors"
|
||||
Accessibility = "Accessibility"
|
||||
AccessibilityInvertColors = "Invert colors"
|
||||
|
||||
@@ -33,7 +33,7 @@ Cartesian = "Binómica "
|
||||
Polar = "Polar "
|
||||
Brightness = "Brillo"
|
||||
SoftwareVersion = "Versión de Epsilon"
|
||||
OmegaVersion = "Versión de Omega"
|
||||
UpsilonVersion = "Versión de Upsilon"
|
||||
Username = "Apellido"
|
||||
MicroPythonVersion = "Version de µPython"
|
||||
FontSizes = "Tipografía Python"
|
||||
@@ -43,6 +43,7 @@ SerialNumber = "Número serie"
|
||||
UpdatePopUp = "Pop-up de actualización"
|
||||
BetaPopUp = "Beta pop-up"
|
||||
Contributors = "Contribuyentes"
|
||||
Battery = "Batería"
|
||||
Accessibility = "Accesibilidad"
|
||||
AccessibilityInvertColors = "Colores invertidos"
|
||||
AccessibilityMagnify = "Lupa"
|
||||
|
||||
@@ -33,7 +33,7 @@ Cartesian = "Algébrique "
|
||||
Polar = "Exponentielle "
|
||||
Brightness = "Luminosité"
|
||||
SoftwareVersion = "Version d'Epsilon"
|
||||
OmegaVersion = "Version d'Omega"
|
||||
UpsilonVersion = "Version d'Upsilon"
|
||||
Username = "Nom"
|
||||
MicroPythonVersion = "Version de µPython"
|
||||
FontSizes = "Police Python"
|
||||
@@ -43,6 +43,7 @@ SerialNumber = "Numéro de série"
|
||||
UpdatePopUp = "Rappel de mise à jour"
|
||||
BetaPopUp = "Rappel de version bêta"
|
||||
Contributors = "Contributeurs"
|
||||
Battery = "Batterie"
|
||||
Accessibility = "Accessibilité"
|
||||
AccessibilityInvertColors = "Inverser couleurs"
|
||||
AccessibilityMagnify = "Loupe"
|
||||
|
||||
@@ -33,7 +33,7 @@ Cartesian = "Kartéziánus "
|
||||
Polar = "Poláris "
|
||||
Brightness = "Fényerö"
|
||||
SoftwareVersion = "Epsilon verzió"
|
||||
OmegaVersion = "Omega verzió"
|
||||
UpsilonVersion = "Upsilon verzió"
|
||||
Username = "Felhasználónév"
|
||||
MicroPythonVersion = "µPython verzió"
|
||||
FontSizes = "Python betü méret"
|
||||
@@ -43,6 +43,7 @@ SerialNumber = "Sorozatszám"
|
||||
UpdatePopUp = "Frissítés figyelmeztetés"
|
||||
BetaPopUp = "Béta figyelmeztetés"
|
||||
Contributors = "Közremüködök"
|
||||
Battery = "Akkumulátor"
|
||||
Accessibility = "Több vizuális beállitások"
|
||||
AccessibilityInvertColors = "Invertált színek"
|
||||
AccessibilityMagnify = "Nagyító"
|
||||
|
||||
@@ -33,7 +33,7 @@ Cartesian = "Algebrico "
|
||||
Polar = "Esponenziale "
|
||||
Brightness = "Luminosità"
|
||||
SoftwareVersion = "Epsilon version"
|
||||
OmegaVersion = "Omega version"
|
||||
UpsilonVersion = "Upsilon version"
|
||||
Username = "Name"
|
||||
MicroPythonVersion = "µPython version"
|
||||
FontSizes = "Carattere Python"
|
||||
@@ -43,6 +43,7 @@ SerialNumber = "Numero di serie"
|
||||
UpdatePopUp = "Promemoria aggiornamento"
|
||||
BetaPopUp = "Promemoria beta"
|
||||
Contributors = "Contributors"
|
||||
Battery = "Batteria"
|
||||
Accessibility = "Accessibility"
|
||||
AccessibilityInvertColors = "Invert colors"
|
||||
AccessibilityMagnify = "Magnify"
|
||||
|
||||
@@ -33,7 +33,7 @@ Cartesian = "Cartesisch "
|
||||
Polar = "Polair "
|
||||
Brightness = "Helderheid"
|
||||
SoftwareVersion = "Epsilon version"
|
||||
OmegaVersion = "Omega version"
|
||||
UpsilonVersion = "Upsilon version"
|
||||
Username = "Name"
|
||||
MicroPythonVersion = "µPython version"
|
||||
FontSizes = "Python lettergrootte"
|
||||
@@ -43,6 +43,7 @@ SerialNumber = "Serienummer"
|
||||
UpdatePopUp = "Update pop-up"
|
||||
BetaPopUp = "Bèta pop-up"
|
||||
Contributors = "Contributors"
|
||||
Battery = "Batterij"
|
||||
Accessibility = "Accessibility"
|
||||
AccessibilityInvertColors = "Invert colors"
|
||||
AccessibilityMagnify = "Magnify"
|
||||
|
||||
@@ -33,7 +33,7 @@ Cartesian = "Cartesiana "
|
||||
Polar = "Polar "
|
||||
Brightness = "Brilho"
|
||||
SoftwareVersion = "Versão do Epsilon"
|
||||
OmegaVersion = "Versão do Omega"
|
||||
UpsilonVersion = "Versão do Upsilon"
|
||||
Username = "Nome"
|
||||
MicroPythonVersion = "Versao do µPython"
|
||||
FontSizes = "Tipografia Python"
|
||||
@@ -43,6 +43,7 @@ SerialNumber = "Número serie"
|
||||
UpdatePopUp = "Alertas de atualização"
|
||||
BetaPopUp = "Beta pop-up"
|
||||
Contributors = "Contribuidores"
|
||||
Battery = "Bateria"
|
||||
Accessibility = "Acessibilidade"
|
||||
AccessibilityInvertColors = "Cores invertidas"
|
||||
AccessibilityMagnify = "Lupa"
|
||||
|
||||
@@ -20,7 +20,7 @@ constexpr SettingsMessageTree s_modelMathOptionsChildren[6] = {SettingsMessageTr
|
||||
constexpr SettingsMessageTree s_modelFontChildren[2] = {SettingsMessageTree(I18n::Message::LargeFont), SettingsMessageTree(I18n::Message::SmallFont)};
|
||||
constexpr SettingsMessageTree s_accessibilityChildren[6] = {SettingsMessageTree(I18n::Message::AccessibilityInvertColors), SettingsMessageTree(I18n::Message::AccessibilityMagnify),SettingsMessageTree(I18n::Message::AccessibilityGamma),SettingsMessageTree(I18n::Message::AccessibilityGammaRed),SettingsMessageTree(I18n::Message::AccessibilityGammaGreen),SettingsMessageTree(I18n::Message::AccessibilityGammaBlue)};
|
||||
constexpr SettingsMessageTree s_contributorsChildren[23] = {SettingsMessageTree(I18n::Message::Developers), SettingsMessageTree(I18n::Message::QuentinGuidee), SettingsMessageTree(I18n::Message::JoachimLeFournis), SettingsMessageTree(I18n::Message::MaximeFriess), SettingsMessageTree(I18n::Message::JeanBaptisteBoric), SettingsMessageTree(I18n::Message::SandraSimmons), SettingsMessageTree(I18n::Message::David), SettingsMessageTree(I18n::Message::DamienNicolet), SettingsMessageTree(I18n::Message::EvannDreumont), SettingsMessageTree(I18n::Message::SzaboLevente), SettingsMessageTree(I18n::Message::VenceslasDuet), SettingsMessageTree(I18n::Message::CharlotteThomas), SettingsMessageTree(I18n::Message::AntoninLoubiere), SettingsMessageTree(I18n::Message::CyprienMejat), SettingsMessageTree(I18n::Message::BetaTesters), SettingsMessageTree(I18n::Message::TimeoArnouts), SettingsMessageTree(I18n::Message::JulieC), SettingsMessageTree(I18n::Message::LelahelHideux), SettingsMessageTree(I18n::Message::Madil), SettingsMessageTree(I18n::Message::HilaireLeRoux), SettingsMessageTree(I18n::Message::HectorNussbaumer), SettingsMessageTree(I18n::Message::RaphaelDyda), SettingsMessageTree(I18n::Message::ThibautC)};
|
||||
constexpr SettingsMessageTree s_modelAboutChildren[8] = {SettingsMessageTree(I18n::Message::Username), SettingsMessageTree(I18n::Message::SoftwareVersion), SettingsMessageTree(I18n::Message::OmegaVersion), SettingsMessageTree(I18n::Message::MicroPythonVersion), SettingsMessageTree(I18n::Message::MemUse), SettingsMessageTree(I18n::Message::SerialNumber), SettingsMessageTree(I18n::Message::FccId), SettingsMessageTree(I18n::Message::Contributors, s_contributorsChildren)};
|
||||
constexpr SettingsMessageTree s_modelAboutChildren[9] = {SettingsMessageTree(I18n::Message::Username), SettingsMessageTree(I18n::Message::SoftwareVersion), SettingsMessageTree(I18n::Message::UpsilonVersion), SettingsMessageTree(I18n::Message::MicroPythonVersion), SettingsMessageTree(I18n::Message::Battery), SettingsMessageTree(I18n::Message::MemUse), SettingsMessageTree(I18n::Message::SerialNumber), SettingsMessageTree(I18n::Message::FccId), SettingsMessageTree(I18n::Message::Contributors, s_contributorsChildren)};
|
||||
|
||||
MainController::MainController(Responder * parentResponder, InputEventHandlerDelegate * inputEventHandlerDelegate) :
|
||||
ViewController(parentResponder),
|
||||
|
||||
@@ -25,7 +25,7 @@ extern const Shared::SettingsMessageTree s_modelFontChildren[2];
|
||||
extern const Shared::SettingsMessageTree s_modelDateTimeChildren[3];
|
||||
extern const Shared::SettingsMessageTree s_accessibilityChildren[6];
|
||||
extern const Shared::SettingsMessageTree s_contributorsChildren[23];
|
||||
extern const Shared::SettingsMessageTree s_modelAboutChildren[8];
|
||||
extern const Shared::SettingsMessageTree s_modelAboutChildren[9];
|
||||
extern const Shared::SettingsMessageTree s_model;
|
||||
|
||||
class MainController : public ViewController, public ListViewDataSource, public SelectableTableViewDataSource {
|
||||
|
||||
@@ -4,8 +4,11 @@
|
||||
#include <cmath>
|
||||
#include <apps/settings/main_controller.h>
|
||||
#include <poincare/integer.h>
|
||||
#include <poincare/number.h>
|
||||
#include <ion/storage.h>
|
||||
|
||||
#include <poincare/preferences.h>
|
||||
|
||||
#define MP_STRINGIFY_HELPER(x) #x
|
||||
#define MP_STRINGIFY(x) MP_STRINGIFY_HELPER(x)
|
||||
|
||||
@@ -13,6 +16,8 @@
|
||||
#error This file expects OMEGA_STATE to be defined
|
||||
#endif
|
||||
|
||||
|
||||
using namespace Shared;
|
||||
namespace Settings {
|
||||
|
||||
AboutController::AboutController(Responder * parentResponder) :
|
||||
@@ -59,13 +64,13 @@ bool AboutController::handleEvent(Ion::Events::Event event) {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
if (childLabel == I18n::Message::OmegaVersion) {
|
||||
if (childLabel == I18n::Message::UpsilonVersion) {
|
||||
MessageTableCellWithBuffer * myCell = (MessageTableCellWithBuffer *)m_selectableTableView.selectedCell();
|
||||
if (strcmp(myCell->accessoryText(), Ion::omegaVersion()) == 0) {
|
||||
if (strcmp(myCell->accessoryText(), Ion::UpsilonVersion()) == 0) {
|
||||
myCell->setAccessoryText(MP_STRINGIFY(OMEGA_STATE)); //Change for public/dev
|
||||
return true;
|
||||
}
|
||||
myCell->setAccessoryText(Ion::omegaVersion());
|
||||
myCell->setAccessoryText(Ion::UpsilonVersion());
|
||||
return true;
|
||||
}
|
||||
if (childLabel == I18n::Message::MemUse) {
|
||||
@@ -159,11 +164,17 @@ void AboutController::willDisplayCellForIndex(HighlightCell * cell, int index) {
|
||||
} else {
|
||||
MessageTableCellWithBuffer * myCell = (MessageTableCellWithBuffer *)cell;
|
||||
static const char * mpVersion = MICROPY_VERSION_STRING;
|
||||
|
||||
static char batteryLevel[15];
|
||||
int batteryLen = Poincare::Number::FloatNumber(Ion::Battery::voltage()).serialize(batteryLevel, 15, Poincare::Preferences::PrintFloatMode::Decimal, 3);
|
||||
batteryLevel[batteryLen] = 'V';
|
||||
|
||||
static const char * messages[] = {
|
||||
(const char*) Ion::username(),
|
||||
Ion::softwareVersion(),
|
||||
Ion::omegaVersion(),
|
||||
Ion::UpsilonVersion(),
|
||||
mpVersion,
|
||||
batteryLevel,
|
||||
"",
|
||||
Ion::serialNumber(),
|
||||
Ion::fccId(),
|
||||
|
||||
@@ -31,9 +31,13 @@ void FunctionApp::willBecomeInactive() {
|
||||
::App::willBecomeInactive();
|
||||
}
|
||||
|
||||
|
||||
bool FunctionApp::isAcceptableExpression(const Expression exp) {
|
||||
return TextFieldDelegateApp::isAcceptableExpression(exp) && ExpressionCanBeSerialized(exp, false, Expression(), localContext());
|
||||
bool FunctionApp::isAcceptableExpression(const Poincare::Expression expression) {
|
||||
/* We forbid functions whose type is equal because the input "2+f(3)" would be
|
||||
* simplify to an expression with an nested equal node which makes no sense. */
|
||||
if (!TextFieldDelegateApp::ExpressionCanBeSerialized(expression, false, Expression(), localContext()) || expression.type() == ExpressionNode::Type::Equal) {
|
||||
return false;
|
||||
}
|
||||
return TextFieldDelegateApp::isAcceptableExpression(expression);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ LocalizationController::ContentView::ContentView(LocalizationController * contro
|
||||
assert(k_numberOfCountryWarningLines == 2); // textMessages is not overflowed
|
||||
I18n::Message textMessages[k_numberOfCountryWarningLines] = {I18n::Message::CountryWarning1, I18n::Message::CountryWarning2};
|
||||
for (int i = 0; i < k_numberOfCountryWarningLines; i++) {
|
||||
m_countryWarningLines[i].setBackgroundColor(Palette::BackgroundHard);
|
||||
m_countryWarningLines[i].setBackgroundColor(Palette::BackgroundApps);
|
||||
m_countryWarningLines[i].setFont(KDFont::SmallFont);
|
||||
m_countryWarningLines[i].setAlignment(0.5f, 0.5f);
|
||||
m_countryWarningLines[i].setMessage(textMessages[i]);
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
#include "message_view.h"
|
||||
#include <assert.h>
|
||||
|
||||
MessageView::MessageView(I18n::Message * messages, KDColor * colors, uint8_t numberOfMessages) {
|
||||
MessageView::MessageView(I18n::Message * messages, KDColor * fgcolors, KDColor * bgcolors, uint8_t numberOfMessages) {
|
||||
m_numberOfMessages = numberOfMessages < k_maxNumberOfMessages ? numberOfMessages : k_maxNumberOfMessages;
|
||||
for (uint8_t i = 0; i < m_numberOfMessages; i++) {
|
||||
m_messageTextViews[i].setFont(i == 0 ? KDFont::LargeFont : KDFont::SmallFont);
|
||||
m_messageTextViews[i].setMessage(messages[i]);
|
||||
m_messageTextViews[i].setAlignment(0.5f, 0.5f);
|
||||
m_messageTextViews[i].setTextColor(colors[i]);
|
||||
m_messageTextViews[i].setTextColor(fgcolors[i]);
|
||||
m_messageTextViews[i].setBackgroundColor(bgcolors[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
class MessageView : public View {
|
||||
public:
|
||||
MessageView(I18n::Message * messages, KDColor * colors, uint8_t numberOfMessages);
|
||||
MessageView(I18n::Message * messages, KDColor * fgcolors, KDColor * bgcolors, uint8_t numberOfMessages);
|
||||
void drawRect(KDContext * ctx, KDRect rect) const override;
|
||||
protected:
|
||||
int numberOfSubviews() const override { return m_numberOfMessages; }
|
||||
|
||||
@@ -85,7 +85,13 @@ bool TextFieldDelegateApp::isFinishingEvent(Ion::Events::Event event) {
|
||||
}
|
||||
|
||||
bool TextFieldDelegateApp::isAcceptableExpression(const Expression exp) {
|
||||
return !(exp.isUninitialized() || exp.type() == ExpressionNode::Type::Store || exp.type() == ExpressionNode::Type::Equal);
|
||||
if (exp.isUninitialized()) {
|
||||
return false;
|
||||
}
|
||||
if (exp.type() == ExpressionNode::Type::Store) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TextFieldDelegateApp::ExpressionCanBeSerialized(const Expression expression, bool replaceAns, Expression ansExpression, Context * context) {
|
||||
|
||||
@@ -68,10 +68,4 @@ void App::willBecomeInactive() {
|
||||
::App::willBecomeInactive();
|
||||
}
|
||||
|
||||
|
||||
bool App::isAcceptableExpression(const Poincare::Expression exp) {
|
||||
return TextFieldDelegateApp::ExpressionCanBeSerialized(exp, false, Poincare::Expression(), localContext())
|
||||
&& !(exp.isUninitialized() || exp.type() == Poincare::ExpressionNode::Type::Store);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user