Starting linux setup system.
128
LogarithmPlotter/__init__.py
Normal file
|
@ -0,0 +1,128 @@
|
||||||
|
"""
|
||||||
|
* LogarithmPlotter - Create graphs with logarithm scales.
|
||||||
|
* Copyright (C) 2021 Ad5001
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* 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 PySide2.QtWidgets import QApplication, QFileDialog
|
||||||
|
from PySide2.QtQml import QQmlApplicationEngine, qmlRegisterType
|
||||||
|
from PySide2.QtCore import Qt, QObject, Signal, Slot, Property
|
||||||
|
from PySide2.QtGui import QIcon, QImage
|
||||||
|
from PySide2 import __version__ as PySide2_version
|
||||||
|
|
||||||
|
import os
|
||||||
|
import tempfile
|
||||||
|
from platform import release as os_release
|
||||||
|
from json import dumps
|
||||||
|
from sys import platform, argv, version as sys_version
|
||||||
|
import webbrowser
|
||||||
|
|
||||||
|
__VERSION__ = "0.0.1.dev0"
|
||||||
|
|
||||||
|
tempfile = tempfile.mkstemp(suffix='.png')[1]
|
||||||
|
|
||||||
|
def get_linux_theme():
|
||||||
|
des = {
|
||||||
|
"KDE": "Flat",
|
||||||
|
"gnome": "default",
|
||||||
|
"lxqt": "fusion",
|
||||||
|
"mate": "fusion",
|
||||||
|
}
|
||||||
|
if "XDG_SESSION_DESKTOP" in os.environ:
|
||||||
|
return des[os.environ["XDG_SESSION_DESKTOP"]] if os.environ["XDG_SESSION_DESKTOP"] in des else "fusion"
|
||||||
|
else:
|
||||||
|
# Android
|
||||||
|
return "Material"
|
||||||
|
|
||||||
|
class Helper(QObject):
|
||||||
|
|
||||||
|
@Slot(str, str)
|
||||||
|
def write(self, filename, filedata):
|
||||||
|
if os.path.exists(os.path.dirname(os.path.realpath(filename))):
|
||||||
|
f = open(os.path.realpath(filename), 'w', -1, 'utf8')
|
||||||
|
f.write(filedata)
|
||||||
|
f.close()
|
||||||
|
|
||||||
|
@Slot(str, result=str)
|
||||||
|
def load(self, filename):
|
||||||
|
if os.path.exists(os.path.realpath(filename)):
|
||||||
|
f = open(os.path.realpath(filename), 'r', -1, 'utf8')
|
||||||
|
data = f.read()
|
||||||
|
f.close()
|
||||||
|
return data
|
||||||
|
return '{}'
|
||||||
|
|
||||||
|
@Slot(result=str)
|
||||||
|
def gettmpfile(self):
|
||||||
|
global tempfile
|
||||||
|
return tempfile
|
||||||
|
|
||||||
|
@Slot()
|
||||||
|
def copyImageToClipboard(self):
|
||||||
|
global tempfile
|
||||||
|
clipboard = QApplication.clipboard()
|
||||||
|
clipboard.setImage(QImage(tempfile))
|
||||||
|
|
||||||
|
@Slot(result=str)
|
||||||
|
def getVersion(self):
|
||||||
|
return __VERSION__
|
||||||
|
|
||||||
|
@Slot(result=str)
|
||||||
|
def getDebugInfos(self):
|
||||||
|
"""
|
||||||
|
Returns the version info about Qt, PySide2 & Python
|
||||||
|
"""
|
||||||
|
return "Built with PySide2 (Qt) v{} and python v{}".format(PySide2_version, sys_version.split("\n")[0])
|
||||||
|
|
||||||
|
@Slot(str)
|
||||||
|
def openUrl(self, url):
|
||||||
|
webbrowser.open(url)
|
||||||
|
|
||||||
|
def run():
|
||||||
|
pwd = os.getcwd()
|
||||||
|
os.chdir(os.path.dirname(os.path.realpath(__file__)))
|
||||||
|
|
||||||
|
os.environ["QT_QUICK_CONTROLS_STYLE"] = {
|
||||||
|
"linux": get_linux_theme(),
|
||||||
|
"freebsd": get_linux_theme(),
|
||||||
|
"win32": "universal" if os_release == "10" else "fusion",
|
||||||
|
"cygwin": "fusion",
|
||||||
|
"darwin": "imagine"
|
||||||
|
}[platform]
|
||||||
|
|
||||||
|
app = QApplication(argv)
|
||||||
|
app.setApplicationName("LogarithmPlotter")
|
||||||
|
app.setOrganizationName("Ad5001")
|
||||||
|
app.setWindowIcon(QIcon(os.path.realpath(os.path.join(os.getcwd(), "..", "logplotter.svg"))))
|
||||||
|
engine = QQmlApplicationEngine()
|
||||||
|
helper = Helper()
|
||||||
|
engine.rootContext().setContextProperty("Helper", helper)
|
||||||
|
|
||||||
|
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', 'lpf']:
|
||||||
|
print(argv[-1])
|
||||||
|
engine.rootObjects()[0].loadDiagram(argv[-1])
|
||||||
|
os.chdir(os.path.dirname(os.path.realpath(__file__)))
|
||||||
|
|
||||||
|
if not engine.rootObjects():
|
||||||
|
print("No root object")
|
||||||
|
exit(-1)
|
||||||
|
app.exec_()
|
||||||
|
|
||||||
|
os.remove(tempfile)
|
||||||
|
|
4
LogarithmPlotter/__main__.py
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
from .run import run
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
run()
|
|
@ -108,12 +108,11 @@ Item {
|
||||||
"α","β","γ","δ","ε","ζ","η","θ","κ","λ",
|
"α","β","γ","δ","ε","ζ","η","θ","κ","λ",
|
||||||
"μ","ξ","ρ","ς","σ","τ","φ","χ","ψ","ω",
|
"μ","ξ","ρ","ς","σ","τ","φ","χ","ψ","ω",
|
||||||
"Γ","Δ","Θ","Λ","Ξ","Π","Σ","Φ","Ψ","Ω",
|
"Γ","Δ","Θ","Λ","Ξ","Π","Σ","Φ","Ψ","Ω",
|
||||||
"∞","≠","≥","≤","∧","∨","∩","∪","⊂","⊃",
|
"∞","∂"," "," "," "," "," "," "," "," ",
|
||||||
"⊕","⊗","∈","∀","∃","∂"," "," "," "," ",
|
|
||||||
"¹","²","³","⁴","⁵","⁶","⁷","⁸","⁹","⁰",
|
"¹","²","³","⁴","⁵","⁶","⁷","⁸","⁹","⁰",
|
||||||
"₁","₂","₃","₄","₅","₆","₇","₈","₉","₀",
|
"₁","₂","₃","₄","₅","₆","₇","₈","₉","₀",
|
||||||
"ₐ","ₑ","ₒ","ₓ","ₔ","ₕ","ₖ","ₗ","ₘ","ₙ",
|
"ₐ","ₑ","ₒ","ₓ","ₔ","ₕ","ₖ","ₗ","ₘ","ₙ",
|
||||||
"ₚ","ₛ","ₜ","₊","₋","₌","₍","₎"," "," "
|
"ₚ","ₛ","ₜ"," "," "," "," "," "," "," "
|
||||||
|
|
||||||
]
|
]
|
||||||
Repeater {
|
Repeater {
|
|
@ -13,7 +13,7 @@
|
||||||
version="1.1"
|
version="1.1"
|
||||||
id="SVGRoot"
|
id="SVGRoot"
|
||||||
sodipodi:docname="Function.svg"
|
sodipodi:docname="Function.svg"
|
||||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
|
inkscape:version="1.0.1 (3bc2e813f5, 2021-09-07)">
|
||||||
<defs
|
<defs
|
||||||
id="defs833" />
|
id="defs833" />
|
||||||
<sodipodi:namedview
|
<sodipodi:namedview
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
|
@ -13,7 +13,7 @@
|
||||||
version="1.1"
|
version="1.1"
|
||||||
id="SVGRoot"
|
id="SVGRoot"
|
||||||
sodipodi:docname="Gain Bode.svg"
|
sodipodi:docname="Gain Bode.svg"
|
||||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
|
inkscape:version="1.0.1 (3bc2e813f5, 2021-09-07)">
|
||||||
<defs
|
<defs
|
||||||
id="defs1469" />
|
id="defs1469" />
|
||||||
<sodipodi:namedview
|
<sodipodi:namedview
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
|
@ -13,7 +13,7 @@
|
||||||
version="1.1"
|
version="1.1"
|
||||||
id="SVGRoot"
|
id="SVGRoot"
|
||||||
sodipodi:docname="Phase Bode.svg"
|
sodipodi:docname="Phase Bode.svg"
|
||||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
|
inkscape:version="1.0.1 (3bc2e813f5, 2021-09-07)">
|
||||||
<defs
|
<defs
|
||||||
id="defs10" />
|
id="defs10" />
|
||||||
<sodipodi:namedview
|
<sodipodi:namedview
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
|
@ -13,7 +13,7 @@
|
||||||
version="1.1"
|
version="1.1"
|
||||||
id="SVGRoot"
|
id="SVGRoot"
|
||||||
sodipodi:docname="Point.svg"
|
sodipodi:docname="Point.svg"
|
||||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
|
inkscape:version="1.0.1 (3bc2e813f5, 2021-09-07)">
|
||||||
<defs
|
<defs
|
||||||
id="defs1469" />
|
id="defs1469" />
|
||||||
<sodipodi:namedview
|
<sodipodi:namedview
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
|
@ -13,7 +13,7 @@
|
||||||
version="1.1"
|
version="1.1"
|
||||||
id="SVGRoot"
|
id="SVGRoot"
|
||||||
sodipodi:docname="Repartition.svg"
|
sodipodi:docname="Repartition.svg"
|
||||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
|
inkscape:version="1.0.1 (3bc2e813f5, 2021-09-07)">
|
||||||
<defs
|
<defs
|
||||||
id="defs835" />
|
id="defs835" />
|
||||||
<sodipodi:namedview
|
<sodipodi:namedview
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
|
@ -13,7 +13,7 @@
|
||||||
version="1.1"
|
version="1.1"
|
||||||
id="SVGRoot"
|
id="SVGRoot"
|
||||||
sodipodi:docname="Sequence.svg"
|
sodipodi:docname="Sequence.svg"
|
||||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
|
inkscape:version="1.0.1 (3bc2e813f5, 2021-09-07)">
|
||||||
<defs
|
<defs
|
||||||
id="defs10" />
|
id="defs10" />
|
||||||
<sodipodi:namedview
|
<sodipodi:namedview
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
|
@ -13,7 +13,7 @@
|
||||||
version="1.1"
|
version="1.1"
|
||||||
id="SVGRoot"
|
id="SVGRoot"
|
||||||
sodipodi:docname="Somme gains Bode.svg"
|
sodipodi:docname="Somme gains Bode.svg"
|
||||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
|
inkscape:version="1.0.1 (3bc2e813f5, 2021-09-07)">
|
||||||
<defs
|
<defs
|
||||||
id="defs1469" />
|
id="defs1469" />
|
||||||
<sodipodi:namedview
|
<sodipodi:namedview
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
|
@ -13,7 +13,7 @@
|
||||||
version="1.1"
|
version="1.1"
|
||||||
id="SVGRoot"
|
id="SVGRoot"
|
||||||
sodipodi:docname="Somme gains Bode.svg"
|
sodipodi:docname="Somme gains Bode.svg"
|
||||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
|
inkscape:version="1.0.1 (3bc2e813f5, 2021-09-07)">
|
||||||
<defs
|
<defs
|
||||||
id="defs1469" />
|
id="defs1469" />
|
||||||
<sodipodi:namedview
|
<sodipodi:namedview
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
|
@ -13,7 +13,7 @@
|
||||||
version="1.1"
|
version="1.1"
|
||||||
id="SVGRoot"
|
id="SVGRoot"
|
||||||
sodipodi:docname="Somme phases Bode.svg"
|
sodipodi:docname="Somme phases Bode.svg"
|
||||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
|
inkscape:version="1.0.1 (3bc2e813f5, 2021-09-07)">
|
||||||
<defs
|
<defs
|
||||||
id="defs10" />
|
id="defs10" />
|
||||||
<sodipodi:namedview
|
<sodipodi:namedview
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
|
@ -13,7 +13,7 @@
|
||||||
version="1.1"
|
version="1.1"
|
||||||
id="SVGRoot"
|
id="SVGRoot"
|
||||||
sodipodi:docname="Text.svg"
|
sodipodi:docname="Text.svg"
|
||||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
|
inkscape:version="1.0.1 (3bc2e813f5, 2021-09-07)">
|
||||||
<defs
|
<defs
|
||||||
id="defs1469" />
|
id="defs1469" />
|
||||||
<sodipodi:namedview
|
<sodipodi:namedview
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
|
@ -13,7 +13,7 @@
|
||||||
version="1.1"
|
version="1.1"
|
||||||
id="SVGRoot"
|
id="SVGRoot"
|
||||||
sodipodi:docname="X Cursor.svg"
|
sodipodi:docname="X Cursor.svg"
|
||||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
|
inkscape:version="1.0.1 (3bc2e813f5, 2021-09-07)">
|
||||||
<defs
|
<defs
|
||||||
id="defs1469" />
|
id="defs1469" />
|
||||||
<sodipodi:namedview
|
<sodipodi:namedview
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
|
@ -13,7 +13,7 @@
|
||||||
version="1.1"
|
version="1.1"
|
||||||
id="SVGRoot"
|
id="SVGRoot"
|
||||||
sodipodi:docname="delete.svg"
|
sodipodi:docname="delete.svg"
|
||||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
|
inkscape:version="1.0.1 (3bc2e813f5, 2021-09-07)">
|
||||||
<defs
|
<defs
|
||||||
id="defs10" />
|
id="defs10" />
|
||||||
<sodipodi:namedview
|
<sodipodi:namedview
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
|
@ -13,7 +13,7 @@
|
||||||
version="1.1"
|
version="1.1"
|
||||||
id="SVGRoot"
|
id="SVGRoot"
|
||||||
sodipodi:docname="xaxisstep.svg"
|
sodipodi:docname="xaxisstep.svg"
|
||||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
|
inkscape:version="1.0.1 (3bc2e813f5, 2021-09-07)">
|
||||||
<defs
|
<defs
|
||||||
id="defs836" />
|
id="defs836" />
|
||||||
<sodipodi:namedview
|
<sodipodi:namedview
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
|
@ -13,7 +13,7 @@
|
||||||
version="1.1"
|
version="1.1"
|
||||||
id="SVGRoot"
|
id="SVGRoot"
|
||||||
sodipodi:docname="yaxisstep.svg"
|
sodipodi:docname="yaxisstep.svg"
|
||||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
|
inkscape:version="1.0.1 (3bc2e813f5, 2021-09-07)">
|
||||||
<defs
|
<defs
|
||||||
id="defs836" />
|
id="defs836" />
|
||||||
<sodipodi:namedview
|
<sodipodi:namedview
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
|
@ -13,7 +13,7 @@
|
||||||
version="1.1"
|
version="1.1"
|
||||||
id="SVGRoot"
|
id="SVGRoot"
|
||||||
sodipodi:docname="Expression.svg"
|
sodipodi:docname="Expression.svg"
|
||||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
|
inkscape:version="1.0.1 (3bc2e813f5, 2021-09-07)">
|
||||||
<defs
|
<defs
|
||||||
id="defs833" />
|
id="defs833" />
|
||||||
<sodipodi:namedview
|
<sodipodi:namedview
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
|
@ -7,7 +7,7 @@
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)"
|
inkscape:version="1.0.1 (3bc2e813f5, 2021-09-07)"
|
||||||
sodipodi:docname="Gain.svg"
|
sodipodi:docname="Gain.svg"
|
||||||
id="SVGRoot"
|
id="SVGRoot"
|
||||||
version="1.1"
|
version="1.1"
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
|
@ -13,7 +13,7 @@
|
||||||
version="1.1"
|
version="1.1"
|
||||||
id="SVGRoot"
|
id="SVGRoot"
|
||||||
sodipodi:docname="Pass.svg"
|
sodipodi:docname="Pass.svg"
|
||||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
|
inkscape:version="1.0.1 (3bc2e813f5, 2021-09-07)">
|
||||||
<defs
|
<defs
|
||||||
id="defs836" />
|
id="defs836" />
|
||||||
<sodipodi:namedview
|
<sodipodi:namedview
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
@ -13,7 +13,7 @@
|
||||||
version="1.1"
|
version="1.1"
|
||||||
id="SVGRoot"
|
id="SVGRoot"
|
||||||
sodipodi:docname="rouding.svg"
|
sodipodi:docname="rouding.svg"
|
||||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
|
inkscape:version="1.0.1 (3bc2e813f5, 2021-09-07)">
|
||||||
<defs
|
<defs
|
||||||
id="defs836" />
|
id="defs836" />
|
||||||
<sodipodi:namedview
|
<sodipodi:namedview
|
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 2 KiB |
|
@ -13,7 +13,7 @@
|
||||||
version="1.1"
|
version="1.1"
|
||||||
id="SVGRoot"
|
id="SVGRoot"
|
||||||
sodipodi:docname="Text.svg"
|
sodipodi:docname="Text.svg"
|
||||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
|
inkscape:version="1.0.1 (3bc2e813f5, 2021-09-07)">
|
||||||
<defs
|
<defs
|
||||||
id="defs1469" />
|
id="defs1469" />
|
||||||
<sodipodi:namedview
|
<sodipodi:namedview
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
|
@ -13,7 +13,7 @@
|
||||||
version="1.1"
|
version="1.1"
|
||||||
id="SVGRoot"
|
id="SVGRoot"
|
||||||
sodipodi:docname="angle.svg"
|
sodipodi:docname="angle.svg"
|
||||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
|
inkscape:version="1.0.1 (3bc2e813f5, 2021-09-07)">
|
||||||
<defs
|
<defs
|
||||||
id="defs836" />
|
id="defs836" />
|
||||||
<sodipodi:namedview
|
<sodipodi:namedview
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
@ -13,7 +13,7 @@
|
||||||
viewBox="0 0 24 24"
|
viewBox="0 0 24 24"
|
||||||
id="svg4"
|
id="svg4"
|
||||||
sodipodi:docname="appearance.svg"
|
sodipodi:docname="appearance.svg"
|
||||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
|
inkscape:version="1.0.1 (3bc2e813f5, 2021-09-07)">
|
||||||
<metadata
|
<metadata
|
||||||
id="metadata10">
|
id="metadata10">
|
||||||
<rdf:RDF>
|
<rdf:RDF>
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
|
@ -13,7 +13,7 @@
|
||||||
version="1.1"
|
version="1.1"
|
||||||
id="SVGRoot"
|
id="SVGRoot"
|
||||||
sodipodi:docname="arrow.svg"
|
sodipodi:docname="arrow.svg"
|
||||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
|
inkscape:version="1.0.1 (3bc2e813f5, 2021-09-07)">
|
||||||
<defs
|
<defs
|
||||||
id="defs836" />
|
id="defs836" />
|
||||||
<sodipodi:namedview
|
<sodipodi:namedview
|
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 2 KiB |
|
@ -13,7 +13,7 @@
|
||||||
version="1.1"
|
version="1.1"
|
||||||
id="SVGRoot"
|
id="SVGRoot"
|
||||||
sodipodi:docname="label.svg"
|
sodipodi:docname="label.svg"
|
||||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
|
inkscape:version="1.0.1 (3bc2e813f5, 2021-09-07)">
|
||||||
<defs
|
<defs
|
||||||
id="defs836" />
|
id="defs836" />
|
||||||
<sodipodi:namedview
|
<sodipodi:namedview
|
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 2 KiB |
|
@ -13,7 +13,7 @@
|
||||||
version="1.1"
|
version="1.1"
|
||||||
id="SVGRoot"
|
id="SVGRoot"
|
||||||
sodipodi:docname="icon.svg"
|
sodipodi:docname="icon.svg"
|
||||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
|
inkscape:version="1.0.1 (3bc2e813f5, 2021-09-07)">
|
||||||
<defs
|
<defs
|
||||||
id="defs836" />
|
id="defs836" />
|
||||||
<sodipodi:namedview
|
<sodipodi:namedview
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
@ -13,7 +13,7 @@
|
||||||
version="1.1"
|
version="1.1"
|
||||||
id="SVGRoot"
|
id="SVGRoot"
|
||||||
sodipodi:docname="target.svg"
|
sodipodi:docname="target.svg"
|
||||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
|
inkscape:version="1.0.1 (3bc2e813f5, 2021-09-07)">
|
||||||
<defs
|
<defs
|
||||||
id="defs836" />
|
id="defs836" />
|
||||||
<sodipodi:namedview
|
<sodipodi:namedview
|
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 2 KiB |
|
@ -13,7 +13,7 @@
|
||||||
version="1.1"
|
version="1.1"
|
||||||
id="SVGRoot"
|
id="SVGRoot"
|
||||||
sodipodi:docname="linewidth.svg"
|
sodipodi:docname="linewidth.svg"
|
||||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
|
inkscape:version="1.0.1 (3bc2e813f5, 2021-09-07)">
|
||||||
<defs
|
<defs
|
||||||
id="defs836" />
|
id="defs836" />
|
||||||
<sodipodi:namedview
|
<sodipodi:namedview
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
@ -13,7 +13,7 @@
|
||||||
version="1.1"
|
version="1.1"
|
||||||
id="SVGRoot"
|
id="SVGRoot"
|
||||||
sodipodi:docname="textsize.svg"
|
sodipodi:docname="textsize.svg"
|
||||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
|
inkscape:version="1.0.1 (3bc2e813f5, 2021-09-07)">
|
||||||
<defs
|
<defs
|
||||||
id="defs833" />
|
id="defs833" />
|
||||||
<sodipodi:namedview
|
<sodipodi:namedview
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
|
@ -13,7 +13,7 @@
|
||||||
version="1.1"
|
version="1.1"
|
||||||
id="SVGRoot"
|
id="SVGRoot"
|
||||||
sodipodi:docname="xaxisstep.svg"
|
sodipodi:docname="xaxisstep.svg"
|
||||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
|
inkscape:version="1.0.1 (3bc2e813f5, 2021-09-07)">
|
||||||
<defs
|
<defs
|
||||||
id="defs836" />
|
id="defs836" />
|
||||||
<sodipodi:namedview
|
<sodipodi:namedview
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
|
@ -13,7 +13,7 @@
|
||||||
version="1.1"
|
version="1.1"
|
||||||
id="SVGRoot"
|
id="SVGRoot"
|
||||||
sodipodi:docname="xlabel.svg"
|
sodipodi:docname="xlabel.svg"
|
||||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
|
inkscape:version="1.0.1 (3bc2e813f5, 2021-09-07)">
|
||||||
<defs
|
<defs
|
||||||
id="defs836" />
|
id="defs836" />
|
||||||
<sodipodi:namedview
|
<sodipodi:namedview
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
@ -13,7 +13,7 @@
|
||||||
version="1.1"
|
version="1.1"
|
||||||
id="SVGRoot"
|
id="SVGRoot"
|
||||||
sodipodi:docname="xmin.svg"
|
sodipodi:docname="xmin.svg"
|
||||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
|
inkscape:version="1.0.1 (3bc2e813f5, 2021-09-07)">
|
||||||
<defs
|
<defs
|
||||||
id="defs836" />
|
id="defs836" />
|
||||||
<sodipodi:namedview
|
<sodipodi:namedview
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
@ -13,7 +13,7 @@
|
||||||
version="1.1"
|
version="1.1"
|
||||||
id="SVGRoot"
|
id="SVGRoot"
|
||||||
sodipodi:docname="xzoom.svg"
|
sodipodi:docname="xzoom.svg"
|
||||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
|
inkscape:version="1.0.1 (3bc2e813f5, 2021-09-07)">
|
||||||
<defs
|
<defs
|
||||||
id="defs836" />
|
id="defs836" />
|
||||||
<sodipodi:namedview
|
<sodipodi:namedview
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
|
@ -13,7 +13,7 @@
|
||||||
version="1.1"
|
version="1.1"
|
||||||
id="SVGRoot"
|
id="SVGRoot"
|
||||||
sodipodi:docname="yaxisstep.svg"
|
sodipodi:docname="yaxisstep.svg"
|
||||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
|
inkscape:version="1.0.1 (3bc2e813f5, 2021-09-07)">
|
||||||
<defs
|
<defs
|
||||||
id="defs836" />
|
id="defs836" />
|
||||||
<sodipodi:namedview
|
<sodipodi:namedview
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
|
@ -13,7 +13,7 @@
|
||||||
version="1.1"
|
version="1.1"
|
||||||
id="SVGRoot"
|
id="SVGRoot"
|
||||||
sodipodi:docname="ylabel.svg"
|
sodipodi:docname="ylabel.svg"
|
||||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
|
inkscape:version="1.0.1 (3bc2e813f5, 2021-09-07)">
|
||||||
<defs
|
<defs
|
||||||
id="defs836" />
|
id="defs836" />
|
||||||
<sodipodi:namedview
|
<sodipodi:namedview
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
@ -13,7 +13,7 @@
|
||||||
version="1.1"
|
version="1.1"
|
||||||
id="SVGRoot"
|
id="SVGRoot"
|
||||||
sodipodi:docname="ymax.svg"
|
sodipodi:docname="ymax.svg"
|
||||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
|
inkscape:version="1.0.1 (3bc2e813f5, 2021-09-07)">
|
||||||
<defs
|
<defs
|
||||||
id="defs836" />
|
id="defs836" />
|
||||||
<sodipodi:namedview
|
<sodipodi:namedview
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
@ -13,7 +13,7 @@
|
||||||
version="1.1"
|
version="1.1"
|
||||||
id="SVGRoot"
|
id="SVGRoot"
|
||||||
sodipodi:docname="yzoom.svg"
|
sodipodi:docname="yzoom.svg"
|
||||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
|
inkscape:version="1.0.1 (3bc2e813f5, 2021-09-07)">
|
||||||
<defs
|
<defs
|
||||||
id="defs836" />
|
id="defs836" />
|
||||||
<sodipodi:namedview
|
<sodipodi:namedview
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
177
linux/application-x-logarithm-plotter.svg
Normal file
|
@ -0,0 +1,177 @@
|
||||||
|
<?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:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
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="logplotterfile.svg"
|
||||||
|
inkscape:version="1.0.1 (3bc2e813f5, 2021-09-07)">
|
||||||
|
<title
|
||||||
|
id="title849">LogarithmPlotter Icon</title>
|
||||||
|
<defs
|
||||||
|
id="defs10">
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
id="linearGradient51">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#e0e0e0;stop-opacity:1"
|
||||||
|
offset="0"
|
||||||
|
id="stop47" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#ffffff;stop-opacity:1"
|
||||||
|
offset="1"
|
||||||
|
id="stop49" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
id="linearGradient909">
|
||||||
|
<stop
|
||||||
|
style="stop-color:#d0d0df;stop-opacity:1"
|
||||||
|
offset="0"
|
||||||
|
id="stop905" />
|
||||||
|
<stop
|
||||||
|
style="stop-color:#dddddf;stop-opacity:0;"
|
||||||
|
offset="1"
|
||||||
|
id="stop907" />
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient909"
|
||||||
|
id="linearGradient911"
|
||||||
|
x1="19"
|
||||||
|
y1="6"
|
||||||
|
x2="19"
|
||||||
|
y2="9"
|
||||||
|
gradientUnits="userSpaceOnUse" />
|
||||||
|
<linearGradient
|
||||||
|
inkscape:collect="always"
|
||||||
|
xlink:href="#linearGradient51"
|
||||||
|
id="linearGradient53"
|
||||||
|
x1="7"
|
||||||
|
y1="5"
|
||||||
|
x2="19"
|
||||||
|
y2="22"
|
||||||
|
gradientUnits="userSpaceOnUse" />
|
||||||
|
</defs>
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="15.839192"
|
||||||
|
inkscape:cx="31.617327"
|
||||||
|
inkscape:cy="5.2075676"
|
||||||
|
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="grid19" />
|
||||||
|
</sodipodi:namedview>
|
||||||
|
<metadata
|
||||||
|
id="metadata13">
|
||||||
|
<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 File Icon</dc:title>
|
||||||
|
<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) Copyright Ad5001 2021</dc:title>
|
||||||
|
</cc:Agent>
|
||||||
|
</dc:rights>
|
||||||
|
<cc:license
|
||||||
|
rdf:resource="http://creativecommons.org/licenses/by-nc-sa/4.0/" />
|
||||||
|
</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:label="Calque 1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1">
|
||||||
|
<path
|
||||||
|
id="rect26"
|
||||||
|
style="fill:url(#linearGradient53);fill-opacity:1;stroke:#aaaaaf;stroke-width:0.7;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
d="m 4,2 h 13 l 3,3.8181818 V 23 H 4 Z"
|
||||||
|
sodipodi:nodetypes="cccccc" />
|
||||||
|
<rect
|
||||||
|
style="fill:#000000;fill-rule:evenodd;stroke-width:9.65201;stroke-opacity:0"
|
||||||
|
id="rect1410"
|
||||||
|
width="11"
|
||||||
|
height="1"
|
||||||
|
x="6.5"
|
||||||
|
y="16" />
|
||||||
|
<rect
|
||||||
|
style="fill:#000000;fill-rule:evenodd;stroke-width:9.65208;stroke-opacity:0"
|
||||||
|
id="rect1412"
|
||||||
|
width="1"
|
||||||
|
height="11"
|
||||||
|
x="10.5"
|
||||||
|
y="7" />
|
||||||
|
<path
|
||||||
|
style="fill:none;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.97652;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
id="path1529"
|
||||||
|
sodipodi:type="arc"
|
||||||
|
sodipodi:cx="6.5"
|
||||||
|
sodipodi:cy="7"
|
||||||
|
sodipodi:rx="10.01174"
|
||||||
|
sodipodi:ry="9.0117397"
|
||||||
|
sodipodi:start="0"
|
||||||
|
sodipodi:end="1.5707963"
|
||||||
|
sodipodi:arc-type="arc"
|
||||||
|
sodipodi:open="true"
|
||||||
|
d="M 16.51174,7 A 10.01174,9.0117397 0 0 1 6.5,16.01174" />
|
||||||
|
<path
|
||||||
|
id="rect899"
|
||||||
|
style="fill:#aaaaaf;fill-opacity:1;stroke:none;stroke-width:0.7;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
d="m 17,2 3,4 v 0 h -3 z"
|
||||||
|
sodipodi:nodetypes="ccccc" />
|
||||||
|
<path
|
||||||
|
id="rect902"
|
||||||
|
style="fill:url(#linearGradient911);fill-opacity:1;stroke:none;stroke-width:0.6579;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||||
|
d="m 17,6 h 2.65 v 2.5 0 z"
|
||||||
|
sodipodi:nodetypes="ccccc" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 5.5 KiB |
5
linux/debian/changelog
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
logarithmplotter (0.0.1.dev0) UNRELEASED; urgency=medium
|
||||||
|
|
||||||
|
* Initial release.
|
||||||
|
|
||||||
|
-- Ad5001 <mail@ad5001.eu> Mon, 06 Jun 2021 08:48:28 +0200
|
1
linux/debian/compat
Normal file
|
@ -0,0 +1 @@
|
||||||
|
11
|
12
linux/debian/control
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
Package: logarithmplotter
|
||||||
|
Source: logarithmplotter
|
||||||
|
Version: 0.0.1.dev0
|
||||||
|
Architecture: all
|
||||||
|
Maintainer: Ad5001 <mail@ad5001.eu>
|
||||||
|
Depends: python3, python3-pip, qt5-default (>= 5.14.0), qml-module-qtquick-controls2 (>= 5.14.0), qml-module-qtmultimedia (>= 5.14.0), qml-module-qtgraphicaleffects (>= 5.14.0), qml-module-qtquick2 (>= 5.14.0), qml-module-qtqml-models2 (>= 5.14.0), qml-module-qtquick-controls (>= 5.14.0), python3-pyside2.qtcore (>= 5.14.0), python3-pyside2.qtqml (>= 5.14.0), python3-pyside2.qtgui (>= 5.14.0), python3-pyside2.qtquick (>= 5.14.0), python3-pyside2.qtwidgets (>= 5.14.0), python3-pyside2.qtmultimedia (>= 5.14.0), python3-pyside2.qtnetwork (>= 5.14.0)
|
||||||
|
Build-Depends: debhelper (>=11~), dh-python, dpkg-dev (>= 1.16.1~), python-setuptools, python3-all-dev (>=3.6)
|
||||||
|
Section: science
|
||||||
|
Priority: optional
|
||||||
|
Homepage: https://apps.ad5001.eu/logarithmplotter
|
||||||
|
Installed-Size: 174
|
||||||
|
Description: Create graphs with logarithm scales.
|
8
linux/debian/copyright
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||||
|
Upstream-Name: logarithmplotter
|
||||||
|
Upstream-Contact: Ad5001 <mail@ad5001.eu>
|
||||||
|
|
||||||
|
Files: *
|
||||||
|
Copyright: 2020, Ad5001 <mail@ad5001.eu>
|
||||||
|
License: GPL-3
|
||||||
|
|
1
linux/debian/depends
Normal file
|
@ -0,0 +1 @@
|
||||||
|
python3-pip, qt5-default (>= 5.12.0), qml-module-qtquick-controls2 (>= 5.12.0), qml-module-qtmultimedia (>= 5.12.0), qml-module-qtgraphicaleffects (>= 5.12.0), qml-module-qtquick2 (>= 5.12.0), qml-module-qtqml-models2 (>= 5.12.0), qml-module-qtquick-controls (>= 5.12.0), python3-pyside2.qtcore (>= 5.12.0), python3-pyside2.qtqml (>= 5.12.0), python3-pyside2.qtgui (>= 5.12.0), python3-pyside2.qtquick (>= 5.12.0), python3-pyside2.qtwidgets (>= 5.12.0), python3-pyside2.qtmultimedia (>= 5.12.0), python3-pyside2.qtnetwork (>= 5.12.0)
|
1
linux/debian/install
Normal file
|
@ -0,0 +1 @@
|
||||||
|
logarithmplotter usr/bin/
|
0
linux/debian/recommends
Normal file
6
linux/debian/rules
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
#!/usr/bin/make -f
|
||||||
|
|
||||||
|
export PYBUILD_NAME = logarithmplotter
|
||||||
|
|
||||||
|
%:
|
||||||
|
dh $@ --with python3 --buildsystem=pybuild
|
12
linux/install_after_setup.sh
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/bash
|
||||||
|
APPROOT="$(cd -P "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||||
|
echo "Adding desktop file..."
|
||||||
|
mkdir -p ~/.local/share/applications
|
||||||
|
sed "s+ROOTFOLDER+$APPROOT/+g" "$APPROOT/linux/logarithmplotter.desktop" > ~/.local/share/applications/logarithmplotter.desktop
|
||||||
|
echo "Installing mime-type..."
|
||||||
|
mkdir -p ~/.local/share/applications
|
||||||
|
sed "s+ROOTFOLDER+$APPROOT/+g" "$APPROOT/linux/x-logarithm-plotter-old.xml" > ~/.local/share/mime/packages/x-logarithm-plotter.xml
|
||||||
|
mkdir -p ~/.local/share/icons/hicolor/scalable/mimetypes
|
||||||
|
cp "$APPROOT/logplotterfile.svg" ~/.local/share/icons/hicolor/scalable/mimetypes/application-x-logarithm-plotter.svg
|
||||||
|
update-mime-database ~/.local/share/mime/
|
||||||
|
update-icon-caches ~/.local/share/icons/hicolor
|
|
@ -2,10 +2,10 @@
|
||||||
APPROOT="$(cd -P "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
APPROOT="$(cd -P "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||||
echo "Adding desktop file..."
|
echo "Adding desktop file..."
|
||||||
mkdir -p ~/.local/share/applications
|
mkdir -p ~/.local/share/applications
|
||||||
sed "s+/home/ad5001/Apps/LogarithmPlotter/+$APPROOT/+g" "$APPROOT/linux/logplotter.desktop" > ~/.local/share/applications/logplotter.desktop
|
sed "s+ROOTFOLDER+$APPROOT/+g" "$APPROOT/linux/logplotter.desktop" > ~/.local/share/applications/logarithmplotter.desktop
|
||||||
echo "Installing mime-type..."
|
echo "Installing mime-type..."
|
||||||
mkdir -p ~/.local/share/applications
|
mkdir -p ~/.local/share/applications
|
||||||
sed "s+/home/ad5001/Apps/LogarithmPlotter/+$APPROOT/+g" "$APPROOT/linux/x-logarithm-plotter.xml" > ~/.local/share/mime/packages/x-logarithm-plotter.xml
|
sed "s+ROOTFOLDER+$APPROOT/+g" "$APPROOT/linux/x-logarithm-plotter-old.xml" > ~/.local/share/mime/packages/x-logarithm-plotter.xml
|
||||||
mkdir -p ~/.local/share/icons/hicolor/scalable/mimetypes
|
mkdir -p ~/.local/share/icons/hicolor/scalable/mimetypes
|
||||||
cp "$APPROOT/logplotterfile.svg" ~/.local/share/icons/hicolor/scalable/mimetypes/application-x-logarithm-plotter.svg
|
cp "$APPROOT/logplotterfile.svg" ~/.local/share/icons/hicolor/scalable/mimetypes/application-x-logarithm-plotter.svg
|
||||||
update-mime-database ~/.local/share/mime/
|
update-mime-database ~/.local/share/mime/
|
||||||
|
|
11
linux/logarithmplotter.desktop
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
Version=1.0
|
||||||
|
Type=Application
|
||||||
|
Name=LogarithmPlotter
|
||||||
|
Comment=Plotter to make BODE diagrams, sequences and repartition functions.
|
||||||
|
Exec=/usr/bin/logarithmplotter %F
|
||||||
|
Icon=logplotter
|
||||||
|
MimeType=application/x-logarithm-plotter;
|
||||||
|
Terminal=false
|
||||||
|
StartupNotify=false
|
||||||
|
Categories=Graphics;Science;Math;
|
|
@ -3,8 +3,8 @@ Version=1.0
|
||||||
Type=Application
|
Type=Application
|
||||||
Name=LogarithmPlotter
|
Name=LogarithmPlotter
|
||||||
Comment=Plotter to make BODE diagrams, sequences and repartition functions.
|
Comment=Plotter to make BODE diagrams, sequences and repartition functions.
|
||||||
Exec=/usr/bin/python3 /home/ad5001/Apps/LogarithmPlotter/run.py %F
|
Exec=/usr/bin/python3 ROOTFOLDER/run.py %F
|
||||||
Icon=/home/ad5001/Apps/LogarithmPlotter/logplotter.svg
|
Icon=ROOTFOLDER/logplotter.svg
|
||||||
MimeType=application/x-logarithm-plotter;
|
MimeType=application/x-logarithm-plotter;
|
||||||
Terminal=false
|
Terminal=false
|
||||||
StartupNotify=false
|
StartupNotify=false
|
||||||
|
|
12
linux/x-logarithm-plotter-old.xml
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
|
||||||
|
<mime-type xmlns="http://www.freedesktop.org/standards/shared-mime-info" type="application/x-logarithm-plotter">
|
||||||
|
<comment>Logarithm Plot File</comment>
|
||||||
|
<comment xml:lang="fr">Fichier Graphe Logarithmique</comment>
|
||||||
|
<icon name="ROOTFOLDER/logplotterfile.svg"/>
|
||||||
|
<glob-deleteall/>
|
||||||
|
<glob pattern="*.json"/>
|
||||||
|
<glob pattern="*.lgg"/>
|
||||||
|
<glob pattern="*.lpf"/>
|
||||||
|
</mime-type>
|
||||||
|
</mime-info>
|
|
@ -3,7 +3,7 @@
|
||||||
<mime-type xmlns="http://www.freedesktop.org/standards/shared-mime-info" type="application/x-logarithm-plotter">
|
<mime-type xmlns="http://www.freedesktop.org/standards/shared-mime-info" type="application/x-logarithm-plotter">
|
||||||
<comment>Logarithm Plot File</comment>
|
<comment>Logarithm Plot File</comment>
|
||||||
<comment xml:lang="fr">Fichier Graphe Logarithmique</comment>
|
<comment xml:lang="fr">Fichier Graphe Logarithmique</comment>
|
||||||
<icon name="/home/ad5001/Apps/LogarithmPlotter/linux/logplotterfile.svg"/>
|
<icon name="application-x-logarithm-plotter"/>
|
||||||
<glob-deleteall/>
|
<glob-deleteall/>
|
||||||
<glob pattern="*.json"/>
|
<glob pattern="*.json"/>
|
||||||
<glob pattern="*.lgg"/>
|
<glob pattern="*.lgg"/>
|
||||||
|
|
|
@ -13,9 +13,9 @@
|
||||||
version="1.1"
|
version="1.1"
|
||||||
id="SVGRoot"
|
id="SVGRoot"
|
||||||
sodipodi:docname="logplotter.svg"
|
sodipodi:docname="logplotter.svg"
|
||||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
|
inkscape:version="1.0.1 (3bc2e813f5, 2021-09-07)">
|
||||||
<title
|
<title
|
||||||
id="title836">Logarithm Plotter Icon v1.0</title>
|
id="title836">LogarithmPlotter Icon v1.0</title>
|
||||||
<defs
|
<defs
|
||||||
id="defs833" />
|
id="defs833" />
|
||||||
<sodipodi:namedview
|
<sodipodi:namedview
|
||||||
|
@ -49,7 +49,7 @@
|
||||||
<dc:format>image/svg+xml</dc:format>
|
<dc:format>image/svg+xml</dc:format>
|
||||||
<dc:type
|
<dc:type
|
||||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
<dc:title>Logarithm Plotter Icon v1.0</dc:title>
|
<dc:title>LogarithmPlotter Icon v1.0</dc:title>
|
||||||
<cc:license
|
<cc:license
|
||||||
rdf:resource="http://creativecommons.org/licenses/by-nc-sa/4.0/" />
|
rdf:resource="http://creativecommons.org/licenses/by-nc-sa/4.0/" />
|
||||||
<dc:date>2021</dc:date>
|
<dc:date>2021</dc:date>
|
||||||
|
|
Before Width: | Height: | Size: 4 KiB After Width: | Height: | Size: 4 KiB |
|
@ -14,9 +14,9 @@
|
||||||
version="1.1"
|
version="1.1"
|
||||||
id="SVGRoot"
|
id="SVGRoot"
|
||||||
sodipodi:docname="logplotterfile.svg"
|
sodipodi:docname="logplotterfile.svg"
|
||||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
|
inkscape:version="1.0.1 (3bc2e813f5, 2021-09-07)">
|
||||||
<title
|
<title
|
||||||
id="title849">Logarithm Plotter Icon</title>
|
id="title849">LogarithmPlotter Icon</title>
|
||||||
<defs
|
<defs
|
||||||
id="defs10">
|
id="defs10">
|
||||||
<linearGradient
|
<linearGradient
|
||||||
|
@ -93,7 +93,7 @@
|
||||||
<dc:format>image/svg+xml</dc:format>
|
<dc:format>image/svg+xml</dc:format>
|
||||||
<dc:type
|
<dc:type
|
||||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
<dc:title>Logarithm Plotter File Icon</dc:title>
|
<dc:title>LogarithmPlotter File Icon</dc:title>
|
||||||
<dc:date>2021</dc:date>
|
<dc:date>2021</dc:date>
|
||||||
<dc:creator>
|
<dc:creator>
|
||||||
<cc:Agent>
|
<cc:Agent>
|
||||||
|
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |
3
package-linux.sh
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
python3 setup.py --command-packages=stdeb.command sdist_dsc --package accountfree --copyright-file linux/debian/copyright --suite hirsute --recommends "$(cat linux/debian/recommends)" --depends "$(cat linux/debian/depends)" --section science bdist_deb
|
130
run.py
|
@ -1,126 +1,8 @@
|
||||||
"""
|
|
||||||
* LogarithmPlotter - Create graphs with logarithm scales.
|
|
||||||
* Copyright (C) 2021 Ad5001
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* 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 PySide2.QtWidgets import QApplication, QFileDialog
|
def run():
|
||||||
from PySide2.QtQml import QQmlApplicationEngine, qmlRegisterType
|
import LogarithmPlotter
|
||||||
from PySide2.QtCore import Qt, QObject, Signal, Slot, Property
|
LogarithmPlotter.run()
|
||||||
from PySide2.QtGui import QIcon, QImage
|
|
||||||
from PySide2 import __version__ as PySide2_version
|
|
||||||
|
|
||||||
import os
|
if __name__ == "__main__":
|
||||||
import tempfile
|
run()
|
||||||
from platform import release as os_release
|
|
||||||
from json import dumps
|
|
||||||
from sys import platform, argv, version as sys_version
|
|
||||||
import webbrowser
|
|
||||||
|
|
||||||
|
|
||||||
pwd = os.getcwd()
|
|
||||||
os.chdir(os.path.dirname(os.path.realpath(__file__)))
|
|
||||||
|
|
||||||
__VERSION__ = "0.0.1.dev0"
|
|
||||||
|
|
||||||
tempfile = tempfile.mkstemp(suffix='.png')[1]
|
|
||||||
|
|
||||||
def get_linux_theme():
|
|
||||||
des = {
|
|
||||||
"KDE": "Flat",
|
|
||||||
"gnome": "default",
|
|
||||||
"lxqt": "fusion",
|
|
||||||
"mate": "fusion",
|
|
||||||
}
|
|
||||||
if "XDG_SESSION_DESKTOP" in os.environ:
|
|
||||||
return des[os.environ["XDG_SESSION_DESKTOP"]] if os.environ["XDG_SESSION_DESKTOP"] in des else "fusion"
|
|
||||||
else:
|
|
||||||
# Android
|
|
||||||
return "Material"
|
|
||||||
os.environ["QT_QUICK_CONTROLS_STYLE"] = {
|
|
||||||
"linux": get_linux_theme(),
|
|
||||||
"freebsd": get_linux_theme(),
|
|
||||||
"win32": "universal" if os_release == "10" else "fusion",
|
|
||||||
"cygwin": "fusion",
|
|
||||||
"darwin": "imagine"
|
|
||||||
}[platform]
|
|
||||||
|
|
||||||
class Helper(QObject):
|
|
||||||
@Slot(str, str)
|
|
||||||
def write(self, filename, filedata):
|
|
||||||
if os.path.exists(os.path.dirname(os.path.realpath(filename))):
|
|
||||||
f = open(os.path.realpath(filename), 'w', -1, 'utf8')
|
|
||||||
f.write(filedata)
|
|
||||||
f.close()
|
|
||||||
|
|
||||||
@Slot(str, result=str)
|
|
||||||
def load(self, filename):
|
|
||||||
if os.path.exists(os.path.realpath(filename)):
|
|
||||||
f = open(os.path.realpath(filename), 'r', -1, 'utf8')
|
|
||||||
data = f.read()
|
|
||||||
f.close()
|
|
||||||
return data
|
|
||||||
return '{}'
|
|
||||||
|
|
||||||
@Slot(result=str)
|
|
||||||
def gettmpfile(self):
|
|
||||||
global tempfile
|
|
||||||
return tempfile
|
|
||||||
|
|
||||||
@Slot()
|
|
||||||
def copyImageToClipboard(self):
|
|
||||||
global tempfile
|
|
||||||
clipboard = QApplication.clipboard()
|
|
||||||
clipboard.setImage(QImage(tempfile))
|
|
||||||
|
|
||||||
@Slot(result=str)
|
|
||||||
def getVersion(self):
|
|
||||||
return __VERSION__
|
|
||||||
|
|
||||||
@Slot(result=str)
|
|
||||||
def getDebugInfos(self):
|
|
||||||
"""
|
|
||||||
Returns the version info about Qt, PySide2 & Python
|
|
||||||
"""
|
|
||||||
return "Built with PySide2 (Qt) v{} and python v{}".format(PySide2_version, sys_version.split("\n")[0])
|
|
||||||
|
|
||||||
@Slot(str)
|
|
||||||
def openUrl(self, url):
|
|
||||||
webbrowser.open(url)
|
|
||||||
|
|
||||||
|
|
||||||
app = QApplication(argv)
|
|
||||||
app.setApplicationName("LogarithmPlotter")
|
|
||||||
app.setOrganizationName("Ad5001")
|
|
||||||
app.setWindowIcon(QIcon(os.path.realpath(os.path.join(os.getcwd(), "logplotter.svg"))))
|
|
||||||
engine = QQmlApplicationEngine()
|
|
||||||
helper = Helper()
|
|
||||||
engine.rootContext().setContextProperty("Helper", helper)
|
|
||||||
|
|
||||||
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', 'lpf']:
|
|
||||||
print(argv[-1])
|
|
||||||
engine.rootObjects()[0].loadDiagram(argv[-1])
|
|
||||||
os.chdir(os.path.dirname(os.path.realpath(__file__)))
|
|
||||||
|
|
||||||
if not engine.rootObjects():
|
|
||||||
print("No root object")
|
|
||||||
exit(-1)
|
|
||||||
app.exec_()
|
|
||||||
|
|
||||||
os.remove(tempfile)
|
|
||||||
|
|
98
setup.py
Normal file
|
@ -0,0 +1,98 @@
|
||||||
|
"""
|
||||||
|
* LogarithmPlotter - Create graphs with logarithm scales.
|
||||||
|
* Copyright (C) 2021 Ad5001
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
"""
|
||||||
|
|
||||||
|
import setuptools
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
|
current_dir = os.path.realpath(os.path.dirname(os.path.realpath(__file__)))
|
||||||
|
|
||||||
|
from LogarithmPlotter import __VERSION__ as pkg_version
|
||||||
|
|
||||||
|
CLASSIFIERS = """
|
||||||
|
Environment :: Graphic
|
||||||
|
Environment :: X11 Applications :: Qt
|
||||||
|
License :: OSI Approved :: GNU General Public License v3 (GPLv3)
|
||||||
|
Natural Language :: English
|
||||||
|
Development Status :: 4 - Beta
|
||||||
|
Operating System :: MacOS :: MacOS X
|
||||||
|
Operating System :: Microsoft :: Windows
|
||||||
|
Operating System :: POSIX
|
||||||
|
Operating System :: POSIX :: BSD
|
||||||
|
Operating System :: POSIX :: Linux
|
||||||
|
Programming Language :: Python :: 3.8
|
||||||
|
Programming Language :: Python :: 3.9
|
||||||
|
Programming Language :: Python :: Implementation :: CPython
|
||||||
|
Topic :: Utilities
|
||||||
|
Topic :: Scientific/Engineering
|
||||||
|
""".strip().splitlines()
|
||||||
|
|
||||||
|
def read_file(file_name):
|
||||||
|
f = open(file_name, 'r', -1)
|
||||||
|
data = f.read()
|
||||||
|
f.close()
|
||||||
|
return data
|
||||||
|
|
||||||
|
def package_data():
|
||||||
|
pkg_data = []
|
||||||
|
for d,folders,files in os.walk("LogarithmPlotter/qml"):
|
||||||
|
d = d[17:]
|
||||||
|
pkg_data += [os.path.join(d, f) for f in files]
|
||||||
|
print("Pkgdata", pkg_data)
|
||||||
|
return pkg_data
|
||||||
|
|
||||||
|
data_files = []
|
||||||
|
if sys.platform == 'linux':
|
||||||
|
data_files.append(('/usr/share/applications/', ['linux/logarithmplotter.desktop']))
|
||||||
|
data_files.append(('/usr/share/mime/packages/', ['linux/x-logarithm-plotter.xml']))
|
||||||
|
data_files.append(('/usr/share/icons/hicolor/scalable/mimetypes/', ['linux/application-x-logarithm-plotter.svg']))
|
||||||
|
data_files.append(('/usr/share/icons/hicolor/scalable/apps/', ['logplotter.svg']))
|
||||||
|
|
||||||
|
setuptools.setup(
|
||||||
|
install_requires=["PySide2"],
|
||||||
|
python_requires='>=3.8',
|
||||||
|
|
||||||
|
name='logarithmplotter',
|
||||||
|
version=pkg_version,
|
||||||
|
|
||||||
|
description='Browse and use online services, free of account',
|
||||||
|
long_description=read_file("README.md"),
|
||||||
|
keywords='logarithm plotter graph creator bode diagram',
|
||||||
|
|
||||||
|
author='Ad5001',
|
||||||
|
author_email='mail@ad5001.eu',
|
||||||
|
|
||||||
|
license=('GPLv3'),
|
||||||
|
url='https://apps.ad5001.eu/logarithmplotter',
|
||||||
|
|
||||||
|
classifiers=CLASSIFIERS,
|
||||||
|
zip_safe=False,
|
||||||
|
packages=["LogarithmPlotter"],
|
||||||
|
|
||||||
|
package_data={
|
||||||
|
'LogarithmPlotter':package_data(),
|
||||||
|
},
|
||||||
|
include_package_data=True,
|
||||||
|
data_files = data_files,
|
||||||
|
entry_points={
|
||||||
|
'console_scripts': [
|
||||||
|
'logarithmplotter = LogarithmPlotter:run',
|
||||||
|
],
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|