Renaming objects to their proper english names.
This commit is contained in:
parent
e0601379ba
commit
a32d480b43
8 changed files with 20 additions and 20 deletions
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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')}
|
|
@ -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)
|
|
@ -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')}
|
|
@ -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())
|
|
@ -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') {
|
||||
|
|
|
@ -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')}
|
|
@ -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(),
|
||||
|
|
Loading…
Reference in a new issue