Multi-iPad dest_id routing, activity ring, context menu hide, live label/visibility sync
Desktop: - Replace Remote checkbox with T: dest_spin (0=Off, 1-9=tablet) on all widgets - dest_id persisted in get_state/set_state, broadcast in tablet snapshot - dest_spin.valueChanged triggers save + broadcast to iPad - _on_widget_visibility_from_tablet updates dest_spin from iPad hide event - _broadcast_preset_update shared helper; ws_server.has_clients guard - label editingFinished triggers live label sync to iPad iOS: - VC-Arrange/VC-Logging/Widgets-Reusable-UI file reorganisation - ArrangeObjects/ArrangeView rename, 7-bucket Arrange-Functions split - myTabletId (UserDefaults) + tabletIdField next to port in toolbar - Preset filter: destId == myTabletId instead of visible bool - BaseWidget activity ring: long press gesture (touch) + final update() flash - Context menu long press (arrange mode): hide widget, save layout, send dest_id:0 - Same-UUID preset check skips Preset Switched alert on visibility/label updates - autoSwitchEnabled, toolbarStatusLabel, presetLabel, statusToken Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+14
-1
@@ -2,7 +2,7 @@ import uuid
|
||||
|
||||
from PyQt6.QtWidgets import (
|
||||
QWidget, QVBoxLayout, QHBoxLayout, QPushButton,
|
||||
QLabel, QSpinBox, QLineEdit, QFrame, QSizePolicy
|
||||
QLabel, QSpinBox, QLineEdit, QFrame, QSizePolicy, QCheckBox
|
||||
)
|
||||
from PyQt6.QtCore import Qt, QEvent, QTimer
|
||||
|
||||
@@ -180,6 +180,15 @@ class ToggleWidget(QWidget):
|
||||
toggle_btn_row.addWidget(self.plus_btn)
|
||||
inner.addLayout(toggle_btn_row)
|
||||
|
||||
# Remote checkbox
|
||||
self.dest_spin = QSpinBox()
|
||||
self.dest_spin.setRange(0, 9)
|
||||
self.dest_spin.setSpecialValueText("Off")
|
||||
self.dest_spin.setPrefix("T:")
|
||||
self.dest_spin.setValue(1)
|
||||
self.dest_spin.setFixedWidth(52)
|
||||
inner.addWidget(self.dest_spin, alignment=Qt.AlignmentFlag.AlignHCenter)
|
||||
|
||||
# Zone button
|
||||
self.zone_btn = ZoneButton()
|
||||
self.zone_btn.left_callback = lambda active: self.on_zone_checked("left", active)
|
||||
@@ -370,6 +379,7 @@ class ToggleWidget(QWidget):
|
||||
"hw_cc": self.hw_cc,
|
||||
"hw_channel": self.hw_channel,
|
||||
"trigger_mode": self.trigger_mode,
|
||||
"dest_id": self.dest_spin.value(),
|
||||
}
|
||||
|
||||
def set_state(self, state):
|
||||
@@ -394,6 +404,9 @@ class ToggleWidget(QWidget):
|
||||
self.hw_cc = state.get("hw_cc", None)
|
||||
self.hw_channel = state.get("hw_channel", None)
|
||||
self.set_trigger_mode(state.get("trigger_mode", "toggle"))
|
||||
self.dest_spin.blockSignals(True)
|
||||
self.dest_spin.setValue(state.get("dest_id", 1))
|
||||
self.dest_spin.blockSignals(False)
|
||||
if self.hw_cc is not None:
|
||||
self.learn_btn.setText(f"HW: CC{self.hw_cc}")
|
||||
self.cc_input_lbl.setText(self._cc_input_label())
|
||||
|
||||
Reference in New Issue
Block a user