Laser Cutter application v1.0

dragwidget.h
Go to the documentation of this file.
1 #ifndef DRAGWIDGET_H
2 #define DRAGWIDGET_H
3
4 #include <QFrame>
5 #include <QLabel>
6 #include <QtWidgets>
7
8 #include "svglabel.h"
9
10
11 QT_BEGIN_NAMESPACE
12 class QDragEnterEvent;
13 class QDropEvent;
14 QT_END_NAMESPACE
15
21 class DragWidget : public QFrame
22 {
23 public:
29 DragWidget(QWidget *parent = nullptr);
30
34 ~DragWidget();
35
36
40 void ClearWidget(bool flag);
41
42 protected:
43
49 void dragEnterEvent(QDragEnterEvent *event) override;
50
51
57 void dragMoveEvent(QDragMoveEvent *event) override;
58
59
66 void dropEvent(QDropEvent *event) override;
67
68
75 void mousePressEvent(QMouseEvent *event) override;
76
77 private:
78
83 QString pathToImg;
84
85 };
86
87 #endif // DRAGWIDGET_H
DragWidget::dropEvent
void dropEvent(QDropEvent *event) override
dropEvent, overridden
Definition: dragwidget.cpp:74
DragWidget::~DragWidget
~DragWidget()
Default d'tor.
Definition: dragwidget.cpp:10
DragWidget::DragWidget
DragWidget(QWidget *parent=nullptr)
Default c'tor.
Definition: dragwidget.cpp:3
DragWidget::pathToImg
QString pathToImg
Definition: dragwidget.h:83
DragWidget::mousePressEvent
void mousePressEvent(QMouseEvent *event) override
mousePressEvent, overridden
Definition: dragwidget.cpp:127
DragWidget::dragEnterEvent
void dragEnterEvent(QDragEnterEvent *event) override
dragEnterEvent, overridden
Definition: dragwidget.cpp:34
DragWidget::dragMoveEvent
void dragMoveEvent(QDragMoveEvent *event) override
dragMoveEvent, overridden
Definition: dragwidget.cpp:54
DragWidget::ClearWidget
void ClearWidget(bool flag)
ClearWidget.
Definition: dragwidget.cpp:15
svglabel.h
DragWidget
Custom Widget for drag&drop action.
Definition: dragwidget.h:22