-
Notifications
You must be signed in to change notification settings - Fork 0
/
application.py
42 lines (31 loc) · 1.11 KB
/
application.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
from PyQt6.QtWidgets import QApplication, QMainWindow, QWidget, QVBoxLayout, QHBoxLayout, QLabel
from inspector_widget import InspectorWidget
import sys
class MainWindow(QMainWindow):
def __init__(self) -> None:
super().__init__()
self.setWindowTitle("Visual Inspection")
layout = QVBoxLayout()
# Add Header
header = QLabel("Visual Inspection GUI")
font = header.font()
font.setPointSize(font.pointSize() * 2)
header.setFont(font)
layout.addWidget(header)
# Scanners
scanner_layout = QHBoxLayout()
scanner_layout.addWidget(InspectorWidget("Machine 1", "/dev/ttyACM0"))
scanner_widget = QWidget()
scanner_widget.setLayout(scanner_layout)
layout.addWidget(scanner_widget)
layout.addStretch()
widget = QWidget()
widget.setLayout(layout)
self.setContentsMargins(10, 10, 10, 10)
self.setCentralWidget(widget)
self.showFullScreen()
if __name__ == "__main__":
app = QApplication(sys.argv)
app.setStyle('dark')
window = MainWindow()
app.exec()