From 665906ecb34244816c81db4f54e2bc71e8b3bcda Mon Sep 17 00:00:00 2001 From: Ad5001 Date: Tue, 2 Apr 2024 22:11:54 +0200 Subject: [PATCH] New preferences panel. --- LogarithmPlotter/i18n/lp_de.ts | 148 +++-- LogarithmPlotter/i18n/lp_en.ts | 156 ++++-- LogarithmPlotter/i18n/lp_es.ts | 462 ++++++++-------- LogarithmPlotter/i18n/lp_fr.ts | 148 +++-- LogarithmPlotter/i18n/lp_hu.ts | 150 +++-- LogarithmPlotter/i18n/lp_nb_NO.ts | 376 +++++++------ LogarithmPlotter/i18n/lp_template.ts | 519 +++++++++--------- .../eu/ad5001/LogarithmPlotter/AppMenuBar.qml | 8 +- .../LogarithmPlotter/LogarithmPlotter.qml | 14 +- .../LogarithmPlotter/Popup/Preferences.qml | 187 +++++++ .../eu/ad5001/LogarithmPlotter/Popup/qmldir | 1 + .../LogarithmPlotter/icons/settings/color.svg | 1 + .../eu/ad5001/LogarithmPlotter/js/autoload.js | 3 +- .../eu/ad5001/LogarithmPlotter/js/canvas.mjs | 4 + .../LogarithmPlotter/js/setting/common.mjs | 67 +++ .../js/setting/expression.mjs | 54 ++ .../LogarithmPlotter/js/setting/general.mjs | 49 ++ .../ad5001/LogarithmPlotter/js/settings.mjs | 39 ++ 18 files changed, 1504 insertions(+), 882 deletions(-) create mode 100644 LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Popup/Preferences.qml create mode 120000 LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/icons/settings/color.svg create mode 100644 LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/setting/common.mjs create mode 100644 LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/setting/expression.mjs create mode 100644 LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/setting/general.mjs create mode 100644 LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/settings.mjs diff --git a/LogarithmPlotter/i18n/lp_de.ts b/LogarithmPlotter/i18n/lp_de.ts index 4d9a064..2e8b5fe 100644 --- a/LogarithmPlotter/i18n/lp_de.ts +++ b/LogarithmPlotter/i18n/lp_de.ts @@ -5,7 +5,7 @@ About - + About LogarithmPlotter Über LogarithmPlotter @@ -186,6 +186,14 @@ Schließen + + BoolSetting + + + Check for updates on startup + Beim Starten auf Updates prüfen + + Changelog @@ -437,14 +445,17 @@ Diese Einstellungen können jederzeit über das Menü "Einstellungen" LogarithmPlotter + Objects Objekte + Settings Einstellungen + History Verlauf @@ -473,14 +484,17 @@ Diese Einstellungen können jederzeit über das Menü "Einstellungen" Geladene Datei '%1'. + Copied plot screenshot to clipboard! Grafik in die Zwischenablage kopiert! + &Update &Aktualisieren + &Update LogarithmPlotter LogarithmPlotter &aktualisieren @@ -599,100 +613,105 @@ Diese Einstellungen können jederzeit über das Menü "Einstellungen" Settings - + X Zoom Zoom auf X - + Y Zoom Zoom auf Y - + Min X Minimum X - + Max Y Maximum Y - + Max X Maximum X - + Min Y Minimum Y - + X Axis Step X-Achsen-Schritt - + Y Axis Step Y-Achsen-Schritt - + Line width Linienbreite - + Text size (px) Textgröße (px) - + X Label Etikett der X-Achse - + Y Label Etikett der Y-Achse - + X Log scale Logarithmische Skala in X - + Show X graduation X-Teilung anzeigen - + Show Y graduation Y-Teilung anzeigen - + Copy to clipboard Kopieren in die Zwischenablage - + Save plot Grafik speichern - + Save plot as Grafik speichern unter - + Load plot Grafik laden + + + Done + Schließen + ThanksTo @@ -790,12 +809,12 @@ Diese Einstellungen können jederzeit über das Menü "Einstellungen" changelog - + Could not fetch changelog: Server error {}. Changelog konnte nicht geholt werden: Server-Fehler {}. - + Could not fetch update: {}. Changelog konnte nicht geholt werden: {}. @@ -1075,6 +1094,22 @@ Ausdruck analysiert: %3 LogarithmPlotter - Drawing error LogarithmPlotter - Fehler + + Automatically close parenthesises and brackets + Klammern automatisch schließen + + + Enable syntax highlighting + Syntaxhervorhebung einschalten + + + Enable autocompletion + Automatische Vervollständigung einschalten + + + Color Scheme + Syntaktische Färbung + function @@ -1106,6 +1141,21 @@ Ausdruck analysiert: %3 Hochpass + + general + + Check for updates on startup + Beim Starten auf Updates prüfen + + + Reset redo stack automaticly + Wiederherstellen-Stapel automatisch zurücksetzen + + + Enable LaTeX rendering + LaTeX-Rendering aktivieren + + historylib @@ -1136,64 +1186,52 @@ Ausdruck analysiert: %3 io - Objects - Objekte + Objekte - Settings - Einstellungen + Einstellungen - History - Verlauf + Verlauf - Saved plot to '%1'. - Gespeicherte Grafik auf '%1'. + Gespeicherte Grafik auf '%1'. - Loading file '%1'. - Laden der Datei '%1'. + Laden der Datei '%1'. - Unknown object type: %1. - Unbekannter Objekttyp: %1. + Unbekannter Objekttyp: %1. - Invalid file provided. - Ungültige Datei angegeben. + Ungültige Datei angegeben. - Could not save file: - Die Datei konnte nicht gespeichert werden: + Die Datei konnte nicht gespeichert werden: - Loaded file '%1'. - Geladene Datei '%1'. + Geladene Datei '%1'. - Copied plot screenshot to clipboard! - Grafik in die Zwischenablage kopiert! + Grafik in die Zwischenablage kopiert! - &Update - &Aktualisieren + &Aktualisieren - &Update LogarithmPlotter - LogarithmPlotter &aktualisieren + LogarithmPlotter &aktualisieren @@ -1226,7 +1264,7 @@ Der Prozess '{}' wurde mit einem Rückgabecode ungleich Null beendet { Bitte vergewissern Sie sich, dass Ihre LaTeX-Installation korrekt ist, und melden Sie einen Fehler, falls dies der Fall ist. - + An exception occured within the creation of the latex formula. Process '{}' took too long to finish: {} @@ -1505,6 +1543,14 @@ Bitte vergewissern Sie sich, dass Ihre LaTeX-Installation korrekt ist, und melde Folgen + + settingCategory + + + general + + + sommegainsbode @@ -1533,22 +1579,22 @@ Bitte vergewissern Sie sich, dass Ihre LaTeX-Installation korrekt ist, und melde update - + An update for LogarithPlotter (v{}) is available. Ein Aktualisierung für LogarithmPlotter (v{}) ist verfügbar. - + No update available. Keine Aktualisierung verfügbar. - + Could not fetch update information: Server error {}. Es konnten keine Aktualisierungsinformationen abgerufen werden: Server-Fehler {}. - + Could not fetch update information: {}. Es konnten keine Aktualisierungsinformationen abgerufen werden:{}. diff --git a/LogarithmPlotter/i18n/lp_en.ts b/LogarithmPlotter/i18n/lp_en.ts index f565fe7..998d124 100644 --- a/LogarithmPlotter/i18n/lp_en.ts +++ b/LogarithmPlotter/i18n/lp_en.ts @@ -5,7 +5,7 @@ About - + About LogarithmPlotter About LogarithmPlotter @@ -186,6 +186,14 @@ Close + + BoolSetting + + + Check for updates on startup + Check for updates on startup + + Changelog @@ -437,14 +445,17 @@ These settings can be changed at any time from the "Settings" menu. LogarithmPlotter + Objects Objects + Settings Settings + History History @@ -473,14 +484,17 @@ These settings can be changed at any time from the "Settings" menu.Loaded file '%1'. + Copied plot screenshot to clipboard! Copied plot screenshot to clipboard! + &Update &Update + &Update LogarithmPlotter &Update LogarithmPlotter @@ -599,100 +613,105 @@ These settings can be changed at any time from the "Settings" menu. Settings - + X Zoom X Zoom - + Y Zoom Y Zoom - + Min X Min X - + Max Y Max Y - + Max X Max X - + Min Y Min Y - + X Axis Step X Axis Step - + Y Axis Step Y Axis Step - + Line width Line width - + Text size (px) Text size (px) - + X Label X Label - + Y Label Y Label - + X Log scale X Log scale - + Show X graduation Show X graduation - + Show Y graduation Show Y graduation - + Copy to clipboard Copy to clipboard - + Save plot Save plot - + Save plot as Save plot as - + Load plot Open plot + + + Done + Done + ThanksTo @@ -790,12 +809,12 @@ These settings can be changed at any time from the "Settings" menu. changelog - + Could not fetch changelog: Server error {}. Could not fetch changelog: Server error {}. - + Could not fetch update: {}. Could not fetch changelog: {}. @@ -1075,6 +1094,22 @@ Evaluated expression: %3 LogarithmPlotter - Drawing error LogarithmPlotter - Drawing error + + Automatically close parenthesises and brackets + Automatically close parentheses and brackets + + + Enable syntax highlighting + Enable syntax highlighting + + + Enable autocompletion + Enable autocompletion + + + Color Scheme + Color Scheme + function @@ -1106,6 +1141,21 @@ Evaluated expression: %3 high-pass + + general + + Check for updates on startup + Check for updates on startup + + + Reset redo stack automaticly + Reset redo stack automatically + + + Enable LaTeX rendering + Enable LaTeX rendering + + historylib @@ -1136,64 +1186,52 @@ Evaluated expression: %3 io - Objects - Objects + Objects - Settings - Settings + Settings - History - History + History - Saved plot to '%1'. - Saved plot to '%1'. + Saved plot to '%1'. - Loading file '%1'. - Loading file '%1'. + Loading file '%1'. - Unknown object type: %1. - Unknown object type: %1. + Unknown object type: %1. - Invalid file provided. - Invalid file provided. + Invalid file provided. - Could not save file: - Could not save file: + Could not save file: - Loaded file '%1'. - Loaded file '%1'. + Loaded file '%1'. - Copied plot screenshot to clipboard! - Copied plot screenshot to clipboard! + Copied plot screenshot to clipboard! - &Update - &Update + &Update - &Update LogarithmPlotter - &Update LogarithmPlotter + &Update LogarithmPlotter @@ -1226,7 +1264,7 @@ Process '{}' ended with a non-zero return code {}: Please make sure your LaTeX installation is correct and report a bug if so. - + An exception occured within the creation of the latex formula. Process '{}' took too long to finish: {} @@ -1505,6 +1543,22 @@ Please make sure your LaTeX installation is correct and report a bug if so.Sequences + + settingCategory + + + general + General + + + editor + Expression Editor + + + default + Default Graph + + sommegainsbode @@ -1533,22 +1587,22 @@ Please make sure your LaTeX installation is correct and report a bug if so. update - + An update for LogarithPlotter (v{}) is available. An update for LogarithmPlotter (v{}) is available. - + No update available. No update available. - + Could not fetch update information: Server error {}. Could not fetch update information: Server error {}. - + Could not fetch update information: {}. Could not fetch update information: {}. diff --git a/LogarithmPlotter/i18n/lp_es.ts b/LogarithmPlotter/i18n/lp_es.ts index c8f4310..ef9e33a 100644 --- a/LogarithmPlotter/i18n/lp_es.ts +++ b/LogarithmPlotter/i18n/lp_es.ts @@ -5,7 +5,7 @@ About - + About LogarithmPlotter Sobre LogarithmPlotter @@ -105,27 +105,27 @@ Expression editor - + Automatically close parenthesises and brackets - + Enable syntax highlighting - + Enable autocompletion - + Color Scheme - + @@ -175,7 +175,7 @@ This plot contains unsaved changes. By doing this, all unsaved data will be lost. Continue? - + @@ -183,7 +183,15 @@ Close - + + + + + BoolSetting + + + Check for updates on startup + Comprobación de las actualizaciones al arrancar @@ -191,12 +199,12 @@ Fetching changelog... - + Done - + @@ -205,12 +213,12 @@ + Create new %1 - + Pick on graph - + @@ -218,42 +226,42 @@ Edit properties of %1 %2 - + LogarithmPlotter - Invalid object name - + An object with the name '%1' already exists. - + Name - + Label content - + null - + name - + name + value - + @@ -261,32 +269,32 @@ Object Properties - + Variables - + Constants - + Functions - + Executable Objects - + Objects - + @@ -294,12 +302,12 @@ Export Logarithm Plot file - + Import Logarithm Plot file - + @@ -307,68 +315,68 @@ Welcome to LogarithmPlotter - + Version %1 - + Take a few seconds to configure LogarithmPlotter. These settings can be changed at any time from the "Settings" menu. - + Check for updates on startup (requires online connectivity) - + Reset redo stack when a new action is added to history - + Enable LaTeX rendering - Activar el renderizado de LaTeX + Activar el renderizado de LaTeX Automatically close parenthesises and brackets in expressions - + Enable syntax highlighting for expressions - + Enable autocompletion interface in expression editor - + Color scheme: - + User manual - + Changelog - + Done - + @@ -376,22 +384,22 @@ These settings can be changed at any time from the "Settings" menu. Filter... - + Redo > - + > Now - + < Undo - + @@ -399,6 +407,39 @@ These settings can be changed at any time from the "Settings" menu. + Add Entry + + + + + LogarithmPlotter + + + Objects + + + + + Settings + + + + + History + + + + + Copied plot screenshot to clipboard! + + + + + &Update + + + + + &Update LogarithmPlotter @@ -407,7 +448,7 @@ These settings can be changed at any time from the "Settings" menu. + Create new: - + @@ -415,12 +456,12 @@ These settings can be changed at any time from the "Settings" menu. Hide all %1 - + Show all %1 - + @@ -428,27 +469,27 @@ These settings can be changed at any time from the "Settings" menu. Hide %1 %2 - + Show %1 %2 - + Set %1 %2 position - + Delete %1 %2 - + Pick new color for %1 %2 - + @@ -456,135 +497,140 @@ These settings can be changed at any time from the "Settings" menu. Pointer precision: - + Snap to grid: - + Pick X - + Pick Y - + Open picker settings - + Hide picker settings - + (no pick selected) - + Settings - + X Zoom - + - + Y Zoom - + - + Min X - + - + Max Y - + - + Max X - + - + Min Y - + - + X Axis Step - + - + Y Axis Step - + - + Line width - + - + Text size (px) - + - + X Label - + - + Y Label - + - + X Log scale - + - + Show X graduation - + - + Show Y graduation - + - + Copy to clipboard - + - + Save plot - + - + Save plot as - + - + Load plot - + + + + + Done + @@ -592,27 +638,27 @@ These settings can be changed at any time from the "Settings" menu. Thanks and Contributions - LogarithmPlotter - + Source code - + Original library by Raphael Graf - + Source - + Ported to Javascript by Matthew Crumley - + @@ -621,76 +667,76 @@ These settings can be changed at any time from the "Settings" menu. Website - + Ported to QMLJS by Ad5001 - + Libraries included - + Email - + English - + French - + German - + Hungarian - + Github - + Norwegian - + Translations included - + Improve - + changelog - + Could not fetch changelog: Server error {}. - + - + Could not fetch update: {}. - + @@ -702,7 +748,7 @@ These settings can be changed at any time from the "Settings" menu. %1: - + @@ -711,152 +757,152 @@ These settings can be changed at any time from the "Settings" menu. Cannot find property %1 of object %2. - + Undefined variable %1. - + In order to be executed, object %1 must have at least one argument. - + %1 cannot be executed. - + Invalid expression. - + Invalid expression (parity). - + Unknown character "%1". - + Illegal escape sequence: %1. - + Parse error [%1:%2]: %3 - + Expected %1 - + Unexpected %1 - + Unexpected ".": member access is not permitted - + Unexpected "[]": arrays are disabled. - + Unexpected symbol: %1. - + Function %1 must have at least one argument. - + First argument to map is not a function. - + Second argument to map is not an array. - + First argument to fold is not a function. - + Second argument to fold is not an array. - + First argument to filter is not a function. - + Second argument to filter is not an array. - + Second argument to indexOf is not a string or array. - + Second argument to join is not an array. - + EOF - + No object found with names %1. - + No object found with name %1. - + Object cannot be dependent on itself. - + Circular dependency detected. Object %1 depends on %2. - + Circular dependency detected. Objects %1 depend on %2. - + @@ -864,7 +910,7 @@ These settings can be changed at any time from the "Settings" menu. - + @@ -872,7 +918,7 @@ Evaluated expression: %3 %3 Undoing last change. - + @@ -881,7 +927,7 @@ Undoing last change. LogarithmPlotter - Parsing error - + @@ -889,75 +935,27 @@ Undoing last change. %2 Evaluated expression: %3 - + LogarithmPlotter - Drawing error - + - io + general - - Objects - + Check for updates on startup + Comprobación de las actualizaciones al arrancar - - Settings - + Reset redo stack automaticly + Restablecer la pila de rehacer automáticamente - - History - - - - - Saved plot to '%1'. - - - - - Loading file '%1'. - - - - - Unknown object type: %1. - - - - - Invalid file provided. - - - - - Could not save file: - - - - - Loaded file '%1'. - - - - - Copied plot screenshot to clipboard! - - - - - &Update - - - - - &Update LogarithmPlotter - + Enable LaTeX rendering + Activar el renderizado de LaTeX @@ -967,12 +965,12 @@ Evaluated expression: %3 No Latex installation found. If you already have a latex distribution installed, make sure it's installed on your path. Otherwise, you can download a Latex distribution like TeX Live at https://tug.org/texlive/. - + DVIPNG was not found. Make sure you include it from your Latex distribution. - + @@ -981,38 +979,46 @@ Process '{}' ended with a non-zero return code {}: {} Please make sure your latex installation is correct and report a bug if so. - + - + An exception occured within the creation of the latex formula. Process '{}' took too long to finish: {} Please make sure your latex installation is correct and report a bug if so. - + + + + + settingCategory + + + general + update - + An update for LogarithPlotter (v{}) is available. - + - + No update available. - + - + Could not fetch update information: Server error {}. - + - + Could not fetch update information: {}. - + @@ -1021,7 +1027,7 @@ Please make sure your latex installation is correct and report a bug if so. Usage: %1 - + @@ -1029,27 +1035,27 @@ Please make sure your latex installation is correct and report a bug if so. Usage: %1 or %2 - + integral(<from: number>, <to: number>, <f: ExecutableObject>) - + integral(<from: number>, <to: number>, <f: string>, <variable: string>) - + derivative(<f: ExecutableObject>, <x: number>) - + derivative(<f: string>, <variable: string>, <x: number>) - + diff --git a/LogarithmPlotter/i18n/lp_fr.ts b/LogarithmPlotter/i18n/lp_fr.ts index f9671dc..40a761b 100644 --- a/LogarithmPlotter/i18n/lp_fr.ts +++ b/LogarithmPlotter/i18n/lp_fr.ts @@ -5,7 +5,7 @@ About - + About LogarithmPlotter À propos de LogarithmPlotter @@ -187,6 +187,14 @@ Fermer + + BoolSetting + + + Check for updates on startup + Vérifier la présence de mise à jour au démarrage + + Changelog @@ -445,14 +453,17 @@ These settings can always be changed at any time from the "Settings" m LogarithmPlotter + Objects Objets + Settings Paramètres + History Historique @@ -481,14 +492,17 @@ These settings can always be changed at any time from the "Settings" m Fichier '%1' chargé. + Copied plot screenshot to clipboard! Image du graphe copiée dans le presse-papiers ! + &Update &Mise à jour + &Update LogarithmPlotter &Mettre à jour LogarithmPlotter @@ -607,100 +621,105 @@ These settings can always be changed at any time from the "Settings" m Settings - + X Zoom Zoom en X - + Y Zoom Zoom en Y - + Min X Min X - + Max Y Max Y - + Max X Max X - + Min Y Min Y - + X Axis Step Pas de l'axe X - + Y Axis Step Pas de l'axe Y - + Line width Taille des lignes - + Text size (px) Taille du texte (px) - + X Label Label de l'axe X - + Y Label Label de l'axe Y - + X Log scale Échelle logarithmique en X - + Show X graduation Montrer la graduation de l'axe X - + Show Y graduation Montrer la graduation de l'axe Y - + Copy to clipboard Copier vers le presse-papiers - + Save plot Sauvegarder le graphe - + Save plot as Sauvegarder le graphe sous - + Load plot Ouvrir un graphe + + + Done + Fermer + ThanksTo @@ -798,12 +817,12 @@ These settings can always be changed at any time from the "Settings" m changelog - + Could not fetch changelog: Server error {}. Impossible de récupérer l'historique des modifications : Erreur de serveur {}. - + Could not fetch update: {}. Impossible de récupérer l'historique des modifications : {}. @@ -1084,6 +1103,22 @@ Formule analysée : %3 LogarithmPlotter - Drawing error LogarithmPlotter - Erreur + + Automatically close parenthesises and brackets + Fermer automatiquement les parenthèses et les crochets + + + Enable syntax highlighting + Activer la coloration syntaxique + + + Enable autocompletion + Activer l'autocomplétion + + + Color Scheme + Coloration Syntaxique + function @@ -1115,6 +1150,21 @@ Formule analysée : %3 passe-haut + + general + + Check for updates on startup + Vérifier la présence de mise à jour au démarrage + + + Reset redo stack automaticly + Réinitialiser la pile d'action "Rétablir" automatiquement + + + Enable LaTeX rendering + Activer le rendu LaTeX + + historylib @@ -1145,64 +1195,52 @@ Formule analysée : %3 io - Objects - Objets + Objets - Settings - Paramètres + Paramètres - History - Historique + Historique - Saved plot to '%1'. - Graphe sauvegardé dans '%1'. + Graphe sauvegardé dans '%1'. - Loading file '%1'. - Chargement du fichier '%1'. + Chargement du fichier '%1'. - Unknown object type: %1. - Type d'objet inconnu : %1. + Type d'objet inconnu : %1. - Invalid file provided. - Fichier fourni invalide. + Fichier fourni invalide. - Could not save file: - Impossible de sauvegarder le fichier : + Impossible de sauvegarder le fichier : - Loaded file '%1'. - Fichier '%1' chargé. + Fichier '%1' chargé. - Copied plot screenshot to clipboard! - Image du graphe copiée dans le presse-papiers ! + Image du graphe copiée dans le presse-papiers ! - &Update - &Mise à jour + &Mise à jour - &Update LogarithmPlotter - &Mettre à jour LogarithmPlotter + &Mettre à jour LogarithmPlotter @@ -1235,7 +1273,7 @@ Le processus '{}' s'est terminé par un code de retour non nul {} Vérifiez que votre installation de LaTeX est correcte et signalez un bogue si c'est le cas. - + An exception occured within the creation of the latex formula. Process '{}' took too long to finish: {} @@ -1514,6 +1552,14 @@ Vérifiez que votre installation de LaTeX est correcte et signalez un bogue si c Suites + + settingCategory + + + general + + + sommegainsbode @@ -1542,22 +1588,22 @@ Vérifiez que votre installation de LaTeX est correcte et signalez un bogue si c update - + An update for LogarithPlotter (v{}) is available. Une mise à jour de LogarithmPlotter (v{}) est disponible. - + No update available. À jour. - + Could not fetch update information: Server error {}. Impossible de récupérer les informations de mise à jour. Erreur du serveur {}. - + Could not fetch update information: {}. Impossible de récupérer les informations de mise à jour. {}. diff --git a/LogarithmPlotter/i18n/lp_hu.ts b/LogarithmPlotter/i18n/lp_hu.ts index d263236..34f6fc4 100644 --- a/LogarithmPlotter/i18n/lp_hu.ts +++ b/LogarithmPlotter/i18n/lp_hu.ts @@ -5,7 +5,7 @@ About - + About LogarithmPlotter LogarithmPlotter névjegye @@ -186,6 +186,14 @@ Bezárás + + BoolSetting + + + Check for updates on startup + Frissítések keresése indításkor + + Changelog @@ -437,14 +445,17 @@ Ezek a beállítások bármikor módosíthatók a „Beállítások” menüben. LogarithmPlotter + Objects Tárgyak + Settings Beállítások + History Előzmények @@ -473,14 +484,17 @@ Ezek a beállítások bármikor módosíthatók a „Beállítások” menüben. A(z) „%1” fájl betöltve. + Copied plot screenshot to clipboard! Ábra képernyőkép vágólapra másolva! + &Update &Frissítés + &Update LogarithmPlotter A LogarithmPlotter &frissítése @@ -599,100 +613,105 @@ Ezek a beállítások bármikor módosíthatók a „Beállítások” menüben. Settings - + X Zoom X-nagyítás - + Y Zoom Y-nagyítás - + Min X Legkisebb X - + Max Y Legnagyobb Y - + Max X Legnagyobb X - + Min Y Legkisebb Y - + X Axis Step X tengely lépésköze - + Y Axis Step Y tengely lépésköze - + Line width Vonalvastagság - + Text size (px) Szövegméret (képpont) - + X Label X címke - + Y Label Y címke - + X Log scale X tengely logaritmikus skálával - + Show X graduation X érettségi megjelenítése - + Show Y graduation Y érettségi megjelenítése - + Copy to clipboard Másolás a vágólapra - + Save plot Ábra mentése - + Save plot as Ábra mentése másként - + Load plot Ábra betöltése + + + Done + Kész + ThanksTo @@ -790,12 +809,12 @@ Ezek a beállítások bármikor módosíthatók a „Beállítások” menüben. changelog - + Could not fetch changelog: Server error {}. Nem sikerült lekérni a változásnaplót: Kiszolgálóhiba: {}. - + Could not fetch update: {}. Nem sikerült lekérni a változásnaplót: {}. @@ -1075,6 +1094,22 @@ Kiértékelt kifejezés: %3 LogarithmPlotter - Drawing error LogarithmPlotter - Rajzolási hiba + + Automatically close parenthesises and brackets + Zárójelek automatikus bezárása + + + Enable syntax highlighting + Mondattani kiemelés engedélyezése + + + Enable autocompletion + Automatikus befejezés engedélyezése + + + Color Scheme + Színséma + function @@ -1106,6 +1141,21 @@ Kiértékelt kifejezés: %3 felüláteresztő + + general + + Check for updates on startup + Frissítések keresése indításkor + + + Reset redo stack automaticly + Ismétlési verem önműködő visszaállítása + + + Enable LaTeX rendering + LaTeX-megjelenítés engedélyezése + + historylib @@ -1132,64 +1182,48 @@ Kiértékelt kifejezés: %3 io - - Objects - - - - Settings - Beállítások + Beállítások - History - Előzmények + Előzmények - Saved plot to '%1'. - Ábra mentve ide: „%1”. + Ábra mentve ide: „%1”. - Loading file '%1'. - A(z) „%1” fájl betöltése folyamatban van. + A(z) „%1” fájl betöltése folyamatban van. - Unknown object type: %1. - Ismeretlen objektumtípus: %1. + Ismeretlen objektumtípus: %1. - Invalid file provided. - A megadott fájl érvénytelen. + A megadott fájl érvénytelen. - Could not save file: - A fájl mentése nem sikerült: + A fájl mentése nem sikerült: - Loaded file '%1'. - A(z) „%1” fájl betöltve. + A(z) „%1” fájl betöltve. - Copied plot screenshot to clipboard! - Ábra képernyőkép vágólapra másolva! + Ábra képernyőkép vágólapra másolva! - &Update - &Frissítés + &Frissítés - &Update LogarithmPlotter - A LogarithmPlotter &frissítése + A LogarithmPlotter &frissítése @@ -1222,7 +1256,7 @@ A(z) „{}” folyamat nullától eltérő visszatérési kóddal ({}) végződ Kérjük, ellenőrizze, hogy a LaTeX telepítése helyes-e, és ha igen, jelentse a hibát. - + An exception occured within the creation of the latex formula. Process '{}' took too long to finish: {} @@ -1497,6 +1531,14 @@ Kérjük, ellenőrizze, hogy a LaTeX telepítése helyes-e, és ha igen, jelents Sorozatok + + settingCategory + + + general + + + sommegainsbode @@ -1525,22 +1567,22 @@ Kérjük, ellenőrizze, hogy a LaTeX telepítése helyes-e, és ha igen, jelents update - + An update for LogarithPlotter (v{}) is available. Elérhető a Logaritmus-ábrázoló ({} verzió) frissítése. - + No update available. Nincs telepíthető frissítés. - + Could not fetch update information: Server error {}. Nem sikerült lekérni a frissítési adatokat: Kiszolgálóhiba: {}. - + Could not fetch update information: {}. Nem sikerült lekérni a frissítési adatokat: {}. diff --git a/LogarithmPlotter/i18n/lp_nb_NO.ts b/LogarithmPlotter/i18n/lp_nb_NO.ts index 369aa32..ae1af4e 100644 --- a/LogarithmPlotter/i18n/lp_nb_NO.ts +++ b/LogarithmPlotter/i18n/lp_nb_NO.ts @@ -5,7 +5,7 @@ About - + About LogarithmPlotter Om @@ -17,7 +17,7 @@ 2D plotter software to make BODE plots, sequences and repartition functions. - 2D-plotterprogramvare laget for opprettelse av Bode-diagram, sekvenser, og distribusjonsfunksjoner. + 2D-plotterprogramvare laget for opprettelse av Bode-diagram, sekvenser, og distribusjonsfunksjoner. @@ -27,7 +27,7 @@ Official website - + @@ -95,37 +95,37 @@ Reset redo stack automaticly - Tilbakestill angrehistorikk automatisk + Tilbakestill angrehistorikk automatisk Enable LaTeX rendering - + Expression editor - + Automatically close parenthesises and brackets - + Enable syntax highlighting - + Enable autocompletion - + Color Scheme - + @@ -135,32 +135,32 @@ &Source code - + &Report a bug - + &User manual - + &Changelog - + &Help translating! - + &Thanks - + @@ -170,12 +170,12 @@ Save unsaved changes? - + This plot contains unsaved changes. By doing this, all unsaved data will be lost. Continue? - + @@ -183,7 +183,15 @@ Close - + + + + + BoolSetting + + + Check for updates on startup + Se etter nye versjoner ved programstart @@ -191,12 +199,12 @@ Fetching changelog... - + Done - + @@ -205,12 +213,12 @@ + Create new %1 - + Opprett nytt %1 + + Opprett nytt %1 Pick on graph - + @@ -218,42 +226,42 @@ Edit properties of %1 %2 - Rediger egenskaper for %1 %2 + Rediger egenskaper for %1 %2 LogarithmPlotter - Invalid object name - + An object with the name '%1' already exists. - + Name - Navn + Navn Label content - Etikett-innhold + Etikett-innhold null - NULL + NULL name - navn + navn name + value - navn + veri + navn + veri @@ -292,32 +300,32 @@ Object Properties - + Variables - + Constants - + Functions - Funksjoner + Funksjoner Executable Objects - + Objects - Objekter + Objekter @@ -325,7 +333,7 @@ Export Logarithm Plot file - Eksporter logaritmeplott-fil + Eksporter logaritmeplott-fil @@ -365,42 +373,42 @@ Disse innstillingene kan endres når som helst fra «Innstillinger»-menyen. Enable LaTeX rendering - + Automatically close parenthesises and brackets in expressions - + Enable syntax highlighting for expressions - + Enable autocompletion interface in expression editor - + Color scheme: - + User manual - + Changelog - + Done - + @@ -408,7 +416,7 @@ Disse innstillingene kan endres når som helst fra «Innstillinger»-menyen. Filter... - + @@ -431,20 +439,23 @@ Disse innstillingene kan endres når som helst fra «Innstillinger»-menyen. + Add Entry - + LogarithmPlotter + Objects Objekter + Settings Innstillinger + History Historikk @@ -473,14 +484,17 @@ Disse innstillingene kan endres når som helst fra «Innstillinger»-menyen.Lastet inn filen «%1». + Copied plot screenshot to clipboard! Kopierte plott-skjermavbildning til utklippstavlen! + &Update &Oppdater + &Update LogarithmPlotter &Installer ny versjon av LogartimePlotter @@ -531,27 +545,27 @@ Disse innstillingene kan endres når som helst fra «Innstillinger»-menyen. Hide %1 %2 - Skjul %1 %2 + Skjul %1 %2 Show %1 %2 - Vis %1 %2 + Vis %1 %2 Set %1 %2 position - Sett %1 %2 posisjon + Sett %1 %2 posisjon Delete %1 %2 - Slett %1 %2 + Slett %1 %2 Pick new color for %1 %2 - Velg ny farge for %1 %2 + Velg ny farge for %1 %2 @@ -568,158 +582,163 @@ Disse innstillingene kan endres når som helst fra «Innstillinger»-menyen. Snap to grid: - + Pick X - + Pick Y - + Open picker settings - + Hide picker settings - + (no pick selected) - + Settings - + X Zoom X-forstørrelse - + Y Zoom Y-forstørrelse - + Min X Min. X - + Max Y Maks. Y - + Max X Maks. X - + Min Y Min. Y - + X Axis Step X-aksesteg - + Y Axis Step Y-aksesteg - + Line width Linjebredde - + Text size (px) Tekststørrelse (piksler) - + X Label Navn på X-akse - + Y Label Navn på Y-akse - + X Log scale Logaritmisk skala i x - + Show X graduation - Vis X-inndeling + Vis X-inndeling - + Show Y graduation - Vis Y-inndeling + Vis Y-inndeling - + Copy to clipboard Kopier til utklippstavle - + Save plot Lagre plott - + Save plot as Lagre plott som - + Load plot Last inn plott + + + Done + + ThanksTo Thanks and Contributions - LogarithmPlotter - + Source code - + Original library by Raphael Graf - + Source - + Ported to Javascript by Matthew Crumley - + @@ -728,76 +747,76 @@ Disse innstillingene kan endres når som helst fra «Innstillinger»-menyen. Website - + Ported to QMLJS by Ad5001 - + Libraries included - + Email - + English - + French - + German - + Hungarian - + Github - + Norwegian - + Translations included - + Improve - + changelog - + Could not fetch changelog: Server error {}. - + - + Could not fetch update: {}. - + @@ -809,7 +828,7 @@ Disse innstillingene kan endres når som helst fra «Innstillinger»-menyen. %1: - + @@ -839,152 +858,152 @@ Disse innstillingene kan endres når som helst fra «Innstillinger»-menyen. Cannot find property %1 of object %2. - + Undefined variable %1. - + In order to be executed, object %1 must have at least one argument. - + %1 cannot be executed. - + Invalid expression. - + Invalid expression (parity). - + Unknown character "%1". - + Illegal escape sequence: %1. - + Parse error [%1:%2]: %3 - + Expected %1 - + Unexpected %1 - + Unexpected ".": member access is not permitted - + Unexpected "[]": arrays are disabled. - + Unexpected symbol: %1. - + Function %1 must have at least one argument. - + First argument to map is not a function. - + Second argument to map is not an array. - + First argument to fold is not a function. - + Second argument to fold is not an array. - + First argument to filter is not a function. - + Second argument to filter is not an array. - + Second argument to indexOf is not a string or array. - + Second argument to join is not an array. - + EOF - + No object found with names %1. - + No object found with name %1. - + Object cannot be dependent on itself. - + Circular dependency detected. Object %1 depends on %2. - + Circular dependency detected. Objects %1 depend on %2. - + @@ -992,7 +1011,7 @@ Disse innstillingene kan endres når som helst fra «Innstillinger»-menyen. - + @@ -1000,7 +1019,7 @@ Evaluated expression: %3 %3 Undoing last change. - + @@ -1009,7 +1028,7 @@ Undoing last change. LogarithmPlotter - Parsing error - + @@ -1017,12 +1036,12 @@ Undoing last change. %2 Evaluated expression: %3 - + LogarithmPlotter - Drawing error - + @@ -1055,6 +1074,17 @@ Evaluated expression: %3 høypass + + general + + Check for updates on startup + Se etter nye versjoner ved programstart + + + Reset redo stack automaticly + Tilbakestill angrehistorikk automatisk + + historylib @@ -1081,64 +1111,52 @@ Evaluated expression: %3 io - Objects - Objekter + Objekter - Settings - Innstillinger + Innstillinger - History - Historikk + Historikk - Saved plot to '%1'. - Lagret plott i «%1». + Lagret plott i «%1». - Loading file '%1'. - Laster inn «%1»-fil. + Laster inn «%1»-fil. - Unknown object type: %1. - Ukjent objekttype: %1. + Ukjent objekttype: %1. - Invalid file provided. - Ugyldig fil angitt. + Ugyldig fil angitt. - Could not save file: - Kunne ikke lagre fil: + Kunne ikke lagre fil: - Loaded file '%1'. - Lastet inn filen «%1». + Lastet inn filen «%1». - Copied plot screenshot to clipboard! - Kopierte plott-skjermavbildning til utklippstavlen! + Kopierte plott-skjermavbildning til utklippstavlen! - &Update - &Oppdater + &Oppdater - &Update LogarithmPlotter - &Installer ny versjon av LogartimePlotter + &Installer ny versjon av LogartimePlotter @@ -1148,12 +1166,12 @@ Evaluated expression: %3 No Latex installation found. If you already have a latex distribution installed, make sure it's installed on your path. Otherwise, you can download a Latex distribution like TeX Live at https://tug.org/texlive/. - + DVIPNG was not found. Make sure you include it from your Latex distribution. - + @@ -1162,15 +1180,15 @@ Process '{}' ended with a non-zero return code {}: {} Please make sure your latex installation is correct and report a bug if so. - + - + An exception occured within the creation of the latex formula. Process '{}' took too long to finish: {} Please make sure your latex installation is correct and report a bug if so. - + @@ -1217,6 +1235,14 @@ Please make sure your latex installation is correct and report a bug if so.Følger + + settingCategory + + + general + + + sommegainsbode @@ -1245,22 +1271,22 @@ Please make sure your latex installation is correct and report a bug if so. update - + An update for LogarithPlotter (v{}) is available. En ny versjon av LogartimePlotter (v{}) er tilgjengelig - + No update available. Ingen nye versjoner. - + Could not fetch update information: Server error {}. Fant ikke ut om det er noen nye versjoner. Tjenerfeil {}. - + Could not fetch update information: {}. Kunne ikke hente info om hvorvidt det er nye versjoner: {}. @@ -1271,7 +1297,7 @@ Please make sure your latex installation is correct and report a bug if so. Usage: %1 - + @@ -1279,27 +1305,27 @@ Please make sure your latex installation is correct and report a bug if so. Usage: %1 or %2 - + integral(<from: number>, <to: number>, <f: ExecutableObject>) - + integral(<from: number>, <to: number>, <f: string>, <variable: string>) - + derivative(<f: ExecutableObject>, <x: number>) - + derivative(<f: string>, <variable: string>, <x: number>) - + diff --git a/LogarithmPlotter/i18n/lp_template.ts b/LogarithmPlotter/i18n/lp_template.ts index 3e4a80b..dcd8d44 100644 --- a/LogarithmPlotter/i18n/lp_template.ts +++ b/LogarithmPlotter/i18n/lp_template.ts @@ -5,29 +5,29 @@ About - + About LogarithmPlotter - + LogarithmPlotter v%1 - + 2D plotter software to make BODE plots, sequences and repartition functions. - + Report a bug - + Official website - + @@ -35,147 +35,147 @@ &File - + &Load... - + &Save - + Save &As... - + &Quit - + &Edit - + &Undo - + &Redo - + &Copy plot - + &Create - + &Settings - + Check for updates on startup - + Reset redo stack automaticly - + Enable LaTeX rendering - + Expression editor - + Automatically close parenthesises and brackets - + Enable syntax highlighting - + Enable autocompletion - + Color Scheme - + &Help - + &Source code - + &Report a bug - + &User manual - + &Changelog - + &Help translating! - + &Thanks - + &About - + Save unsaved changes? - + This plot contains unsaved changes. By doing this, all unsaved data will be lost. Continue? - + @@ -183,7 +183,15 @@ Close - + + + + + BoolSetting + + + Check for updates on startup + @@ -191,12 +199,12 @@ Fetching changelog... - + Done - + @@ -205,12 +213,12 @@ + Create new %1 - + Pick on graph - + @@ -218,42 +226,42 @@ Edit properties of %1 %2 - + LogarithmPlotter - Invalid object name - + An object with the name '%1' already exists. - + Name - + Label content - + null - + name - + name + value - + @@ -261,32 +269,32 @@ Object Properties - + Variables - + Constants - + Functions - + Executable Objects - + Objects - + @@ -294,12 +302,12 @@ Export Logarithm Plot file - + Import Logarithm Plot file - + @@ -307,68 +315,68 @@ Welcome to LogarithmPlotter - + Version %1 - + Take a few seconds to configure LogarithmPlotter. These settings can be changed at any time from the "Settings" menu. - + Check for updates on startup (requires online connectivity) - + Reset redo stack when a new action is added to history - + Enable LaTeX rendering - + Automatically close parenthesises and brackets in expressions - + Enable syntax highlighting for expressions - + Enable autocompletion interface in expression editor - + Color scheme: - + User manual - + Changelog - + Done - + @@ -376,22 +384,22 @@ These settings can be changed at any time from the "Settings" menu. Filter... - + Redo > - + > Now - + < Undo - + @@ -399,6 +407,39 @@ These settings can be changed at any time from the "Settings" menu. + Add Entry + + + + + LogarithmPlotter + + + Objects + + + + + Settings + + + + + History + + + + + Copied plot screenshot to clipboard! + + + + + &Update + + + + + &Update LogarithmPlotter @@ -407,7 +448,7 @@ These settings can be changed at any time from the "Settings" menu. + Create new: - + @@ -415,12 +456,12 @@ These settings can be changed at any time from the "Settings" menu. Hide all %1 - + Show all %1 - + @@ -428,27 +469,27 @@ These settings can be changed at any time from the "Settings" menu. Hide %1 %2 - + Show %1 %2 - + Set %1 %2 position - + Delete %1 %2 - + Pick new color for %1 %2 - + @@ -456,135 +497,140 @@ These settings can be changed at any time from the "Settings" menu. Pointer precision: - + Snap to grid: - + Pick X - + Pick Y - + Open picker settings - + Hide picker settings - + (no pick selected) - + Settings - + X Zoom - + - + Y Zoom - + - + Min X - + - + Max Y - + - + Max X - + - + Min Y - + - + X Axis Step - + - + Y Axis Step - + - + Line width - + - + Text size (px) - + - + X Label - + - + Y Label - + - + X Log scale - + - + Show X graduation - + - + Show Y graduation - + - + Copy to clipboard - + - + Save plot - + - + Save plot as - + - + Load plot - + + + + + Done + @@ -592,27 +638,27 @@ These settings can be changed at any time from the "Settings" menu. Thanks and Contributions - LogarithmPlotter - + Source code - + Original library by Raphael Graf - + Source - + Ported to Javascript by Matthew Crumley - + @@ -621,76 +667,76 @@ These settings can be changed at any time from the "Settings" menu. Website - + Ported to QMLJS by Ad5001 - + Libraries included - + Email - + English - + French - + German - + Hungarian - + Github - + Norwegian - + Translations included - + Improve - + changelog - + Could not fetch changelog: Server error {}. - + - + Could not fetch update: {}. - + @@ -702,7 +748,7 @@ These settings can be changed at any time from the "Settings" menu. %1: - + @@ -711,152 +757,152 @@ These settings can be changed at any time from the "Settings" menu. Cannot find property %1 of object %2. - + Undefined variable %1. - + In order to be executed, object %1 must have at least one argument. - + %1 cannot be executed. - + Invalid expression. - + Invalid expression (parity). - + Unknown character "%1". - + Illegal escape sequence: %1. - + Parse error [%1:%2]: %3 - + Expected %1 - + Unexpected %1 - + Unexpected ".": member access is not permitted - + Unexpected "[]": arrays are disabled. - + Unexpected symbol: %1. - + Function %1 must have at least one argument. - + First argument to map is not a function. - + Second argument to map is not an array. - + First argument to fold is not a function. - + Second argument to fold is not an array. - + First argument to filter is not a function. - + Second argument to filter is not an array. - + Second argument to indexOf is not a string or array. - + Second argument to join is not an array. - + EOF - + No object found with names %1. - + No object found with name %1. - + Object cannot be dependent on itself. - + Circular dependency detected. Object %1 depends on %2. - + Circular dependency detected. Objects %1 depend on %2. - + @@ -864,7 +910,7 @@ These settings can be changed at any time from the "Settings" menu. - + @@ -872,7 +918,7 @@ Evaluated expression: %3 %3 Undoing last change. - + @@ -881,7 +927,7 @@ Undoing last change. LogarithmPlotter - Parsing error - + @@ -889,75 +935,12 @@ Undoing last change. %2 Evaluated expression: %3 - + LogarithmPlotter - Drawing error - - - - - io - - - Objects - - - - - Settings - - - - - History - - - - - Saved plot to '%1'. - - - - - Loading file '%1'. - - - - - Unknown object type: %1. - - - - - Invalid file provided. - - - - - Could not save file: - - - - - Loaded file '%1'. - - - - - Copied plot screenshot to clipboard! - - - - - &Update - - - - - &Update LogarithmPlotter - + @@ -967,12 +950,12 @@ Evaluated expression: %3 No Latex installation found. If you already have a latex distribution installed, make sure it's installed on your path. Otherwise, you can download a Latex distribution like TeX Live at https://tug.org/texlive/. - + DVIPNG was not found. Make sure you include it from your Latex distribution. - + @@ -981,38 +964,46 @@ Process '{}' ended with a non-zero return code {}: {} Please make sure your latex installation is correct and report a bug if so. - + - + An exception occured within the creation of the latex formula. Process '{}' took too long to finish: {} Please make sure your latex installation is correct and report a bug if so. - + + + + + settingCategory + + + general + update - + An update for LogarithPlotter (v{}) is available. - + - + No update available. - + - + Could not fetch update information: Server error {}. - + - + Could not fetch update information: {}. - + @@ -1021,7 +1012,7 @@ Please make sure your latex installation is correct and report a bug if so. Usage: %1 - + @@ -1029,27 +1020,27 @@ Please make sure your latex installation is correct and report a bug if so. Usage: %1 or %2 - + integral(<from: number>, <to: number>, <f: ExecutableObject>) - + integral(<from: number>, <to: number>, <f: string>, <variable: string>) - + derivative(<f: ExecutableObject>, <x: number>) - + derivative(<f: string>, <variable: string>, <x: number>) - + diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/AppMenuBar.qml b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/AppMenuBar.qml index 3de96ca..944c18a 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/AppMenuBar.qml +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/AppMenuBar.qml @@ -90,13 +90,19 @@ MenuBar { icon.color: enabled ? sysPalette.windowText : sysPaletteIn.windowText enabled: history.redoCount > 0 } - MenuSeparator { } Action { text: qsTr("&Copy plot") shortcut: StandardKey.Copy onTriggered: root.copyDiagramToClipboard() icon.name: 'edit-copy' } + MenuSeparator { } + Action { + text: qsTr("&Preferences") + shortcut: StandardKey.Copy + onTriggered: preferences.open() + icon.name: 'settings' + } } Menu { diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/LogarithmPlotter.qml b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/LogarithmPlotter.qml index 388264c..2e24d53 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/LogarithmPlotter.qml +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/LogarithmPlotter.qml @@ -55,6 +55,8 @@ ApplicationWindow { Popup.GreetScreen {} + Popup.Preferences {id: preferences} + Popup.Changelog {id: changelog} Popup.About {id: about} @@ -86,19 +88,19 @@ ApplicationWindow { width: parent.width anchors.top: parent.top TabButton { - text: qsTranslate('io', "Objects") + text: qsTr("Objects") icon.name: 'polygon-add-nodes' icon.color: sysPalette.windowText //height: 24 } TabButton { - text: qsTranslate('io', "Settings") + text: qsTr("Settings") icon.name: 'preferences-system-symbolic' icon.color: sysPalette.windowText //height: 24 } TabButton { - text: qsTranslate('io', "History") + text: qsTr("History") icon.name: 'view-history' icon.color: sysPalette.windowText //height: 24 @@ -227,7 +229,7 @@ ApplicationWindow { var file = Helper.gettmpfile() drawCanvas.save(file) Helper.copyImageToClipboard() - alert.show(qsTranslate('io', "Copied plot screenshot to clipboard!")) + alert.show(qsTr("Copied plot screenshot to clipboard!")) } /*! @@ -242,9 +244,9 @@ ApplicationWindow { Menu { id: updateMenu - title: qsTranslate('io', "&Update") + title: qsTr("&Update") Action { - text: qsTranslate('io', "&Update LogarithmPlotter") + text: qsTr("&Update LogarithmPlotter") icon.name: 'update' onTriggered: Qt.openUrlExternally("https://apps.ad5001.eu/logarithmplotter/") } diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Popup/Preferences.qml b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Popup/Preferences.qml new file mode 100644 index 0000000..6218fb9 --- /dev/null +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Popup/Preferences.qml @@ -0,0 +1,187 @@ +/** + * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. + * Copyright (C) 2021-2024 Ad5001 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts +import eu.ad5001.LogarithmPlotter.Setting 1.0 as Setting +import "../js/setting/common.mjs" as S + +/*! + \qmltype Preferences + \inqmlmodule eu.ad5001.LogarithmPlotter.Popup + \brief Popup to change global application preferences. + + \sa LogarithmPlotter, GreetScreen +*/ +Popup { + id: preferencesPopup + x: (parent.width-width)/2 + y: Math.max(20, (parent.height-height)/2) + width: settingPopupRow.width + 30 + height: settingPopupRow.height + 20 + modal: true + focus: true + closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutside + + // Components for the preferences + Component { + id: boolSettingComponent + + CheckBox { + height: 20 + text: setting.displayName + checked: setting.value() + onClicked: setting.set(this.checked) + } + } + + Component { + id: enumIntSettingComponent + + // Setting when selecting data from an enum, or an object of a certain type. + Setting.ComboBoxSetting { + height: 30 + label: setting.displayName + icon: `settings/${setting.icon}.svg` + currentIndex: setting.value() + model: setting.values() + onActivated: function(newIndex) { setting.set(newIndex) } + } + } + + Row { + id: settingPopupRow + height: 300 + width: categories.width + categorySeparator.width + settingView.width + 70 + spacing: 15 + + anchors { + top: parent.top + bottom: parent.bottom + left: parent.left + right: parent.right + topMargin: 10 + bottomMargin: 10 + rightMargin: 15 + leftMargin: 15 + } + + ColumnLayout { + id: categories + width: 150 + height: parent.height + spacing: 0 + clip: true + + Repeater { + model: Object.keys(Modules.Settings.categories) + + Button { + // width: 150 + Layout.fillWidth: true + text: qsTranslate('settingCategory', modelData) + + onClicked: { + settingList.model = Modules.Settings.categories[modelData] + settingCategoryName.text = text + } + } + } + + Item { + Layout.fillHeight: true + Layout.fillWidth: true + + Button { + id: closeButton + anchors { + left: parent.left + right: parent.right + bottom: parent.bottom + } + text: qsTr('Done') + onClicked: preferencesPopup.close() + } + } + } + + Rectangle { + id: categorySeparator + anchors { + top: parent.top + topMargin: 5 + } + opacity: 0.3 + color: sysPalette.windowText + height: parent.height - 10 + width: 1 + } + + ScrollView { + id: settingView + clip: true + width: 500 + height: parent.height + + Column { + spacing: 10 + clip: true + width: settingView.width + + Text { + id: settingCategoryName + font.pixelSize: 32 + color: sysPalette.windowText + text: qsTranslate('settingCategory', 'general') + + Rectangle { + id: bottomSeparator + anchors.top: parent.bottom + opacity: 0.3 + color: sysPalette.windowText + width: settingView.width + height: 1 + } + } + + Repeater { + id: settingList + model: Modules.Settings.categories.general + + delegate: Component { + Loader { + width: settingView.width + property var setting: modelData + sourceComponent: { + if(setting instanceof S.BoolSetting) + return boolSettingComponent + else if(setting instanceof S.EnumIntSetting) + return enumIntSettingComponent + else + console.log('Unknown setting type!', modelData.constructor) + } + } + } + } + } + } + } + + Component.onCompleted: open() +} diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Popup/qmldir b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Popup/qmldir index 9306fae..8c0859f 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Popup/qmldir +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Popup/qmldir @@ -8,3 +8,4 @@ GreetScreen 1.0 GreetScreen.qml Changelog 1.0 Changelog.qml ThanksTo 1.0 ThanksTo.qml InsertCharacter 1.0 InsertCharacter.qml +Preferences 1.0 Preferences.qml diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/icons/settings/color.svg b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/icons/settings/color.svg new file mode 120000 index 0000000..41b711b --- /dev/null +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/icons/settings/color.svg @@ -0,0 +1 @@ +../common/appearance.svg \ No newline at end of file diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/autoload.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/autoload.js index 9f207a0..211aa9e 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/autoload.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/autoload.js @@ -6,4 +6,5 @@ .import "math/latex.mjs" as Latex .import "history/common.mjs" as HistoryCommon .import "canvas.mjs" as CanvasAPI -.import "io.mjs" as IOAPI \ No newline at end of file +.import "io.mjs" as IOAPI +.import "settings.mjs" as SettingsAPI \ No newline at end of file diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/canvas.mjs b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/canvas.mjs index d68bd9d..9649634 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/canvas.mjs +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/canvas.mjs @@ -144,6 +144,10 @@ class CanvasAPI extends Module { // Methods to draw the canvas // + requestPaint() { + this._canvas.requestPaint() + } + /** * Redraws the entire canvas */ diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/setting/common.mjs b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/setting/common.mjs new file mode 100644 index 0000000..2e395c6 --- /dev/null +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/setting/common.mjs @@ -0,0 +1,67 @@ +/** + * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. + * Copyright (C) 2021-2024 Ad5001 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +class Setting { + constructor(name, nameInConfig, icon) { + this.name = name + this.displayName = qsTr(name) + this.nameInConfig = nameInConfig + this.icon = icon + } + + /** + * Returns the value of the setting. + * @returns {string|boolean|number} + */ + value() { + throw new TypeError(`value of ${this.constructor} not implemented.`) + } + + /** + * Sets the value of the setting + * @param {string|boolean|number} value + */ + set(value) { + throw new TypeError(`value of ${this.constructor} not implemented.`) + } +} + +export class BoolSetting extends Setting { + value() { + return Helper.getSettingBool(this.nameInConfig) + } + + set(value) { + Helper.setSettingBool(this.nameInConfig, value) + } +} + +export class IntSetting extends Setting { + value() { + return Helper.getSettingInt(this.nameInConfig) + } + + set(value) { + Helper.setSettingInt(this.nameInConfig, value) + } +} + +export class EnumIntSetting extends IntSetting { + values() { + throw new TypeError(`enumerations of ${this.constructor} not implemented.`) + } +} \ No newline at end of file diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/setting/expression.mjs b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/setting/expression.mjs new file mode 100644 index 0000000..0fab509 --- /dev/null +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/setting/expression.mjs @@ -0,0 +1,54 @@ +/** + * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. + * Copyright (C) 2021-2024 Ad5001 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +import {BoolSetting, EnumIntSetting} from "common.mjs" + +class AutocloseFormula extends BoolSetting { + constructor() { + super(qsTr("Automatically close parenthesises and brackets"), 'expression_editor.autoclose', 'Text') + } +} + +class EnableSyntaxHighlighting extends BoolSetting { + constructor() { + super(qsTr("Enable syntax highlighting"), 'expression_editor.colorize', 'appearance') + } +} + +class EnableAutocomplete extends BoolSetting { + constructor() { + super(qsTr("Enable autocompletion"), 'autocompletion.enabled', 'label') + } +} + +class PickColorScheme extends EnumIntSetting { + constructor() { + super(qsTr("Color Scheme"), 'expression_editor.color_scheme', 'color') + } + + values() { + return ["Breeze Light", "Breeze Dark", "Solarized", "Github Light", "Github Dark", "Nord", "Monokai"] + } +} + +export default [ + new AutocloseFormula(), + new EnableAutocomplete(), + new EnableSyntaxHighlighting(), + new PickColorScheme() +] \ No newline at end of file diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/setting/general.mjs b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/setting/general.mjs new file mode 100644 index 0000000..2430b52 --- /dev/null +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/setting/general.mjs @@ -0,0 +1,49 @@ +/** + * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. + * Copyright (C) 2021-2024 Ad5001 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +import {BoolSetting} from "common.mjs" + +class CheckForUpdates extends BoolSetting { + constructor() { + super(QT_TR_NOOP("Check for updates on startup"), 'check_for_updates', 'update') + } +} + +class ResetRedoStack extends BoolSetting { + constructor() { + super(qsTr("Reset redo stack automaticly"), 'reset_redo_stack', 'timeline') + } +} + +class EnableLatex extends BoolSetting { + constructor() { + super(qsTr("Enable LaTeX rendering"), 'enable_latex', 'Expression') + } + + set(value) { + super.set(value) + Modules.Latex.enabled = value + Modules.Canvas.requestPaint() + } +} + +export default [ + new CheckForUpdates(), + new ResetRedoStack(), + new EnableLatex() +] \ No newline at end of file diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/settings.mjs b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/settings.mjs new file mode 100644 index 0000000..8fff543 --- /dev/null +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/settings.mjs @@ -0,0 +1,39 @@ +/** + * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. + * Copyright (C) 2021-2024 Ad5001 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +import {Module} from "modules.mjs" +import General from "setting/general.mjs" +import Editor from "setting/expression.mjs" + +class SettingsAPI extends Module { + constructor() { + super('Settings', [ + Modules.Canvas, + Modules.Latex + ]) + + this.categories = { + [QT_TRANSLATE_NOOP('settingCategory', 'general')]: General, + [QT_TRANSLATE_NOOP('settingCategory', 'editor')]: Editor, + [QT_TRANSLATE_NOOP('settingCategory', 'default')]: [], + } + } +} + +/** @type {CanvasAPI} */ +Modules.Settings = Modules.Settings || new SettingsAPI() +export const API = Modules.Settings \ No newline at end of file