From a32d480b43d4b7e310ef3887c77affb2bbfa6343 Mon Sep 17 00:00:00 2001 From: Ad5001 Date: Sun, 22 Sep 2024 18:58:19 +0200 Subject: [PATCH] Renaming objects to their proper english names. --- .../LogarithmPlotter/js/objs/autoload.mjs | 20 +++++++++---------- .../objs/{gainbode.mjs => bodemagnitude.mjs} | 2 +- ...ommegainsbode.mjs => bodemagnitudesum.mjs} | 4 ++-- .../js/objs/{phasebode.mjs => bodephase.mjs} | 2 +- .../{sommephasesbode.mjs => bodephasesum.mjs} | 4 ++-- .../LogarithmPlotter/js/objs/common.mjs | 2 +- .../{repartition.mjs => distribution.mjs} | 2 +- .../ad5001/LogarithmPlotter/js/objs/point.mjs | 4 ++-- 8 files changed, 20 insertions(+), 20 deletions(-) rename LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/{gainbode.mjs => bodemagnitude.mjs} (99%) rename LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/{sommegainsbode.mjs => bodemagnitudesum.mjs} (97%) rename LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/{phasebode.mjs => bodephase.mjs} (98%) rename LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/{sommephasesbode.mjs => bodephasesum.mjs} (97%) rename LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/{repartition.mjs => distribution.mjs} (98%) diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/autoload.mjs b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/autoload.mjs index dc84bb0..cf0df63 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/autoload.mjs +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/autoload.mjs @@ -21,13 +21,13 @@ import { DrawableObject } from "common.mjs" import Point from "point.mjs" import Text from "text.mjs" import Function from "function.mjs" -import GainBode from "gainbode.mjs" -import PhaseBode from "phasebode.mjs" -import SommeGainsBode from "sommegainsbode.mjs" -import SommePhasesBode from "sommephasesbode.mjs" +import BodeMagnitude from "bodemagnitude.mjs" +import BodePhase from "bodephase.mjs" +import BodeMagnitudeSum from "bodemagnitudesum.mjs" +import BodePhaseSum from "bodephasesum.mjs" import XCursor from "xcursor.mjs" import Sequence from "sequence.mjs" -import RepartitionFunction from "repartition.mjs" +import DistributionFunction from "distribution.mjs" /** * Registers the object obj in the object list. @@ -47,11 +47,11 @@ if(Object.keys(Modules.Objects.types).length === 0) { registerObject(Point) registerObject(Text) registerObject(Function) - registerObject(GainBode) - registerObject(PhaseBode) - registerObject(SommeGainsBode) - registerObject(SommePhasesBode) + registerObject(BodeMagnitude) + registerObject(BodePhase) + registerObject(BodeMagnitudeSum) + registerObject(BodePhaseSum) registerObject(XCursor) registerObject(Sequence) - registerObject(RepartitionFunction) + registerObject(DistributionFunction) } diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/gainbode.mjs b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/bodemagnitude.mjs similarity index 99% rename from LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/gainbode.mjs rename to LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/bodemagnitude.mjs index f86d747..9b0085f 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/gainbode.mjs +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/bodemagnitude.mjs @@ -28,7 +28,7 @@ import { API as HistoryAPI } from "../history/common.mjs" import { CreateNewObject } from "../historylib.mjs" -export default class GainBode extends ExecutableObject { +export default class BodeMagnitude extends ExecutableObject { static type(){return 'Gain Bode'} static displayType(){return qsTr('Bode Magnitude')} static displayTypeMultiple(){return qsTr('Bode Magnitudes')} diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/sommegainsbode.mjs b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/bodemagnitudesum.mjs similarity index 97% rename from LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/sommegainsbode.mjs rename to LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/bodemagnitudesum.mjs index 9226eee..bc4713a 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/sommegainsbode.mjs +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/bodemagnitudesum.mjs @@ -25,7 +25,7 @@ import { ExecutableObject } from "common.mjs" import Function from "function.mjs" -export default class SommeGainsBode extends ExecutableObject { +export default class BodeMagnitudeSum extends ExecutableObject { static type(){return 'Somme gains Bode'} static displayType(){return qsTr('Bode Magnitudes Sum')} static displayTypeMultiple(){return qsTr('Bode Magnitudes Sum')} @@ -92,7 +92,7 @@ export default class SommeGainsBode extends ExecutableObject { magnitudes.push([Number.MAX_VALUE, 0, true]) // Draw the ending section // Collect data from current magnitude (or gain in French) objects. let baseY = 0 - for(/** @type {GainBode} */ let magnitudeObj of magnitudeObjects) { // Sorting by their om_0 position. + for(/** @type {Bodemagnitude} */ let magnitudeObj of magnitudeObjects) { // Sorting by their om_0 position. const om0x = magnitudeObj.om_0.x.execute() magnitudes.push([om0x, magnitudeObj.gain.execute(), magnitudeObj.pass === 'high']) baseY += magnitudeObj.execute(MIN_DRAW) diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/phasebode.mjs b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/bodephase.mjs similarity index 98% rename from LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/phasebode.mjs rename to LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/bodephase.mjs index 09895d9..eaf48d3 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/phasebode.mjs +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/bodephase.mjs @@ -26,7 +26,7 @@ import Latex from "../math/latex.mjs" import { ExecutableObject } from "common.mjs" -export default class PhaseBode extends ExecutableObject { +export default class BodePhase extends ExecutableObject { static type(){return 'Phase Bode'} static displayType(){return qsTr('Bode Phase')} static displayTypeMultiple(){return qsTr('Bode Phases')} diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/sommephasesbode.mjs b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/bodephasesum.mjs similarity index 97% rename from LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/sommephasesbode.mjs rename to LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/bodephasesum.mjs index 3bb6a3c..8e91784 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/sommephasesbode.mjs +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/bodephasesum.mjs @@ -23,7 +23,7 @@ import Latex from "../math/latex.mjs" import { ExecutableObject } from "common.mjs" -export default class SommePhasesBode extends ExecutableObject { +export default class BodePhaseSum extends ExecutableObject { static type(){return 'Somme phases Bode'} static displayType(){return qsTr('Bode Phases Sum')} static displayTypeMultiple(){return qsTr('Bode Phases Sum')} @@ -88,7 +88,7 @@ export default class SommePhasesBode extends ExecutableObject { Objects.deleteObject(this.name) } else { console.log('Recalculating cache phase') - for(/** @type {PhaseBode} */ let obj of phaseObjects) { + for(/** @type {Bodephase} */ let obj of phaseObjects) { this.om0xList.push(obj.om_0.x.execute()) if(!phasesDict.has(obj.om_0.x.execute())) { phasesDict.set(obj.om_0.x.execute(), obj.phase.execute()) diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/common.mjs b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/common.mjs index 58a2d8d..b27cbf3 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/common.mjs +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/common.mjs @@ -98,7 +98,7 @@ export class DrawableObject { * @param {string} name - Name of the object * @param {boolean} visible - true if the object is visible, false otherwise. * @param {color|string} color - Color of the object (can be string or QColor) - * @param {Enum} labelContent - One of 'null', 'name' or 'name + value' describing the content of the label. + * @param {'null'|'name'|'name + value'} labelContent - One of 'null', 'name' or 'name + value' describing the content of the label. * @constructor */ constructor(name, visible = true, color = null, labelContent = 'name + value') { diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/repartition.mjs b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/distribution.mjs similarity index 98% rename from LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/repartition.mjs rename to LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/distribution.mjs index aeaf6e1..b77189f 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/repartition.mjs +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/distribution.mjs @@ -23,7 +23,7 @@ import Latex from "../math/latex.mjs" import { ExecutableObject } from "common.mjs" -export default class RepartitionFunction extends ExecutableObject { +export default class DistributionFunction extends ExecutableObject { static type(){return 'Repartition'} static displayType(){return qsTr('Repartition')} static displayTypeMultiple(){return qsTr('Repartition functions')} diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/point.mjs b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/point.mjs index 66a493c..503026e 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/point.mjs +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/point.mjs @@ -26,8 +26,8 @@ import { DrawableObject } from "common.mjs" export default class Point extends DrawableObject { static type(){return 'Point'} - static displayType(){return qsTr('Point')} - static displayTypeMultiple(){return qsTr('Points')} + static displayType(){return qsTranslate("point", 'Point')} + static displayTypeMultiple(){return qsTranslate("point", 'Points')} static properties() {return { [QT_TRANSLATE_NOOP('prop','x')]: new P.Expression(),