Final repository
This commit is contained in:
@@ -2,11 +2,14 @@ from PySide6.QtWidgets import (
|
||||
QWidget, QVBoxLayout, QHBoxLayout, QLabel, QComboBox,
|
||||
QSlider, QCheckBox, QPushButton, QGroupBox, QFormLayout,
|
||||
QSpinBox, QDoubleSpinBox, QTabWidget, QLineEdit, QFileDialog,
|
||||
QSpacerItem, QSizePolicy
|
||||
QSpacerItem, QSizePolicy, QScrollArea
|
||||
)
|
||||
from PySide6.QtCore import Qt, Signal, Slot
|
||||
from PySide6.QtGui import QFont
|
||||
|
||||
# Import VLM insights widget
|
||||
from ui.vlm_insights_widget import VLMInsightsWidget
|
||||
|
||||
class ConfigPanel(QWidget):
|
||||
"""Side panel for application configuration."""
|
||||
|
||||
@@ -362,10 +365,62 @@ class ConfigPanel(QWidget):
|
||||
|
||||
violation_layout.addWidget(violation_group)
|
||||
|
||||
# === VLM Insights Tab ===
|
||||
vlm_tab = QWidget()
|
||||
vlm_layout = QVBoxLayout(vlm_tab)
|
||||
|
||||
# Create scroll area for VLM insights
|
||||
vlm_scroll = QScrollArea()
|
||||
vlm_scroll.setWidgetResizable(True)
|
||||
vlm_scroll.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
|
||||
vlm_scroll.setStyleSheet("""
|
||||
QScrollArea {
|
||||
border: none;
|
||||
background: transparent;
|
||||
}
|
||||
""")
|
||||
|
||||
# Add VLM insights widget
|
||||
print("[CONFIG PANEL DEBUG] Creating VLM insights widget...")
|
||||
self.vlm_insights = VLMInsightsWidget()
|
||||
print("[CONFIG PANEL DEBUG] VLM insights widget created successfully")
|
||||
vlm_scroll.setWidget(self.vlm_insights)
|
||||
vlm_layout.addWidget(vlm_scroll)
|
||||
|
||||
# Smart Intersection Tab - Scene Analytics
|
||||
smart_intersection_tab = QWidget()
|
||||
si_layout = QVBoxLayout(smart_intersection_tab)
|
||||
|
||||
# Smart Intersection config widget
|
||||
si_scroll = QScrollArea()
|
||||
si_scroll.setWidgetResizable(True)
|
||||
si_scroll.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
|
||||
si_scroll.setStyleSheet("""
|
||||
QScrollArea {
|
||||
border: none;
|
||||
background: transparent;
|
||||
}
|
||||
""")
|
||||
|
||||
try:
|
||||
from ui.smart_intersection_config import SmartIntersectionConfigPanel
|
||||
self.smart_intersection_config = SmartIntersectionConfigPanel()
|
||||
si_scroll.setWidget(self.smart_intersection_config)
|
||||
print("[CONFIG PANEL DEBUG] Smart Intersection config panel created successfully")
|
||||
except Exception as e:
|
||||
print(f"[CONFIG PANEL DEBUG] Error creating Smart Intersection config: {e}")
|
||||
self.smart_intersection_config = None
|
||||
si_scroll.setWidget(QLabel(f"Smart Intersection config unavailable: {e}"))
|
||||
|
||||
si_layout.addWidget(si_scroll)
|
||||
|
||||
# Add all tabs
|
||||
tabs.addTab(detection_tab, "Detection")
|
||||
tabs.addTab(display_tab, "Display")
|
||||
tabs.addTab(violation_tab, "Violations")
|
||||
tabs.addTab(vlm_tab, "🤖 AI Insights") # Add VLM insights tab
|
||||
tabs.addTab(smart_intersection_tab, "🚦 Smart Intersection") # Add Smart Intersection tab
|
||||
print("[CONFIG PANEL DEBUG] Added AI Insights and Smart Intersection tabs to config panel")
|
||||
|
||||
layout.addWidget(tabs)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user