-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettings_window.py
More file actions
28 lines (22 loc) · 911 Bytes
/
settings_window.py
File metadata and controls
28 lines (22 loc) · 911 Bytes
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
from PyQt5.QtWidgets import QMainWindow, QMessageBox
from PyQt5.uic import loadUi
from detection_window import DetectionWindow
class SettingsWindow(QMainWindow):
def __init__(self):
super(SettingsWindow, self).__init__()
loadUi("UI\settings_window.ui", self)
self.detection_window = DetectionWindow()
self.pushButton.clicked.connect(self.go_to_detection)
def displayInfo(self):
self.show()
def go_to_detection(self):
if self.detection_window.isVisible():
print("Detection window is Already Open")
else:
self.detection_window.create_detection_instance()
self.detection_window.start_detection()
def closeEvent(self, event):
if self.detection_window.isVisible():
self.detection_window.detection.running = False
self.detection_window.close()
event.accept()