import sys from PySide6.QtWidgets import ( QApplication, QMainWindow, QWidget, QVBoxLayout, QHBoxLayout, QPushButton, QLabel, QSplitter, QStackedWidget, QLineEdit ) from PySide6.QtCore import Qt, Slot from PySide6.QtGui import QPalette, QColor from ui.widgets.placeholder_widget import PlaceholderWidget from ui.widgets.color_list_widget import ColorListWidget class MainWindow(QMainWindow): def __init__(self): super().__init__() self.setWindowTitle("Mayo Stain Helper") self.resize(1920, 1080) self.setup_ui() def setup_ui(self): # Central widget and main layout central_widget = QWidget() main_layout = QHBoxLayout(central_widget) self.setCentralWidget(central_widget) self.preview_widget = QSplitter(Qt.Orientation.Vertical) self.preview_widget.addWidget(PlaceholderWidget("Camera View", "#750466")) self.preview_widget.addWidget(PlaceholderWidget("Image View", "#007981")) self.thumbnail_widget = PlaceholderWidget("Thumbnails", "#AAAAAA") self.thumbnail_widget.setFixedWidth(200) # self.control_widget = PlaceholderWidget("Controls", "#CCCCCC") self.control_widget = QWidget() self.control_widget.setFixedWidth(300) # self.control_widget.setContentsMargins(0, 0, 0, 0) main_layout.addWidget(self.preview_widget) main_layout.addWidget(self.thumbnail_widget) main_layout.addWidget(self.control_widget) control_layout = QVBoxLayout(self.control_widget) control_layout.setContentsMargins(0, 0, 0, 0) histogram_view = PlaceholderWidget("Histogram View", "#FF5733") histogram_view.setFixedHeight(200) control_layout.addWidget(histogram_view) color_list_widget = ColorListWidget([ {"name": "Red", "color": "#FF0000"}, {"name": "Green", "color": "#00FF00"}, {"name": "Blue", "color": "#0000FF"}, {"name": "Yellow", "color": "#FFFF00"}, {"name": "Cyan", "color": "#00FFFF"}, {"name": "Magenta", "color": "#FF00FF"}, ], self.control_widget) control_layout.addWidget(color_list_widget) # control_layout.addStretch() record_button = QPushButton("Nagraj Wideo") record_button.setMinimumHeight(40) record_button.setStyleSheet("font-size: 12pt;") control_layout.addWidget(record_button) photo_button = QPushButton("Zrób zdjęcie") photo_button.setMinimumHeight(40) photo_button.setStyleSheet("font-size: 12pt;") control_layout.addWidget(photo_button)