update exe GUI build

This commit is contained in:
ykcheungab
2026-06-21 12:01:34 +08:00
parent 258948bcb7
commit 7feae9550e
18 changed files with 862 additions and 173 deletions
+32
View File
@@ -0,0 +1,32 @@
"""Runtime mesh viewport UI state shared by settings and the 3D mesh panel."""
from __future__ import annotations
from PyQt5.QtCore import QObject, pyqtSignal
from .layout import DashboardLayout, LAYOUT
class MeshViewState(QObject):
"""Mutable runtime toggles for the embedded mesh viewport."""
flow_arrows_changed = pyqtSignal(bool)
def __init__(self, *, flow_arrows_enabled: bool = True):
super().__init__()
self._flow_arrows_enabled = bool(flow_arrows_enabled)
@property
def flow_arrows_enabled(self) -> bool:
return self._flow_arrows_enabled
@classmethod
def from_layout(cls, layout: DashboardLayout = LAYOUT) -> MeshViewState:
return cls(flow_arrows_enabled=layout.mesh_flow_arrow.enabled)
def set_flow_arrows_enabled(self, enabled: bool) -> None:
enabled = bool(enabled)
if enabled == self._flow_arrows_enabled:
return
self._flow_arrows_enabled = enabled
self.flow_arrows_changed.emit(enabled)