36 explicit Display7(QGraphicsItem *parent =
nullptr);
48 QString
color()
const override;
59 void paint(QPainter *painter,
const QStyleOptionGraphicsItem *option, QWidget *widget)
override;
79 QVector<std::shared_ptr<QSvgRenderer>> a, b, c, d, e, f, g, dp;
80 int m_colorNumber = 1;
Abstract base class for all graphical circuit elements.
QString color() const override
Returns the current display color name.
void load(QDataStream &stream, SerializationContext &context) override
void save(QDataStream &stream, SerializationOptions options) const override
Serializes the color selection to stream.
void updatePortsProperties() override
Updates port positions (fixed at 8 inputs).
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override
void refresh() override
Refreshes the displayed segments based on current input states.
static constexpr const char * kDefaultColor
static QVector< std::shared_ptr< QSvgRenderer > > cachedSegmentRenderers(const QString &resourcePath)
Display7(QGraphicsItem *parent=nullptr)
Constructs the element with optional parent.
void setColor(const QString &color) override
Sets the display color.
GraphicElement(ElementType type, QGraphicsItem *parent=nullptr)
Constructs a graphic element of the given type, fetching all properties from the metadata registry.
Abstract base class for circuit element ports (connection endpoints).
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...