Rewirring paths to improve import names and such.
This commit is contained in:
parent
f52ee65c56
commit
e6de739d0c
22 changed files with 79 additions and 45 deletions
|
@ -20,7 +20,7 @@ import QtQuick
|
|||
import Qt.labs.platform as Native
|
||||
//import QtQuick.Controls 2.15
|
||||
import eu.ad5001.MixedMenu 1.1
|
||||
import "js/index.mjs" as JS
|
||||
import eu.ad5001.LogarithmPlotter.Common
|
||||
|
||||
|
||||
/*!
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
module eu.ad5001.LogarithmPlotter.Common
|
||||
|
||||
JS 1.0 index.mjs
|
|
@ -24,7 +24,7 @@ import eu.ad5001.LogarithmPlotter.Setting 1.0 as Setting
|
|||
|
||||
|
||||
/*!
|
||||
\qmltype HistoryBrowser
|
||||
\qmltype Browser
|
||||
\inqmlmodule eu.ad5001.LogarithmPlotter.History
|
||||
\brief Tab of the drawer that allows to navigate through the undo and redo history.
|
||||
|
||||
|
@ -95,7 +95,7 @@ Item {
|
|||
Repeater {
|
||||
model: historyBrowser.redoCount
|
||||
|
||||
HistoryItem {
|
||||
SingleItem {
|
||||
id: redoButton
|
||||
width: historyBrowser.actionWidth
|
||||
//height: actionHeight
|
||||
|
@ -147,7 +147,7 @@ Item {
|
|||
model: historyBrowser.undoCount
|
||||
|
||||
|
||||
HistoryItem {
|
||||
SingleItem {
|
||||
id: undoButton
|
||||
width: historyBrowser.actionWidth
|
||||
//height: actionHeight
|
|
@ -22,7 +22,7 @@ import eu.ad5001.LogarithmPlotter.Setting 1.0 as Setting
|
|||
|
||||
|
||||
/*!
|
||||
\qmltype HistoryItem
|
||||
\qmltype SingleItem
|
||||
\inqmlmodule eu.ad5001.LogarithmPlotter.History
|
||||
\brief Item representing an history action.
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
module eu.ad5001.LogarithmPlotter.History
|
||||
|
||||
HistoryBrowser 1.0 HistoryBrowser.qml
|
||||
HistoryItem 1.0 HistoryItem.qml
|
||||
Browser 1.0 Browser.qml
|
||||
SingleItem 1.0 SingleItem.qml
|
||||
|
|
|
@ -23,10 +23,11 @@ import QtQuick.Layouts 1.12
|
|||
import QtQuick
|
||||
|
||||
// Auto loading all modules.
|
||||
import "js/index.mjs" as JS
|
||||
import eu.ad5001.LogarithmPlotter.Common
|
||||
|
||||
import eu.ad5001.LogarithmPlotter.History 1.0
|
||||
import eu.ad5001.LogarithmPlotter.History 1.0 as History
|
||||
import eu.ad5001.LogarithmPlotter.ObjectLists 1.0
|
||||
import eu.ad5001.LogarithmPlotter.Overlay 1.0 as Overlay
|
||||
import eu.ad5001.LogarithmPlotter.Popup 1.0 as Popup
|
||||
|
||||
/*!
|
||||
|
@ -120,16 +121,16 @@ ApplicationWindow {
|
|||
|
||||
ObjectLists {
|
||||
id: objectLists
|
||||
onChanged: drawCanvas.requestPaint()
|
||||
onChanged: Modules.Canvas.requestPaint()
|
||||
}
|
||||
|
||||
Settings {
|
||||
id: settings
|
||||
canvas: drawCanvas
|
||||
onChanged: drawCanvas.requestPaint()
|
||||
onChanged: Modules.Canvas.requestPaint()
|
||||
}
|
||||
|
||||
HistoryBrowser {
|
||||
History.Browser {
|
||||
id: historyBrowser
|
||||
}
|
||||
}
|
||||
|
@ -154,18 +155,24 @@ ApplicationWindow {
|
|||
}
|
||||
}
|
||||
|
||||
ViewPositionChangeOverlay {
|
||||
Overlay.ViewPositionChange {
|
||||
id: viewPositionChanger
|
||||
anchors.fill: parent
|
||||
canvas: parent
|
||||
settingsInstance: settings
|
||||
}
|
||||
|
||||
PickLocationOverlay {
|
||||
Overlay.PickLocation {
|
||||
id: positionPicker
|
||||
anchors.fill: parent
|
||||
canvas: parent
|
||||
}
|
||||
|
||||
// Overlay.Loading {
|
||||
// id: loadingOverlay
|
||||
// anchors.fill: parent
|
||||
// canvas: parent
|
||||
// }
|
||||
}
|
||||
|
||||
Timer {
|
||||
|
|
|
@ -20,7 +20,7 @@ import QtQuick
|
|||
import QtQuick.Controls
|
||||
import Qt.labs.platform as Native
|
||||
import eu.ad5001.LogarithmPlotter.Setting 1.0 as Setting
|
||||
import "../../js/index.mjs" as JS
|
||||
import eu.ad5001.LogarithmPlotter.Common
|
||||
|
||||
/*!
|
||||
\qmltype CustomPropertyList
|
||||
|
|
|
@ -18,11 +18,10 @@
|
|||
|
||||
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/index.mjs" as JS
|
||||
import eu.ad5001.LogarithmPlotter.Common
|
||||
|
||||
/*!
|
||||
\qmltype Dialog
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import eu.ad5001.LogarithmPlotter.Setting 1.0 as Setting
|
||||
import "../js/index.mjs" as JS
|
||||
import eu.ad5001.LogarithmPlotter.Common
|
||||
|
||||
|
||||
/*!
|
||||
|
|
|
@ -21,7 +21,7 @@ import QtQuick.Dialogs
|
|||
import QtQuick.Controls
|
||||
import QtQuick.Window
|
||||
import eu.ad5001.LogarithmPlotter.Setting 1.0 as Setting
|
||||
import "../js/index.mjs" as JS
|
||||
import eu.ad5001.LogarithmPlotter.Common
|
||||
|
||||
|
||||
/*!
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
/**
|
||||
* LogarithmPlotter - 2D plotter software to make BODE plots, sequences and distribution functions.
|
||||
* Copyright (C) 2021-2024 Ad5001
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import QtQuick
|
|
@ -18,12 +18,12 @@
|
|||
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import eu.ad5001.LogarithmPlotter.Setting 1.0 as Setting
|
||||
import "js/index.mjs" as JS
|
||||
import eu.ad5001.LogarithmPlotter.Setting as Setting
|
||||
import eu.ad5001.LogarithmPlotter.Common
|
||||
|
||||
/*!
|
||||
\qmltype PickLocationOverlay
|
||||
\inqmlmodule eu.ad5001.LogarithmPlotter
|
||||
\qmltype PickLocation
|
||||
\inqmlmodule eu.ad5001.LogarithmPlotter.Overlay
|
||||
\brief Overlay used to pick a new location for an object.
|
||||
|
||||
Provides an overlay over the canvas that can be shown when the user clicks the "Set position" button
|
||||
|
@ -32,11 +32,13 @@ import "js/index.mjs" as JS
|
|||
|
||||
\sa LogarithmPlotter, LogGraphCanvas
|
||||
*/
|
||||
Item {
|
||||
Rectangle {
|
||||
id: pickerRoot
|
||||
visible: false
|
||||
clip: true
|
||||
|
||||
color: sysPalette.window
|
||||
opacity: 0.35
|
||||
|
||||
/*!
|
||||
\qmlsignal PickLocationOverlay::picked(var obj)
|
||||
|
||||
|
@ -96,11 +98,6 @@ Item {
|
|||
*/
|
||||
readonly property bool userPickY: pickY && pickYCheckbox.checked
|
||||
|
||||
Rectangle {
|
||||
color: sysPalette.window
|
||||
opacity: 0.35
|
||||
anchors.fill: parent
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: picker
|
|
@ -19,7 +19,7 @@
|
|||
import QtQuick
|
||||
|
||||
/*!
|
||||
\qmltype ViewPositionChangeOverlay
|
||||
\qmltype ViewPositionChange.Overlay
|
||||
\inqmlmodule eu.ad5001.LogarithmPlotter
|
||||
\brief Overlay used allow the user to drag the canvas' position and change the zoom level.
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
module eu.ad5001.LogarithmPlotter.Overlay
|
||||
|
||||
PickLocation 1.0 PickLocation.qml
|
||||
ViewPositionChange 1.0 ViewPositionChange.qml
|
|
@ -20,7 +20,7 @@ import QtQuick
|
|||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import eu.ad5001.LogarithmPlotter.Setting 1.0 as Setting
|
||||
import "../js/index.mjs" as JS
|
||||
import eu.ad5001.LogarithmPlotter.Common
|
||||
|
||||
/*!
|
||||
\qmltype Preferences
|
||||
|
|
|
@ -20,7 +20,7 @@ import QtQuick.Controls
|
|||
import QtQuick
|
||||
import Qt.labs.platform as Native
|
||||
import eu.ad5001.LogarithmPlotter.Popup 1.0 as P
|
||||
import "../js/index.mjs" as JS
|
||||
import eu.ad5001.LogarithmPlotter.Common
|
||||
|
||||
|
||||
/*!
|
||||
|
|
|
@ -20,7 +20,7 @@ import QtQuick
|
|||
import QtQuick.Controls
|
||||
import eu.ad5001.LogarithmPlotter.Setting 1.0 as Setting
|
||||
import eu.ad5001.LogarithmPlotter.Popup 1.0 as Popup
|
||||
import "js/index.mjs" as JS
|
||||
import eu.ad5001.LogarithmPlotter.Common
|
||||
|
||||
/*!
|
||||
\qmltype Settings
|
||||
|
|
|
@ -2,6 +2,4 @@ module eu.ad5001.LogarithmPlotter
|
|||
|
||||
AppMenuBar 1.0 AppMenuBar.qml
|
||||
LogGraphCanvas 1.0 LogGraphCanvas.qml
|
||||
PickLocationOverlay 1.0 PickLocationOverlay.qml
|
||||
Settings 1.0 Settings.qml
|
||||
ViewPositionChangeOverlay 1.0 ViewPositionChangeOverlay.qml
|
|
@ -181,7 +181,6 @@ class Latex(QObject):
|
|||
"""
|
||||
markup_hash, render_hash, export_path = self.create_export_path(latex_markup, font_size, color)
|
||||
if self.latexSupported and not path.exists(export_path + ".png"):
|
||||
print("Rendering", latex_markup)
|
||||
# Generating file
|
||||
latex_path = path.join(self.tempdir, str(markup_hash))
|
||||
# If the formula is just recolored or the font is just changed, no need to recreate the DVI.
|
||||
|
|
|
@ -100,6 +100,7 @@ class PyPromise(QObject):
|
|||
Starts the thread that will run the promise.
|
||||
"""
|
||||
if not self._started: # Avoid getting started twice.
|
||||
print("Starting", self._runner.args)
|
||||
QThreadPool.globalInstance().start(self._runner)
|
||||
self._started = True
|
||||
|
||||
|
@ -153,6 +154,7 @@ class PyPromise(QObject):
|
|||
def _fulfill(self, data):
|
||||
self._state = "fulfilled"
|
||||
no_return = [None, QJSValue.SpecialValue.UndefinedValue]
|
||||
print("Finished", self._runner.args)
|
||||
for i in range(len(self._fulfills)):
|
||||
try:
|
||||
result = self._fulfills[i](data)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue