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.QtWidgets import QApplication, QMainWindow, QWidget, QVBoxLayout, QTabWidget
from PyQt6.QtCore import Qt
import sys import sys
import os import os
...@@ -6,6 +7,7 @@ from tabs.config_tab import ConfigTab ...@@ -6,6 +7,7 @@ from tabs.config_tab import ConfigTab
from tabs.shifter_tab import ShifterTab from tabs.shifter_tab import ShifterTab
from tabs.depth_tab import DepthTab from tabs.depth_tab import DepthTab
from tabs.material_tab import MaterialTab from tabs.material_tab import MaterialTab
from tabs.edge_net_tab import EdgeNetTab
from utils.config_reader import ConfigReader from utils.config_reader import ConfigReader
class ModuleDebugGUI(QMainWindow): class ModuleDebugGUI(QMainWindow):
...@@ -40,6 +42,7 @@ class ModuleDebugGUI(QMainWindow): ...@@ -40,6 +42,7 @@ class ModuleDebugGUI(QMainWindow):
self.tabs.addTab(ShifterTab(self.config_reader), "Image Shifter") self.tabs.addTab(ShifterTab(self.config_reader), "Image Shifter")
self.tabs.addTab(DepthTab(self.config_reader), "MonoDepth Estimation") self.tabs.addTab(DepthTab(self.config_reader), "MonoDepth Estimation")
self.tabs.addTab(MaterialTab(self.config_reader), "Material Recognition") self.tabs.addTab(MaterialTab(self.config_reader), "Material Recognition")
self.tabs.addTab(EdgeNetTab(self.config_reader), "EdgeNet Execution")
def main(): def main():
app = QApplication(sys.argv) app = QApplication(sys.argv)
......
This diff is collapsed.
# utils/qt_widgets.py # utils/qt_widgets.py
from PyQt6.QtWidgets import (QTextEdit, QGroupBox, QVBoxLayout, from PyQt6.QtWidgets import (QTextEdit, QGroupBox, QVBoxLayout,
QHBoxLayout, QPushButton, QLabel) QHBoxLayout, QPushButton, QLabel,
QMessageBox)
from PyQt6.QtCore import Qt from PyQt6.QtCore import Qt
def create_group_with_text(title, height=100): def create_group_with_text(title, height=100):
...@@ -182,4 +183,13 @@ def get_status_text(status_layout): ...@@ -182,4 +183,13 @@ def get_status_text(status_layout):
str: Current status text str: Current status text
""" """
text = status_layout.itemAt(1).widget().text() text = status_layout.itemAt(1).widget().text()
return text.replace("", "").replace("", "") return text.replace("", "").replace("", "")
\ No newline at end of file
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