27 explicit TruthTable(QGraphicsItem *parent =
nullptr);
41 void paint(QPainter *painter,
const QStyleOptionGraphicsItem *option, QWidget *widget)
override;
69 void generatePixmap();
73 void drawBody(QPainter *painter);
Abstract base class for all graphical circuit elements.
GraphicElement(ElementType type, QGraphicsItem *parent=nullptr)
Constructs a graphic element of the given type, fetching all properties from the metadata registry.
void setkey(const QBitArray &key)
Sets the truth-table output bit-array to key.
void updatePortsProperties() override
Resizes the truth-table key when input or output count changes.
void requestOpenTruthTableEditor()
Emitted on double-click to request opening the truth table editor.
QBitArray & key()
Returns a reference to the truth-table output bit-array.
QRectF boundingRect() const override
void load(QDataStream &stream, SerializationContext &context) override
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override
void save(QDataStream &stream, SerializationOptions options) const override
void update()
Forces a repaint of the element.
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) override
void updateLogic() override
Looks up the current input pattern in the truth table and drives outputs.
TruthTable(QGraphicsItem *parent=nullptr)
Constructs the element with optional parent.
Bundles all per-deserialization state so that load() overrides receive it through one explicit parame...
Options passed to GraphicElement::save() (and friends); the save-side counterpart of SerializationCon...