coming_soon_overlay.py 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. """
  2. Coming Soon Overlay Widget
  3. Semi-transparent overlay for features not yet implemented.
  4. """
  5. from PyQt5.QtWidgets import QWidget, QVBoxLayout, QLabel
  6. from PyQt5.QtCore import Qt
  7. from PyQt5.QtGui import QFont
  8. class ComingSoonOverlay(QWidget):
  9. """
  10. Overlay widget that displays "COMING SOON" message over disabled content.
  11. Args:
  12. message: Main message text
  13. description: Optional detailed description
  14. parent: Parent widget
  15. """
  16. def __init__(self, message: str = "COMING SOON",
  17. description: str = "", parent=None):
  18. super().__init__(parent)
  19. self.init_ui(message, description)
  20. def init_ui(self, message: str, description: str):
  21. """Initialize the overlay UI."""
  22. # Make overlay fill parent
  23. self.setAttribute(Qt.WA_StyledBackground, True)
  24. self.setStyleSheet("""
  25. background-color: rgba(44, 62, 80, 0.85);
  26. border-radius: 4px;
  27. """)
  28. layout = QVBoxLayout(self)
  29. layout.setAlignment(Qt.AlignCenter)
  30. # Main message
  31. main_label = QLabel(message)
  32. main_label.setFont(QFont("Arial", 14, QFont.Bold))
  33. main_label.setStyleSheet("color: #ecf0f1;")
  34. main_label.setAlignment(Qt.AlignCenter)
  35. layout.addWidget(main_label)
  36. # Description (if provided)
  37. if description:
  38. desc_label = QLabel(description)
  39. desc_label.setFont(QFont("Arial", 10))
  40. desc_label.setStyleSheet("color: #bdc3c7;")
  41. desc_label.setAlignment(Qt.AlignCenter)
  42. desc_label.setWordWrap(True)
  43. layout.addWidget(desc_label)