""" About Dialog Displays information about the DuDONG application, including: - Project description - Version information - Development team - Partners and acknowledgments - Partner logos """ from PyQt5.QtWidgets import (QDialog, QVBoxLayout, QHBoxLayout, QLabel, QPushButton, QScrollArea, QWidget) from PyQt5.QtCore import Qt from PyQt5.QtGui import QFont, QPixmap from resources.styles import STANDARD_BUTTON_STYLE from utils.config import PROJECT_ROOT class AboutDialog(QDialog): """ About dialog window showing project information. Displays: - Application name and version - Project description - Development team information - Partner organizations - Acknowledgments """ def __init__(self, parent=None): """ Initialize the about dialog. Args: parent: Parent widget """ super().__init__(parent) self.setWindowTitle("About DuDONG") self.setMinimumSize(600, 700) self.setMaximumSize(700, 800) self.init_ui() def init_ui(self): """Initialize the UI components.""" layout = QVBoxLayout() # Create scroll area for content scroll = QScrollArea() scroll.setWidgetResizable(True) scroll.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff) # Content widget content_widget = QWidget() content_layout = QVBoxLayout(content_widget) content_layout.setSpacing(12) # DuDONG Logo (moved to top, larger size) logo_label = QLabel() logo_path = PROJECT_ROOT / "assets" / "logos" / "dudong_logo.png" try: if logo_path.exists(): pixmap = QPixmap(str(logo_path)) if not pixmap.isNull(): scaled_pixmap = pixmap.scaledToHeight(300, Qt.SmoothTransformation) logo_label.setPixmap(scaled_pixmap) logo_label.setAlignment(Qt.AlignCenter) content_layout.addWidget(logo_label) except Exception as e: print(f"Warning: Could not load DuDONG logo: {e}") # Application Title title = QLabel("DuDONG") title.setFont(QFont("Arial", 24, QFont.Bold)) title.setAlignment(Qt.AlignCenter) title.setStyleSheet("color: #2c3e50; margin: 8px;") content_layout.addWidget(title) # Subtitle subtitle = QLabel("Durian Desktop-Oriented Non-Invasive Grading System") subtitle.setFont(QFont("Arial", 12)) subtitle.setAlignment(Qt.AlignCenter) subtitle.setStyleSheet("color: #7f8c8d; margin-bottom: 10px;") subtitle.setWordWrap(True) content_layout.addWidget(subtitle) # Version version = QLabel("Version 2.1.0") version.setFont(QFont("Arial", 10)) version.setAlignment(Qt.AlignCenter) version.setStyleSheet("color: #95a5a6; margin-bottom: 20px;") content_layout.addWidget(version) # Description description = QLabel( "DuDONG is a robust desktop application developed by the AIDurian project " "using Python, designed for advanced assessment of durian ripeness and quality. " "Utilizing advanced AI models and multiple sensor inputs, the software delivers " "precise predictions of durian fruit ripeness, quality assessment, and maturity classification. " "The application supports both audio analysis and multispectral imaging for comprehensive " "durian evaluation. Through multi-model analysis including defect detection, shape assessment, " "and locule counting, DuDONG provides detailed insights into durian quality characteristics. " "All analysis results are persisted in a comprehensive database for historical tracking " "and performance monitoring." ) description.setWordWrap(True) description.setFont(QFont("Arial", 10)) description.setStyleSheet("color: #2c3e50; padding: 10px; line-height: 1.5;") content_layout.addWidget(description) # Features Section features_title = QLabel("Key Features") features_title.setFont(QFont("Arial", 14, QFont.Bold)) features_title.setStyleSheet("color: #2c3e50; margin-top: 20px;") content_layout.addWidget(features_title) features_text = QLabel( "• Durian Ripeness Classification (Audio Analysis & Multispectral Imaging)\n" "• Quality Assessment (Defect Detection, Shape Analysis)\n" "• Locule Counting with Segmentation\n" "• Maturity Classification (Multispectral Analysis)\n" "• Real-time Processing with GPU Acceleration\n" "• Comprehensive Multi-Model Analysis Reports\n" "• Manual Input Mode (Multi-Source File Processing)\n" "• Database Persistence (Analysis History Tracking)" ) features_text.setWordWrap(True) features_text.setFont(QFont("Arial", 10)) features_text.setStyleSheet("color: #2c3e50; padding: 10px;") content_layout.addWidget(features_text) # Development Team team_title = QLabel("Development Team") team_title.setFont(QFont("Arial", 14, QFont.Bold)) team_title.setStyleSheet("color: #2c3e50; margin-top: 20px;") content_layout.addWidget(team_title) team_text = QLabel( "Developed by researchers at the Department of Math, Physics, and Computer Science " "in UP Mindanao, specifically, the AIDurian Project, under the Department of " "Science and Technology's (DOST) i-CRADLE program.\n\n" "The project aims to bridge the gap between manual practices of durian farming " "and introduce it to the various technological advancements available today." ) team_text.setWordWrap(True) team_text.setFont(QFont("Arial", 10)) team_text.setStyleSheet("color: #2c3e50; padding: 10px;") content_layout.addWidget(team_text) # Institutions institutions_title = QLabel("Supported By") institutions_title.setFont(QFont("Arial", 14, QFont.Bold)) institutions_title.setStyleSheet("color: #2c3e50; margin-top: 20px;") content_layout.addWidget(institutions_title) institutions_text = QLabel( "• University of the Philippines Mindanao\n" "• Department of Science and Technology (DOST)\n" "• DOST-PCAARRD i-CRADLE Program" ) institutions_text.setWordWrap(True) institutions_text.setFont(QFont("Arial", 10)) institutions_text.setStyleSheet("color: #2c3e50; padding: 10px;") content_layout.addWidget(institutions_text) # Institution logos inst_logos_layout = QHBoxLayout() inst_logos_layout.setSpacing(15) inst_logos_layout.setContentsMargins(10, 10, 10, 10) institution_data = [ ("UPMin.png", "UP Mindanao"), ("dost.png", "DOST"), ("DOST-PCAARRD.png", "DOST-PCAARRD"), ] for image_file, inst_name in institution_data: image_path = PROJECT_ROOT / "assets" / "logos" / image_file inst_logo_container = QVBoxLayout() inst_logo_label = QLabel() try: if image_path.exists(): pixmap = QPixmap(str(image_path)) if not pixmap.isNull(): # Scale to 50px height, maintain aspect ratio scaled_pixmap = pixmap.scaledToHeight(50, Qt.SmoothTransformation) inst_logo_label.setPixmap(scaled_pixmap) inst_logo_label.setAlignment(Qt.AlignCenter) else: inst_logo_label.setText(inst_name) inst_logo_label.setFont(QFont("Arial", 8)) inst_logo_label.setAlignment(Qt.AlignCenter) inst_logo_label.setStyleSheet("color: #95a5a6; padding: 5px;") else: inst_logo_label.setText(inst_name) inst_logo_label.setFont(QFont("Arial", 8)) inst_logo_label.setAlignment(Qt.AlignCenter) inst_logo_label.setStyleSheet("color: #95a5a6; padding: 5px;") except Exception as e: print(f"Warning: Could not load institution logo {image_file}: {e}") inst_logo_label.setText(inst_name) inst_logo_label.setFont(QFont("Arial", 8)) inst_logo_label.setAlignment(Qt.AlignCenter) inst_logo_label.setStyleSheet("color: #95a5a6; padding: 5px;") inst_logo_container.addWidget(inst_logo_label) inst_logos_layout.addLayout(inst_logo_container) content_layout.addLayout(inst_logos_layout) # Partners partners_title = QLabel("Industry Partners") partners_title.setFont(QFont("Arial", 14, QFont.Bold)) partners_title.setStyleSheet("color: #2c3e50; margin-top: 20px;") content_layout.addWidget(partners_title) partners_text = QLabel( "Special thanks to AIDurian's partners:\n" "• Belviz Farms\n" "• D'Farmers Market\n" "• EngSeng Food Products\n" "• Rosario's Delicacies\n" "• VJT Enterprises" ) partners_text.setWordWrap(True) partners_text.setFont(QFont("Arial", 10)) partners_text.setStyleSheet("color: #2c3e50; padding: 10px;") content_layout.addWidget(partners_text) # Partner logos logos_layout = QHBoxLayout() logos_layout.setSpacing(15) logos_layout.setContentsMargins(10, 10, 10, 10) partner_data = [ ("Belviz-logo-1.png", "Belviz Farms"), ("logo_final.png", "D'Farmers Market"), ("eng-seng.png", "EngSeng Food Products"), ("Rosario-Background-Removed.png", "Rosario's Delicacies"), ("VJT-Enterprise.jpeg", "VJT Enterprises"), ] for image_file, partner_name in partner_data: image_path = PROJECT_ROOT / "assets" / "logos" / image_file logo_container = QVBoxLayout() logo_label = QLabel() try: if image_path.exists(): pixmap = QPixmap(str(image_path)) if not pixmap.isNull(): # Scale to 50px height, maintain aspect ratio scaled_pixmap = pixmap.scaledToHeight(50, Qt.SmoothTransformation) logo_label.setPixmap(scaled_pixmap) logo_label.setAlignment(Qt.AlignCenter) else: logo_label.setText(partner_name) logo_label.setFont(QFont("Arial", 8)) logo_label.setAlignment(Qt.AlignCenter) logo_label.setStyleSheet("color: #95a5a6; padding: 5px;") else: logo_label.setText(partner_name) logo_label.setFont(QFont("Arial", 8)) logo_label.setAlignment(Qt.AlignCenter) logo_label.setStyleSheet("color: #95a5a6; padding: 5px;") except Exception as e: print(f"Warning: Could not load partner logo {image_file}: {e}") logo_label.setText(partner_name) logo_label.setFont(QFont("Arial", 8)) logo_label.setAlignment(Qt.AlignCenter) logo_label.setStyleSheet("color: #95a5a6; padding: 5px;") logo_container.addWidget(logo_label) logos_layout.addLayout(logo_container) content_layout.addLayout(logos_layout) # Copyright copyright_text = QLabel("© 2024 AIDurian Project. All rights reserved.") copyright_text.setAlignment(Qt.AlignCenter) copyright_text.setFont(QFont("Arial", 9)) copyright_text.setStyleSheet("color: #95a5a6; margin-top: 30px;") content_layout.addWidget(copyright_text) # Add stretch to push content to top content_layout.addStretch() # Set content widget to scroll area scroll.setWidget(content_widget) layout.addWidget(scroll) # Close button close_btn = QPushButton("Close") close_btn.setStyleSheet(STANDARD_BUTTON_STYLE) close_btn.clicked.connect(self.accept) layout.addWidget(close_btn, alignment=Qt.AlignRight) self.setLayout(layout)