|
wiRedPanda
Logic Circuit Simulator
|
Push-button that accepts IC file drag-and-drop to trigger IC removal. More...
#include <TrashButton.h>
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 |
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.
|
explicit |
Constructs the trash button with optional parent.
Definition at line 16 of file TrashButton.cpp.
|
overrideprotected |
Definition at line 22 of file TrashButton.cpp.
References MimeType::DragDrop, and MimeType::DragDropLegacy.
|
overrideprotected |
Definition at line 32 of file TrashButton.cpp.
References MimeType::DragDrop, MimeType::DragDropLegacy, readDragDropPayload(), Serialization::readPandaHeader(), removeEmbeddedIC(), and removeICFile().
| void TrashButton::removeEmbeddedIC | ( | const QString & | blobName | ) |
Removes all embedded IC instances with the given blobName from the scene.
Referenced by dropEvent().
| void TrashButton::removeICFile | ( | const QString & | icFileName | ) |
Removes the IC file icFileName from disk after user confirmation.
Referenced by dropEvent().