diff --git a/linux/logplotterfile.svg b/linux/logplotterfile.svg index 690a823..1f80b85 100644 --- a/linux/logplotterfile.svg +++ b/linux/logplotterfile.svg @@ -15,6 +15,8 @@ id="SVGRoot" sodipodi:docname="logplotterfile.svg" inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)"> + Logarithm Plotter Icon image/svg+xml - + Logarithm Plotter File Icon + 2021 + + + Ad5001 + + + + + (c) Copyright Ad5001 2021 + + + + + + + + + + + + - - - - - + + + Logarithm Plot/Graph + Graphe Logarithmique - + diff --git a/logplotter.svg b/logplotter.svg index 2c02446..f62dd55 100644 --- a/logplotter.svg +++ b/logplotter.svg @@ -52,7 +52,7 @@ Logarithm Plotter Icon v1.0 - 27/12/2020 + 2021 Ad5001 @@ -60,7 +60,7 @@ - (c) Ad5001 2020 - All rights reserved + (c) Ad5001 2021 - All rights reserved diff --git a/qml/FileDialog.qml b/qml/FileDialog.qml index c0d5d92..49c9e66 100644 --- a/qml/FileDialog.qml +++ b/qml/FileDialog.qml @@ -24,7 +24,7 @@ D.FileDialog { property bool exportMode: false title: exportMode ? "Export Logarithmic Graph file" : "Import Logarithmic Graph file" - nameFilters: ["Logarithmic Graph JSON Data (*.lgg)", "Old Logarithmic Graph JSON Data (*.json)", "All files (*)"] + nameFilters: ["Logarithmic Graph JSON Data (*.lpf *.lgg)", "Old Logarithmic Graph JSON Data (*.json)", "All files (*)"] folder: shortcuts.documents selectExisting: !exportMode diff --git a/qml/LogGraph.qml b/qml/LogGraph.qml index ab70ebb..74db77d 100644 --- a/qml/LogGraph.qml +++ b/qml/LogGraph.qml @@ -94,9 +94,9 @@ ApplicationWindow { LogGraphCanvas { id: drawCanvas anchors.top: parent.top - anchors.left: sidebar.right + anchors.left: sidebar.inPortrait ? parent.left : sidebar.right height: parent.height - width: parent.width - sidebar.position*sidebar.width + width: sidebar.inPortrait ? parent.width : parent.width - sidebar.position*sidebar.width x: sidebar.position*sidebar.width xmin: settings.xmin @@ -117,6 +117,8 @@ ApplicationWindow { } function saveDiagram(filename) { + if(['json', 'lpf', 'lgg'].indexOf(filename.split('.')[filename.split('.').length-1]) == -1) + filename += '.lpf' settings.saveFilename = filename var objs = {} for(var objType in Objects.currentObjects){ diff --git a/qml/js/objects.js b/qml/js/objects.js index 65fbb09..321586b 100644 --- a/qml/js/objects.js +++ b/qml/js/objects.js @@ -234,7 +234,7 @@ class Function extends ExecutableObject { getReadableString() { if(this.displayMode == 'application') { - return `${this.name}: ${this.definitionDomain} ⟼ ${this.destinationDomain}\n ${' '.repeat(this.name.length)}x ⟼ ${this.expression.toString()}` + return `${this.name}: ${this.definitionDomain} ⟶ ${this.destinationDomain}\n ${' '.repeat(this.name.length)}x ⟼ ${this.expression.toString()}` } else { return `${this.name}(x) = ${this.expression.toString()}\nD${Utils.textsub(this.name)} = ${this.definitionDomain}` } diff --git a/run.py b/run.py index 0b6be20..730665b 100644 --- a/run.py +++ b/run.py @@ -93,7 +93,7 @@ engine.addImportPath(os.path.realpath(os.path.join(os.getcwd(), "qml"))) engine.load(os.path.realpath(os.path.join(os.getcwd(), "qml", "LogGraph.qml"))) os.chdir(pwd) -if len(argv) > 0 and os.path.exists(argv[-1]) and argv[-1].split('.')[-1] in ['json', 'lgg']: +if len(argv) > 0 and os.path.exists(argv[-1]) and argv[-1].split('.')[-1] in ['json', 'lgg', 'lpf']: print(argv[-1]) engine.rootObjects()[0].loadDiagram(argv[-1]) os.chdir(os.path.dirname(os.path.realpath(__file__))) diff --git a/win/logplotter.ico b/win/logplotter.ico new file mode 100644 index 0000000..f975ab5 Binary files /dev/null and b/win/logplotter.ico differ