main.qml 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. import QtQuick 2.15
  2. import QtQuick.Window 2.15
  3. import QtQuick.Controls 2.15
  4. import myqml 1.0
  5. Window {
  6. id: window
  7. width: 800
  8. height: 600
  9. visible: true
  10. title: qsTr("Hello World")
  11. Column {
  12. spacing: 10
  13. topPadding: 10
  14. AudioWaveform {
  15. id: waveform
  16. Timer {
  17. id: timer
  18. interval: 100
  19. repeat: false
  20. running: false
  21. onTriggered: {
  22. waveform.paintWaveForm()
  23. }
  24. }
  25. width: window.width
  26. height: 100
  27. onWidthChanged: {
  28. timer.restart()
  29. }
  30. }
  31. Spectrum {
  32. id: spectrum
  33. width: window.width
  34. height: 100
  35. }
  36. TimeDomainPlot {
  37. width: window.width
  38. height: 100
  39. }
  40. SpectrumPlot {
  41. width: window.width
  42. height: 100
  43. }
  44. WaveformPlot {
  45. width: window.width
  46. height: 100
  47. onWidthChanged: {
  48. paintWaveForm()
  49. }
  50. }
  51. }
  52. }