wiRedPanda
Logic Circuit Simulator
Loading...
Searching...
No Matches
TrashButton.h
Go to the documentation of this file.
1// Copyright 2015 - 2026, GIBIS-UNIFESP and the wiRedPanda contributors
2// SPDX-License-Identifier: GPL-3.0-or-later
3
7
8#pragma once
9
10#include <QPushButton>
11
19class TrashButton : public QPushButton
20{
21 Q_OBJECT
22
23public:
24 // --- Lifecycle ---
25
27 explicit TrashButton(QWidget *parent = nullptr);
28
29signals:
30 // --- Signals ---
31
33 void removeICFile(const QString &icFileName);
34
36 void removeEmbeddedIC(const QString &blobName);
37
38protected:
39 // --- Drag and Drop ---
40
42 void dragEnterEvent(QDragEnterEvent *event) override;
44 void dropEvent(QDropEvent *event) override;
45};
void removeEmbeddedIC(const QString &blobName)
Removes all embedded IC instances with the given blobName from the scene.
void dropEvent(QDropEvent *event) override
void dragEnterEvent(QDragEnterEvent *event) override
TrashButton(QWidget *parent=nullptr)
Constructs the trash button with optional parent.
void removeICFile(const QString &icFileName)
Removes the IC file icFileName from disk after user confirmation.