31 explicit Led(QGraphicsItem *parent =
nullptr);
36 QString
color()
const override;
48 void setAppearance(
const bool useDefaultAppearance,
const QString &fileName)
override;
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.
Led(QGraphicsItem *parent=nullptr)
Constructs the element with optional parent.
QString color() const override
Returns the current LED color name.
void updateLogic() override
Propagates input values to matching outputs.
QList< std::pair< int, QString > > appearanceStates() const override
void setColor(const QString &color) override
Sets the LED color to color.
void load(QDataStream &stream, SerializationContext &context) override
void updatePortsProperties() override
Updates port positions when input count changes.
void save(QDataStream &stream, SerializationOptions options) const override
QString genericProperties() override
Returns a string describing the current color for the element editor.
void setAppearance(const bool useDefaultAppearance, const QString &fileName) override
void refresh() override
Refreshes the visual appearance based on current state.
static constexpr const char * kDefaultColor
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...