diff --git a/LogarithmPlotter/__init__.py b/LogarithmPlotter/__init__.py
index 13f6a90..442e5e4 100644
--- a/LogarithmPlotter/__init__.py
+++ b/LogarithmPlotter/__init__.py
@@ -15,8 +15,29 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
"""
+from shutil import which
-__VERSION__ = "0.0.1.dev0"
+__VERSION__ = "0.1"
+is_release = False
+
+
+# Check if development version, if so get the date of the latest git patch
+# and append it to the version string.
+if which('git') is not None and not is_release:
+ from os.path import realpath, join, dirname, exists
+ from subprocess import check_output
+ from datetime import datetime
+ # Command to check date of latest git commit
+ cmd = ['git', 'log', '--format=%ci', '-n 1']
+ cwd = realpath(join(dirname(__file__), '..')) # Root AccountFree directory.
+ if exists(join(cwd, '.git')):
+ date_str = check_output(cmd, cwd=cwd).decode('utf-8').split(' ')[0]
+ try:
+ date = datetime.fromisoformat(date_str)
+ __VERSION__ += '.dev0+git' + date.strftime('%Y%m%d')
+ except ValueError:
+ # Date cannot be parsed, not git root?
+ pass
if __name__ == "__main__":
from .logarithmplotter import run
diff --git a/LogarithmPlotter/logarithmplotter.py b/LogarithmPlotter/logarithmplotter.py
index 4f6e88d..4e757e6 100644
--- a/LogarithmPlotter/logarithmplotter.py
+++ b/LogarithmPlotter/logarithmplotter.py
@@ -34,7 +34,7 @@ pwd = os.getcwd()
def get_linux_theme():
des = {
- "KDE": "Flat",
+ "KDE": "org.kde.desktop",
"gnome": "default",
"lxqt": "fusion",
"mate": "fusion",
diff --git a/LogarithmPlotter/logarithmplotter.svg b/LogarithmPlotter/logarithmplotter.svg
index 89b2b1b..69f819d 100644
--- a/LogarithmPlotter/logarithmplotter.svg
+++ b/LogarithmPlotter/logarithmplotter.svg
@@ -1,131 +1,9 @@
-
-
- LogarithmPlotter Icon v1.0
-
-
-
-
-
-
-
- image/svg+xml
-
- LogarithmPlotter Icon v1.0
-
- 2021
-
-
- Ad5001
-
-
-
-
- (c) Ad5001 2021 - All rights reserved
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ LogarithmPlotter Icon v1.0
+
+
+
+
+
+
diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/ObjectLists/ObjectCreationGrid.qml b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/ObjectLists/ObjectCreationGrid.qml
index 410eb3f..7d02669 100644
--- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/ObjectLists/ObjectCreationGrid.qml
+++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/ObjectLists/ObjectCreationGrid.qml
@@ -46,7 +46,7 @@ Column {
visible: Objects.types[modelData].createable()
height: visible ? implicitHeight : 0
display: AbstractButton.TextUnderIcon
- icon.name: modelData
+ icon.name: Objects.types[modelData].displayType()
icon.width: 24
icon.height: 24
icon.color: sysPalette.windowText
diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/ObjectLists/ObjectLists.qml b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/ObjectLists/ObjectLists.qml
index 08a4422..0b48846 100644
--- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/ObjectLists/ObjectLists.qml
+++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/ObjectLists/ObjectLists.qml
@@ -60,13 +60,13 @@ ListView {
}
ToolTip.visible: hovered
- ToolTip.text: checked ? `Hide all ${Objects.types[objType].typeMultiple()}` : `Show all ${Objects.types[objType].typeMultiple()}`
+ ToolTip.text: checked ? `Hide all ${Objects.types[objType].displayTypeMultiple()}` : `Show all ${Objects.types[objType].displayTypeMultiple()}`
}
Label {
id: typeHeaderText
verticalAlignment: TextInput.AlignVCenter
- text: Objects.types[objType].typeMultiple() + ":"
+ text: Objects.types[objType].displayTypeMultiple() + ":"
font.pixelSize: 20
}
}
diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objects.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objects.js
index 478ff89..7cd4460 100644
--- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objects.js
+++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objects.js
@@ -26,6 +26,8 @@ var history = null
var HistoryLib = null
function getNewName(allowedLetters) {
+ // Allows to get a new name, based on the allowed letters,
+ // as well as adding a sub number when needs be.
var newid = 0
var ret
do {
@@ -40,11 +42,18 @@ function getNewName(allowedLetters) {
class DrawableObject {
// Class to extend for every type of object that
// can be drawn on the canvas.
+
+ // Base name of the object. Needs to be constant over time.
static type(){return 'Unknown'}
+
+ // (Potentially translated) name of the object to be shown to the user.
+ static displayType(){return 'Unknown'}
+
// Label used for the list on the ObjectsList sidebar.
- static typeMultiple(){return 'Unknown'}
+ static displayTypeMultiple(){return 'Unknowns'}
+
// Whether this object can be created by the user
- // or are instanciated by other objects.
+ // or are instantiated by other objects.
static createable() {return true}
// Properties are set with key as property name and
// value as it's type name (e.g 'Expression', 'string'...),
@@ -117,7 +126,9 @@ class ExecutableObject extends DrawableObject {
class Point extends DrawableObject {
static type(){return 'Point'}
- static typeMultiple(){return 'Points'}
+ static displayType(){return 'Point'}
+ static displayTypeMultiple(){return 'Points'}
+
static properties() {return {
'x': 'Expression',
'y': 'Expression',
@@ -200,7 +211,8 @@ class Point extends DrawableObject {
class Function extends ExecutableObject {
static type(){return 'Function'}
- static typeMultiple(){return 'Functions'}
+ static displayType(){return 'Function'}
+ static displayTypeMultiple(){return 'Functions'}
static properties() {return {
'expression': 'Expression',
'definitionDomain': 'Domain',
@@ -353,7 +365,8 @@ class Function extends ExecutableObject {
class GainBode extends ExecutableObject {
static type(){return 'Gain Bode'}
- static typeMultiple(){return 'Gains Bode'}
+ static displayType(){return 'Bode Magnitude'}
+ static displayTypeMultiple(){return 'Bode Magnitudes'}
static properties() {return {
'om_0': new P.ObjectType('Point'),
'pass': new P.Enum('high', 'low'),
@@ -493,7 +506,8 @@ class GainBode extends ExecutableObject {
class SommeGainsBode extends DrawableObject {
static type(){return 'Somme gains Bode'}
- static typeMultiple(){return 'Somme gains Bode'}
+ static displayType(){return 'Bode Magnitudes Sum'}
+ static displayTypeMultiple(){return 'Bode Magnitudes Sum'}
static createable() {return false}
static properties() {return {
'labelPosition': new P.Enum('above', 'below', 'left', 'right', 'above-left', 'above-right', 'below-left', 'below-right'),
@@ -637,7 +651,8 @@ class SommeGainsBode extends DrawableObject {
class PhaseBode extends ExecutableObject {
static type(){return 'Phase Bode'}
- static typeMultiple(){return 'Phases Bode'}
+ static displayType(){return 'Bode Phase'}
+ static displayTypeMultiple(){return 'Bode Phases'}
static properties() {return {
'om_0': new P.ObjectType('Point'),
'phase': 'Expression',
@@ -767,7 +782,8 @@ class PhaseBode extends ExecutableObject {
class SommePhasesBode extends ExecutableObject {
static type(){return 'Somme phases Bode'}
- static typeMultiple(){return 'Somme phases Bode'}
+ static displayType(){return 'Bode Phases Sum'}
+ static displayTypeMultiple(){return 'Bode Phases Sum'}
static createable() {return false}
static properties() {return {
'labelPosition': new P.Enum('above', 'below', 'left', 'right', 'above-left', 'above-right', 'below-left', 'below-right'),
@@ -895,7 +911,8 @@ class SommePhasesBode extends ExecutableObject {
class XCursor extends DrawableObject {
static type(){return 'X Cursor'}
- static typeMultiple(){return 'X Cursors'}
+ static displayType(){return 'X Cursor'}
+ static displayTypeMultiple(){return 'X Cursors'}
static properties() {
return {
'x': 'Expression',
@@ -1026,7 +1043,8 @@ class XCursor extends DrawableObject {
class Sequence extends ExecutableObject {
static type(){return 'Sequence'}
- static typeMultiple(){return 'Sequences'}
+ static displayType(){return 'Sequence'}
+ static displayTypeMultiple(){return 'Sequences'}
static properties() {return {
'drawPoints': 'boolean',
'drawDashedLines': 'boolean',
@@ -1141,7 +1159,8 @@ class Sequence extends ExecutableObject {
class RepartitionFunction extends ExecutableObject {
static type(){return 'Repartition'}
- static typeMultiple(){return 'Repartitions'}
+ static displayType(){return 'Repartition'}
+ static displayTypeMultiple(){return 'Repartition functions'}
static properties() {return {
'beginIncluded': 'boolean',
'drawLineEnds': 'boolean',
@@ -1290,7 +1309,8 @@ class RepartitionFunction extends ExecutableObject {
class Text extends DrawableObject {
static type(){return 'Text'}
- static typeMultiple(){return 'Texts'}
+ static displayType(){return 'Text'}
+ static displayTypeMultiple(){return 'Texts'}
static properties() {return {
'x': 'Expression',
'y': 'Expression',
diff --git a/README.md b/README.md
index e6aec18..054e924 100644
--- a/README.md
+++ b/README.md
@@ -20,7 +20,7 @@ For all builds, you need [Python 3](https://python.org) with [PySide2](https://p
- MacOS Archive creator installer:
- You need `pyinstaller`. You can install it using `pip install pyinstaller`.
- Run the `build-macosx.sh` script to build an .app for AccountFree which can be found in the dist directory.
- - Run the `package-macosx.sh` script. You will find a LogarithmPlotter-v0.0.1-dev-setup.dmg installer in the dist/ folder.
+ - Run the `package-macosx.sh` script. You will find a LogarithmPlotter-v0.1-dev-setup.dmg installer in the dist/ folder.
- Linux packages:
- To build a DEB, you need DPKG and stdeb. You can install the later by using `pip install stdeb`.
- To build and install the flatpak, you need [flatpak-builder](https://docs.flatpak.org/en/latest/flatpak-builder.html) installed.
diff --git a/linux/eu.ad5001.LogarithmPlotter.metainfo.flatpak.xml b/linux/eu.ad5001.LogarithmPlotter.metainfo.flatpak.xml
index fd95650..546634f 100644
--- a/linux/eu.ad5001.LogarithmPlotter.metainfo.flatpak.xml
+++ b/linux/eu.ad5001.LogarithmPlotter.metainfo.flatpak.xml
@@ -17,7 +17,7 @@
LogarithmPlotter is, as it's name suggests, a plotter made with logarithm scales in mind. With an object system similar to Geogebra's, it allows dynamic creation of plots with very few limitations.
- It's primary use is to quickly create asymptotic Bode Diagrams, but it's extensible nature and ability to switch to non-logarithmic scales allow it to create other things with it, like sequences or statistical repartition functions.
+ It's primary use is to quickly create asymptotic Bode plots, but it's extensible nature and ability to switch to non-logarithmic scales allow it to create other things with it, like sequences or statistical repartition functions.
@@ -40,7 +40,7 @@
http://apps.ad5001.eu/img/full/logarithmplotter.png
-
+
diff --git a/linux/eu.ad5001.LogarithmPlotter.metainfo.xml b/linux/eu.ad5001.LogarithmPlotter.metainfo.xml
index 061bd54..fbd3fa3 100644
--- a/linux/eu.ad5001.LogarithmPlotter.metainfo.xml
+++ b/linux/eu.ad5001.LogarithmPlotter.metainfo.xml
@@ -17,7 +17,7 @@
LogarithmPlotter is, as it's name suggests, a plotter made with logarithm scales in mind. With an object system similar to Geogebra's, it allows dynamic creation of plots with very few limitations.
- It's primary use is to quickly create asymptotic Bode Diagrams, but it's extensible nature and ability to switch to non-logarithmic scales allow it to create other things with it, like sequences or statistical repartition functions.
+ It's primary use is to quickly create asymptotic Bode plots, but it's extensible nature and ability to switch to non-logarithmic scales allow it to create other things with it, like sequences or statistical repartition functions.
@@ -40,7 +40,7 @@
http://apps.ad5001.eu/img/full/logarithmplotter.png
-
+
diff --git a/mac/Info.plist b/mac/Info.plist
index fdf7463..ff60696 100644
--- a/mac/Info.plist
+++ b/mac/Info.plist
@@ -17,7 +17,7 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- 0.0.1
+ 0.1
NSHighResolutionCapable
UTExportedTypeDeclarations
diff --git a/package-macosx.sh b/package-macosx.sh
index c41d738..6e07cac 100644
--- a/package-macosx.sh
+++ b/package-macosx.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-VERSION=0.0.1-dev0
+VERSION=0.1-dev0
title="LogarithmPlotter v${VERSION} Setup"
finalDMGName="LogarithmPlotter-v${VERSION}-setup.dmg"
applicationName=LogarithmPlotter
diff --git a/snapcraft.yaml b/snapcraft.yaml
index 65add5c..42a0f64 100644
--- a/snapcraft.yaml
+++ b/snapcraft.yaml
@@ -1,10 +1,10 @@
name: logarithmplotter
title: LogarithmPlotter
-version: '0.0.1'
+version: '0.1'
summary: 2D plotter software to make BODE plots, sequences and repartition functions.
description: |
LogarithmPlotter is, as it's name suggests, a plotter made with logarithm scales in mind. With an object system similar to [Geogebra](https://geogebra.org)'s, it allows dynamic creation of plots with very few limitations.
- It's primary use is to quickly create [asymptotic Bode Diagrams/plots](https://en.wikipedia.org/wiki/Bode_plot), but it's extensible nature and ability to switch to non-logarithmic scales allow it to create other things with it, like sequences or statistical repartition functions.
+ It's primary use is to quickly create [asymptotic Bode plots](https://en.wikipedia.org/wiki/Bode_plot), but it's extensible nature and ability to switch to non-logarithmic scales allow it to create other things with it, like sequences or statistical repartition functions.
confinement: strict
base: core20
grade: devel
diff --git a/win/installer.nsi b/win/installer.nsi
index a584c81..93ca0d5 100644
--- a/win/installer.nsi
+++ b/win/installer.nsi
@@ -10,7 +10,7 @@ Unicode True
!define APP_NAME "LogarithmPlotter"
!define DEV_NAME "Ad5001"
!define WEBSITE "https://apps.ad5001.eu/LogarithmPlotter"
-!define APP_VERSION "0.0.1.0"
+!define APP_VERSION "0.1.0.0"
!define COPYRIGHT "Ad5001 © 2021"
!define DESCRIPTION "Create graphs with logarithm scales."