Changing version to v0.1 with potential git version, changing type display request function to displayType and displayTypeMultiple

This commit is contained in:
Ad5001 2021-08-14 16:13:14 +02:00
parent 4a9f2f5828
commit 7cc126db00
Signed by: Ad5001
GPG key ID: 7251B1AF90B960F9
13 changed files with 76 additions and 157 deletions

View file

@ -15,8 +15,29 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
"""
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

View file

@ -34,7 +34,7 @@ pwd = os.getcwd()
def get_linux_theme():
des = {
"KDE": "Flat",
"KDE": "org.kde.desktop",
"gnome": "default",
"lxqt": "fusion",
"mate": "fusion",

View file

@ -1,131 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="24.0px"
height="24.0px"
viewBox="0 0 24.0 24.0"
version="1.1"
id="SVGRoot"
sodipodi:docname="logplotter.svg"
inkscape:version="1.0.1 (3bc2e813f5, 2021-09-07)">
<title
id="title836">LogarithmPlotter Icon v1.0</title>
<defs
id="defs833" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="22.627417"
inkscape:cx="23.950814"
inkscape:cy="5.6122612"
inkscape:document-units="px"
inkscape:current-layer="layer1"
inkscape:document-rotation="0"
showgrid="true"
inkscape:window-width="1920"
inkscape:window-height="1011"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1">
<inkscape:grid
type="xygrid"
id="grid1403" />
</sodipodi:namedview>
<metadata
id="metadata836">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>LogarithmPlotter Icon v1.0</dc:title>
<cc:license
rdf:resource="http://creativecommons.org/licenses/by-nc-sa/4.0/" />
<dc:date>2021</dc:date>
<dc:creator>
<cc:Agent>
<dc:title>Ad5001</dc:title>
</cc:Agent>
</dc:creator>
<dc:rights>
<cc:Agent>
<dc:title>(c) Ad5001 2021 - All rights reserved</dc:title>
</cc:Agent>
</dc:rights>
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/by-nc-sa/4.0/">
<cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Notice" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#Attribution" />
<cc:prohibits
rdf:resource="http://creativecommons.org/ns#CommercialUse" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
<cc:requires
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
</cc:License>
</rdf:RDF>
</metadata>
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="Bg">
<rect
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect1546"
width="24"
height="24"
x="0"
y="0"
ry="3" />
</g>
<g
inkscape:label="Calque 1"
inkscape:groupmode="layer"
id="layer1">
<rect
style="fill:#000000;fill-rule:evenodd;stroke-width:19.304;stroke-opacity:0"
id="rect1410"
width="22"
height="2"
x="1"
y="19" />
<rect
style="fill:#000000;fill-rule:evenodd;stroke-width:19.3041;stroke-opacity:0"
id="rect1412"
width="2"
height="22"
x="9"
y="1" />
<path
style="fill:none;fill-rule:evenodd;stroke:#ff0000;stroke-width:1.95063;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path1529"
sodipodi:type="arc"
sodipodi:cx="1"
sodipodi:cy="1"
sodipodi:rx="20.024685"
sodipodi:ry="18.024683"
sodipodi:start="0"
sodipodi:end="1.5707963"
sodipodi:arc-type="arc"
d="M 21.024685,1 A 20.024685,18.024683 0 0 1 1,19.024683"
sodipodi:open="true" />
</g>
<svg id="SVGRoot" width="48" height="48" version="1.1" viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg">
<title>LogarithmPlotter Icon v1.0</title>
<g fill-rule="evenodd" stroke-width="2">
<rect width="48" height="48" ry="6" fill="#fff"/>
<rect x="2" y="38" width="44" height="4" stroke-opacity="0"/>
<rect x="18" y="2" width="4" height="44" stroke-opacity="0"/>
</g>
<path d="M 42.05,2 A 40.05,36.05 0 0 1 2,38.05" fill="none" stroke="#f00" stroke-width="3.9012"/>
</svg>

Before

Width:  |  Height:  |  Size: 4 KiB

After

Width:  |  Height:  |  Size: 488 B

View file

@ -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

View file

@ -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
}
}

View file

@ -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',

View file

@ -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.

View file

@ -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.
</p>
<p>
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.
</p>
</description>
<description xml:lang="fr">
@ -40,7 +40,7 @@
<screenshot type="default">http://apps.ad5001.eu/img/full/logarithmplotter.png</screenshot>
</screenshots>
<releases>
<release version="0.0.1" date="2021-07-15"/>
<release version="0.1" date="2021-07-15"/>
</releases>
<content_rating type="oars-1.0">
</content_rating>

View file

@ -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.
</p>
<p>
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.
</p>
</description>
<description xml:lang="fr">
@ -40,7 +40,7 @@
<screenshot type="default">http://apps.ad5001.eu/img/full/logarithmplotter.png</screenshot>
</screenshots>
<releases>
<release version="0.0.1" date="2021-07-15"/>
<release version="0.1" date="2021-07-15"/>
</releases>
<content_rating type="oars-1.0">
</content_rating>

View file

@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.0.1</string>
<string>0.1</string>
<key>NSHighResolutionCapable</key>
<true/>
<key>UTExportedTypeDeclarations</key>

View file

@ -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

View file

@ -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

View file

@ -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."