-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrtplotter.py
executable file
·65 lines (42 loc) · 1.51 KB
/
rtplotter.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/usr/bin/env python3
import typing
import numpy as np
from PyQt5.QtWidgets import QSplitter,QMainWindow,QMdiArea,QMdiSubWindow,QApplication,QWidget,\
QTreeView
from PyQt5.QtCore import Qt
from msgRecord.messageLog import MessageLog
from msgRecord.ivyRecorder import IvyRecorder
from plotting.plotWidget import PlotWidget,FieldPlotInfo
class RTPlotterMain(QSplitter):
def __init__(self, ivy:IvyRecorder,parent: QWidget | None = None) -> None:
super().__init__(parent)
self.setOrientation(Qt.Orientation.Horizontal)
self.ivyRecorder = ivy
# self.model = IvyModel(ivy)
# self.filteredModel = FilteredIvyModel(self.model)
self.addWidget(QTreeView(self))
self.setStyleSheet("""
QSplitter::handle {
background-color: #575757;
border: 1px solid #777;
width: 13px;
margin-left: 2px;
margin-right: 2px;
border-radius: 4px;
}
""")
mdi = QMdiArea(self)
mdi.setViewMode(QMdiArea.ViewMode.TabbedView)
self.addWidget(mdi)
if __name__ == '__main__':
app = QApplication([])
app.setApplicationName("RT Plotter")
ivy = IvyRecorder(buffer_size=200)
window = QMainWindow()
# window.setAcceptDrops(True)
window.setCentralWidget(PlotWidget(ivy,window))
window.setWindowTitle("Paparazzi RT Plotter")
# window = PlotWidget(ivy)
app.aboutToQuit.connect(ivy.stop)
window.show()
app.exec()