55 const QPixmap &
pixmap()
const;
92 QPoint m_dragStartPos;
98 bool m_isEmbedded =
false;
Central enumeration types for element types, groups, and signal status.
Enums::ElementType ElementType
void startDrag()
Initiates a drag operation carrying this label's element type.
void mouseMoveEvent(QMouseEvent *event) override
Starts the drag once the pointer moves past the platform drag threshold.
void addToSceneRequested(QMimeData *mimeData)
QString name() const
Returns the displayed element name.
bool isEmbedded() const
Returns true if this label represents an embedded IC.
void mousePressEvent(QMouseEvent *event) override
const QPixmap & pixmap() const
Returns the icon pixmap shown in this label.
void updateName()
Updates the displayed name to match the current application locale.
QMimeData * mimeData() const
Creates and returns the MIME data payload used for drag-and-drop.
QString icFileName() const
Returns the IC file path, or an empty string for built-in elements.
void mouseDoubleClickEvent(QMouseEvent *event) override
Requests adding this element to the active scene (drag-free shortcut).
void updateTheme()
Updates colors to match the current application theme.
const ElementType & elementType() const
Returns the element type identifier for this label.
ElementLabel(const QPixmap &pixmap, ElementType type, const QString &icFileName, QWidget *parent=nullptr, bool isEmbedded=false)
Constructs an ElementLabel from a pixmap.