remove drop label
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
0b6ce5525d
commit
0f9ea5c949
3 changed files with 0 additions and 61 deletions
|
@ -1085,8 +1085,6 @@ SET(LAUNCHER_SOURCES
|
||||||
ui/widgets/CustomCommands.h
|
ui/widgets/CustomCommands.h
|
||||||
ui/widgets/EnvironmentVariables.cpp
|
ui/widgets/EnvironmentVariables.cpp
|
||||||
ui/widgets/EnvironmentVariables.h
|
ui/widgets/EnvironmentVariables.h
|
||||||
ui/widgets/DropLabel.cpp
|
|
||||||
ui/widgets/DropLabel.h
|
|
||||||
ui/widgets/FocusLineEdit.cpp
|
ui/widgets/FocusLineEdit.cpp
|
||||||
ui/widgets/FocusLineEdit.h
|
ui/widgets/FocusLineEdit.h
|
||||||
ui/widgets/IconLabel.cpp
|
ui/widgets/IconLabel.cpp
|
||||||
|
|
|
@ -1,40 +0,0 @@
|
||||||
#include "DropLabel.h"
|
|
||||||
|
|
||||||
#include <QDropEvent>
|
|
||||||
#include <QMimeData>
|
|
||||||
|
|
||||||
DropLabel::DropLabel(QWidget* parent) : QLabel(parent)
|
|
||||||
{
|
|
||||||
setAcceptDrops(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
void DropLabel::dragEnterEvent(QDragEnterEvent* event)
|
|
||||||
{
|
|
||||||
event->acceptProposedAction();
|
|
||||||
}
|
|
||||||
|
|
||||||
void DropLabel::dragMoveEvent(QDragMoveEvent* event)
|
|
||||||
{
|
|
||||||
event->acceptProposedAction();
|
|
||||||
}
|
|
||||||
|
|
||||||
void DropLabel::dragLeaveEvent(QDragLeaveEvent* event)
|
|
||||||
{
|
|
||||||
event->accept();
|
|
||||||
}
|
|
||||||
|
|
||||||
void DropLabel::dropEvent(QDropEvent* event)
|
|
||||||
{
|
|
||||||
const QMimeData* mimeData = event->mimeData();
|
|
||||||
|
|
||||||
if (!mimeData) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mimeData->hasUrls()) {
|
|
||||||
auto urls = mimeData->urls();
|
|
||||||
emit droppedURLs(urls);
|
|
||||||
}
|
|
||||||
|
|
||||||
event->acceptProposedAction();
|
|
||||||
}
|
|
|
@ -1,19 +0,0 @@
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include <QLabel>
|
|
||||||
|
|
||||||
class DropLabel : public QLabel {
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
explicit DropLabel(QWidget* parent = nullptr);
|
|
||||||
|
|
||||||
signals:
|
|
||||||
void droppedURLs(QList<QUrl> urls);
|
|
||||||
|
|
||||||
protected:
|
|
||||||
void dropEvent(QDropEvent* event) override;
|
|
||||||
void dragEnterEvent(QDragEnterEvent* event) override;
|
|
||||||
void dragMoveEvent(QDragMoveEvent* event) override;
|
|
||||||
void dragLeaveEvent(QDragLeaveEvent* event) override;
|
|
||||||
};
|
|
Loading…
Add table
Add a link
Reference in a new issue