|
wiRedPanda
Logic Circuit Simulator
|
Abstract base class for all graphical circuit elements in wiRedPanda. More...
#include <GraphicElement.h>
Public Types | |
| enum | { Type = QGraphicsItem::UserType + 3 } |
Public Member Functions | |
| QVector< Port * > | allPorts () const |
| Returns a combined list of all input and output ports as Port pointers. | |
| QPixmap | appearancePreviewPixmap (const int index, const QSize &size) const |
| Returns a small preview pixmap for the appearance at index (see appearanceStates()). | |
| virtual QList< std::pair< int, QString > > | appearanceStates () const |
| Returns the list of editable appearance states for this element. Each pair is (appearance list index, human-readable state description). Override in subclasses with multi-state appearances (e.g., Led). | |
| virtual QString | audio () const |
| Returns the name of the audio file currently associated with this element. | |
| void | beginDeferredCommit () |
| virtual const QString & | blobName () const |
| Returns the blob name for embedded ICs, empty string otherwise. Base returns empty. | |
| QRectF | boundingRect () const override |
| Returns the bounding rectangle of this element in local coordinates. | |
| bool | canChangeAppearance () const |
Returns true if the user is allowed to choose a custom appearance for this element. | |
| void | clearOutputChanged () |
| Clears the simulation output-changed flag. | |
| virtual QString | color () const |
| Returns the name of the color currently applied to this element. | |
| void | commitDeferredOutputs () |
| void | connectPredecessor (const int inputIndex, GraphicElement *source, const int outputPort) |
| Connects simulation input inputIndex to output outputPort of source element. | |
| virtual double | delay () const |
| Returns the clock phase delay in seconds (overridden by Clock; returns 0 for other elements). | |
| QList< PropertyDescriptor > | editableProperties () const |
| Returns the list of editable properties this element exposes in the ElementEditor. | |
| ElementGroup | elementGroup () const |
| Returns the group this element belongs to. | |
| ElementType | elementType () const |
| Returns the type identifier for this element. | |
| virtual QStringList | externalFiles () const |
| virtual double | frequency () const |
| Returns the clock frequency in Hz (overridden by Clock; returns 0 for other elements). | |
| virtual QString | genericProperties () |
| Returns a string encoding element-specific properties for serialization or display. | |
| GraphicElement (ElementType type, QGraphicsItem *parent=nullptr) | |
| Constructs a graphic element of the given type, fetching all properties from the metadata registry. | |
| bool | hasAudio () const |
Returns true if this element type supports audio output. | |
| bool | hasAudioBox () const |
Returns true if this element type shows an audio selection box. | |
| bool | hasColors () const |
Returns true if this element type supports color selection. | |
| bool | hasDelay () const |
Returns true if this element type exposes a configurable clock phase delay. | |
| bool | hasFrequency () const |
Returns true if this element type exposes a configurable clock frequency. | |
| bool | hasLabel () const |
Returns true if this element type supports a user-editable label. | |
| bool | hasTrigger () const |
Returns true if this element type supports a keyboard trigger. | |
| bool | hasTruthTable () const |
Returns true if this element type has an editable truth table. | |
| bool | hasVolume () const |
Returns true if this element type supports volume control. | |
| virtual bool | hasWirelessMode () const |
| Returns true if this element supports a configurable wireless routing mode. | |
| void | initSimulationVectors (const int inputCount, const int outputCount) |
| Allocates simulation I/O vectors with inputs inputs and outputs outputs. | |
| void | inlineEditRequested (GraphicElement *element) |
| InputPort * | inputPort (const int index=0) const |
| Returns the input port at index (default 0). | |
| const QVector< InputPort * > & | inputs () const |
| Returns a const reference to the vector of all input ports. | |
| int | inputSize () const |
| Returns the current number of input ports. | |
| virtual bool | isEmbedded () const |
| Returns true if this element is an embedded IC (not file-backed). Base returns false. | |
| bool | isFlippedX () const |
Returns true if this element is mirrored along the X axis (horizontal flip). | |
| bool | isFlippedY () const |
Returns true if this element is mirrored along the Y axis (vertical flip). | |
| bool | isValid () |
Returns true if the element is fully initialised and connected correctly. | |
| QString | label () const |
| Returns the user-visible label text for this element. | |
| QRectF | labelSceneBoundingRect () const |
| virtual void | load (QDataStream &stream, SerializationContext &context) |
| Loads the graphic element through a binary data stream. | |
| virtual void | loadFromDrop (const QString &fileName, const QString &contextDir) |
| Polymorphic interface for drag-drop initialization (replaces elementType() == IC checks). | |
| int | maxInputSize () const |
| Returns the maximum allowed number of input ports. | |
| int | maxOutputSize () const |
| Returns the maximum allowed number of output ports. | |
| int | minInputSize () const |
| Returns the minimum allowed number of input ports. | |
| int | minOutputSize () const |
| Returns the minimum allowed number of output ports. | |
| QString | nextColor () const |
| Returns the name of the next color in the element's color list. | |
| bool | outputChanged () const |
| OutputPort * | outputPort (const int index=0) const |
| Returns the output port at index (default 0). | |
| const QVector< OutputPort * > & | outputs () const |
| Returns a const reference to the vector of all output ports. | |
| int | outputSize () const |
| Returns the current number of output ports. | |
| Status | outputValue (const int index=0) const |
| Returns the four-state signal value on simulation output port index. | |
| void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override |
| Paints the element onto the scene. | |
| QPointF | pixmapCenter () const |
| Returns the centre point of the element's pixmap in local coordinates. | |
| QString | previousColor () const |
| Returns the name of the previous color in the element's color list. | |
| void | reapplyAppearanceOrientation () |
| virtual void | refresh () |
| Forces a visual refresh of the element's pixmap and ports. | |
| virtual void | resetSimState () |
| Resets all simulation-visible state to power-on defaults. | |
| virtual void | resettleCombinational () |
| Re-evaluates combinational outputs after the synchronous sequential commit, propagating just-committed flip-flop/latch state to downstream logic and IC output boundaries within the same tick. | |
| void | retranslate () |
| Updates the translated display name, tooltip, and port object name after a locale change. | |
| void | rotatePorts () |
| bool | rotatesGraphic () const |
| qreal | rotation () const |
| Returns the current rotation angle of this element in degrees. | |
| virtual void | save (QDataStream &stream, SerializationOptions options) const |
| virtual void | setAppearance (const bool defaultAppearance, const QString &fileName) |
| Switches the element's appearance. | |
| void | setAppearanceAt (const int index, const QString &fileName) |
| Sets a custom appearance at a specific index in the appearance list. | |
| virtual void | setAudio (const QString &audio) |
| Sets the audio file associated with this element to audio. | |
| virtual void | setColor (const QString &color) |
| Sets the element color to color and refreshes the pixmap. | |
| virtual void | setDelay (const double delay) |
| Sets the clock phase delay to delay (overridden by clock elements). | |
| void | setFlippedX (bool flipped) |
| Sets the horizontal mirror state and updates the item transform. | |
| void | setFlippedY (bool flipped) |
| Sets the vertical mirror state and updates the item transform. | |
| virtual void | setFrequency (const double freq) |
| Sets the clock frequency to freq (overridden by clock elements). | |
| void | setInputs (const QVector< InputPort * > &inputs) |
| Replaces the input port vector with inputs. | |
| virtual void | setInputSize (const int size) |
| Adjusts the number of input ports to size, adding or removing ports as needed. | |
| void | setLabel (const QString &label) |
| Sets the label text to label and refreshes the display. | |
| virtual void | setOutputSize (const int size) |
| Adjusts the number of output ports to size, adding or removing ports as needed. | |
| void | setOutputValue (const bool value) |
Convenience overload — converts bool to Active/Inactive for port 0. | |
| void | setOutputValue (const int index, const bool value) |
Convenience overload — converts bool to Active/Inactive for port index. | |
| void | setOutputValue (const int index, const Status value) |
| Sets simulation output port index to value. | |
| void | setOutputValue (const Status value) |
| Sets simulation output port 0 to value. | |
| void | setPixmap (const int index) |
| Loads and applies the appearance at position index in the appearance list. | |
| void | setPixmap (const QString &pixmapPath) |
| Loads and applies the pixmap located at pixmapPath. | |
| void | setPortName (const QString &name) |
| Sets the object name of all ports to name for identification. | |
| void | setRotation (const qreal angle) |
| Rotates the element to angle degrees and updates port positions. | |
| void | setTrigger (const QKeySequence &trigger) |
| Sets the keyboard shortcut to trigger and updates the label. | |
| virtual void | setVolume (float vol) |
| Sets the audio playback volume to vol (0.0–1.0). | |
| const QVector< Status > & | simInputs () const |
| Read-only view of the cached simulation input values. | |
| const QVector< Status > & | simOutputs () const |
| Read-only view of the current simulation output values. | |
| qsizetype | simOutputSize () const |
| Returns the number of simulation output slots. | |
| QKeySequence | trigger () const |
| Returns the keyboard shortcut that activates this element. | |
| int | type () const override |
| Returns the custom type identifier for this item. | |
| void | updateLabel () |
| Repositions and updates the label child item to reflect current state. | |
| virtual void | updateLogic () |
| Computes this element's output values from its current inputs. | |
| virtual void | updatePortsProperties () |
| Repositions and reconfigures all ports after the port count changes. | |
| virtual void | updateTheme () |
| Updates the element's visual theme according to the current dark/light palette. | |
| virtual float | volume () const |
| Returns the audio playback volume (0.0–1.0). | |
| virtual WirelessMode | wirelessMode () const |
| Returns the wireless routing mode for this element. | |
| ~GraphicElement () override | |
| Out-of-line so the unique_ptr to the forward-declared QSvgRenderer can be destroyed. | |
| Public Member Functions inherited from ItemWithId | |
| int | id () const |
| Returns the unique integer identifier of this item, or -1 if unassigned. | |
| ItemWithId ()=default | |
| Constructs a new ItemWithId with an unassigned ID of -1. | |
| void | setId (const int id) |
| Sets the identifier to id. | |
| virtual | ~ItemWithId () |
| Self-unregisters from the current SceneItemRegistry, if any. | |
Static Public Member Functions | |
| static int | colorNameToIndex (const QString &color) |
| Maps a color name ("White","Red","Green","Blue","Purple") to indices 0–4. | |
Protected Member Functions | |
| int | decodeSelectValue (int offset, int count) const |
| Decodes count select-line statuses from simInputs() into a binary index. | |
| QVariant | itemChange (GraphicsItemChange change, const QVariant &value) override |
| Handles item state changes such as position, rotation, and selection. | |
| virtual void | labelContentChanged () |
| void | mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event) override |
| Requests inline label editing on double-click. | |
| QPixmap | pixmap () const |
| Returns the pixmap currently displayed by this element. | |
| QRectF | portsBoundingRect () const |
| Returns the bounding rectangle that encompasses all child ports. | |
| QRectF | renderBodyBounds () const |
| Footprint of a "procedural render body" (IC/Mux/Demux/TruthTable): the nominal 64x64 body unioned with wherever the ports actually land, which extends past it once an instance has enough ports. | |
| bool | sceneEvent (QEvent *event) override |
| Intercepts mouse-press and mouse-release events to handle Ctrl+click. | |
| void | setHasColors (const bool hasColors) |
| Sets whether this element type supports color selection. | |
| void | setLabelAnchor (const QPointF &pos) |
| void | setMaxInputSize (const int maxInputSize) |
| Sets the maximum number of input ports to maxInputSize. | |
| void | setMaxOutputSize (const int maxOutputSize) |
| Sets the maximum number of output ports to maxOutputSize. | |
| void | setMinInputSize (const int minInputSize) |
| Sets the minimum number of input ports to minInputSize. | |
| void | setMinOutputSize (const int minOutputSize) |
| Sets the minimum number of output ports to minOutputSize. | |
| bool | simUpdateInputs () |
| Snapshots each predecessor's output into the simulation input cache. | |
| bool | simUpdateInputsAllowUnknown () |
| Like simUpdateInputs(), but allows Unknown/Error values through. | |
Protected Attributes | |
| ElementAppearance | m_appearance {this} |
| QGraphicsSimpleTextItem * | m_label = new QGraphicsSimpleTextItem(this) |
| Child text item that displays the label and optional trigger shortcut. | |
| QPointF | m_labelAnchor |
| The label's intended anchor point in the element's un-rotated local frame; see setLabelAnchor(). | |
| ElementPorts | m_ports {this} |
| QString | m_titleText |
| Translated title text shown in UI panels (from metadata). | |
| QString | m_translatedName |
| Translated element name used as tooltip and port object name. | |
Friends | |
| class | ElementAppearance |
| class | GraphicElementSerializer |
Abstract base class for all graphical circuit elements in wiRedPanda.
Combines a QGraphicsObject (visual representation on the scene) with ItemWithId (stable numeric identity) to form the common interface that every circuit element must implement. Concrete subclasses cover gates, flip-flops, I/O elements, integrated circuits, and all other element types.
Responsibilities handled here:
Definition at line 58 of file GraphicElement.h.
| anonymous enum |
| Enumerator | |
|---|---|
| Type | |
Definition at line 64 of file GraphicElement.h.
|
explicit |
Constructs a graphic element of the given type, fetching all properties from the metadata registry.
Definition at line 43 of file GraphicElement.cpp.
References ElementMetadata::alternativeAppearances, ElementMetadata::defaultAppearances, ElementMetadata::group, ElementMetadata::hasColors, ElementMetadata::hasLabel, m_appearance, m_label, m_titleText, m_translatedName, ElementMetadata::maxInputSize, ElementMetadata::maxOutputSize, ElementMetadata::minInputSize, ElementMetadata::minOutputSize, ElementMetadata::pixmapPath, qCDebug, setInputSize(), setLabelAnchor(), setOutputSize(), setPortName(), ElementMetadata::titleText, ElementMetadata::translatedName, ElementMetadata::trContext, type(), updatePortsProperties(), and updateTheme().
Referenced by And::And(), AudioOutputElement::AudioOutputElement(), connectPredecessor(), Demux::Demux(), DFlipFlop::DFlipFlop(), Display14::Display14(), Display16::Display16(), Display7::Display7(), DLatch::DLatch(), GraphicElementInput::GraphicElementInput(), IC::IC(), inlineEditRequested(), InputGnd::InputGnd(), InputVcc::InputVcc(), JKFlipFlop::JKFlipFlop(), Led::Led(), Line::Line(), Mux::Mux(), Nand::Nand(), Node::Node(), Nor::Nor(), Not::Not(), Or::Or(), SRFlipFlop::SRFlipFlop(), SRLatch::SRLatch(), Text::Text(), TFlipFlop::TFlipFlop(), TruthTable::TruthTable(), Xnor::Xnor(), and Xor::Xor().
|
overridedefault |
Out-of-line so the unique_ptr to the forward-declared QSvgRenderer can be destroyed.
| QVector< Port * > GraphicElement::allPorts | ( | ) | const |
Returns a combined list of all input and output ports as Port pointers.
Definition at line 154 of file GraphicElement.cpp.
References m_ports.
Referenced by itemChange().
| QPixmap GraphicElement::appearancePreviewPixmap | ( | const int | index, |
| const QSize & | size ) const |
Returns a small preview pixmap for the appearance at index (see appearanceStates()).
Definition at line 263 of file GraphicElement.cpp.
References m_appearance.
|
virtual |
Returns the list of editable appearance states for this element. Each pair is (appearance list index, human-readable state description). Override in subclasses with multi-state appearances (e.g., Led).
Reimplemented in Clock, InputButton, InputSwitch, and Led.
Definition at line 257 of file GraphicElement.cpp.
|
virtual |
Returns the name of the audio file currently associated with this element.
Reimplemented in AudioBox.
Definition at line 597 of file GraphicElement.cpp.
Referenced by setAudio().
|
inline |
Begins a deferred (non-blocking) output commit window; routes subsequent setOutputValue() calls to a staging buffer so peers read the pre-tick value.
Definition at line 430 of file GraphicElement.h.
|
inlinevirtual |
Returns the blob name for embedded ICs, empty string otherwise. Base returns empty.
Reimplemented in IC.
Definition at line 200 of file GraphicElement.h.
Referenced by WorkSpace::onChildICBlobSaved().
|
override |
Returns the bounding rectangle of this element in local coordinates.
Definition at line 169 of file GraphicElement.cpp.
References pixmap(), and portsBoundingRect().
Referenced by Text::boundingRect(), and paint().
| bool GraphicElement::canChangeAppearance | ( | ) | const |
Returns true if the user is allowed to choose a custom appearance for this element.
Definition at line 658 of file GraphicElement.cpp.
Referenced by editableProperties().
|
inline |
Clears the simulation output-changed flag.
Definition at line 426 of file GraphicElement.h.
|
virtual |
Returns the name of the color currently applied to this element.
Reimplemented in Display14, Display16, Display7, and Led.
Definition at line 577 of file GraphicElement.cpp.
Referenced by colorNameToIndex(), nextColor(), previousColor(), setColor(), and Node::setWirelessMode().
|
static |
Maps a color name ("White","Red","Green","Blue","Purple") to indices 0–4.
Definition at line 582 of file GraphicElement.cpp.
References color().
Referenced by Display14::setColor(), Display16::setColor(), Display7::setColor(), and Led::setColor().
|
inline |
Ends the deferred-commit window and publishes staged outputs through the normal change-detecting path so visuals refresh correctly.
Definition at line 434 of file GraphicElement.h.
| void GraphicElement::connectPredecessor | ( | const int | inputIndex, |
| GraphicElement * | source, | ||
| const int | outputPort ) |
Connects simulation input inputIndex to output outputPort of source element.
Definition at line 740 of file GraphicElement.cpp.
References GraphicElement(), and outputPort().
|
inlineprotected |
Decodes count select-line statuses from simInputs() into a binary index.
| offset | Index of the first select-line input in simInputs(). |
| count | Number of select lines to read. |
Used by Mux and Demux to convert select-line signals into a data-port index.
Definition at line 627 of file GraphicElement.h.
Referenced by Demux::updateLogic(), and Mux::updateLogic().
|
virtual |
Returns the clock phase delay in seconds (overridden by Clock; returns 0 for other elements).
Reimplemented in Clock.
Definition at line 720 of file GraphicElement.cpp.
Referenced by setDelay().
| QList< PropertyDescriptor > GraphicElement::editableProperties | ( | ) | const |
Returns the list of editable properties this element exposes in the ElementEditor.
Derived from metadata flags; no override needed in subclasses.
Definition at line 641 of file GraphicElement.cpp.
References PropertyDescriptor::Appearance, PropertyDescriptor::Audio, PropertyDescriptor::AudioBox, canChangeAppearance(), PropertyDescriptor::Color, PropertyDescriptor::Delay, PropertyDescriptor::Frequency, hasAudio(), hasAudioBox(), hasColors(), hasDelay(), hasFrequency(), hasLabel(), hasTrigger(), hasTruthTable(), hasVolume(), hasWirelessMode(), PropertyDescriptor::Label, PropertyDescriptor::Trigger, PropertyDescriptor::TruthTable, PropertyDescriptor::Volume, and PropertyDescriptor::WirelessModeSelector.
| ElementGroup GraphicElement::elementGroup | ( | ) | const |
Returns the group this element belongs to.
Definition at line 99 of file GraphicElement.cpp.
Referenced by ICLoader::buildPortMetadata().
| ElementType GraphicElement::elementType | ( | ) | const |
Returns the type identifier for this element.
Definition at line 94 of file GraphicElement.cpp.
Referenced by addElementAction(), PropertyShortcutHandler::nextElement(), PropertyShortcutHandler::prevElement(), and GraphicElementSerializer::save().
|
virtual |
Returns the list of external (non-resource) file paths this element depends on. Used by the save infrastructure to copy files into the project directory.
Reimplemented in AudioBox, and IC.
Definition at line 109 of file GraphicElement.cpp.
References m_appearance.
Referenced by AudioBox::externalFiles().
|
virtual |
Returns the clock frequency in Hz (overridden by Clock; returns 0 for other elements).
Reimplemented in Buzzer, and Clock.
Definition at line 710 of file GraphicElement.cpp.
|
virtual |
Returns a string encoding element-specific properties for serialization or display.
Reimplemented in Clock, and Led.
Definition at line 404 of file GraphicElement.cpp.
| bool GraphicElement::hasAudio | ( | ) | const |
Returns true if this element type supports audio output.
Definition at line 388 of file GraphicElement.cpp.
Referenced by editableProperties().
| bool GraphicElement::hasAudioBox | ( | ) | const |
Returns true if this element type shows an audio selection box.
Definition at line 622 of file GraphicElement.cpp.
Referenced by editableProperties().
| bool GraphicElement::hasColors | ( | ) | const |
Returns true if this element type supports color selection.
Definition at line 557 of file GraphicElement.cpp.
Referenced by editableProperties(), and setHasColors().
| bool GraphicElement::hasDelay | ( | ) | const |
Returns true if this element type exposes a configurable clock phase delay.
Definition at line 607 of file GraphicElement.cpp.
Referenced by editableProperties().
| bool GraphicElement::hasFrequency | ( | ) | const |
Returns true if this element type exposes a configurable clock frequency.
Definition at line 602 of file GraphicElement.cpp.
Referenced by editableProperties().
| bool GraphicElement::hasLabel | ( | ) | const |
Returns true if this element type supports a user-editable label.
Definition at line 612 of file GraphicElement.cpp.
Referenced by editableProperties(), and mouseDoubleClickEvent().
| bool GraphicElement::hasTrigger | ( | ) | const |
Returns true if this element type supports a keyboard trigger.
Definition at line 562 of file GraphicElement.cpp.
Referenced by editableProperties(), and updateLabel().
| bool GraphicElement::hasTruthTable | ( | ) | const |
Returns true if this element type has an editable truth table.
Definition at line 617 of file GraphicElement.cpp.
Referenced by editableProperties().
| bool GraphicElement::hasVolume | ( | ) | const |
Returns true if this element type supports volume control.
Definition at line 627 of file GraphicElement.cpp.
Referenced by editableProperties().
|
virtual |
Returns true if this element supports a configurable wireless routing mode.
Returns false in the base class. Node overrides this to return true.
Reimplemented in Node.
Definition at line 144 of file GraphicElement.cpp.
Referenced by editableProperties().
| void GraphicElement::initSimulationVectors | ( | const int | inputCount, |
| const int | outputCount ) |
Allocates simulation I/O vectors with inputs inputs and outputs outputs.
Definition at line 745 of file GraphicElement.cpp.
References m_ports.
| void GraphicElement::inlineEditRequested | ( | GraphicElement * | element | ) |
Emitted on double-click for a labelable element (hasLabel()) whose type doesn't already claim double-click for something else (IC/TruthTable override mouseDoubleClickEvent() directly and this signal never fires for them). The owning Scene listens and drives the actual inline edit widget – see InlineLabelEditor.
References GraphicElement(), and label().
Referenced by Scene::addItem(), and mouseDoubleClickEvent().
| InputPort * GraphicElement::inputPort | ( | const int | index = 0 | ) | const |
Returns the input port at index (default 0).
Definition at line 129 of file GraphicElement.cpp.
References m_ports.
Referenced by BaseHandler::availablePorts(), CommandUtils::drainPortConnections(), BaseHandler::inputPortByLabel(), Node::Node(), Display14::paint(), Display16::paint(), Display7::paint(), Node::setWirelessMode(), Demux::updatePortsProperties(), DFlipFlop::updatePortsProperties(), Display14::updatePortsProperties(), Display16::updatePortsProperties(), Display7::updatePortsProperties(), DLatch::updatePortsProperties(), JKFlipFlop::updatePortsProperties(), Mux::updatePortsProperties(), Node::updatePortsProperties(), SRFlipFlop::updatePortsProperties(), SRLatch::updatePortsProperties(), and TFlipFlop::updatePortsProperties().
| const QVector< InputPort * > & GraphicElement::inputs | ( | ) | const |
Returns a const reference to the vector of all input ports.
Definition at line 149 of file GraphicElement.cpp.
References m_ports.
Referenced by ICLoader::buildPortMetadata(), Display7::load(), IC::load(), AudioOutputElement::refresh(), setInputs(), Display14::updatePortsProperties(), Display16::updatePortsProperties(), Display7::updatePortsProperties(), Led::updatePortsProperties(), TruthTable::updatePortsProperties(), and BaseHandler::validatePortRange().
| int GraphicElement::inputSize | ( | ) | const |
Returns the current number of input ports.
Definition at line 668 of file GraphicElement.cpp.
References m_ports.
Referenced by Led::appearanceStates(), BaseHandler::availablePorts(), BaseHandler::inputPortByLabel(), Mux::updateLogic(), Demux::updatePortsProperties(), Led::updatePortsProperties(), and Mux::updatePortsProperties().
|
inlinevirtual |
Returns true if this element is an embedded IC (not file-backed). Base returns false.
Reimplemented in IC.
Definition at line 197 of file GraphicElement.h.
|
inline |
Returns true if this element is mirrored along the X axis (horizontal flip).
Definition at line 348 of file GraphicElement.h.
Referenced by ICRenderer::drawBody(), and GraphicElementSerializer::save().
|
inline |
Returns true if this element is mirrored along the Y axis (vertical flip).
Definition at line 351 of file GraphicElement.h.
Referenced by ICRenderer::drawBody(), and GraphicElementSerializer::save().
| bool GraphicElement::isValid | ( | ) |
Returns true if the element is fully initialised and connected correctly.
Definition at line 534 of file GraphicElement.cpp.
References m_ports, and qCDebug.
Referenced by AudioOutputElement::refresh().
|
overrideprotected |
Handles item state changes such as position, rotation, and selection.
Three change types are intercepted:
| change | The type of change that occurred. |
| value | The new value associated with the change. |
Definition at line 326 of file GraphicElement.cpp.
References allPorts(), Constants::gridSize, and qCDebug.
| QString GraphicElement::label | ( | ) | const |
Returns the user-visible label text for this element.
Definition at line 483 of file GraphicElement.cpp.
Referenced by ICRegistry::initEmbeddedIC(), inlineEditRequested(), Text::labelContentChanged(), ICLoader::loadFile(), GraphicElementSerializer::save(), setLabel(), InlineLabelEditor::start(), and updateLabel().
|
inlineprotectedvirtual |
Hook called whenever the label text is set (including on construction and on inline-edit commit). Base is a no-op; Text overrides it to toggle its empty-state hint.
Reimplemented in Text.
Definition at line 526 of file GraphicElement.h.
Referenced by updateLabel().
| QRectF GraphicElement::labelSceneBoundingRect | ( | ) | const |
Returns the label child item's bounding rect in scene coordinates – used to position the inline rename editor over the visible label. Empty when the label has no text yet (a caller should fall back to the element's own sceneBoundingRect() in that case).
Definition at line 488 of file GraphicElement.cpp.
References m_label.
Referenced by InlineLabelEditor::start().
|
virtual |
Loads the graphic element through a binary data stream.
| context | carries portMap, version, contextDir and optional copy-operation state. |
Reimplemented in AudioBox, Buzzer, Clock, Display14, Display16, Display7, IC, InputButton, InputRotary, InputSwitch, Led, Node, and TruthTable.
Definition at line 86 of file GraphicElementSerializer.cpp.
References GraphicElementSerializer::load().
Referenced by AudioBox::load(), Buzzer::load(), Clock::load(), Display14::load(), Display16::load(), Display7::load(), IC::load(), InputButton::load(), InputRotary::load(), InputSwitch::load(), Led::load(), Node::load(), and TruthTable::load().
|
virtual |
Polymorphic interface for drag-drop initialization (replaces elementType() == IC checks).
Reimplemented in IC.
Definition at line 813 of file GraphicElement.cpp.
| int GraphicElement::maxInputSize | ( | ) | const |
Returns the maximum allowed number of input ports.
Definition at line 765 of file GraphicElement.cpp.
Referenced by setMaxInputSize().
| int GraphicElement::maxOutputSize | ( | ) | const |
Returns the maximum allowed number of output ports.
Definition at line 760 of file GraphicElement.cpp.
Referenced by setMaxOutputSize(), and Demux::setOutputSize().
| int GraphicElement::minInputSize | ( | ) | const |
Returns the minimum allowed number of input ports.
Definition at line 755 of file GraphicElement.cpp.
Referenced by setMinInputSize().
| int GraphicElement::minOutputSize | ( | ) | const |
Returns the minimum allowed number of output ports.
Definition at line 750 of file GraphicElement.cpp.
Referenced by setMinOutputSize(), and Demux::setOutputSize().
|
overrideprotected |
Requests inline label editing on double-click.
Only fires for hasLabel() elements; other types fall through to the base Qt behavior unchanged. IC and TruthTable override this method themselves (to open a sub-circuit / the truth-table editor instead), so this base implementation is never reached for them – ordinary virtual dispatch, no elementType() check needed here.
Definition at line 377 of file GraphicElement.cpp.
References hasLabel(), and inlineEditRequested().
| QString GraphicElement::nextColor | ( | ) | const |
Returns the name of the next color in the element's color list.
Definition at line 506 of file GraphicElement.cpp.
References color().
|
inline |
Returns true if any simulation output changed since the flag was last cleared (it does NOT reset the flag — see clearOutputChanged()).
Definition at line 423 of file GraphicElement.h.
| OutputPort * GraphicElement::outputPort | ( | const int | index = 0 | ) | const |
Returns the output port at index (default 0).
Definition at line 134 of file GraphicElement.cpp.
References m_ports.
Referenced by BaseHandler::availablePorts(), connectPredecessor(), CommandUtils::drainPortConnections(), BaseHandler::outputPortByLabel(), GraphicElementInput::setOn(), InputRotary::setOn(), Node::setWirelessMode(), Demux::updatePortsProperties(), DFlipFlop::updatePortsProperties(), DLatch::updatePortsProperties(), InputRotary::updatePortsProperties(), JKFlipFlop::updatePortsProperties(), Mux::updatePortsProperties(), Node::updatePortsProperties(), SRFlipFlop::updatePortsProperties(), SRLatch::updatePortsProperties(), and TFlipFlop::updatePortsProperties().
| const QVector< OutputPort * > & GraphicElement::outputs | ( | ) | const |
Returns a const reference to the vector of all output ports.
Definition at line 124 of file GraphicElement.cpp.
References m_ports.
Referenced by ICLoader::buildPortMetadata(), InputGnd::InputGnd(), InputVcc::InputVcc(), IC::load(), InputRotary::outputSize(), TruthTable::updatePortsProperties(), and BaseHandler::validatePortRange().
| int GraphicElement::outputSize | ( | ) | const |
Returns the current number of output ports.
Definition at line 700 of file GraphicElement.cpp.
References m_ports.
Referenced by BaseHandler::availablePorts(), BaseHandler::outputPortByLabel(), Demux::updateLogic(), TruthTable::updateLogic(), and Demux::updatePortsProperties().
|
inline |
Returns the four-state signal value on simulation output port index.
Definition at line 401 of file GraphicElement.h.
|
override |
Paints the element onto the scene.
Draws a rounded selection rectangle when the item is selected, then draws the current pixmap at the item origin.
| painter | Painter provided by the graphics view framework. |
| option | Style options (unused). |
| widget | Target widget (unused). |
Definition at line 200 of file GraphicElement.cpp.
References boundingRect(), and m_appearance.
Referenced by Display14::paint(), Display16::paint(), Display7::paint(), and InputRotary::paint().
|
protected |
Returns the pixmap currently displayed by this element.
Definition at line 104 of file GraphicElement.cpp.
References m_appearance.
Referenced by boundingRect(), and ICRenderer::drawBody().
| QPointF GraphicElement::pixmapCenter | ( | ) | const |
Returns the centre point of the element's pixmap in local coordinates.
Definition at line 164 of file GraphicElement.cpp.
References m_appearance.
Referenced by InputRotary::paint().
|
protected |
Returns the bounding rectangle that encompasses all child ports.
Iterates over childItems(), mapping each Port's bounding rect into the element's local coordinate space.
Definition at line 174 of file GraphicElement.cpp.
Referenced by boundingRect(), and renderBodyBounds().
| QString GraphicElement::previousColor | ( | ) | const |
Returns the name of the previous color in the element's color list.
Definition at line 496 of file GraphicElement.cpp.
References color().
|
inline |
Forwards the appearance's orientation re-application after a rotation/flip transform change, and keeps the name label counter-oriented to match. Public because ElementOrientation (a sibling collaborator, not a subclass) calls it back after updating the item transform.
Definition at line 343 of file GraphicElement.h.
References m_appearance.
|
virtual |
Forces a visual refresh of the element's pixmap and ports.
Reimplemented in AudioOutputElement, Display14, Display16, Display7, IC, InputRotary, and Led.
Definition at line 319 of file GraphicElement.cpp.
References setPixmap().
|
protected |
Footprint of a "procedural render body" (IC/Mux/Demux/TruthTable): the nominal 64x64 body unioned with wherever the ports actually land, which extends past it once an instance has enough ports.
Single source of truth for boundingRect(), the sizing pixmap, and the selection-highlight rect on those four element types, so they can never drift out of sync with each other.
Definition at line 188 of file GraphicElement.cpp.
References portsBoundingRect().
Referenced by Demux::boundingRect(), IC::boundingRect(), Mux::boundingRect(), TruthTable::boundingRect(), ICRenderer::generatePixmap(), and TruthTable::updatePortsProperties().
|
virtual |
Resets all simulation-visible state to power-on defaults.
The base implementation resets each output slot to its port's defaultStatus(). Sequential elements (flip-flops, latches) override this to also clear their internal edge-detection variables (m_simLastClk, etc.) so that BeWavedDolphin can start every sweep from a known, reproducible state.
Reimplemented in DFlipFlop, JKFlipFlop, SRFlipFlop, and TFlipFlop.
Definition at line 735 of file GraphicElement.cpp.
References m_ports.
Referenced by DFlipFlop::resetSimState(), JKFlipFlop::resetSimState(), SRFlipFlop::resetSimState(), and TFlipFlop::resetSimState().
|
inlinevirtual |
Re-evaluates combinational outputs after the synchronous sequential commit, propagating just-committed flip-flop/latch state to downstream logic and IC output boundaries within the same tick.
Called only on non-sequential elements (the simulation skips ElementGroup::Memory so their edge state is not disturbed). The default recomputes via updateLogic(); IC overrides it to recurse through its internals while skipping its own sequential elements.
Reimplemented in IC.
Definition at line 398 of file GraphicElement.h.
References updateLogic().
| void GraphicElement::retranslate | ( | ) |
Updates the translated display name, tooltip, and port object name after a locale change.
Queries ElementFactory for the new translated name and propagates it to setPortName() and setToolTip().
Definition at line 805 of file GraphicElement.cpp.
References m_translatedName, setPortName(), and ElementFactory::translatedName().
| void GraphicElement::rotatePorts | ( | ) |
Re-applies the combined rotation + flip orientation to every port. Used by non-rotatable elements, which keep their pixmap fixed and move only their ports around the centre.
Definition at line 227 of file GraphicElement.cpp.
Referenced by Display14::updatePortsProperties(), Display16::updatePortsProperties(), and Display7::updatePortsProperties().
| bool GraphicElement::rotatesGraphic | ( | ) | const |
Returns true if rotating/flipping re-orients this element's graphic. When false the icon stays fixed and only the ports reposition around the centre (the element still rotates).
Definition at line 663 of file GraphicElement.cpp.
Referenced by updatePortsProperties(), and TruthTable::updatePortsProperties().
| qreal GraphicElement::rotation | ( | ) | const |
Returns the current rotation angle of this element in degrees.
Definition at line 232 of file GraphicElement.cpp.
Referenced by ICRenderer::drawBody(), and GraphicElementSerializer::save().
|
virtual |
Saves the graphic element through a binary data stream. options has no default – every caller must state whether this builds a genuine .panda file or an in-session snapshot; see SerializationPurpose.
Reimplemented in AudioBox, Buzzer, Clock, Display14, Display16, Display7, IC, InputButton, InputRotary, InputSwitch, Led, Node, and TruthTable.
Definition at line 81 of file GraphicElementSerializer.cpp.
References GraphicElementSerializer::save().
Referenced by ChangePortSizeCommand::redo(), AudioBox::save(), Buzzer::save(), Clock::save(), Display14::save(), Display16::save(), Display7::save(), IC::save(), InputButton::save(), InputRotary::save(), InputSwitch::save(), Led::save(), Node::save(), and TruthTable::save().
|
overrideprotected |
Intercepts mouse-press and mouse-release events to handle Ctrl+click.
When Ctrl is held during a mouse press or release, the event is consumed here and not forwarded, preventing accidental multi-selection.
| event | The scene event to inspect. |
Definition at line 362 of file GraphicElement.cpp.
|
virtual |
Switches the element's appearance.
| defaultAppearance | true to restore the built-in default appearance. |
| fileName | File path of the custom appearance image (used when defaultAppearance is false). |
Reimplemented in GraphicElementInput, InputRotary, and Led.
Definition at line 247 of file GraphicElement.cpp.
References m_appearance.
| void GraphicElement::setAppearanceAt | ( | const int | index, |
| const QString & | fileName ) |
Sets a custom appearance at a specific index in the appearance list.
| index | Appearance list index. |
| fileName | File path of the custom appearance image (empty restores default for that index). |
Definition at line 252 of file GraphicElement.cpp.
References m_appearance.
|
virtual |
Sets the audio file associated with this element to audio.
Reimplemented in AudioBox, and Buzzer.
Definition at line 592 of file GraphicElement.cpp.
References audio().
|
virtual |
|
virtual |
Sets the clock phase delay to delay (overridden by clock elements).
Reimplemented in Clock.
Definition at line 725 of file GraphicElement.cpp.
References delay().
| void GraphicElement::setFlippedX | ( | bool | flipped | ) |
Sets the horizontal mirror state and updates the item transform.
Definition at line 237 of file GraphicElement.cpp.
| void GraphicElement::setFlippedY | ( | bool | flipped | ) |
Sets the vertical mirror state and updates the item transform.
Definition at line 242 of file GraphicElement.cpp.
|
virtual |
Sets the clock frequency to freq (overridden by clock elements).
Reimplemented in Buzzer, and Clock.
Definition at line 715 of file GraphicElement.cpp.
|
protected |
Sets whether this element type supports color selection.
Definition at line 572 of file GraphicElement.cpp.
References hasColors().
Referenced by Led::Led(), and Led::updatePortsProperties().
| void GraphicElement::setInputs | ( | const QVector< InputPort * > & | inputs | ) |
Replaces the input port vector with inputs.
Definition at line 159 of file GraphicElement.cpp.
References inputs(), and m_ports.
Referenced by Display7::load().
|
virtual |
Adjusts the number of input ports to size, adding or removing ports as needed.
Definition at line 695 of file GraphicElement.cpp.
Referenced by GraphicElement(), and Demux::setOutputSize().
| void GraphicElement::setLabel | ( | const QString & | label | ) |
Sets the label text to label and refreshes the display.
Definition at line 477 of file GraphicElement.cpp.
References label(), and updateLabel().
Referenced by ICRegistry::initEmbeddedIC(), and ICLoader::loadFile().
|
protected |
Sets the label's anchor point in the element's un-rotated local frame, and repositions it there. pos is remembered (m_labelAnchor) so updateLabelOrientation() can always recompute the label's actual on-screen position from this original value, rather than from whatever rotation-adjusted position it last computed.
Definition at line 193 of file GraphicElement.cpp.
References m_label, and m_labelAnchor.
Referenced by AudioOutputElement::AudioOutputElement(), GraphicElement(), Node::Node(), and TruthTable::updatePortsProperties().
|
protected |
Sets the maximum number of input ports to maxInputSize.
Definition at line 770 of file GraphicElement.cpp.
References maxInputSize().
|
protected |
Sets the maximum number of output ports to maxOutputSize.
Definition at line 775 of file GraphicElement.cpp.
References maxOutputSize().
|
protected |
Sets the minimum number of input ports to minInputSize.
Definition at line 780 of file GraphicElement.cpp.
References minInputSize().
|
protected |
Sets the minimum number of output ports to minOutputSize.
Definition at line 785 of file GraphicElement.cpp.
References minOutputSize().
|
virtual |
Adjusts the number of output ports to size, adding or removing ports as needed.
Reimplemented in Demux.
Definition at line 705 of file GraphicElement.cpp.
Referenced by GraphicElement(), and Demux::setOutputSize().
|
inline |
Convenience overload — converts bool to Active/Inactive for port 0.
Definition at line 416 of file GraphicElement.h.
|
inline |
Convenience overload — converts bool to Active/Inactive for port index.
Definition at line 413 of file GraphicElement.h.
|
inline |
Sets simulation output port index to value.
Definition at line 407 of file GraphicElement.h.
Referenced by And::updateLogic(), Demux::updateLogic(), DFlipFlop::updateLogic(), DLatch::updateLogic(), JKFlipFlop::updateLogic(), Led::updateLogic(), Mux::updateLogic(), Nand::updateLogic(), Node::updateLogic(), Nor::updateLogic(), Not::updateLogic(), Or::updateLogic(), SRFlipFlop::updateLogic(), SRLatch::updateLogic(), TFlipFlop::updateLogic(), TruthTable::updateLogic(), Xnor::updateLogic(), Xor::updateLogic(), and GraphicElementInput::updateOutputs().
|
inline |
Sets simulation output port 0 to value.
Definition at line 410 of file GraphicElement.h.
| void GraphicElement::setPixmap | ( | const int | index | ) |
Loads and applies the appearance at position index in the appearance list.
Definition at line 114 of file GraphicElement.cpp.
References m_appearance.
| void GraphicElement::setPixmap | ( | const QString & | pixmapPath | ) |
Loads and applies the pixmap located at pixmapPath.
Definition at line 119 of file GraphicElement.cpp.
References m_appearance.
Referenced by Led::Led(), AudioOutputElement::play(), refresh(), Led::refresh(), GraphicElementInput::setAppearance(), InputRotary::setAppearance(), Led::setAppearance(), GraphicElementInput::setOn(), AudioOutputElement::stop(), DFlipFlop::updateTheme(), DLatch::updateTheme(), JKFlipFlop::updateTheme(), SRFlipFlop::updateTheme(), SRLatch::updateTheme(), and TFlipFlop::updateTheme().
| void GraphicElement::setPortName | ( | const QString & | name | ) |
Sets the object name of all ports to name for identification.
Definition at line 217 of file GraphicElement.cpp.
Referenced by GraphicElement(), and retranslate().
| void GraphicElement::setRotation | ( | const qreal | angle | ) |
Rotates the element to angle degrees and updates port positions.
Definition at line 222 of file GraphicElement.cpp.
| void GraphicElement::setTrigger | ( | const QKeySequence & | trigger | ) |
Sets the keyboard shortcut to trigger and updates the label.
Definition at line 398 of file GraphicElement.cpp.
References trigger(), and updateLabel().
|
virtual |
Sets the audio playback volume to vol (0.0–1.0).
Reimplemented in AudioOutputElement.
Definition at line 637 of file GraphicElement.cpp.
|
inline |
Read-only view of the cached simulation input values.
Definition at line 484 of file GraphicElement.h.
Referenced by And::updateLogic(), Demux::updateLogic(), DFlipFlop::updateLogic(), DLatch::updateLogic(), JKFlipFlop::updateLogic(), Led::updateLogic(), Mux::updateLogic(), Nand::updateLogic(), Node::updateLogic(), Nor::updateLogic(), Not::updateLogic(), Or::updateLogic(), SRFlipFlop::updateLogic(), SRLatch::updateLogic(), TFlipFlop::updateLogic(), TruthTable::updateLogic(), Xnor::updateLogic(), and Xor::updateLogic().
|
inline |
Read-only view of the current simulation output values.
Definition at line 487 of file GraphicElement.h.
Referenced by DFlipFlop::updateLogic(), DLatch::updateLogic(), JKFlipFlop::updateLogic(), SRFlipFlop::updateLogic(), SRLatch::updateLogic(), and TFlipFlop::updateLogic().
|
inline |
Returns the number of simulation output slots.
Definition at line 404 of file GraphicElement.h.
Referenced by GraphicElementInput::updateOutputs().
|
inlineprotected |
Snapshots each predecessor's output into the simulation input cache.
If any predecessor output is Unknown or Error, all outputs are set to Unknown and the method returns false so that sequential elements (flip-flops, latches) can skip computation with incomplete data. Unconnected inputs (null predecessor) use the corresponding port's defaultStatus(), replacing the old global GND/VCC approach.
true if all inputs are Active or Inactive (simulation can proceed). Definition at line 609 of file GraphicElement.h.
References m_ports.
Referenced by DFlipFlop::updateLogic(), DLatch::updateLogic(), JKFlipFlop::updateLogic(), Led::updateLogic(), SRFlipFlop::updateLogic(), SRLatch::updateLogic(), and TFlipFlop::updateLogic().
|
inlineprotected |
Like simUpdateInputs(), but allows Unknown/Error values through.
Combinational gates use this so their domination rules (e.g. AND(0, X) = 0) can short-circuit even with unknown inputs. Only a truly unconnected input (null predecessor whose port default is Unknown) triggers an early all-outputs-Unknown return.
Definition at line 618 of file GraphicElement.h.
References m_ports.
Referenced by ICSimulation::resettle(), ICSimulation::update(), And::updateLogic(), Demux::updateLogic(), Mux::updateLogic(), Nand::updateLogic(), Node::updateLogic(), Nor::updateLogic(), Not::updateLogic(), Or::updateLogic(), TruthTable::updateLogic(), Xnor::updateLogic(), and Xor::updateLogic().
| QKeySequence GraphicElement::trigger | ( | ) | const |
Returns the keyboard shortcut that activates this element.
Definition at line 393 of file GraphicElement.cpp.
Referenced by GraphicElementSerializer::save(), setTrigger(), and updateLabel().
|
inlineoverride |
Returns the custom type identifier for this item.
Definition at line 67 of file GraphicElement.h.
References Type.
Referenced by AudioOutputElement::AudioOutputElement(), GraphicElement(), and GraphicElementInput::GraphicElementInput().
| void GraphicElement::updateLabel | ( | ) |
Repositions and updates the label child item to reflect current state.
Definition at line 409 of file GraphicElement.cpp.
References hasTrigger(), label(), labelContentChanged(), labelFont(), m_label, and trigger().
Referenced by setLabel(), and setTrigger().
|
virtual |
Computes this element's output values from its current inputs.
Override in subclasses to implement element-specific logic.
Reimplemented in And, Demux, DFlipFlop, DLatch, IC, JKFlipFlop, Led, Mux, Nand, Node, Nor, Not, Or, SRFlipFlop, SRLatch, TFlipFlop, TruthTable, Xnor, and Xor.
Definition at line 730 of file GraphicElement.cpp.
Referenced by resettleCombinational().
|
virtual |
Repositions and reconfigures all ports after the port count changes.
Distributes input ports vertically on the left edge (x=0) and output ports on the right edge (x=64), spaced by half the scene grid size. Also reapplies rotation for non-rotatable elements. Called after construction, loading, and any input/output size change.
Reimplemented in Demux, DFlipFlop, Display14, Display16, Display7, DLatch, InputRotary, JKFlipFlop, Led, Mux, Node, SRFlipFlop, SRLatch, TFlipFlop, and TruthTable.
Definition at line 268 of file GraphicElement.cpp.
References Constants::gridSize, m_ports, qCDebug, and rotatesGraphic().
Referenced by GraphicElement(), GraphicElementSerializer::load(), and Led::updatePortsProperties().
|
virtual |
Updates the element's visual theme according to the current dark/light palette.
Reimplemented in DFlipFlop, DLatch, JKFlipFlop, SRFlipFlop, SRLatch, Text, and TFlipFlop.
Definition at line 516 of file GraphicElement.cpp.
References ThemeManager::attributes(), m_appearance, ThemeAttributes::m_graphicElementLabelColor, m_label, and m_ports.
Referenced by GraphicElement(), DFlipFlop::updateTheme(), DLatch::updateTheme(), JKFlipFlop::updateTheme(), SRFlipFlop::updateTheme(), SRLatch::updateTheme(), Text::updateTheme(), and TFlipFlop::updateTheme().
|
virtual |
Returns the audio playback volume (0.0–1.0).
Reimplemented in AudioOutputElement.
Definition at line 632 of file GraphicElement.cpp.
|
virtual |
Returns the wireless routing mode for this element.
Returns WirelessMode::None for all elements except Node, which overrides this to expose its configurable Tx/Rx mode.
Reimplemented in Node.
Definition at line 139 of file GraphicElement.cpp.
Referenced by ConnectionManager::connectionRejectionReason().
|
friend |
Calls prepareGeometryChange() before its pixmap mutation resizes boundingRect(), and invalidateRenderCache() when that mutation changes the pixmap size; see ElementAppearance::setPixmap()/setRenderPixmap().
Definition at line 639 of file GraphicElement.h.
References ElementAppearance.
Referenced by ElementAppearance.
|
friend |
Reaches ports/orientation/appearance/context-directory state to implement save()/load(); see GraphicElementSerializer.
Definition at line 634 of file GraphicElement.h.
References GraphicElementSerializer.
Referenced by GraphicElementSerializer.
|
protected |
Owns the pixmap/SVG appearance, the appearance list, and selection-highlight colors; this element forwards its rendering and appearance interface here. See ElementAppearance.
Definition at line 586 of file GraphicElement.h.
Referenced by appearancePreviewPixmap(), Display14::Display14(), Display16::Display16(), Display7::Display7(), externalFiles(), ICRenderer::generatePixmap(), GraphicElement(), InputRotary::InputRotary(), Led::Led(), Demux::paint(), paint(), IC::paint(), Mux::paint(), TruthTable::paint(), pixmap(), pixmapCenter(), reapplyAppearanceOrientation(), GraphicElementSerializer::save(), setAppearance(), GraphicElementInput::setAppearance(), InputRotary::setAppearance(), Led::setAppearance(), setAppearanceAt(), setPixmap(), setPixmap(), and updateTheme().
|
protected |
Child text item that displays the label and optional trigger shortcut.
Definition at line 588 of file GraphicElement.h.
Referenced by GraphicElement(), IC::IC(), labelSceneBoundingRect(), setLabelAnchor(), updateLabel(), and updateTheme().
|
protected |
The label's intended anchor point in the element's un-rotated local frame; see setLabelAnchor().
Definition at line 589 of file GraphicElement.h.
Referenced by setLabelAnchor().
|
protected |
Owns the input/output port vectors and their creation/resize lifecycle; this element forwards its port-access interface here. See ElementPorts.
Definition at line 582 of file GraphicElement.h.
Referenced by allPorts(), initSimulationVectors(), inputPort(), inputs(), inputSize(), isValid(), outputPort(), outputs(), outputSize(), resetSimState(), GraphicElementSerializer::save(), setInputs(), simUpdateInputs(), simUpdateInputsAllowUnknown(), updatePortsProperties(), and updateTheme().
|
protected |
Translated title text shown in UI panels (from metadata).
Definition at line 593 of file GraphicElement.h.
Referenced by GraphicElement().
|
protected |
Translated element name used as tooltip and port object name.
Definition at line 594 of file GraphicElement.h.
Referenced by GraphicElement(), and retranslate().