ezmsg.qt#
ezmsg.qt - Qt integration for ezmsg with direct topic-based pub/sub.
This package provides Qt widgets that can subscribe to and publish messages on ezmsg topics using a familiar Qt signal/slot pattern.
Example
from ezmsg.qt import EzSubscriber, EzPublisher, EzSession, ProcessorGraph
- class MyWidget(QtWidgets.QWidget):
- def __init__(self, session):
super().__init__() # Simple subscription (no processing) self.data_sub = EzSubscriber(MyTopic.OUTPUT, parent=self, session=session) self.data_sub.connect(self.on_data)
# Processing graph with isolated and shared sidecar stages self.graph = (
ProcessorGraph(MyTopic.RAW, parent=self, auto_gate=True) .parallel(LowPassFilter, ScaleProcessor) .local(ThresholdDetector) .connect(self.on_processed) .attach(session)
)
- def on_data(self, msg):
pass
- def on_processed(self, msg):
pass
app = QtWidgets.QApplication([]) session = EzSession() window = MyWidget(session) window.show()
- with session:
app.exec()
Modules
TransformerAdapter - Wrap ezmsg-baseproc transformers as ez.Unit. |
|
ProcessorGraph - Fluent DAG API for compiled processing graphs. |
|
Gate unit for controlling message flow in processor graphs. |
|
EzPublisher - Send messages to ezmsg topics from Qt widgets. |
|
EzSession - runtime ownership for Qt/ezmsg integration. |
|
Sidecar runtime compilation for processor graphs. |
|
EzSubscriber - Receive messages from ezmsg topics in Qt widgets. |
|
Visibility tracking for auto-gating processor graphs. |