wiRedPanda
Logic Circuit Simulator
Loading...
Searching...
No Matches
DolphinModelBuilder.h
Go to the documentation of this file.
1// Copyright 2015 - 2026, GIBIS-UNIFESP and the wiRedPanda contributors
2// SPDX-License-Identifier: GPL-3.0-or-later
3
7
8#pragma once
9
10#include <QStringList>
11#include <QVector>
12
13class GraphicElement;
15class Scene;
16
25namespace DolphinModelBuilder {
26
28enum class RowKind { Input, Output };
29
39struct Row {
41 int port = 0;
44 QString label;
46};
47
49struct Signals {
50 QVector<GraphicElementInput *> inputs;
51 QVector<GraphicElement *> outputs;
52 int inputPorts = 0;
53 QStringList inputLabels;
54 QStringList outputLabels;
58 QVector<Row> rows;
59};
60
64Signals collect(Scene *scene);
65
66} // namespace DolphinModelBuilder
Abstract base for all interactive input elements (switches, buttons, clocks, etc.).
Abstract base class for all graphical circuit elements in wiRedPanda.
Main circuit editing scene.
Definition Scene.h:56
Collects and orders the input/output elements of a circuit scene and derives the waveform table's row...
Signals collect(Scene *scene)
RowKind
Which side of the table a row belongs to.
One waveform table row: exactly one PORT of one element.
GraphicElement * element
The element this row reads or drives.
The input/output elements (label-sorted) and the row layout for a waveform table.
QVector< GraphicElement * > outputs
Output elements, sorted by label.
QStringList inputLabels
Row label per input port (indexed for multi-port).
QVector< GraphicElementInput * > inputs
Input elements, sorted by label.
int inputPorts
Total input rows; derived from rows.