Skip to content
Snippets Groups Projects
Commit 96356804 authored by mhby1g21's avatar mhby1g21
Browse files

refactored edge_net_tab.py, lots less lines now, but still have some visual problems

parent 34d72aaf
No related branches found
No related tags found
1 merge request!4GDP 4.2.10 - Adding Debug mode to GUI.py to run individual modules
from PyQt6.QtWidgets import QApplication, QMainWindow, QWidget, QVBoxLayout, QTabWidget
from PyQt6.QtCore import Qt
import sys
import os
......@@ -6,6 +7,7 @@ from tabs.config_tab import ConfigTab
from tabs.shifter_tab import ShifterTab
from tabs.depth_tab import DepthTab
from tabs.material_tab import MaterialTab
from tabs.edge_net_tab import EdgeNetTab
from utils.config_reader import ConfigReader
class ModuleDebugGUI(QMainWindow):
......@@ -40,6 +42,7 @@ class ModuleDebugGUI(QMainWindow):
self.tabs.addTab(ShifterTab(self.config_reader), "Image Shifter")
self.tabs.addTab(DepthTab(self.config_reader), "MonoDepth Estimation")
self.tabs.addTab(MaterialTab(self.config_reader), "Material Recognition")
self.tabs.addTab(EdgeNetTab(self.config_reader), "EdgeNet Execution")
def main():
app = QApplication(sys.argv)
......
This diff is collapsed.
# utils/qt_widgets.py
from PyQt6.QtWidgets import (QTextEdit, QGroupBox, QVBoxLayout,
QHBoxLayout, QPushButton, QLabel)
QHBoxLayout, QPushButton, QLabel,
QMessageBox)
from PyQt6.QtCore import Qt
def create_group_with_text(title, height=100):
......@@ -183,3 +184,12 @@ def get_status_text(status_layout):
"""
text = status_layout.itemAt(1).widget().text()
return text.replace("", "").replace("", "")
def show_confirmation_dialog(parent, title, message):
"""Show a confirmation dialog and return True if user clicks Yes"""
return QMessageBox.question(
parent,
title,
message,
QMessageBox.StandardButton.Yes | QMessageBox.StandardButton.No
) == QMessageBox.StandardButton.Yes
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment