Added audio analysis page

This commit is contained in:
ppravatto
2024-06-16 14:24:36 +02:00
parent 5f513b1c76
commit 87295d6e9d
6 changed files with 3488 additions and 3394 deletions

View File

@@ -31,6 +31,7 @@
<file>ui/Downloader.qml</file> <file>ui/Downloader.qml</file>
<file>ui/Preferences.qml</file> <file>ui/Preferences.qml</file>
<file>ui/SpaceWeather.qml</file> <file>ui/SpaceWeather.qml</file>
<file>ui/AudioAnalysis.qml</file>
<file>ui/DocumentsManager.qml</file> <file>ui/DocumentsManager.qml</file>
<file>ui/SignalEditor.qml</file> <file>ui/SignalEditor.qml</file>
<file>ui/CategoryEditor.qml</file> <file>ui/CategoryEditor.qml</file>

File diff suppressed because it is too large Load Diff

View File

@@ -17,6 +17,7 @@ from artemis.ui.dbmanager import UIdbmanager
from artemis.ui.signaleditor import UIsignaleditor from artemis.ui.signaleditor import UIsignaleditor
from artemis.ui.downloader import UIDownloader from artemis.ui.downloader import UIDownloader
from artemis.ui.spaceweather import UIspaceweather from artemis.ui.spaceweather import UIspaceweather
from artemis.ui.audioanalysis import UIAudioAnalysis
from artemis.ui.documentsmanager import UIdocumentsmanager from artemis.ui.documentsmanager import UIdocumentsmanager
from artemis.ui.categoryeditor import UIcategoryeditor from artemis.ui.categoryeditor import UIcategoryeditor
@@ -64,6 +65,7 @@ class UIArtemis(QObject):
self.preferences = UIPreferences(self) self.preferences = UIPreferences(self)
self.dbmanager = UIdbmanager(self) self.dbmanager = UIdbmanager(self)
self.spaceweather = UIspaceweather(self) self.spaceweather = UIspaceweather(self)
self.audioanalysis = UIAudioAnalysis(self)
self.docmanager = UIdocumentsmanager(self) self.docmanager = UIdocumentsmanager(self)
self.sigeditor = UIsignaleditor(self) self.sigeditor = UIsignaleditor(self)
self.cateditor = UIcategoryeditor(self) self.cateditor = UIcategoryeditor(self)
@@ -84,6 +86,7 @@ class UIArtemis(QObject):
self._window.updateDb.connect(self.update_db) self._window.updateDb.connect(self.update_db)
self._window.updateArtemis.connect(self.update_artemis) self._window.updateArtemis.connect(self.update_artemis)
self._window.showSpaceWeather.connect(self.show_space_weather_ui) self._window.showSpaceWeather.connect(self.show_space_weather_ui)
self._window.showAudioAnalysis.connect(self.show_audio_analysis_ui)
self._window.openDbDirectory.connect(self.open_db_directory) self._window.openDbDirectory.connect(self.open_db_directory)
self._window.showCatManager.connect(self.open_cat_manager) self._window.showCatManager.connect(self.open_cat_manager)
@@ -211,6 +214,12 @@ class UIArtemis(QObject):
self.spaceweather.load_spaceweather_ui() self.spaceweather.load_spaceweather_ui()
def show_audio_analysis_ui(self):
""" Open the space weather windows
"""
self.audioanalysis.load_audioanalysis_ui()
def show_documentsmanager_ui(self): def show_documentsmanager_ui(self):
""" Open the documents manager windows """ Open the documents manager windows
""" """

View File

@@ -0,0 +1,29 @@
from PySide6.QtQml import QQmlApplicationEngine
from PySide6.QtCore import QObject, Slot, Signal
class UIAudioAnalysis(QObject):
# Python > QML Signals
show_ui = Signal()
def __init__(self, parent):
super().__init__()
self._parent = parent
self._engine = QQmlApplicationEngine()
self._engine.load('qrc:/ui/AudioAnalysis.qml')
self._window = self._engine.rootObjects()[0]
self._connect()
def _connect(self):
# QML > Python connections
# Python > QML connections
self.show_ui.connect(self._window.show)
def load_audioanalysis_ui(self):
self.show_ui.emit()

View File

@@ -31,6 +31,7 @@ Window {
signal showCatManager() signal showCatManager()
signal openSigEditor(string type, var sig_param, bool is_new) signal openSigEditor(string type, var sig_param, bool is_new)
signal showSpaceWeather() signal showSpaceWeather()
signal showAudioAnalysis()
signal checkForUpdate() signal checkForUpdate()
signal updateDb() signal updateDb()
signal updateArtemis() signal updateArtemis()
@@ -322,6 +323,17 @@ Window {
} }
} }
Menu {
title: qsTr("Analysis")
MenuItem {
text: "Audio Analysis"
onClicked: {
showAudioAnalysis()
}
}
}
Menu { Menu {
id: aboutMenu id: aboutMenu
title: qsTr("Help") title: qsTr("Help")

27
ui/AudioAnalysis.qml Normal file
View File

@@ -0,0 +1,27 @@
import QtQuick
import QtQuick.Window
import QtQuick.Controls
import QtQuick.Controls.Material
import QtQuick.Layouts
import QtQuick.Dialogs
Window {
id: window
width: 1100
height: 800
Component.onCompleted: {
x = Screen.width / 2 - width / 2
y = Screen.height / 2 - height / 2
}
title: qsTr("Artemis - Audio Analysis")
modality: Qt.ApplicationModal
flags: Qt.Window
// Windows without upper bar
//flags: Qt.FramelessWindowHint
}