wiRedPanda
Logic Circuit Simulator
Loading...
Searching...
No Matches
TrashButton Class Reference

Push-button that accepts IC file drag-and-drop to trigger IC removal. More...

#include <TrashButton.h>

Inheritance diagram for TrashButton:
[legend]

Public Member Functions

void removeEmbeddedIC (const QString &blobName)
 Removes all embedded IC instances with the given blobName from the scene.
void removeICFile (const QString &icFileName)
 Removes the IC file icFileName from disk after user confirmation.
 TrashButton (QWidget *parent=nullptr)
 Constructs the trash button with optional parent.

Protected Member Functions

void dragEnterEvent (QDragEnterEvent *event) override
void dropEvent (QDropEvent *event) override

Detailed Description

Push-button that accepts IC file drag-and-drop to trigger IC removal.

When an IC file is dragged from the IC list and dropped onto this button, it emits removeICFile() with the IC's file path so the caller can delete it.

Definition at line 19 of file TrashButton.h.

Constructor & Destructor Documentation

◆ TrashButton()

TrashButton::TrashButton ( QWidget * parent = nullptr)
explicit

Constructs the trash button with optional parent.

Definition at line 16 of file TrashButton.cpp.

Member Function Documentation

◆ dragEnterEvent()

void TrashButton::dragEnterEvent ( QDragEnterEvent * event)
overrideprotected
Reimplemented from base class.

Definition at line 22 of file TrashButton.cpp.

References MimeType::DragDrop, and MimeType::DragDropLegacy.

◆ dropEvent()

void TrashButton::dropEvent ( QDropEvent * event)
overrideprotected

◆ removeEmbeddedIC()

void TrashButton::removeEmbeddedIC ( const QString & blobName)

Removes all embedded IC instances with the given blobName from the scene.

Referenced by dropEvent().

◆ removeICFile()

void TrashButton::removeICFile ( const QString & icFileName)

Removes the IC file icFileName from disk after user confirmation.

Referenced by dropEvent().


The documentation for this class was generated from the following files: