summaryrefslogtreecommitdiffstats
path: root/application/widgets/DropLabel.h
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2019-10-14 02:31:53 +0200
committerPetr Mrázek <peterix@gmail.com>2019-10-14 02:31:53 +0200
commit9cc5ebcdd15736d648554c81e250cd6ce21f6e98 (patch)
tree8a3ee8329208e1324d278e1f21c826e33b00ba53 /application/widgets/DropLabel.h
parentc60647523e0a19adff994ff165410e5f0438d718 (diff)
downloadMultiMC-9cc5ebcdd15736d648554c81e250cd6ce21f6e98.tar
MultiMC-9cc5ebcdd15736d648554c81e250cd6ce21f6e98.tar.gz
MultiMC-9cc5ebcdd15736d648554c81e250cd6ce21f6e98.tar.lz
MultiMC-9cc5ebcdd15736d648554c81e250cd6ce21f6e98.tar.xz
MultiMC-9cc5ebcdd15736d648554c81e250cd6ce21f6e98.zip
GH-2859 improve UI for twitch pack import with drag&drop
Diffstat (limited to 'application/widgets/DropLabel.h')
-rw-r--r--application/widgets/DropLabel.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/application/widgets/DropLabel.h b/application/widgets/DropLabel.h
new file mode 100644
index 00000000..c5ca0bcc
--- /dev/null
+++ b/application/widgets/DropLabel.h
@@ -0,0 +1,20 @@
+#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;
+};