SILICON
Loading...
Searching...
No Matches
SILICON::ui Namespace Reference

Namespaces

namespace  componentSearchMatcher
namespace  detail
namespace  fileDialog
namespace  indentation
namespace  inputDialog
namespace  Layout
namespace  portGeometryDetail
namespace  projectDocumentPolicy
namespace  settings
namespace  svg
namespace  theme
namespace  waveform

Classes

class  AboutDialog
struct  ArchitectureActions
class  ArchitectureController
class  ArchitectureDocumentEditor
class  ArchitectureLoadPlan
 Architecture files resolved before the editor tabs are rebuilt. More...
class  ArchitectureWorkspace
class  AutoplacementRoutingFailure
 Complete pure autoplacement result. More...
class  BinaryDocumentEditor
class  BinaryEditor
class  BinaryHexView
class  BinaryNibbleEditCommand
class  BinaryUndoStack
class  BrowserShortcutCapture
class  CallbackScope
class  CallbackUndoCommand
class  Circuit
 Represents a digital circuit as a directed graph of components. More...
struct  CircuitActions
struct  CircuitAutoplacement
class  CircuitAutoplacer
 Combines OGDF component layout with libavoid orthogonal wire routing. More...
struct  CircuitAutoplacerOptions
 Configuration for full circuit autoplacement and wire routing. More...
class  CircuitEditor
class  CodeDocumentEditor
class  CodeEditor
struct  CodeFilePresentation
struct  CodeIndentation
struct  CodeIndentationContext
class  CodeLineNumberArea
struct  CodeSyntax
struct  CodeSyntaxContainedRule
class  CodeSyntaxHighlighter
struct  CodeSyntaxKeywordGroup
struct  CodeSyntaxMatchRule
struct  CodeSyntaxRegionRule
struct  CommonSettingsValues
 Snapshot of the common application settings used at runtime. More...
class  ComponentCatalogOverlay
struct  ComponentResizeState
struct  ComponentRouteMove
class  ComponentSearchBox
struct  ConnectionReport
struct  ConversionResult
class  DiagramInteractionController
class  DiagramScene
 Graphics scene for the circuit diagram editor. More...
class  DiagramSceneSerializer
 Handles DiagramScene persistence, clipboard payloads, and reconstruction. More...
class  DiagramSceneSimulationController
 Manages simulation lifecycle and waveform tracing for DiagramScene. More...
class  DiagramView
class  Document
struct  DocumentActions
struct  DocumentConverter
class  DocumentEditor
class  DocumentNavigator
struct  EditActions
struct  EditorEditState
struct  EditorNotifications
class  EditorWorkspace
 Selects and hosts editors while preserving detached document preparation. More...
class  EditWireRouteCommand
class  GraphicalAdderNBits
class  GraphicalAnd
class  GraphicalBusInput
 Represents a multi-bit user-editable data bus input in the UI. More...
class  GraphicalBusOutput
 Represents a multi-bit data bus display output in the UI. More...
class  GraphicalComparator
class  GraphicalComplementer
class  GraphicalComponent
 Base class for graphical circuit components. More...
class  GraphicalConstant
 Displays a fixed-width value produced by an imported HDL netlist. More...
class  GraphicalDecoder
class  GraphicalDemultiplexer
class  GraphicalDFlipFlop
class  GraphicalDivider
class  GraphicalDLatch
class  GraphicalEFlipFlop
class  GraphicalExtender
class  GraphicalFlipFlop
class  GraphicalFullAdder
class  GraphicalGate
class  GraphicalHalfAdder
class  GraphicalInput
 Represents a single-bit user-toggleable input switch in the UI. More...
class  GraphicalIO
 Abstract base class for all graphical Input and Output components. More...
class  GraphicalItem
 Base class for all graphical items in the diagram. More...
class  GraphicalJKFlipFlop
class  GraphicalLogicComponent
 Base class for logic-gate graphical components. More...
class  GraphicalLogStream
class  GraphicalMultiplexer
class  GraphicalMultiplier
class  GraphicalNand
class  GraphicalNor
class  GraphicalNot
class  GraphicalOr
class  GraphicalOutputSingle
 Represents a single-bit display output in the UI (e.g., an LED indicator). More...
class  GraphicalRegister
class  GraphicalROM
class  GraphicalShifter
class  GraphicalSubcircuitComponent
 Graphical component wrapper for a registered subcircuit. More...
 Visual metadata used to render a subcircuit as a reusable component. More...
 Visual metadata for one subcircuit boundary port. More...
class  GraphicalText
class  GraphicalWire
 Logical wire entity that groups segments sharing the same bus. More...
class  GraphicalWireMerger
class  GraphicalWireSegment
 The visible, selectable polyline wire on the diagram scene. More...
class  GraphicalWireSplitter
class  GraphicalXor
class  GraphLayout
 Pure OGDF adapter for calculating circuit component positions. More...
struct  GraphLayoutOptions
 Configuration for OGDF-based component placement. More...
class  GUIComponentFactory
 Factory for creating graphical circuit components. More...
class  Icon
class  InteractiveWireRouter
struct  ItemPositionChange
class  LocalWireEditor
class  LogSideView
class  MetadataEditCommand
class  ModifyPropertyCommand
class  MoveItemCommand
struct  NetConnection
class  Port
 Represents a connection point on a component. More...
struct  PreparedDocumentConversion
struct  PreparedEditorDocument
struct  ProjectActions
class  ProjectDocumentController
class  ProjectFileController
struct  ProjectSession
class  ProjectTree
 Project document navigator used by the SILICON editor. More...
struct  ProjectTreeDocumentSelection
class  PropertyPanel
class  PropertySpinBox
class  ResizeComponentCommand
class  RotateItemCommand
struct  RoutedSegment
struct  RoutedWire
 Scene-coordinate wire path produced by an automatic router. More...
struct  RoutingComponent
struct  RoutingSegment
class  SceneLoadPlan
 Scene payload deserialized ahead of time, detached from the host scene. More...
class  SceneSelectionCommand
class  ScopedEventFilter
class  SettingsWindow
 Dialog for editing persisted application settings and shortcuts. More...
struct  ShortcutSetting
 Shortcut row shown in the settings dialog. More...
class  SiliconSettings
 QSettings wrapper configured to read and write SILICON TOML settings files. More...
class  SiliconStyle
class  SiliconWindow
 Main window for the SILICON graphical circuit editor. More...
class  SislVisualizer
class  SubcircuitRectShape
class  TextItem
struct  ThemeColors
class  ThemedSvgItem
class  ThemeEngine
struct  WaveformActions
class  WaveformController
class  WindowActions
 Owns main-window actions, menus, shortcuts, and their enabled state. More...
class  WindowLifetime
struct  WireEndpointEdit
class  WireManager
struct  WireRouteChange
class  WireTopologyCommand

Typedefs

using IoOrientationMap = std::unordered_map<GraphicalIO*, PortSide>
using PortPair = std::pair<QString, QPoint>
using RoutePreview = std::optional<std::vector<RoutedSegment>>
using InteractionMode = DiagramScene::InteractionMode
 Alias for DiagramScene::InteractionMode.
using CodeIndentationFunction = std::string (*)(const CodeIndentationContext&)

Enumerations

enum class  PortPositioning { Automatic , Manual }
enum class  ResizeHandle {
  Left , Right , Top , Bottom ,
  TopLeft , TopRight , BottomLeft , BottomRight
}
enum class  ItemDataRole { Category = Qt::UserRole + 1 }
enum class  ItemCategory : uint32_t {
  None = 0 , GraphicalItem = 1 << 0 , WireSegment = 1 << 1 , Component = 1 << 2 ,
  LogicComponent = 1 << 3 , IO = 1 << 4 , Input = 1 << 5 , Output = 1 << 6
}
enum  SiliconTypes {
  UNKNOWN = QGraphicsItem::UserType , PORT , WIRE_SEGMENT , COMPONENT = WIRE_SEGMENT + 10 ,
  GENERIC_IO , SINGLE_INPUT , SINGLE_OUTPUT , BUS_INPUT ,
  BUS_OUTPUT , CONSTANT , WIRE_SPLITTER , WIRE_MERGER ,
  AND_GATE , NAND_GATE , OR_GATE , NOR_GATE ,
  NOT_GATE , XOR_GATE , D_FLIP_FLOP , E_FLIP_FLOP ,
  JK_FLIP_FLOP , EXTENDER , COMPLEMENTER , HALF_ADDER ,
  FULL_ADDER , ADDER_N_BITS , COMPARATOR , MULTIPLEXER ,
  DEMULTIPLEXER , DECODER , REGISTER , ROM_COMPONENT ,
  SUBCIRCUIT , D_LATCH , SHIFTER , MULTIPLIER ,
  DIVIDER , TEXT , SILICON_END
}
enum  CollidingStatus { NOT_COLLIDING , COLLIDING_WITH_COMPONENT , COLLIDING_WITH_PORT , COLLIDING_WITH_WIRE }
 Collision state of a graphical item. More...
enum class  GraphLayoutAlgorithm { Layered , ForceDirected }
enum class  GraphLayoutDirection { TopToBottom , LeftToRight }
 Signal-flow direction used for a layered layout. More...
enum class  PortSide { LEFT , RIGHT , UP , DOWN }
enum class  WireDragKind { Bend , Edge , Endpoint }
enum class  CodeSyntaxStyle {
  Statement , Label , Conditional , Repeat ,
  Todo , Operator , Comment , Global ,
  Constant , Number , String , Escape ,
  Directive
}
enum class  ProjectTreeItemKind { Project , Section , Document , Architecture }
 Semantic role of an item shown in the project tree. More...
enum class  DocumentType
enum class  ColorToken

Functions

void editGraphicalSubcircuitShape (const std::string &slug, SILICON::project::ProjectContext &project, QUndoStack *undoStack, QWidget *parent=nullptr)
 Opens the modal editor for a project subcircuit's graphical shape.
QPoint automaticPortPosition (const QSize &size, bool input, std::size_t index, std::size_t count)
QRect shapeRect (const QSize &size)
QPoint sanitizePortPosition (const QPointF &position, const QRect &rect)
QSize defaultGraphicalSubcircuitSize (std::size_t inputCount, std::size_t outputCount)
 Default square dimensions for the boundary port counts, in pixels.
std::optional< GraphicalSubcircuitMetadata > parseGraphicalSubcircuitMetadata (const nlohmann::json &document)
 Parses graphical subcircuit metadata from a scene document.
bool subcircuitHasGraphicalMetadata (std::string_view sceneJson)
 Checks whether a scene document contains valid graphical metadata.
GraphicalSubcircuitMetadata synchronizeGraphicalSubcircuitMetadata (const nlohmann::json &document, const GraphicalSubcircuitMetadata &fallbackMetadata, const CircuitResolver *resolver=nullptr)
 Reconciles saved graphical metadata with the current circuit document.
std::vector< GraphicalSubcircuitPortMetadata > synchronizePortsWithBuses (const std::vector< GraphicalSubcircuitPortMetadata > &fallbackPorts, const std::vector< Bus > &buses, const GraphicalSubcircuitMetadata &metadata, bool inputPort)
 Reconciles metadata when a loaded subcircuit component has a different bus count than its saved graphical metadata.
nlohmann::ordered_json graphicalSubcircuitMetadataToJson (const GraphicalSubcircuitMetadata &metadata)
 Serializes graphical metadata to the JSON shape/port object.
bool resizesLeft (ResizeHandle handle)
bool resizesRight (ResizeHandle handle)
bool resizesTop (ResizeHandle handle)
bool resizesBottom (ResizeHandle handle)
QPointF resizeHandlePoint (const QRectF &bounds, ResizeHandle handle)
QPointF resizeAnchor (const QRectF &bounds, ResizeHandle handle)
constexpr ItemCategory operator| (ItemCategory a, ItemCategory b)
constexpr ItemCategory operator& (ItemCategory a, ItemCategory b)
bool hasCategory (const QGraphicsItem *item, ItemCategory cat)
template<typename TargetType>
TargetType * category_cast (QGraphicsItem *item, ItemCategory expectedCategory)
template<typename TargetType>
const TargetType * category_cast (const QGraphicsItem *item, ItemCategory expectedCategory)
int gridToPixels (int value)
int pixelsToGrid (int value)
QPoint gridToPixels (const QPoint &point)
QPoint pixelsToGrid (const QPoint &point)
QSize pixelsToGrid (const QSize &size)
int pixelsToNearestGrid (qreal value)
QPoint pixelsToNearestGrid (const QPointF &point)
bool isPortPositionOutside (const QPoint &pt, const QRect &rect)
 Returns whether a position lies strictly beyond a rectangle boundary.
std::pair< PortSide, QPoint > nearestPortSide (const QPoint &pt, const QRect &rect)
 Finds the nearest rectangle side for an interior or exterior point.
std::span< const CodeFilePresentation > codeFilePresentations ()
const CodeFilePresentation & codeFilePresentation (const project::DocumentType type)
template<class Callback>
auto guardCallback (const QObject *owner, Callback callback)
const DocumentConverter * documentConverterFor (const DocumentType source, const DocumentType target)
std::vector< const DocumentConverter * > documentConvertersFor (const DocumentType source)
PreparedDocumentConversion prepareDocumentConversion (const Document &source, const DocumentType target, const std::span< const Document > projectDocuments, const SILICON::core::ComponentRegistry &registry, const SILICON::core::CircuitResolver &resolver)
const DocumentConverter * documentConverterFor (SILICON::project::DocumentType source, SILICON::project::DocumentType target)
std::vector< const DocumentConverter * > documentConvertersFor (SILICON::project::DocumentType source)
PreparedDocumentConversion prepareDocumentConversion (const SILICON::project::Document &source, SILICON::project::DocumentType target, std::span< const SILICON::project::Document > projectDocuments, const SILICON::core::ComponentRegistry &registry, const SILICON::core::CircuitResolver &resolver)
void registerAllGUIComponents (GUIComponentFactory &factory)
CommonSettingsValues readCommonSettings (const QSettings &settings)
 Reads the common UI and simulation settings into a typed snapshot.
SILICON::ui::theme::Mode themeModeFromText (const QString &value)
 Converts a persisted theme string into a theme engine mode.
QString interactionModeName (const InteractionMode mode)
QIcon categoryIcon (const SILICON::project::DocumentType type)
QAction * makeAction (QObject *parent, const QIcon &icon, const QString &text, const QString &statusTip)
QAction * makeAction (QObject *parent, const QString &text, const QString &statusTip)
QString documentTypeName (SILICON::project::DocumentType type)
void addIndentLevel (std::string &indentation, const int indentWidth)
std::string codePortion (const std::string_view line, const std::regex &strippedPortions)
bool endsWithWord (const std::string_view value, const std::string_view word)
std::string leadingWhitespace (const std::string_view line)
bool regexSearch (const std::string_view value, const std::regex &expression)
void removeIndentLevel (std::string &indentation, const int indentWidth)
std::string_view trimLeft (std::string_view value)
std::string_view trimRight (std::string_view value)

Variables

constexpr int EXTERNAL_PORT_MARGIN_GRID = 2
constexpr int EXTERNAL_PORT_SPACING_GRID = 2
constexpr int GRAPHICAL_SUBCIRCUIT_DEFAULT_SIZE = 2
 Default subcircuit rectangle size in persisted grid units.
constexpr std::array AllResizeHandles
constexpr int GRID_SIZE = 10
const CodeSyntax VERILOG_CODE_SYNTAX
const CodeSyntax SISL_CODE_SYNTAX
const SILICON::logging::Logger uiLog ("ui")

Typedef Documentation

◆ CodeIndentationFunction

using CodeIndentationFunction = std::string (*)(const CodeIndentationContext&)

Definition at line 73 of file codeSyntax.hpp.

◆ InteractionMode

◆ IoOrientationMap

using IoOrientationMap = std::unordered_map<GraphicalIO*, PortSide>

Definition at line 38 of file circuitAutoplacer.hpp.

◆ PortPair

using PortPair = std::pair<QString, QPoint>

Definition at line 42 of file graphicalComponent.hpp.

◆ RoutePreview

using RoutePreview = std::optional<std::vector<RoutedSegment>>

Definition at line 36 of file interactiveWireRouter.hpp.

Enumeration Type Documentation

◆ CodeSyntaxStyle

enum class CodeSyntaxStyle
strong
Enumerator
Statement 
Label 
Conditional 
Repeat 
Todo 
Operator 
Comment 
Global 
Constant 
Number 
String 
Escape 
Directive 

Definition at line 26 of file codeSyntax.hpp.

◆ CollidingStatus

Collision state of a graphical item.

Enumerator
NOT_COLLIDING 

Not colliding with anything

COLLIDING_WITH_COMPONENT 

Colliding with another component

COLLIDING_WITH_PORT 

Colliding with a port

COLLIDING_WITH_WIRE 

Colliding with a wire

Definition at line 43 of file graphicalItem.hpp.

◆ ColorToken

enum class ColorToken
strong

Definition at line 33 of file theme.hpp.

◆ DocumentType

enum class DocumentType
strong

Definition at line 37 of file projectDocument.hpp.

◆ GraphLayoutAlgorithm

enum class GraphLayoutAlgorithm
strong
Enumerator
Layered 
ForceDirected 

Definition at line 34 of file ogdfCircuit.hpp.

◆ GraphLayoutDirection

enum class GraphLayoutDirection
strong

Signal-flow direction used for a layered layout.

Enumerator
TopToBottom 
LeftToRight 

Definition at line 40 of file ogdfCircuit.hpp.

◆ ItemCategory

enum class ItemCategory : uint32_t
strong
Enumerator
None 
GraphicalItem 
WireSegment 
Component 
LogicComponent 
IO 
Input 
Output 

Definition at line 28 of file enums.hpp.

◆ ItemDataRole

enum class ItemDataRole
strong
Enumerator
Category 

Definition at line 26 of file enums.hpp.

◆ PortPositioning

enum class PortPositioning
strong
Enumerator
Automatic 
Manual 

Definition at line 41 of file metadata.hpp.

◆ PortSide

enum class PortSide
strong
Enumerator
LEFT 
RIGHT 
UP 
DOWN 

Definition at line 28 of file portGeometry.hpp.

◆ ProjectTreeItemKind

enum class ProjectTreeItemKind
strong

Semantic role of an item shown in the project tree.

Enumerator
Project 
Section 
Document 
Architecture 

Definition at line 32 of file projectTree.hpp.

◆ ResizeHandle

enum class ResizeHandle
strong
Enumerator
Left 
Right 
Top 
Bottom 
TopLeft 
TopRight 
BottomLeft 
BottomRight 

Definition at line 16 of file componentResize.hpp.

◆ SiliconTypes

Enumerator
UNKNOWN 
PORT 
WIRE_SEGMENT 
COMPONENT 
GENERIC_IO 
SINGLE_INPUT 
SINGLE_OUTPUT 
BUS_INPUT 
BUS_OUTPUT 
CONSTANT 
WIRE_SPLITTER 
WIRE_MERGER 
AND_GATE 
NAND_GATE 
OR_GATE 
NOR_GATE 
NOT_GATE 
XOR_GATE 
D_FLIP_FLOP 
E_FLIP_FLOP 
JK_FLIP_FLOP 
EXTENDER 
COMPLEMENTER 
HALF_ADDER 
FULL_ADDER 
ADDER_N_BITS 
COMPARATOR 
MULTIPLEXER 
DEMULTIPLEXER 
DECODER 
REGISTER 
ROM_COMPONENT 
SUBCIRCUIT 
D_LATCH 
SHIFTER 
MULTIPLIER 
DIVIDER 
TEXT 
SILICON_END 

Definition at line 72 of file enums.hpp.

◆ WireDragKind

enum class WireDragKind
strong
Enumerator
Bend 
Edge 
Endpoint 

Definition at line 41 of file diagramSceneEdit.hpp.

Function Documentation

◆ addIndentLevel()

void addIndentLevel ( std::string & indentation,
const int indentWidth )

Definition at line 78 of file indentationUtils.cpp.

◆ automaticPortPosition()

QPoint automaticPortPosition ( const QSize & size,
bool input,
std::size_t index,
std::size_t count )
inlinenodiscard

Places one port in the automatic layout for the entire component shape.

Definition at line 31 of file geometry.hpp.

◆ category_cast() [1/2]

template<typename TargetType>
const TargetType * category_cast ( const QGraphicsItem * item,
ItemCategory expectedCategory )

Definition at line 66 of file enums.hpp.

◆ category_cast() [2/2]

template<typename TargetType>
TargetType * category_cast ( QGraphicsItem * item,
ItemCategory expectedCategory )

Definition at line 60 of file enums.hpp.

◆ categoryIcon()

QIcon categoryIcon ( const SILICON::project::DocumentType type)

Definition at line 26 of file uiUtils.cpp.

◆ codeFilePresentation()

const CodeFilePresentation & codeFilePresentation ( const project::DocumentType type)
nodiscard

Definition at line 44 of file codeFilePresentation.cpp.

◆ codeFilePresentations()

std::span< const CodeFilePresentation > codeFilePresentations ( )
nodiscard

Definition at line 39 of file codeFilePresentation.cpp.

◆ codePortion()

std::string codePortion ( const std::string_view line,
const std::regex & strippedPortions )
nodiscard

Masks each regex match with spaces before structural matching.

Definition at line 48 of file indentationUtils.cpp.

◆ defaultGraphicalSubcircuitSize()

QSize defaultGraphicalSubcircuitSize ( std::size_t inputCount,
std::size_t outputCount )
nodiscard

Default square dimensions for the boundary port counts, in pixels.

Definition at line 215 of file metadata.cpp.

◆ documentConverterFor() [1/2]

const DocumentConverter * documentConverterFor ( const DocumentType source,
const DocumentType target )

Definition at line 92 of file document_conversion.cpp.

◆ documentConverterFor() [2/2]

const DocumentConverter * documentConverterFor ( SILICON::project::DocumentType source,
SILICON::project::DocumentType target )
nodiscard

◆ documentConvertersFor() [1/2]

std::vector< const DocumentConverter * > documentConvertersFor ( const DocumentType source)

Definition at line 102 of file document_conversion.cpp.

◆ documentConvertersFor() [2/2]

std::vector< const DocumentConverter * > documentConvertersFor ( SILICON::project::DocumentType source)
nodiscard

◆ documentTypeName()

QString documentTypeName ( SILICON::project::DocumentType type)
inline

Definition at line 30 of file uiUtils.hpp.

◆ editGraphicalSubcircuitShape()

void editGraphicalSubcircuitShape ( const std::string & slug,
SILICON::project::ProjectContext & project,
QUndoStack * undoStack,
QWidget * parent = nullptr )

Opens the modal editor for a project subcircuit's graphical shape.

Parameters
slugProject-local subcircuit slug to edit.
projectProject context containing the subcircuit metadata.
undoStackOptional undo stack used to route metadata changes.
parentOptional parent widget for the dialog and warnings.

Definition at line 439 of file componentShapeEditor.cpp.

◆ endsWithWord()

bool endsWithWord ( const std::string_view value,
const std::string_view word )
nodiscard

Definition at line 67 of file indentationUtils.cpp.

◆ graphicalSubcircuitMetadataToJson()

nlohmann::ordered_json graphicalSubcircuitMetadataToJson ( const GraphicalSubcircuitMetadata & metadata)
nodiscard

Serializes graphical metadata to the JSON shape/port object.

Parameters
metadataRuntime pixel metadata.
Returns
JSON metadata with dimensions and port positions in grid units.

Definition at line 324 of file metadata.cpp.

◆ gridToPixels() [1/2]

QPoint gridToPixels ( const QPoint & point)
inlinenodiscard

Definition at line 37 of file grid.hpp.

◆ gridToPixels() [2/2]

int gridToPixels ( int value)
inlinenodiscard

Definition at line 29 of file grid.hpp.

◆ guardCallback()

template<class Callback>
auto guardCallback ( const QObject * owner,
Callback callback )

Makes an asynchronous callback inert when its owner disappears.

Definition at line 20 of file lifetime.hpp.

◆ hasCategory()

bool hasCategory ( const QGraphicsItem * item,
ItemCategory cat )
inline

Definition at line 49 of file enums.hpp.

◆ interactionModeName()

QString interactionModeName ( const InteractionMode mode)

Definition at line 12 of file uiUtils.cpp.

◆ isPortPositionOutside()

bool isPortPositionOutside ( const QPoint & pt,
const QRect & rect )
inlinenodiscard

Returns whether a position lies strictly beyond a rectangle boundary.

Definition at line 62 of file portGeometry.hpp.

◆ leadingWhitespace()

std::string leadingWhitespace ( const std::string_view line)
nodiscard

Definition at line 40 of file indentationUtils.cpp.

◆ makeAction() [1/2]

QAction * makeAction ( QObject * parent,
const QIcon & icon,
const QString & text,
const QString & statusTip )

Definition at line 38 of file uiUtils.cpp.

◆ makeAction() [2/2]

QAction * makeAction ( QObject * parent,
const QString & text,
const QString & statusTip )

Definition at line 47 of file uiUtils.cpp.

◆ nearestPortSide()

std::pair< PortSide, QPoint > nearestPortSide ( const QPoint & pt,
const QRect & rect )
inlinenodiscard

Finds the nearest rectangle side for an interior or exterior point.

Returns
The side and the point's projection onto that side.

Definition at line 73 of file portGeometry.hpp.

◆ operator&()

ItemCategory operator& ( ItemCategory a,
ItemCategory b )
constexpr

Definition at line 44 of file enums.hpp.

◆ operator|()

ItemCategory operator| ( ItemCategory a,
ItemCategory b )
constexpr

Definition at line 39 of file enums.hpp.

◆ parseGraphicalSubcircuitMetadata()

std::optional< GraphicalSubcircuitMetadata > parseGraphicalSubcircuitMetadata ( const nlohmann::json & document)
nodiscard

Parses graphical subcircuit metadata from a scene document.

Parameters
documentParsed subcircuit scene JSON.
Returns
Parsed metadata, or std::nullopt when metadata is missing or invalid.

Definition at line 224 of file metadata.cpp.

◆ pixelsToGrid() [1/3]

QPoint pixelsToGrid ( const QPoint & point)
inlinenodiscard

Definition at line 41 of file grid.hpp.

◆ pixelsToGrid() [2/3]

QSize pixelsToGrid ( const QSize & size)
inlinenodiscard

Definition at line 45 of file grid.hpp.

◆ pixelsToGrid() [3/3]

int pixelsToGrid ( int value)
inlinenodiscard

Definition at line 33 of file grid.hpp.

◆ pixelsToNearestGrid() [1/2]

QPoint pixelsToNearestGrid ( const QPointF & point)
inlinenodiscard

Definition at line 53 of file grid.hpp.

◆ pixelsToNearestGrid() [2/2]

int pixelsToNearestGrid ( qreal value)
inlinenodiscard

Definition at line 49 of file grid.hpp.

◆ prepareDocumentConversion() [1/2]

PreparedDocumentConversion prepareDocumentConversion ( const Document & source,
const DocumentType target,
const std::span< const Document > projectDocuments,
const SILICON::core::ComponentRegistry & registry,
const SILICON::core::CircuitResolver & resolver )

Definition at line 113 of file document_conversion.cpp.

◆ prepareDocumentConversion() [2/2]

PreparedDocumentConversion prepareDocumentConversion ( const SILICON::project::Document & source,
SILICON::project::DocumentType target,
std::span< const SILICON::project::Document > projectDocuments,
const SILICON::core::ComponentRegistry & registry,
const SILICON::core::CircuitResolver & resolver )
nodiscard

◆ readCommonSettings()

CommonSettingsValues readCommonSettings ( const QSettings & settings)
nodiscard

Reads the common UI and simulation settings into a typed snapshot.

Parameters
settingsSource settings object.
Returns
Current common settings values with defaults applied.

Definition at line 260 of file siliconSettings.cpp.

◆ regexSearch()

bool regexSearch ( const std::string_view value,
const std::regex & expression )
nodiscard

Definition at line 62 of file indentationUtils.cpp.

◆ registerAllGUIComponents()

void registerAllGUIComponents ( GUIComponentFactory & factory)

Definition at line 44 of file gui_component_registration.cpp.

◆ removeIndentLevel()

void removeIndentLevel ( std::string & indentation,
const int indentWidth )

Definition at line 83 of file indentationUtils.cpp.

◆ resizeAnchor()

QPointF resizeAnchor ( const QRectF & bounds,
ResizeHandle handle )
inline

Fixed anchor: opposite corner, opposite vertical midpoint, or top of the opposite side.

Definition at line 68 of file componentResize.hpp.

◆ resizeHandlePoint()

QPointF resizeHandlePoint ( const QRectF & bounds,
ResizeHandle handle )
inline

Definition at line 56 of file componentResize.hpp.

◆ resizesBottom()

bool resizesBottom ( ResizeHandle handle)
inline

Definition at line 50 of file componentResize.hpp.

◆ resizesLeft()

bool resizesLeft ( ResizeHandle handle)
inline

Definition at line 32 of file componentResize.hpp.

◆ resizesRight()

bool resizesRight ( ResizeHandle handle)
inline

Definition at line 38 of file componentResize.hpp.

◆ resizesTop()

bool resizesTop ( ResizeHandle handle)
inline

Definition at line 44 of file componentResize.hpp.

◆ sanitizePortPosition()

QPoint sanitizePortPosition ( const QPointF & position,
const QRect & rect )
inlinenodiscard

Constrains a port to a grid-aligned, two-grid-unit extension from the rectangle.

Definition at line 48 of file geometry.hpp.

◆ shapeRect()

QRect shapeRect ( const QSize & size)
inlinenodiscard

Definition at line 42 of file geometry.hpp.

◆ subcircuitHasGraphicalMetadata()

bool subcircuitHasGraphicalMetadata ( std::string_view sceneJson)
nodiscard

Checks whether a scene document contains valid graphical metadata.

Parameters
sceneJsonSerialized subcircuit scene JSON.
Returns
True when parseGraphicalSubcircuitMetadata() can parse the document.

Definition at line 269 of file metadata.cpp.

◆ synchronizeGraphicalSubcircuitMetadata()

GraphicalSubcircuitMetadata synchronizeGraphicalSubcircuitMetadata ( const nlohmann::json & document,
const GraphicalSubcircuitMetadata & fallbackMetadata,
const CircuitResolver * resolver = nullptr )
nodiscard

Reconciles saved graphical metadata with the current circuit document.

Boundary ports are re-derived from the circuit contents while matching existing positions by identity, with name/index compatibility for old metadata. Automatic dimensions use twice the larger boundary port count in grid units, with a minimum of two grid units. Generated port groups are centered on each side with two grid units between centers. Automatic layouts follow size/count changes; manual layouts retain saved positions.

Parameters
documentParsed subcircuit scene JSON.
fallbackMetadataExisting metadata to preserve user-edited positions.
resolverOptional resolver for dependent subcircuits.
Returns
Metadata whose ports match the current boundary components.

Definition at line 276 of file metadata.cpp.

◆ synchronizePortsWithBuses()

std::vector< GraphicalSubcircuitPortMetadata > synchronizePortsWithBuses ( const std::vector< GraphicalSubcircuitPortMetadata > & fallbackPorts,
const std::vector< Bus > & buses,
const GraphicalSubcircuitMetadata & metadata,
const bool inputPort )
nodiscard

Reconciles metadata when a loaded subcircuit component has a different bus count than its saved graphical metadata.

Definition at line 298 of file metadata.cpp.

◆ themeModeFromText()

SILICON::ui::theme::Mode themeModeFromText ( const QString & value)
nodiscard

Converts a persisted theme string into a theme engine mode.

Parameters
valuePersisted theme identifier.
Returns
Matching theme mode, defaulting to light for unknown values.

Definition at line 275 of file siliconSettings.cpp.

◆ trimLeft()

std::string_view trimLeft ( std::string_view value)
nodiscard

Definition at line 25 of file indentationUtils.cpp.

◆ trimRight()

std::string_view trimRight ( std::string_view value)
nodiscard

Definition at line 33 of file indentationUtils.cpp.

Variable Documentation

◆ AllResizeHandles

◆ EXTERNAL_PORT_MARGIN_GRID

int EXTERNAL_PORT_MARGIN_GRID = 2
inlineconstexpr

Definition at line 27 of file geometry.hpp.

◆ EXTERNAL_PORT_SPACING_GRID

int EXTERNAL_PORT_SPACING_GRID = 2
inlineconstexpr

Definition at line 28 of file geometry.hpp.

◆ GRAPHICAL_SUBCIRCUIT_DEFAULT_SIZE

int GRAPHICAL_SUBCIRCUIT_DEFAULT_SIZE = 2
inlineconstexpr

Default subcircuit rectangle size in persisted grid units.

Definition at line 44 of file metadata.hpp.

◆ GRID_SIZE

int GRID_SIZE = 10
inlineconstexpr

Definition at line 27 of file grid.hpp.

◆ SISL_CODE_SYNTAX

const CodeSyntax SISL_CODE_SYNTAX
Initial value:
{
.keywordGroups = KEYWORD_GROUPS,
.matchRules = MATCH_RULES,
.regionRules = REGION_RULES,
.extraWordCharacters = "-",
.indentation = &SISL_INDENTATION,
}

Definition at line 101 of file sisl.cpp.

◆ uiLog

const SILICON::logging::Logger uiLog("ui") ( "ui" )

◆ VERILOG_CODE_SYNTAX

const CodeSyntax VERILOG_CODE_SYNTAX
Initial value:
{
.keywordGroups = KEYWORD_GROUPS,
.matchRules = MATCH_RULES,
.regionRules = REGION_RULES,
.extraWordCharacters = "?",
.indentation = &VERILOG_INDENTATION,
}

Definition at line 437 of file verilog.cpp.