Merge branch 'master' of https://git.ad5001.eu/Ad5001/LogarithmPlotter
This commit is contained in:
commit
9b03090d14
19 changed files with 166 additions and 36 deletions
|
@ -630,7 +630,7 @@ attach them to the start of each source file to most effectively state
|
||||||
the exclusion of warranty; and each file should have at least the
|
the exclusion of warranty; and each file should have at least the
|
||||||
"copyright" line and a pointer to where the full notice is found.
|
"copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
Logarithm Graph Creator - Create graphs with logarithm scales.
|
Logarithmic Plotter - Create graphs with logarithm scales.
|
||||||
Copyright (C) 2020 Ad5001
|
Copyright (C) 2020 Ad5001
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
@ -652,7 +652,7 @@ mail.
|
||||||
If the program does terminal interaction, make it output a short
|
If the program does terminal interaction, make it output a short
|
||||||
notice like this when it starts in an interactive mode:
|
notice like this when it starts in an interactive mode:
|
||||||
|
|
||||||
Logarithm Graph Creator Copyright (C) 2020 Ad5001
|
Logarithmic Plotter Copyright (C) 2020 Ad5001
|
||||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
This is free software, and you are welcome to redistribute it
|
This is free software, and you are welcome to redistribute it
|
||||||
under certain conditions; type `show c' for details.
|
under certain conditions; type `show c' for details.
|
||||||
|
|
107
qml/About.qml
Normal file
107
qml/About.qml
Normal file
|
@ -0,0 +1,107 @@
|
||||||
|
/**
|
||||||
|
* Logarithmic Plotter - 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 QtQuick 2.12
|
||||||
|
import QtQuick.Dialogs 1.3 as D
|
||||||
|
import QtQuick.Controls 2.12
|
||||||
|
|
||||||
|
|
||||||
|
D.Dialog {
|
||||||
|
id: about
|
||||||
|
title: `About Logarithmic Plotter`
|
||||||
|
width: 400
|
||||||
|
height: 600
|
||||||
|
|
||||||
|
Image {
|
||||||
|
id: logo
|
||||||
|
source: "../logplotter.svg"
|
||||||
|
sourceSize.width: 64
|
||||||
|
sourceSize.height: 64
|
||||||
|
width: 64
|
||||||
|
height: 64
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
anchors.rightMargin: width/2
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.topMargin: 10
|
||||||
|
}
|
||||||
|
|
||||||
|
Text {
|
||||||
|
id: appName
|
||||||
|
anchors.top: logo.bottom
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.topMargin: 10
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
width: parent.width
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
|
font.pixelSize: 25
|
||||||
|
text: "Logarithmic Plotter v" + Helper.getVersion()
|
||||||
|
}
|
||||||
|
|
||||||
|
Text {
|
||||||
|
id: description
|
||||||
|
anchors.top: appName.bottom
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.topMargin: 10
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
width: parent.width
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
|
font.pixelSize: 18
|
||||||
|
text: "Create graphs with logarithm scales."
|
||||||
|
}
|
||||||
|
|
||||||
|
Text {
|
||||||
|
id: debugInfos
|
||||||
|
anchors.top: description.bottom
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.topMargin: 10
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
width: parent.width
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
|
font.pixelSize: 14
|
||||||
|
text: Helper.getDebugInfos()
|
||||||
|
}
|
||||||
|
|
||||||
|
Text {
|
||||||
|
id: copyrightInfos
|
||||||
|
anchors.top: debugInfos.bottom
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
anchors.topMargin: 10
|
||||||
|
width: Math.min(410, parent.width)
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
|
textFormat: Text.RichText
|
||||||
|
font.pixelSize: 13
|
||||||
|
text: "Copyright (C) 2021 Ad5001 <mail@ad5001.eu><br>
|
||||||
|
<br>
|
||||||
|
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.<br>
|
||||||
|
<br>
|
||||||
|
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.<br>
|
||||||
|
<br>
|
||||||
|
You should have received a copy of the GNU General Public License along with this program. If not, see <a href='http://www.gnu.org/licenses/'>http://www.gnu.org/licenses/</a>."
|
||||||
|
onLinkActivated: Helper.openUrl(link)
|
||||||
|
}
|
||||||
|
|
||||||
|
Button {
|
||||||
|
id: openIssueButton
|
||||||
|
anchors.top: copyrightInfos.bottom
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
anchors.topMargin: 10
|
||||||
|
text: 'Report a bug'
|
||||||
|
icon.name: 'bug'
|
||||||
|
onClicked: Helper.openUrl('https://git.ad5001.eu/Ad5001/LogarithmPlotter')
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* Logarithm Graph Creator - Create graphs with logarithm scales.
|
* Logarithmic Plotter - Create graphs with logarithm scales.
|
||||||
* Copyright (C) 2020 Ad5001
|
* Copyright (C) 2021 Ad5001
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -104,6 +104,7 @@ MenuBar {
|
||||||
Action {
|
Action {
|
||||||
text: qsTr("&About")
|
text: qsTr("&About")
|
||||||
icon.name: 'about'
|
icon.name: 'about'
|
||||||
|
onTriggered: about.open()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* Logarithm Graph Creator - Create graphs with logarithm scales.
|
* Logarithmic Plotter - Create graphs with logarithm scales.
|
||||||
* Copyright (C) 2020 Ad5001
|
* Copyright (C) 2021 Ad5001
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* Logarithm Graph Creator - Create graphs with logarithm scales.
|
* Logarithmic Plotter - Create graphs with logarithm scales.
|
||||||
* Copyright (C) 2020 Ad5001
|
* Copyright (C) 2021 Ad5001
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* Logarithm Graph Creator - Create graphs with logarithm scales.
|
* Logarithmic Plotter - Create graphs with logarithm scales.
|
||||||
* Copyright (C) 2020 Ad5001
|
* Copyright (C) 2021 Ad5001
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* Logarithm Graph Creator - Create graphs with logarithm scales.
|
* Logarithmic Plotter - Create graphs with logarithm scales.
|
||||||
* Copyright (C) 2020 Ad5001
|
* Copyright (C) 2021 Ad5001
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* Logarithm Graph Creator - Create graphs with logarithm scales.
|
* Logarithmic Plotter - Create graphs with logarithm scales.
|
||||||
* Copyright (C) 2020 Ad5001
|
* Copyright (C) 2021 Ad5001
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* Logarithm Graph Creator - Create graphs with logarithm scales.
|
* Logarithmic Plotter - Create graphs with logarithm scales.
|
||||||
* Copyright (C) 2020 Ad5001
|
* Copyright (C) 2021 Ad5001
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -37,6 +37,8 @@ ApplicationWindow {
|
||||||
|
|
||||||
menuBar: AppMenuBar {}
|
menuBar: AppMenuBar {}
|
||||||
|
|
||||||
|
About {id: about}
|
||||||
|
|
||||||
Drawer {
|
Drawer {
|
||||||
id: sidebar
|
id: sidebar
|
||||||
width: 300
|
width: 300
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* Logarithm Graph Creator - Create graphs with logarithm scales.
|
* Logarithmic Plotter - Create graphs with logarithm scales.
|
||||||
* Copyright (C) 2020 Ad5001
|
* Copyright (C) 2021 Ad5001
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* Logarithm Graph Creator - Create graphs with logarithm scales.
|
* Logarithmic Plotter - Create graphs with logarithm scales.
|
||||||
* Copyright (C) 2020 Ad5001
|
* Copyright (C) 2021 Ad5001
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* Logarithm Graph Creator - Create graphs with logarithm scales.
|
* Logarithmic Plotter - Create graphs with logarithm scales.
|
||||||
* Copyright (C) 2020 Ad5001
|
* Copyright (C) 2021 Ad5001
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* Logarithm Graph Creator - Create graphs with logarithm scales.
|
* Logarithmic Plotter - Create graphs with logarithm scales.
|
||||||
* Copyright (C) 2020 Ad5001
|
* Copyright (C) 2021 Ad5001
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* Logarithm Graph Creator - Create graphs with logarithm scales.
|
* Logarithmic Plotter - Create graphs with logarithm scales.
|
||||||
* Copyright (C) 2020 Ad5001
|
* Copyright (C) 2021 Ad5001
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* Logarithm Graph Creator - Create graphs with logarithm scales.
|
* Logarithmic Plotter - Create graphs with logarithm scales.
|
||||||
* Copyright (C) 2020 Ad5001
|
* Copyright (C) 2021 Ad5001
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* Logarithm Graph Creator - Create graphs with logarithm scales.
|
* Logarithmic Plotter - Create graphs with logarithm scales.
|
||||||
* Copyright (C) 2020 Ad5001
|
* Copyright (C) 2021 Ad5001
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* Logarithm Graph Creator - Create graphs with logarithm scales.
|
* Logarithmic Plotter - Create graphs with logarithm scales.
|
||||||
* Copyright (C) 2020 Ad5001
|
* Copyright (C) 2021 Ad5001
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* Logarithm Graph Creator - Create graphs with logarithm scales.
|
* Logarithmic Plotter - Create graphs with logarithm scales.
|
||||||
* Copyright (C) 2020 Ad5001
|
* Copyright (C) 2021 Ad5001
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
24
run.py
24
run.py
|
@ -1,5 +1,5 @@
|
||||||
"""
|
"""
|
||||||
* Logarithm Graph Creator - Create graphs with logarithm scales.
|
* Logarithmic Plotter - Create graphs with logarithm scales.
|
||||||
* Copyright (C) 2020 Ad5001
|
* Copyright (C) 2020 Ad5001
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
@ -20,16 +20,20 @@ from PySide2.QtWidgets import QApplication, QFileDialog
|
||||||
from PySide2.QtQml import QQmlApplicationEngine, qmlRegisterType
|
from PySide2.QtQml import QQmlApplicationEngine, qmlRegisterType
|
||||||
from PySide2.QtCore import Qt, QObject, Signal, Slot, Property
|
from PySide2.QtCore import Qt, QObject, Signal, Slot, Property
|
||||||
from PySide2.QtGui import QIcon
|
from PySide2.QtGui import QIcon
|
||||||
|
from PySide2 import __version__ as PySide2_version
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import tempfile
|
import tempfile
|
||||||
from platform import release as os_release
|
from platform import release as os_release
|
||||||
from json import dumps
|
from json import dumps
|
||||||
from sys import platform, argv
|
from sys import platform, argv, version as sys_version
|
||||||
|
import webbrowser
|
||||||
|
|
||||||
|
|
||||||
pwd = os.getcwd()
|
pwd = os.getcwd()
|
||||||
os.chdir(os.path.dirname(os.path.realpath(__file__)))
|
os.chdir(os.path.dirname(os.path.realpath(__file__)))
|
||||||
|
|
||||||
|
__VERSION__ = "0.0.1.dev0"
|
||||||
|
|
||||||
tempfile = tempfile.mkstemp(suffix='.png')[1]
|
tempfile = tempfile.mkstemp(suffix='.png')[1]
|
||||||
|
|
||||||
|
@ -81,6 +85,22 @@ class Helper(QObject):
|
||||||
# TODO: Better copy system
|
# TODO: Better copy system
|
||||||
os.system("xclip -selection clipboard -t image/png -i " + tempfile)
|
os.system("xclip -selection clipboard -t image/png -i " + 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 = QApplication(argv)
|
||||||
app.setApplicationName("Logarithmic Plotter")
|
app.setApplicationName("Logarithmic Plotter")
|
||||||
app.setOrganizationName("Ad5001")
|
app.setOrganizationName("Ad5001")
|
||||||
|
|
Loading…
Reference in a new issue