mirror of
https://github.com/iperov/DeepFaceLive
synced 2025-07-05 20:42:12 -07:00
61 lines
2.9 KiB
Python
61 lines
2.9 KiB
Python
from localization import L
|
|
from PyQt6.QtCore import *
|
|
from PyQt6.QtGui import *
|
|
from PyQt6.QtWidgets import *
|
|
from xlib import qt as lib_qt
|
|
|
|
from .widgets.QBackendPanel import QBackendPanel
|
|
from .widgets.QComboBoxCSWDynamicSingleSwitch import \
|
|
QComboBoxCSWDynamicSingleSwitch
|
|
from .widgets.QLabelPopupInfo import QLabelPopupInfo
|
|
from .widgets.QSpinBoxCSWNumber import QSpinBoxCSWNumber
|
|
|
|
|
|
class QFaceMarker(QBackendPanel):
|
|
def __init__(self, backend):
|
|
cs = backend.get_control_sheet()
|
|
|
|
q_marker_type_label = QLabelPopupInfo(label=L('@QFaceMarker.marker_type'), popup_info_text=L('@QFaceMarker.help.marker_type') )
|
|
q_marker_type = QComboBoxCSWDynamicSingleSwitch(cs.marker_type, reflect_state_widgets=[q_marker_type_label])
|
|
|
|
q_device_label = QLabelPopupInfo(label=L('@QFaceMarker.device'), popup_info_text=L('@QFaceMarker.help.device') )
|
|
q_device = QComboBoxCSWDynamicSingleSwitch(cs.device, reflect_state_widgets=[q_device_label])
|
|
|
|
q_marker_coverage_label = QLabelPopupInfo(label=L('@QFaceMarker.marker_coverage'), popup_info_text=L('@QFaceMarker.help.marker_coverage') )
|
|
q_marker_coverage = QSpinBoxCSWNumber(cs.marker_coverage, reflect_state_widgets=[q_marker_coverage_label])
|
|
|
|
q_temporal_smoothing_label = QLabelPopupInfo(label=L('@QFaceMarker.temporal_smoothing'), popup_info_text=L('@QFaceMarker.help.temporal_smoothing') )
|
|
q_temporal_smoothing = QSpinBoxCSWNumber(cs.temporal_smoothing, reflect_state_widgets=[q_temporal_smoothing_label])
|
|
|
|
grid_l = lib_qt.QXGridLayout(spacing=5)
|
|
row = 0
|
|
grid_l.addWidget(q_marker_type_label, row, 0, 1, 1, alignment=Qt.AlignmentFlag.AlignRight | Qt.AlignmentFlag.AlignVCenter )
|
|
grid_l.addWidget(q_marker_type, row, 1, 1, 3, alignment=Qt.AlignmentFlag.AlignLeft )
|
|
row += 1
|
|
grid_l.addWidget(q_device_label, row, 0, 1, 1, alignment=Qt.AlignmentFlag.AlignRight | Qt.AlignmentFlag.AlignVCenter )
|
|
grid_l.addWidget(q_device, row, 1, 1, 3, alignment=Qt.AlignmentFlag.AlignLeft )
|
|
row += 1
|
|
|
|
sub_row = 0
|
|
sub_grid_l = lib_qt.QXGridLayout(spacing=5)
|
|
sub_grid_l.addWidget(q_marker_coverage_label, sub_row, 0, 1, 1, alignment=Qt.AlignmentFlag.AlignRight | Qt.AlignmentFlag.AlignVCenter )
|
|
sub_grid_l.addWidget(q_marker_coverage, sub_row, 1, 1, 1, alignment=Qt.AlignmentFlag.AlignLeft )
|
|
sub_row += 1
|
|
sub_grid_l.addWidget(q_temporal_smoothing_label, sub_row, 0, 1, 1, alignment=Qt.AlignmentFlag.AlignRight | Qt.AlignmentFlag.AlignVCenter )
|
|
sub_grid_l.addWidget(q_temporal_smoothing, sub_row, 1, 1, 1, alignment=Qt.AlignmentFlag.AlignLeft )
|
|
sub_row += 1
|
|
|
|
|
|
grid_l.addLayout(sub_grid_l, row, 0, 1, 4, alignment=Qt.AlignmentFlag.AlignCenter )
|
|
row += 1
|
|
|
|
super().__init__(backend, L('@QFaceMarker.module_title'),
|
|
layout=lib_qt.QXVBoxLayout([grid_l]) )
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|