Merge branch 'master' of https://git.ad5001.eu/Ad5001/LogarithmPlotter
This commit is contained in:
commit
5e61869a78
60 changed files with 174 additions and 84 deletions
|
@ -1,6 +1,6 @@
|
|||
"""
|
||||
* LogarithmPlotter - Create graphs with logarithm scales.
|
||||
* Copyright (C) 2021 Ad5001
|
||||
* Copyright (C) 2022 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
|
||||
|
@ -17,7 +17,7 @@
|
|||
"""
|
||||
from shutil import which
|
||||
|
||||
__VERSION__ = "0.1.2"
|
||||
__VERSION__ = "0.1.3"
|
||||
is_release = False
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
"""
|
||||
* LogarithmPlotter - Create graphs with logarithm scales.
|
||||
* Copyright (C) 2021 Ad5001
|
||||
* Copyright (C) 2022 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
"""
|
||||
* LogarithmPlotter - Create graphs with logarithm scales.
|
||||
* Copyright (C) 2021 Ad5001
|
||||
* Copyright (C) 2022 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
"""
|
||||
* LogarithmPlotter - Create graphs with logarithm scales.
|
||||
* Copyright (C) 2021 Ad5001
|
||||
* Copyright (C) 2022 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
"""
|
||||
* LogarithmPlotter - Create graphs with logarithm scales.
|
||||
* Copyright (C) 2021 Ad5001
|
||||
* Copyright (C) 2022 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* LogarithmPlotter - Create graphs with logarithm scales.
|
||||
* Copyright (C) 2021 Ad5001
|
||||
* Copyright (C) 2022 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
|
||||
|
@ -85,7 +85,7 @@ D.Dialog {
|
|||
wrapMode: Text.WordWrap
|
||||
textFormat: Text.RichText
|
||||
font.pixelSize: 13
|
||||
text: "Copyright © 2021 Ad5001 <mail@ad5001.eu><br>
|
||||
text: "Copyright © 2022 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>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* LogarithmPlotter - Create graphs with logarithm scales.
|
||||
* Copyright (C) 2021 Ad5001
|
||||
* Copyright (C) 2022 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* LogarithmPlotter - Create graphs with logarithm scales.
|
||||
* Copyright (C) 2021 Ad5001
|
||||
* Copyright (C) 2022 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* LogarithmPlotter - Create graphs with logarithm scales.
|
||||
* Copyright (C) 2021 Ad5001
|
||||
* Copyright (C) 2022 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* LogarithmPlotter - Create graphs with logarithm scales.
|
||||
* Copyright (C) 2021 Ad5001
|
||||
* Copyright (C) 2022 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
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
/**
|
||||
* LogarithmPlotter - Create graphs with logarithm scales.
|
||||
* Copyright (C) 2021 Ad5001
|
||||
* Copyright (C) 2022 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* LogarithmPlotter - Create graphs with logarithm scales.
|
||||
* Copyright (C) 2021 Ad5001
|
||||
* Copyright (C) 2022 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* LogarithmPlotter - Create graphs with logarithm scales.
|
||||
* Copyright (C) 2021 Ad5001
|
||||
* Copyright (C) 2022 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* LogarithmPlotter - Create graphs with logarithm scales.
|
||||
* Copyright (C) 2021 Ad5001
|
||||
* Copyright (C) 2022 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* LogarithmPlotter - Create graphs with logarithm scales.
|
||||
* Copyright (C) 2021 Ad5001
|
||||
* Copyright (C) 2022 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* LogarithmPlotter - Create graphs with logarithm scales.
|
||||
* Copyright (C) 2021 Ad5001
|
||||
* Copyright (C) 2022 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* LogarithmPlotter - Create graphs with logarithm scales.
|
||||
* Copyright (C) 2021 Ad5001
|
||||
* Copyright (C) 2022 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* LogarithmPlotter - Create graphs with logarithm scales.
|
||||
* Copyright (C) 2021 Ad5001
|
||||
* Copyright (C) 2022 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* LogarithmPlotter - Create graphs with logarithm scales.
|
||||
* Copyright (C) 2021 Ad5001
|
||||
* Copyright (C) 2022 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* LogarithmPlotter - Create graphs with logarithm scales.
|
||||
* Copyright (C) 2021 Ad5001
|
||||
* Copyright (C) 2022 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* LogarithmPlotter - Create graphs with logarithm scales.
|
||||
* Copyright (C) 2021 Ad5001
|
||||
* Copyright (C) 2022 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* LogarithmPlotter - Create graphs with logarithm scales.
|
||||
* Copyright (C) 2021 Ad5001
|
||||
* Copyright (C) 2022 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* LogarithmPlotter - Create graphs with logarithm scales.
|
||||
* Copyright (C) 2021 Ad5001
|
||||
* Copyright (C) 2022 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* LogarithmPlotter - Create graphs with logarithm scales.
|
||||
* Copyright (C) 2021 Ad5001
|
||||
* Copyright (C) 2022 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* LogarithmPlotter - Create graphs with logarithm scales.
|
||||
* Copyright (C) 2021 Ad5001
|
||||
* Copyright (C) 2022 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* LogarithmPlotter - Create graphs with logarithm scales.
|
||||
* Copyright (C) 2021 Ad5001
|
||||
* Copyright (C) 2022 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* LogarithmPlotter - Create graphs with logarithm scales.
|
||||
* Copyright (C) 2021 Ad5001
|
||||
* Copyright (C) 2022 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* LogarithmPlotter - Create graphs with logarithm scales.
|
||||
* Copyright (C) 2021 Ad5001
|
||||
* Copyright (C) 2022 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
|
||||
|
@ -135,16 +135,18 @@ class Function extends Common.ExecutableObject {
|
|||
var previousY;
|
||||
if(definitionDomain instanceof MathLib.SpecialDomain && definitionDomain.moveSupported) {
|
||||
// Point based functions.
|
||||
previousX = definitionDomain.previous(previousX)
|
||||
previousX = definitionDomain.next(previousX)
|
||||
if(previousX === null) previousX = definitionDomain.next(canvas.px2x(0))
|
||||
previousY = expr.execute(previousX)
|
||||
if(!drawPoints && !drawDash) return
|
||||
while(previousX !== null && canvas.x2px(previousX) < canvas.canvasSize.width) {
|
||||
var currentX = definitionDomain.next(previousX)
|
||||
// Reconverted for canvas to fix for logarithmic scales.
|
||||
var currentX = definitionDomain.next(canvas.px2x(canvas.x2px(previousX)+pxprecision));
|
||||
var currentY = expr.execute(currentX)
|
||||
if(currentX === null) break;
|
||||
if((definitionDomain.includes(currentX) || definitionDomain.includes(previousX)) &&
|
||||
(destinationDomain.includes(currentY) || destinationDomain.includes(previousY))) {
|
||||
console.log(drawDash, drawPoints)
|
||||
if(drawDash)
|
||||
canvas.drawDashedLine(ctx, canvas.x2px(previousX), canvas.y2px(previousY), canvas.x2px(currentX), canvas.y2px(currentY))
|
||||
if(drawPoints) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* LogarithmPlotter - Create graphs with logarithm scales.
|
||||
* Copyright (C) 2021 Ad5001
|
||||
* Copyright (C) 2022 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* LogarithmPlotter - Create graphs with logarithm scales.
|
||||
* Copyright (C) 2021 Ad5001
|
||||
* Copyright (C) 2022 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* LogarithmPlotter - Create graphs with logarithm scales.
|
||||
* Copyright (C) 2021 Ad5001
|
||||
* Copyright (C) 2022 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* LogarithmPlotter - Create graphs with logarithm scales.
|
||||
* Copyright (C) 2021 Ad5001
|
||||
* Copyright (C) 2022 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* LogarithmPlotter - Create graphs with logarithm scales.
|
||||
* Copyright (C) 2021 Ad5001
|
||||
* Copyright (C) 2022 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* LogarithmPlotter - Create graphs with logarithm scales.
|
||||
* Copyright (C) 2021 Ad5001
|
||||
* Copyright (C) 2022 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* LogarithmPlotter - Create graphs with logarithm scales.
|
||||
* Copyright (C) 2021 Ad5001
|
||||
* Copyright (C) 2022 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* LogarithmPlotter - Create graphs with logarithm scales.
|
||||
* Copyright (C) 2021 Ad5001
|
||||
* Copyright (C) 2022 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* LogarithmPlotter - Create graphs with logarithm scales.
|
||||
* Copyright (C) 2021 Ad5001
|
||||
* Copyright (C) 2022 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* LogarithmPlotter - Create graphs with logarithm scales.
|
||||
* Copyright (C) 2021 Ad5001
|
||||
* Copyright (C) 2022 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* LogarithmPlotter - Create graphs with logarithm scales.
|
||||
* Copyright (C) 2021 Ad5001
|
||||
* Copyright (C) 2022 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* LogarithmPlotter - Create graphs with logarithm scales.
|
||||
* Copyright (C) 2021 Ad5001
|
||||
* Copyright (C) 2022 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* LogarithmPlotter - Create graphs with logarithm scales.
|
||||
* Copyright (C) 2021 Ad5001
|
||||
* Copyright (C) 2022 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* LogarithmPlotter - Create graphs with logarithm scales.
|
||||
* Copyright (C) 2021 Ad5001
|
||||
* Copyright (C) 2022 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* LogarithmPlotter - Create graphs with logarithm scales.
|
||||
* Copyright (C) 2021 Ad5001
|
||||
* Copyright (C) 2022 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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* LogarithmPlotter - Create graphs with logarithm scales.
|
||||
* Copyright (C) 2021 Ad5001
|
||||
* Copyright (C) 2022 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
|
||||
|
@ -134,7 +134,7 @@ function simplifyExpression(str) {
|
|||
],
|
||||
[ // Decomposition way 2
|
||||
/(^.?|[+-] |\()\((([-.\d\w] [*/] )?[-\d\w.]+) ([+\-]) (([-.\d\w] [*/] )?[\d\w.+]+)\) ([*/]) ([-.\d\w]+)(.?$| [+-]|\))/g,
|
||||
"$1$8 $7 $2 $4 $8 $7 $5$9"
|
||||
"$1$2 $7 $8 $4 $5 $7 $8$9"
|
||||
],
|
||||
[ // Factorisation of π elements.
|
||||
/(([-\d\w.]+ [*/] )*)(pi|π)(( [/*] [-\d\w.]+)*) ([+-]) (([-\d\w.]+ [*/] )*)(pi|π)(( [/*] [-\d\w.]+)*)?/g,
|
||||
|
@ -199,7 +199,7 @@ function simplifyExpression(str) {
|
|||
}
|
||||
],
|
||||
[// Starting & ending parenthesis if not needed.
|
||||
/^\((.*)\)$/g,
|
||||
/^\s*\((.*)\)\s*$/g,
|
||||
function(match, middle) {
|
||||
var str = middle
|
||||
// Replace all groups
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
"""
|
||||
* LogarithmPlotter - Create graphs with logarithm scales.
|
||||
* Copyright (C) 2021 Ad5001
|
||||
* Copyright (C) 2022 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
|
||||
|
@ -19,6 +19,7 @@
|
|||
from PySide2.QtCore import Qt, QRunnable, QThreadPool, QThread, QObject, Signal
|
||||
from urllib.request import urlopen
|
||||
from urllib.error import HTTPError, URLError
|
||||
from sys import argv
|
||||
|
||||
class UpdateInformation(QObject):
|
||||
got_update_info = Signal(bool, str, bool)
|
||||
|
@ -67,7 +68,8 @@ def check_for_updates(current_version, window):
|
|||
"""
|
||||
Checks for updates in the background, and sends an alert with information.
|
||||
"""
|
||||
|
||||
if "--no-check-for-updates" in argv:
|
||||
return #
|
||||
def cb(show_alert, msg_text, update_available):
|
||||
pass
|
||||
if show_alert:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue