QInferenceBackendStep Class
The QInferenceBackendStep class is the abstract base class for backend-specific pipeline steps. More...
| Header: | #include <QInferenceBackendStep> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS EdgeAi)target_link_libraries(mytarget PRIVATE Qt6::EdgeAi) |
| qmake: | QT += edgeai |
| Inherits: | QObject |
| Status: | Technical Preview |
Public Functions
| QInferenceBackendStep(QObject *parent = nullptr) | |
| QInferenceBackendFlow * | flow() const |
| virtual void | initialize() = 0 |
| QList<QInferenceDataPort *> | inputPorts() const |
| virtual bool | isReady() const = 0 |
| QList<QInferenceDataPort *> | outputPorts() const |
| QInferenceDataPort * | port(QInferenceDataPort::Direction direction, QInferenceDataPort::Type type) const |
| QInferenceDataPort * | port(QInferenceDataPort::Direction direction, const QString &name) const |
| void | setFlow(QInferenceBackendFlow *flow) |
Signals
| void | dataAvailable(const QVariant &data, const QString &portName) |
| void | flowChanged() |
| void | flowReady() |
| void | inputPortsChanged() |
| void | outputPortsChanged() |
| void | ready() |
Protected Functions
| void | addInputPort(QInferenceBackendDataPort *impl) |
| void | addOutputPort(QInferenceBackendDataPort *impl) |
Detailed Description
QInferenceBackendFactory creates a QInferenceBackendStep for each QInferenceStep, for example QInferenceVideoSource or QVisionInference. It manages input and output QInferenceDataPort instances, reports readiness through the ready() signal, and attaches to a QInferenceBackendFlow through setFlow() when QInferenceFlow adds the step to a flow.
See also QInferenceStep, QInferenceBackendFlow, QInferenceDataPort, initialize(), and isReady().
Member Function Documentation
[explicit] QInferenceBackendStep::QInferenceBackendStep(QObject *parent = nullptr)
Constructs a QInferenceBackendStep with the given parent.
[protected] void QInferenceBackendStep::addInputPort(QInferenceBackendDataPort *impl)
Adds an input port backed by impl. Sets the direction of impl to In, wraps it in a QInferenceDataPort, and appends the port to the list of input ports. Subclasses call this to expose an input port.
See also addOutputPort() and inputPorts().
[protected] void QInferenceBackendStep::addOutputPort(QInferenceBackendDataPort *impl)
Adds an output port backed by impl. Sets the direction of impl to Out, wraps it in a QInferenceDataPort, and appends the port to the list of output ports. Subclasses call this to expose an output port.
See also addInputPort() and outputPorts().
[signal] void QInferenceBackendStep::dataAvailable(const QVariant &data, const QString &portName)
This signal is emitted when data becomes available on the output port named portName.
QInferenceBackendFlow *QInferenceBackendStep::flow() const
Returns the flow this step belongs to, or nullptr if not attached.
See also setFlow() and flowChanged().
[signal] void QInferenceBackendStep::flowChanged()
This signal is emitted when the flow this step belongs to changes.
See also flow() and setFlow().
[signal] void QInferenceBackendStep::flowReady()
This signal is emitted when the flow this step belongs to becomes ready, that is, when all of its steps have been added and their ports connected.
Subclasses that need to react to the flow becoming ready, for example to inspect which of their ports ended up connected, connect to this signal.
See also flow() and QInferenceDataPort::isConnected().
[pure virtual] void QInferenceBackendStep::initialize()
Initializes the backend step, for example by creating elements and setting caps. Called by the framework when the step's configuration is ready. When initialization is complete, implementations emit ready().
See also isReady() and ready().
QList<QInferenceDataPort *> QInferenceBackendStep::inputPorts() const
Returns the list of input ports.
See also outputPorts() and addInputPort().
[signal] void QInferenceBackendStep::inputPortsChanged()
This signal is emitted when the list of input ports changes.
See also inputPorts().
[pure virtual] bool QInferenceBackendStep::isReady() const
Returns true if this step is initialized and ready to be added to a pipeline; otherwise returns false.
See also initialize() and ready().
QList<QInferenceDataPort *> QInferenceBackendStep::outputPorts() const
Returns the list of output ports.
See also inputPorts() and addOutputPort().
[signal] void QInferenceBackendStep::outputPortsChanged()
This signal is emitted when the list of output ports changes.
See also outputPorts().
QInferenceDataPort *QInferenceBackendStep::port(QInferenceDataPort::Direction direction, QInferenceDataPort::Type type) const
Returns the first port in the given direction whose type() matches type, or nullptr if no such port is found.
See also port().
QInferenceDataPort *QInferenceBackendStep::port(QInferenceDataPort::Direction direction, const QString &name) const
Returns the port with the given direction and name, or nullptr if no such port is found.
See also port().
[signal] void QInferenceBackendStep::ready()
This signal is emitted when the step has finished initializing and is ready to be added to a pipeline.
See also initialize() and isReady().
void QInferenceBackendStep::setFlow(QInferenceBackendFlow *flow)
Sets the flow that this step belongs to to flow. QInferenceFlow calls this when it adds or removes the step.
See also flow() and flowChanged().
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.