diff --git a/LogarithmPlotter/__init__.py b/LogarithmPlotter/__init__.py index cf95148..bef6d4a 100644 --- a/LogarithmPlotter/__init__.py +++ b/LogarithmPlotter/__init__.py @@ -1,6 +1,6 @@ """ * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 diff --git a/LogarithmPlotter/__main__.py b/LogarithmPlotter/__main__.py index e679d61..62b2568 100644 --- a/LogarithmPlotter/__main__.py +++ b/LogarithmPlotter/__main__.py @@ -1,6 +1,6 @@ """ * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 diff --git a/LogarithmPlotter/logarithmplotter.py b/LogarithmPlotter/logarithmplotter.py index 3a8051c..7e1c2af 100644 --- a/LogarithmPlotter/logarithmplotter.py +++ b/LogarithmPlotter/logarithmplotter.py @@ -1,6 +1,6 @@ """ * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 @@ -18,10 +18,10 @@ from time import time -from PySide2.QtWidgets import QApplication -from PySide2.QtQml import QQmlApplicationEngine -from PySide2.QtCore import Qt, QTranslator, QLocale -from PySide2.QtGui import QIcon +from PySide6.QtWidgets import QApplication +from PySide6.QtQml import QQmlApplicationEngine +from PySide6.QtCore import Qt, QTranslator, QLocale +from PySide6.QtGui import QIcon from tempfile import TemporaryDirectory from os import getcwd, chdir, environ, path, remove, close @@ -52,7 +52,7 @@ config.init() def get_linux_theme(): des = { - "KDE": "org.kde.desktop", + "KDE": "default", "gnome": "default", "lxqt": "fusion", "mate": "fusion", diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/AppMenuBar.qml b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/AppMenuBar.qml index 5eae7c1..adf2a34 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/AppMenuBar.qml +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/AppMenuBar.qml @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 @@ -16,8 +16,8 @@ * along with this program. If not, see . */ -import QtQuick 2.12 -import QtQuick.Dialogs 1.3 +import QtQuick +import Qt.labs.platform as Native //import QtQuick.Controls 2.15 import eu.ad5001.MixedMenu 1.1 import "js/objects.js" as Objects @@ -133,6 +133,7 @@ MenuBar { checked: Helper.getSettingBool("check_for_updates") onTriggered: Helper.setSettingBool("check_for_updates", checked) icon.name: 'update' + icon.color: sysPalette.buttonText } Action { @@ -142,6 +143,7 @@ MenuBar { checked: Helper.getSettingBool("reset_redo_stack") onTriggered: Helper.setSettingBool("reset_redo_stack", checked) icon.name: 'timeline' + icon.color: sysPalette.buttonText } Action { @@ -155,6 +157,7 @@ MenuBar { drawCanvas.requestPaint() } icon.name: 'Expression' + icon.color: sysPalette.buttonText } Menu { @@ -169,6 +172,7 @@ MenuBar { Helper.setSettingBool("expression_editor.autoclose", checked) } icon.name: 'Text' + icon.color: sysPalette.buttonText } Action { @@ -180,6 +184,7 @@ MenuBar { Helper.setSettingBool("expression_editor.colorize", checked) } icon.name: 'appearance' + icon.color: sysPalette.buttonText } Action { @@ -191,6 +196,7 @@ MenuBar { Helper.setSettingBool("autocompletion.enabled", checked) } icon.name: 'label' + icon.color: sysPalette.buttonText } Menu { @@ -257,16 +263,17 @@ MenuBar { } } - MessageDialog { + Native.MessageDialog { id: saveUnsavedChangesDialog title: qsTr("Save unsaved changes?") - icon: StandardIcon.Question text: qsTr("This plot contains unsaved changes. By doing this, all unsaved data will be lost. Continue?") - standardButtons: StandardButton.Yes | StandardButton.No - onYes: Qt.quit() + buttons: Native.MessageDialog.Save | Native.MessageDialog.Discard | Native.MessageDialog.Cancel + + onSaveClicked: settings.save() + onDiscardClicked: Qt.quit() } - function showSaveUnsavedChangesDialog() { - saveUnsavedChangesDialog.visible = true + function openSaveUnsavedChangesDialog() { + saveUnsavedChangesDialog.open() } } diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/History/History.qml b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/History/History.qml index bdbc768..831bb15 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/History/History.qml +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/History/History.qml @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 @@ -16,9 +16,9 @@ * along with this program. If not, see . */ -import QtQuick 2.12 -import QtQml 2.12 -import QtQuick.Window 2.12 +import QtQuick +import QtQml +import QtQuick.Window import "../js/objects.js" as Objects import "../js/historylib.js" as HistoryLib import "../js/history/common.js" as HistoryCommon diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/History/HistoryBrowser.qml b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/History/HistoryBrowser.qml index c1f73a4..16feace 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/History/HistoryBrowser.qml +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/History/HistoryBrowser.qml @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 @@ -16,8 +16,8 @@ * along with this program. If not, see . */ -import QtQuick.Controls 2.12 -import QtQuick 2.12 +import QtQuick.Controls +import QtQuick import eu.ad5001.LogarithmPlotter.Setting 1.0 as Setting import "../js/utils.js" as Utils diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/History/HistoryItem.qml b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/History/HistoryItem.qml index 44397af..bb4b60b 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/History/HistoryItem.qml +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/History/HistoryItem.qml @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 @@ -16,9 +16,9 @@ * along with this program. If not, see . */ -import QtQuick.Controls 2.12 -import QtQuick 2.12 -import QtGraphicalEffects 1.15 +import QtQuick.Controls +import QtQuick +import Qt5Compat.GraphicalEffects import "../js/utils.js" as Utils import eu.ad5001.LogarithmPlotter.Setting 1.0 as Setting diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/LogGraphCanvas.qml b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/LogGraphCanvas.qml index e35950a..7ab2153 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/LogGraphCanvas.qml +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/LogGraphCanvas.qml @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import QtQuick 2.12 +import QtQuick import "js/objects.js" as Objects import "js/utils.js" as Utils import "js/mathlib.js" as MathLib @@ -278,7 +278,7 @@ Canvas { for(var xpow = -maxgradx; xpow <= maxgradx; xpow+=1) { var textSize = ctx.measureText("10"+Utils.textsup(xpow)).width if(xpow != 0) - drawVisibleText(ctx, "10"+Utils.textsup(xpow), x2px(Math.pow(10,xpow))-textSize/2, axisxpx+16+(6*(y==0))) + drawVisibleText(ctx, "10"+Utils.textsup(xpow), x2px(Math.pow(10,xpow))-textSize/2, axisxpx+16+(6*(xpow==1))) } } else { for(var x = 1; x < drawMaxX; x += 1) { @@ -308,7 +308,7 @@ Canvas { Draws an horizontal line at \c x plot coordinate using 2D \c ctx. */ function drawXLine(ctx, x) { - if(visible(x, ymax)) { + if(isVisible(x, ymax)) { drawLine(ctx, x2px(x), 0, x2px(x), canvasSize.height) } } @@ -318,7 +318,7 @@ Canvas { Draws an vertical line at \c y plot coordinate using 2D \c ctx. */ function drawYLine(ctx, y) { - if(visible(xmin, y)) { + if(isVisible(xmin, y)) { drawLine(ctx, 0, y2px(y), canvasSize.width, y2px(y)) } } @@ -407,10 +407,10 @@ Canvas { } /*! - \qmlmethod bool LogGraphCanvas::visible(double x, double y) + \qmlmethod bool LogGraphCanvas::isVisible(double x, double y) Checks whether a plot point (\c x, \c y) is visible or not on the canvas. */ - function visible(x, y) { + function isVisible(x, y) { return (x2px(x) >= 0 && x2px(x) <= canvasSize.width) && (y2px(y) >= 0 && y2px(y) <= canvasSize.height) } diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/LogarithmPlotter.qml b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/LogarithmPlotter.qml index 0c71421..bbc826a 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/LogarithmPlotter.qml +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/LogarithmPlotter.qml @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 @@ -16,11 +16,11 @@ * along with this program. If not, see . */ -import QtQml 2.12 -import QtQuick.Controls 2.12 +import QtQml +import QtQuick.Controls import eu.ad5001.MixedMenu 1.1 import QtQuick.Layouts 1.12 -import QtQuick 2.12 +import QtQuick // Auto loading all objects. import "js/objs/autoload.js" as ALObjects @@ -323,10 +323,10 @@ ApplicationWindow { onTriggered: Qt.quit() // Quit after paint on test build } - onClosing: { + onClosing: function(close) { if(!history.saved) { close.accepted = false - appMenu.showSaveUnsavedChangesDialog() + appMenu.openSaveUnsavedChangesDialog() } } diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/ObjectLists/Editor/CustomPropertyList.qml b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/ObjectLists/Editor/CustomPropertyList.qml index 18da95f..8c74403 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/ObjectLists/Editor/CustomPropertyList.qml +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/ObjectLists/Editor/CustomPropertyList.qml @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 @@ -16,8 +16,8 @@ * along with this program. If not, see . */ -import QtQuick 2.12 -import QtQuick.Controls 2.12 +import QtQuick +import QtQuick.Controls import eu.ad5001.LogarithmPlotter.Setting 1.0 as Setting import "../../js/objects.js" as Objects import "../../js/historylib.js" as HistoryLib diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/ObjectLists/Editor/Dialog.qml b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/ObjectLists/Editor/Dialog.qml index 3297139..eff350c 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/ObjectLists/Editor/Dialog.qml +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/ObjectLists/Editor/Dialog.qml @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 @@ -16,10 +16,12 @@ * along with this program. If not, see . */ -import QtQuick 2.12 -import QtQuick.Controls 2.12 -import QtQuick.Dialogs 1.3 as D +import QtQuick +import QtQuick.Controls +import QtQuick.Dialogs as D +import Qt.labs.platform as Native import eu.ad5001.LogarithmPlotter.Setting 1.0 as Setting +import eu.ad5001.LogarithmPlotter.Popup 1.0 as Popup import "../../js/objects.js" as Objects import "../../js/objs/common.js" as ObjectsCommons import "../../js/historylib.js" as HistoryLib @@ -36,7 +38,7 @@ import "../../js/mathlib.js" as MathLib \sa Loader, ObjectLists */ -D.Dialog { +Popup.BaseDialog { id: objEditor /*! \qmlproperty string EditorDialog::objType @@ -56,99 +58,111 @@ D.Dialog { title: "LogarithmPlotter" width: 350 - height: 400 + minimumHeight: 400 // Disable closing on return/enter, causing issues with autocomplete. - onActionChosen: if(action.key == Qt.Key_Enter || action.key == Qt.Key_Return) action.accepted = false - - Label { - id: dlgTitle - anchors.left: parent.left - anchors.top: parent.top - verticalAlignment: TextInput.AlignVCenter - text: qsTr("Edit properties of %1 %2").arg(Objects.types[objEditor.objType].displayType()).arg(objEditor.obj.name) - font.pixelSize: 20 - color: sysPalette.windowText - } - - Column { - id: dlgProperties - anchors.top: dlgTitle.bottom - width: objEditor.width - 20 - spacing: 10 - - D.MessageDialog { - id: invalidNameDialog - title: qsTr("LogarithmPlotter - Invalid object name") - text: "" - function showDialog(objectName) { - text = qsTr("An object with the name '%1' already exists.").arg(objectName) - open() - } + // onActionChosen: if(action.key == Qt.Key_Enter || action.key == Qt.Key_Return) action.accepted = false + Item { + anchors { + top: parent.top; + left: parent.left; + bottom: parent.bottom; + right: parent.right; + topMargin: margin; + leftMargin: margin; + bottomMargin: margin; + rightMargin: margin; } - - Setting.TextSetting { - id: nameProperty - height: 30 - label: qsTr("Name") - icon: "common/label.svg" - width: dlgProperties.width - value: objEditor.obj.name - onChanged: function(newValue) { - let newName = Utils.parseName(newValue) - if(newName != '' && objEditor.obj.name != newName) { - if(newName in Objects.currentObjectsByName) { - invalidNameDialog.showDialog(newName) - } else { - history.addToHistory(new HistoryLib.NameChanged( - objEditor.obj.name, objEditor.objType, newName - )) - Objects.renameObject(obj.name, newName) - objEditor.obj = Objects.currentObjects[objEditor.objType][objEditor.objIndex] + + Label { + id: dlgTitle + anchors.left: parent.left + anchors.top: parent.top + verticalAlignment: TextInput.AlignVCenter + text: qsTr("Edit properties of %1 %2").arg(Objects.types[objEditor.objType].displayType()).arg(objEditor.obj.name) + font.pixelSize: 20 + color: sysPalette.windowText + } + + Column { + id: dlgProperties + anchors.top: dlgTitle.bottom + width: objEditor.width - 20 + spacing: 10 + + Native.MessageDialog { + id: invalidNameDialog + title: qsTr("LogarithmPlotter - Invalid object name") + text: "" + function showDialog(objectName) { + text = qsTr("An object with the name '%1' already exists.").arg(objectName) + open() + } + } + + Setting.TextSetting { + id: nameProperty + height: 30 + label: qsTr("Name") + icon: "common/label.svg" + width: dlgProperties.width + value: objEditor.obj.name + onChanged: function(newValue) { + let newName = Utils.parseName(newValue) + if(newName != '' && objEditor.obj.name != newName) { + if(newName in Objects.currentObjectsByName) { + invalidNameDialog.showDialog(newName) + } else { + history.addToHistory(new HistoryLib.NameChanged( + objEditor.obj.name, objEditor.objType, newName + )) + Objects.renameObject(obj.name, newName) + objEditor.obj = Objects.currentObjects[objEditor.objType][objEditor.objIndex] + objectListList.update() + } + } + } + } + + Setting.ComboBoxSetting { + id: labelContentProperty + height: 30 + width: dlgProperties.width + label: qsTr("Label content") + model: [qsTr("null"), qsTr("name"), qsTr("name + value")] + property var idModel: ["null", "name", "name + value"] + icon: "common/label.svg" + currentIndex: idModel.indexOf(objEditor.obj.labelContent) + onActivated: function(newIndex) { + if(idModel[newIndex] != objEditor.obj.labelContent) { + objEditor.obj.labelContent = idModel[newIndex] + objEditor.obj.update() objectListList.update() } } } - } - - Setting.ComboBoxSetting { - id: labelContentProperty - height: 30 - width: dlgProperties.width - label: qsTr("Label content") - model: [qsTr("null"), qsTr("name"), qsTr("name + value")] - property var idModel: ["null", "name", "name + value"] - icon: "common/label.svg" - currentIndex: idModel.indexOf(objEditor.obj.labelContent) - onActivated: function(newIndex) { - if(idModel[newIndex] != objEditor.obj.labelContent) { - objEditor.obj.labelContent = idModel[newIndex] - objEditor.obj.update() + + // Dynamic properties + CustomPropertyList { + id: dlgCustomProperties + obj: objEditor.obj + + onChanged: { + obj.update() objectListList.update() } } } - - // Dynamic properties - CustomPropertyList { - id: dlgCustomProperties - obj: objEditor.obj - - onChanged: { - obj.update() - objectListList.update() - } - } } /*! - \qmlmethod void EditorDialog::show() + \qmlmethod void EditorDialog::open() Shows the editor after the object to be edited is set. */ - function show() { + function open() { dlgCustomProperties.model = [] // Reset let objProps = Objects.types[objEditor.objType].properties() dlgCustomProperties.model = Object.keys(objProps).map(prop => [prop, objProps[prop]]) // Converted to 2-dimentional array. - objEditor.open() + objEditor.show() } } diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/ObjectLists/ObjectCreationGrid.qml b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/ObjectLists/ObjectCreationGrid.qml index bba2622..133971d 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/ObjectLists/ObjectCreationGrid.qml +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/ObjectLists/ObjectCreationGrid.qml @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 @@ -16,8 +16,8 @@ * along with this program. If not, see . */ -import QtQuick 2.12 -import QtQuick.Controls 2.12 +import QtQuick +import QtQuick.Controls import "../js/objects.js" as Objects import "../js/historylib.js" as HistoryLib import eu.ad5001.LogarithmPlotter.Setting 1.0 as Setting @@ -95,7 +95,7 @@ Column { objectEditor.obj = Objects.currentObjects[modelData][Objects.currentObjects[modelData].length - 1] objectEditor.objType = modelData objectEditor.objIndex = Objects.currentObjects[modelData].length - 1 - objectEditor.show() + objectEditor.open() } } } diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/ObjectLists/ObjectLists.qml b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/ObjectLists/ObjectLists.qml index 99e08a7..4fa963d 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/ObjectLists/ObjectLists.qml +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/ObjectLists/ObjectLists.qml @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 @@ -16,9 +16,9 @@ * along with this program. If not, see . */ -import QtQuick 2.12 -import QtQuick.Dialogs 1.3 as D -import QtQuick.Controls 2.12 +import QtQuick +// import QtQuick.Dialogs 1.3 as D +import QtQuick.Controls import eu.ad5001.LogarithmPlotter.Setting 1.0 as Setting import eu.ad5001.LogarithmPlotter.ObjectLists.Editor 1.0 as Editor import "../js/objects.js" as Objects diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/ObjectLists/ObjectRow.qml b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/ObjectLists/ObjectRow.qml index ca02fe9..c5e2918 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/ObjectLists/ObjectRow.qml +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/ObjectLists/ObjectRow.qml @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 @@ -16,10 +16,10 @@ * along with this program. If not, see . */ -import QtQuick 2.12 -import QtQuick.Dialogs 1.3 as D -import QtQuick.Controls 2.12 -import QtQuick.Window 2.12 +import QtQuick +import QtQuick.Dialogs +import QtQuick.Controls +import QtQuick.Window import eu.ad5001.LogarithmPlotter.Setting 1.0 as Setting import "../js/objects.js" as Objects import "../js/historylib.js" as HistoryLib @@ -115,7 +115,7 @@ Item { objEditor.objType = obj.type objEditor.objIndex = index //objEditor.editingRow = objectRow - objEditor.show() + objEditor.open() } } } @@ -193,9 +193,9 @@ Item { } } - D.ColorDialog { + ColorDialog { id: pickColor - color: obj.color + selectedColor: obj.color title: qsTr("Pick new color for %1 %2").arg(obj.constructor.displayType()).arg(obj.name) onAccepted: { history.addToHistory(new HistoryLib.ColorChanged( diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/PickLocationOverlay.qml b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/PickLocationOverlay.qml index 5460160..5173a24 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/PickLocationOverlay.qml +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/PickLocationOverlay.qml @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 @@ -16,8 +16,9 @@ * along with this program. If not, see . */ -import QtQuick 2.12 -import QtQuick.Controls 2.12 +import QtQuick +import QtQuick.Controls +import eu.ad5001.LogarithmPlotter.Setting 1.0 as Setting import "js/objects.js" as Objects import "js/mathlib.js" as MathLib import "js/historylib.js" as HistoryLib @@ -36,6 +37,7 @@ import "js/historylib.js" as HistoryLib Item { id: pickerRoot visible: false + clip: true /*! \qmlproperty var PickLocationOverlay::canvas @@ -90,7 +92,7 @@ Item { hoverEnabled: parent.visible cursorShape: Qt.CrossCursor acceptedButtons: Qt.LeftButton | Qt.RightButton - onClicked: { + onClicked: function(mouse) { if(mouse.button == Qt.LeftButton) { // Validate let newValueX = !parent.pickX ? null : parseValue(picked.mouseX.toString(), objType, propertyX) let newValueY = !parent.pickY ? null : parseValue(picked.mouseY.toString(), objType, propertyY) @@ -120,31 +122,96 @@ Item { } } - Row { - height: precisionSlider.height - Text { - text: " "+ qsTr("Pointer precision:") + " " - color: 'black' - anchors.verticalCenter: parent.verticalCenter - } + + + Rectangle { + id: pickerSettings + radius: 15 + color: sysPalette.window + width: pickerSettingsColumn.width + 30; + height: pickerSettingsColumn.height + 20 + property bool folded: false; + x: -15 - ((width-55) * folded); + y: 10 + z: 2 - Slider { - id: precisionSlider - from: 0 - value: 2 - to: 10 - stepSize: 1 - ToolTip { - parent: precisionSlider.handle - visible: precisionSlider.pressed - text: precisionSlider.value.toFixed(0) + Row { + id: pickerSettingsColumn + anchors { + left: parent.left + top: parent.top + leftMargin: 20 + topMargin: 10 + } + spacing: 15 + property int cellHeight: 15 + + Column { + spacing: 5 + width: 100 + + Text { + text: qsTr("Pointer precision:") + color: sysPalette.windowText + verticalAlignment: Text.AlignVCenter + height: pickerSettingsColumn.cellHeight + } + + Text { + text: qsTr("Snap to grid") + ":" + color: sysPalette.windowText + verticalAlignment: Text.AlignVCenter + height: pickerSettingsColumn.cellHeight + } + } + + Column { + spacing: 5 + + Slider { + id: precisionSlider + from: 0 + value: 2 + to: 10 + stepSize: 1 + height: pickerSettingsColumn.cellHeight + + ToolTip { + parent: precisionSlider.handle + visible: precisionSlider.pressed + text: precisionSlider.value.toFixed(0) + } + } + + CheckBox { + id: snapToGridCheckbox + height: pickerSettingsColumn.cellHeight + // text: qsTr("Snap to grid") + checked: false + } + } + + Button { + width: 24 + anchors.top: parent.top + anchors.bottom: parent.bottom + flat: true + + onClicked: pickerSettings.folded = !pickerSettings.folded + + ToolTip.visible: hovered + ToolTip.delay: 200 + ToolTip.text: pickerSettings.folded ? qsTr("Open picker settings") : qsTr("Hide picker settings") + + Setting.Icon { + anchors.verticalCenter: parent.verticalCenter + anchors.horizontalCenter: parent.horizontalCenter + width: 18 + height: 18 + color: sysPalette.windowText + source: `../icons/common/settings.svg` + } } - } - - CheckBox { - id: snapToGridCheckbox - text: qsTr("Snap to grid") - checked: false } } diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Popup/About.qml b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Popup/About.qml index 7e1687c..406c348 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Popup/About.qml +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Popup/About.qml @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 @@ -16,9 +16,8 @@ * along with this program. If not, see . */ -import QtQuick 2.12 -import QtQuick.Dialogs 1.3 as D -import QtQuick.Controls 2.12 +import QtQuick +import QtQuick.Controls /*! \qmltype About @@ -27,98 +26,112 @@ import QtQuick.Controls 2.12 \sa LogarithmPlotter */ -D.Dialog { +BaseDialog { id: about title: qsTr("About LogarithmPlotter") width: 400 - height: 600 + minimumHeight: 600 - Image { - id: logo - source: "../icons/logarithmplotter.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 - } - - Label { - 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: qsTr("LogarithmPlotter v%1").arg(Helper.getVersion()) - } - - Label { - 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: qsTr("2D plotter software to make BODE plots, sequences and repartition functions.") - } - - Label { - 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() - } - - Label { - 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 © 2022 Ad5001 <mail@ad5001.eu>
+ Item { + anchors { + top: parent.top; + left: parent.left; + bottom: parent.bottom; + right: parent.right; + topMargin: margin; + leftMargin: margin; + bottomMargin: margin; + rightMargin: margin; + } + + Image { + id: logo + source: "../icons/logarithmplotter.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 + } + + Label { + 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: qsTr("LogarithmPlotter v%1").arg(Helper.getVersion()) + } + + Label { + 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: qsTr("2D plotter software to make BODE plots, sequences and repartition functions.") + } + + Label { + 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() + } + + Label { + 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 © 2023 Ad5001 <mail@ad5001.eu>

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 http://www.gnu.org/licenses/." - onLinkActivated: Qt.openUrlExternally(link) - } - - Row { - anchors.top: copyrightInfos.bottom - anchors.horizontalCenter: parent.horizontalCenter - anchors.topMargin: 10 - spacing: 5 - - Button { - id: openIssueButton - text: qsTr('Report a bug') - icon.name: 'tools-report-bug' - onClicked: Qt.openUrlExternally('https://git.ad5001.eu/Ad5001/LogarithmPlotter') + onLinkActivated: Qt.openUrlExternally(link) } - Button { - id: officialWebsiteButton - text: qsTr('Official website') - icon.name: 'web-browser' - onClicked: Qt.openUrlExternally('https://apps.ad5001.eu/logarithmplotter/') + Row { + id: buttonsRow + anchors.top: copyrightInfos.bottom + anchors.horizontalCenter: parent.horizontalCenter + anchors.topMargin: 10 + spacing: 5 + + Button { + id: openIssueButton + text: qsTr('Report a bug') + icon.name: 'tools-report-bug' + onClicked: Qt.openUrlExternally('https://git.ad5001.eu/Ad5001/LogarithmPlotter') + } + + Button { + id: officialWebsiteButton + text: qsTr('Official website') + icon.name: 'web-browser' + onClicked: Qt.openUrlExternally('https://apps.ad5001.eu/logarithmplotter/') + } } } } diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Popup/Alert.qml b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Popup/Alert.qml index 4b54697..dda9e01 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Popup/Alert.qml +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Popup/Alert.qml @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import QtQuick 2.12 +import QtQuick /*! \qmltype Alert \inqmlmodule eu.ad5001.LogarithmPlotter.Popup diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Popup/BaseDialog.qml b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Popup/BaseDialog.qml new file mode 100644 index 0000000..05de55c --- /dev/null +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Popup/BaseDialog.qml @@ -0,0 +1,54 @@ +/** + * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. + * Copyright (C) 2023 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 . + */ + +import QtQuick +import QtQuick.Controls + +/*! + \qmltype BaseDialog + \inqmlmodule eu.ad5001.LogarithmPlotter.Popup + \brief Base dialog window in replacement of Dialog Popup from Qt 5. + + \sa LogarithmPlotter +*/ + +Window { + color: sysPalette.window + visible: false; + flags: Qt.Dialog | Qt.Popup | Qt.MSWindowsFixedSizeDialogHint + modality: Qt.WindowModal + minimumWidth: width + maximumWidth: width + height: minimumHeight + // maximumHeight: contentItem.implicitHeight + 2*margin + property int margin: 10 + + Button { + id: closeButton + anchors.bottom: parent.bottom + anchors.right: parent.right + anchors.bottomMargin: margin + anchors.rightMargin: margin + text: qsTr('Close') + onClicked: close() + } + + function open() { + show() + } +} diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Popup/Changelog.qml b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Popup/Changelog.qml index 0bf9247..b7efb83 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Popup/Changelog.qml +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Popup/Changelog.qml @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 @@ -16,8 +16,8 @@ * along with this program. If not, see . */ -import QtQuick 2.12 -import QtQuick.Controls 2.12 +import QtQuick +import QtQuick.Controls /*! \qmltype Changelog diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Popup/FileDialog.qml b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Popup/FileDialog.qml index dc5c8c8..6061ac8 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Popup/FileDialog.qml +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Popup/FileDialog.qml @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import QtQuick.Dialogs 1.3 as D +import Qt.labs.platform /*! \qmltype FileDialog @@ -25,7 +25,7 @@ import QtQuick.Dialogs 1.3 as D \sa LogarithmPlotter, Settings */ -D.FileDialog { +FileDialog { id: fileDialog property bool exportMode: false @@ -33,6 +33,6 @@ D.FileDialog { title: exportMode ? qsTr("Export Logarithm Plot file") : qsTr("Import Logarithm Plot file") nameFilters: ["Logarithm Plot File (*.lpf)", "All files (*)"] - folder: shortcuts.documents - selectExisting: !exportMode + defaultSuffix: 'lpf' + fileMode: exportMode ? FileDialog.SaveFile : FileDialog.OpenFile } diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Popup/GreetScreen.qml b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Popup/GreetScreen.qml index 7a6a921..e9ae5f1 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Popup/GreetScreen.qml +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Popup/GreetScreen.qml @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 @@ -16,8 +16,8 @@ * along with this program. If not, see . */ -import QtQuick 2.12 -import QtQuick.Controls 2.12 +import QtQuick +import QtQuick.Controls import "../js/math/latex.js" as Latex /*! diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Popup/InsertCharacter.qml b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Popup/InsertCharacter.qml index bbeb3e0..57f7e7d 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Popup/InsertCharacter.qml +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Popup/InsertCharacter.qml @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 @@ -16,8 +16,8 @@ * along with this program. If not, see . */ -import QtQuick.Controls 2.12 -import QtQuick 2.12 +import QtQuick.Controls +import QtQuick /*! \qmltype InsertCharacter diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Popup/ThanksTo.qml b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Popup/ThanksTo.qml index fce6d1c..80a0c2d 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Popup/ThanksTo.qml +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Popup/ThanksTo.qml @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 @@ -16,9 +16,9 @@ * along with this program. If not, see . */ -import QtQuick 2.12 -import QtQuick.Dialogs 1.3 as D -import QtQuick.Controls 2.12 +import QtQuick +import QtQuick.Dialogs +import QtQuick.Controls /*! \qmltype ThanksTo @@ -27,14 +27,24 @@ import QtQuick.Controls 2.12 \sa LogarithmPlotter */ -D.Dialog { +BaseDialog { id: about title: qsTr("Thanks and Contributions - LogarithmPlotter") - width: 400 - height: 600 + width: 450 + minimumHeight: 710 Column { - anchors.fill: parent + anchors { + top: parent.top; + left: parent.left; + bottom: parent.bottom; + right: parent.right; + topMargin: margin; + leftMargin: margin; + bottomMargin: margin; + rightMargin: margin; + } + spacing: 10 ListView { diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Popup/qmldir b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Popup/qmldir index fb7800e..9306fae 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Popup/qmldir +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Popup/qmldir @@ -1,5 +1,6 @@ module eu.ad5001.LogarithmPlotter.Popup +BaseDialog 1.0 BaseDialog.qml About 1.0 About.qml Alert 1.0 Alert.qml FileDialog 1.0 FileDialog.qml diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Setting/AutocompletionCategory.qml b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Setting/AutocompletionCategory.qml index 7e9f683..df2f9f3 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Setting/AutocompletionCategory.qml +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Setting/AutocompletionCategory.qml @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 @@ -16,8 +16,8 @@ * along with this program. If not, see . */ -import QtQuick 2.12 -import QtQuick.Controls 2.12 +import QtQuick +import QtQuick.Controls /*! \qmltype AutocompletionCategory diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Setting/ComboBoxSetting.qml b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Setting/ComboBoxSetting.qml index bd572e3..936718f 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Setting/ComboBoxSetting.qml +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Setting/ComboBoxSetting.qml @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 @@ -16,8 +16,8 @@ * along with this program. If not, see . */ -import QtQuick 2.12 -import QtQuick.Controls 2.12 +import QtQuick +import QtQuick.Controls /*! \qmltype ComboBoxSetting diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Setting/ExpressionEditor.qml b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Setting/ExpressionEditor.qml index 0e976b8..1735278 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Setting/ExpressionEditor.qml +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Setting/ExpressionEditor.qml @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 @@ -16,9 +16,9 @@ * along with this program. If not, see . */ -import QtQuick.Controls 2.12 -import QtQuick 2.12 -import QtQuick.Dialogs 1.3 as D +import QtQuick.Controls +import QtQuick +import Qt.labs.platform as Native import eu.ad5001.LogarithmPlotter.Popup 1.0 as P import "../js/mathlib.js" as MathLib import "../js/utils.js" as Utils @@ -186,7 +186,7 @@ Item { visible: control.label != "" } - D.MessageDialog { + Native.MessageDialog { id: parsingErrorDialog title: qsTranslate("expression", "LogarithmPlotter - Parsing error") text: "" @@ -388,7 +388,7 @@ Item { property string objectName: isEnteringProperty ? (parent.currentToken.dot ? parent.previousToken.value : parent.previousToken2.value) : "" - property bool doesObjectExist: isEnteringProperty && objectName in Objects.currentObjectsByName + property bool doesObjectExist: isEnteringProperty && (objectName in Objects.currentObjectsByName) property var objectProperties: doesObjectExist ? Objects.currentObjectsByName[objectName].constructor.properties() : {} diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Setting/Icon.qml b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Setting/Icon.qml index 7cf3b31..7fa45e7 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Setting/Icon.qml +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Setting/Icon.qml @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 @@ -15,9 +15,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -import QtQuick 2.12 -import QtQuick.Window 2.12 -import QtGraphicalEffects 1.0 +import QtQuick +import QtQuick.Window +import Qt5Compat.GraphicalEffects /*! \qmltype Icon @@ -47,11 +47,11 @@ Item { id: img height: parent.height width: parent.width - //smooth: true visible: false sourceSize.width: width*Screen.devicePixelRatio sourceSize.height: width*Screen.devicePixelRatio } + ColorOverlay { anchors.fill: img source: img diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Setting/ListSetting.qml b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Setting/ListSetting.qml index c71fddd..30724b2 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Setting/ListSetting.qml +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Setting/ListSetting.qml @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 @@ -16,9 +16,9 @@ * along with this program. If not, see . */ -import QtQuick 2.12 -import QtQuick.Controls 2.12 -import QtQml.Models 2.12 +import QtQuick +import QtQuick.Controls +import QtQml.Models /*! \qmltype ListSetting @@ -140,8 +140,8 @@ Column { visible: control.dictionaryMode height: parent.height width: visible ? 50 : 0 - validator: RegExpValidator { - regExp: control.keyRegexp + validator: RegularExpressionValidator { + regularExpression: control.keyRegexp } verticalAlignment: TextInput.AlignVCenter horizontalAlignment: TextInput.AlignHCenter @@ -180,8 +180,8 @@ Column { id: valueInput height: parent.height width: parent.width - x - deleteButton.width - 5 - validator: RegExpValidator { - regExp: control.valueRegexp + validator: RegularExpressionValidator { + regularExpression: control.valueRegexp } verticalAlignment: TextInput.AlignVCenter horizontalAlignment: TextInput.AlignHCenter diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Setting/TextSetting.qml b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Setting/TextSetting.qml index 1d1073f..2c6ea9a 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Setting/TextSetting.qml +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Setting/TextSetting.qml @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 @@ -16,8 +16,8 @@ * along with this program. If not, see . */ -import QtQuick.Controls 2.12 -import QtQuick 2.12 +import QtQuick.Controls +import QtQuick import eu.ad5001.LogarithmPlotter.Popup 1.0 as Popup /*! @@ -113,8 +113,8 @@ Item { verticalAlignment: TextInput.AlignVCenter horizontalAlignment: control.label == "" ? TextInput.AlignLeft : TextInput.AlignHCenter color: sysPalette.windowText - validator: RegExpValidator { - regExp: control.isInt ? /-?[0-9]+/ : control.isDouble ? /-?[0-9]+(\.[0-9]+)?/ : /.+/ + validator: RegularExpressionValidator { + regularExpression: control.isInt ? /-?[0-9]+/ : control.isDouble ? /-?[0-9]+(\.[0-9]+)?/ : /.+/ } focus: true text: control.defValue diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Settings.qml b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Settings.qml index 6bde410..39c508f 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Settings.qml +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Settings.qml @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 @@ -16,8 +16,8 @@ * along with this program. If not, see . */ -import QtQuick.Controls 2.12 -import QtQuick 2.12 +import QtQuick.Controls +import QtQuick import eu.ad5001.LogarithmPlotter.Setting 1.0 as Setting import eu.ad5001.LogarithmPlotter.Popup 1.0 as Popup import "js/utils.js" as Utils @@ -135,7 +135,7 @@ ScrollView { Popup.FileDialog { id: fdiag onAccepted: { - var filePath = fileUrl.toString().substr(7) + var filePath = fdiag.currentFile.toString().substr(7) settings.saveFilename = filePath if(exportMode) { root.saveDiagram(filePath) diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/icons/common/settings.svg b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/icons/common/settings.svg new file mode 100644 index 0000000..4fb694d --- /dev/null +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/icons/common/settings.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/history/color.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/history/color.js index 4c52aa7..ff4bc54 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/history/color.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/history/color.js @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/history/common.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/history/common.js index 0cdf6a7..96020fa 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/history/common.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/history/common.js @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/history/create.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/history/create.js index 7545372..f47f686 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/history/create.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/history/create.js @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/history/delete.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/history/delete.js index 407f29c..8f651d0 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/history/delete.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/history/delete.js @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/history/editproperty.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/history/editproperty.js index 17cc28f..799d26b 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/history/editproperty.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/history/editproperty.js @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/history/name.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/history/name.js index 0ec790d..aa0299e 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/history/name.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/history/name.js @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/history/position.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/history/position.js index 1a2ba46..761d7c4 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/history/position.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/history/position.js @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/history/visibility.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/history/visibility.js index ec1a5c8..20f4c31 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/history/visibility.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/history/visibility.js @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/historylib.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/historylib.js index 70542af..fb43342 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/historylib.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/historylib.js @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/math/common.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/math/common.js index 156394b..59297d8 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/math/common.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/math/common.js @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/math/domain.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/math/domain.js index 48c23cf..25f04d2 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/math/domain.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/math/domain.js @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/math/expression.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/math/expression.js index 9993152..9c9ae49 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/math/expression.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/math/expression.js @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/math/latex.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/math/latex.js index 9ebdf6d..69b7d8c 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/math/latex.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/math/latex.js @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/math/sequence.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/math/sequence.js index 0c43b30..b3e6f51 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/math/sequence.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/math/sequence.js @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/mathlib.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/mathlib.js index 1013f82..3d13340 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/mathlib.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/mathlib.js @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objects.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objects.js index 5fc5d6a..d57f18d 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objects.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objects.js @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/autoload.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/autoload.js index 5044942..045cf48 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/autoload.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/autoload.js @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/common.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/common.js index 5046005..896b0cf 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/common.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/common.js @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/function.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/function.js index 85a798f..80ebe3c 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/function.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/function.js @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/gainbode.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/gainbode.js index 84f271b..52452f7 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/gainbode.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/gainbode.js @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/phasebode.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/phasebode.js index 528910b..4ffd5a7 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/phasebode.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/phasebode.js @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/point.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/point.js index 760ab68..1f27690 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/point.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/point.js @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/repartition.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/repartition.js index dc20a73..7a98b56 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/repartition.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/repartition.js @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/sequence.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/sequence.js index 484b7a4..b5cc866 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/sequence.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/sequence.js @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/sommegainsbode.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/sommegainsbode.js index 70e7440..b9e04ce 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/sommegainsbode.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/sommegainsbode.js @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/sommephasesbode.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/sommephasesbode.js index 5d3f0da..8f16693 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/sommephasesbode.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/sommephasesbode.js @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/text.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/text.js index 99e9936..11ac049 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/text.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/text.js @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/xcursor.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/xcursor.js index 4d6eb60..5321296 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/xcursor.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/objs/xcursor.js @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parameters.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parameters.js index c8d34ca..03e4c9e 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parameters.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parameters.js @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parsing/ast.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parsing/ast.js index 30633b6..eca0f78 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parsing/ast.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parsing/ast.js @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parsing/builder.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parsing/builder.js index b81b6e1..a165b69 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parsing/builder.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parsing/builder.js @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parsing/common.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parsing/common.js index 05960fd..4e7f6fe 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parsing/common.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parsing/common.js @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parsing/parsing.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parsing/parsing.js index 6dfe932..5cf9f9b 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parsing/parsing.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parsing/parsing.js @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parsing/polyfill.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parsing/polyfill.js index 9f750d8..d723444 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parsing/polyfill.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parsing/polyfill.js @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parsing/reference.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parsing/reference.js index 66d8bf0..ddc3bdd 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parsing/reference.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parsing/reference.js @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parsing/tokenizer.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parsing/tokenizer.js index 63358c0..e782e6f 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parsing/tokenizer.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/parsing/tokenizer.js @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/utils.js b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/utils.js index da52902..466fc9f 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/utils.js +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/js/utils.js @@ -1,6 +1,6 @@ /** * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 diff --git a/LogarithmPlotter/util/config.py b/LogarithmPlotter/util/config.py index 4f19fd3..79c0bb7 100644 --- a/LogarithmPlotter/util/config.py +++ b/LogarithmPlotter/util/config.py @@ -1,6 +1,6 @@ """ * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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,7 +19,7 @@ from os import path, environ, makedirs from platform import system from json import load, dumps -from PySide2.QtCore import QLocale, QTranslator +from PySide6.QtCore import QLocale, QTranslator DEFAULT_SETTINGS = { diff --git a/LogarithmPlotter/util/helper.py b/LogarithmPlotter/util/helper.py index df3dba3..8cf7891 100644 --- a/LogarithmPlotter/util/helper.py +++ b/LogarithmPlotter/util/helper.py @@ -1,6 +1,6 @@ """ * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 @@ -16,11 +16,11 @@ * along with this program. If not, see . """ -from PySide2.QtWidgets import QMessageBox, QApplication -from PySide2.QtCore import QRunnable, QThreadPool, QThread, QObject, Signal, Slot, QCoreApplication -from PySide2.QtQml import QQmlApplicationEngine -from PySide2.QtGui import QImage -from PySide2 import __version__ as PySide2_version +from PySide6.QtWidgets import QMessageBox, QApplication +from PySide6.QtCore import QRunnable, QThreadPool, QThread, QObject, Signal, Slot, QCoreApplication +from PySide6.QtQml import QQmlApplicationEngine +from PySide6.QtGui import QImage +from PySide6 import __version__ as PySide6_version from os import chdir, path from json import loads @@ -150,9 +150,9 @@ class Helper(QObject): @Slot(result=str) def getDebugInfos(self): """ - Returns the version info about Qt, PySide2 & Python + Returns the version info about Qt, PySide6 & Python """ - return QCoreApplication.translate('main',"Built with PySide2 (Qt) v{} and python v{}").format(PySide2_version, sys_version.split("\n")[0]) + return QCoreApplication.translate('main',"Built with PySide6 (Qt) v{} and python v{}").format(PySide6_version, sys_version.split("\n")[0]) @Slot() def fetchChangelog(self): diff --git a/LogarithmPlotter/util/latex.py b/LogarithmPlotter/util/latex.py index 35d8d46..e2d9823 100644 --- a/LogarithmPlotter/util/latex.py +++ b/LogarithmPlotter/util/latex.py @@ -1,6 +1,6 @@ """ * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 @@ -16,9 +16,9 @@ * along with this program. If not, see . """ -from PySide2.QtCore import QObject, Slot, Property, QCoreApplication -from PySide2.QtGui import QImage, QColor -from PySide2.QtWidgets import QApplication, QMessageBox +from PySide6.QtCore import QObject, Slot, Property, QCoreApplication +from PySide6.QtGui import QImage, QColor +from PySide6.QtWidgets import QApplication, QMessageBox from os import path, remove from string import Template diff --git a/LogarithmPlotter/util/native.py b/LogarithmPlotter/util/native.py index 2ac1b1b..40ec810 100644 --- a/LogarithmPlotter/util/native.py +++ b/LogarithmPlotter/util/native.py @@ -1,6 +1,6 @@ """ * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 @@ -18,7 +18,7 @@ # This file contains stuff for native interactions with each OS. -from PySide2.QtCore import QObject, QEvent +from PySide6.QtCore import QObject, QEvent # On macOS, opening a file through finder can only be fetched through the # QFileOpenEvent and NOT throught command line parameters. diff --git a/LogarithmPlotter/util/update.py b/LogarithmPlotter/util/update.py index 5d8917e..d159a7a 100644 --- a/LogarithmPlotter/util/update.py +++ b/LogarithmPlotter/util/update.py @@ -1,6 +1,6 @@ """ * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 @@ -16,7 +16,7 @@ * along with this program. If not, see . """ -from PySide2.QtCore import QRunnable, QThreadPool, QThread, QObject, Signal, QCoreApplication +from PySide6.QtCore import QRunnable, QThreadPool, QThread, QObject, Signal, QCoreApplication from urllib.request import urlopen from urllib.error import HTTPError, URLError from sys import argv diff --git a/README.md b/README.md index bb99c41..f3dc862 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ There are several ways to contribute to LogarithmPlotter. ## Legal notice LogarithmPlotter - 2D plotter software to make BODE plots, sequences and repartition functions. - Copyright (C) 2022 Ad5001 + Copyright (C) 2023 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 diff --git a/ci/drone.yml b/ci/drone.yml index 249cbc3..591934e 100644 --- a/ci/drone.yml +++ b/ci/drone.yml @@ -12,10 +12,8 @@ steps: - git submodule update --init --recursive - name: Linux test - image: ad5001/ubuntu-pyside2-xvfb:hirsute-5.15.2 + image: ad5001/ubuntu-pyside6-xvfb:jammy-6.5.0 commands: - #- apt update - #- apt install -y texlive-latex-base dvipng - xvfb-run python3 run.py --test-build --no-check-for-updates - xvfb-run python3 run.py --test-build --no-check-for-updates ./ci/test1.lpf - xvfb-run python3 run.py --test-build --no-check-for-updates ./ci/test2.lpf @@ -23,7 +21,7 @@ steps: event: [ push, tag ] - name: Windows test - image: ad5001/ubuntu-pyside2-xvfb-wine:win7-5.15.2 + image: ad5001/ubuntu-pyside6-xvfb-wine:jammy-6.5.0 commands: - # For some reason, launching GUI apps with wine, even with xvfb-run, fails. - xvfb-run python run.py --test-build --no-check-for-updates @@ -33,19 +31,19 @@ steps: event: [ push, tag ] -- name: Linux packaging - image: ad5001/accountfree-build-img:hirsute-5.15.2 - commands: - - bash scripts/package-linux.sh - when: - event: [ push, tag ] - - -- name: Windows building - image: ad5001/accountfree-build-img-wine:win7-5.15.2 - commands: - - bash scripts/build-wine.sh - - bash scripts/package-wine.sh - when: - event: [ push, tag ] - +# - name: Linux packaging +# image: ad5001/accountfree-build-img:hirsute-5.15.2 +# commands: +# - bash scripts/package-linux.sh +# when: +# event: [ push, tag ] +# +# +# - name: Windows building +# image: ad5001/accountfree-build-img-wine:win7-5.15.2 +# commands: +# - bash scripts/build-wine.sh +# - bash scripts/package-wine.sh +# when: +# event: [ push, tag ] +# diff --git a/run.py b/run.py index faddd86..a1d78a1 100644 --- a/run.py +++ b/run.py @@ -1,6 +1,6 @@ """ * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 diff --git a/scripts/generate_manuals.php b/scripts/generate_manuals.php index ec357dc..615f988 100644 --- a/scripts/generate_manuals.php +++ b/scripts/generate_manuals.php @@ -1,7 +1,7 @@ +# Copyright (C) 2023 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 diff --git a/setup.py b/setup.py index ea494cc..cb3d90a 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ """ * LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions. - * Copyright (C) 2022 Ad5001 + * Copyright (C) 2023 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 @@ -122,7 +122,7 @@ if sys.platform == 'linux': os.remove(os.environ["PREFIX"] + '/icons/hicolor/scalable/apps/logplotter.svg') setuptools.setup( - install_requires=([] if "FLATPAK_INSTALL" in os.environ else ["PySide2"]), + install_requires=([] if "FLATPAK_INSTALL" in os.environ else ["PySide6"]), python_requires='>=3.8', name='logarithmplotter',