27 explicit Mux(QGraphicsItem *parent =
nullptr);
35 void paint(QPainter *painter,
const QStyleOptionGraphicsItem *option, QWidget *widget)
override;
44 void generatePixmap();
48 void drawBody(QPainter *painter);
55 static int calculateSelectLines(
int totalInputs);
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 updatePortsProperties() override
Recalculates port positions for the current port count.
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override
void updateLogic() override
Routes the data input selected by the select lines to the output.
Mux(QGraphicsItem *parent=nullptr)
Constructs the element with optional parent.
QRectF boundingRect() const override