-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdragwidget.h
34 lines (29 loc) · 872 Bytes
/
dragwidget.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#ifndef DRAGWIDGET_H
#define DRAGWIDGET_H
#include <QFrame>
#include <QMap>
#include "dialogservice.h"
#include "domelement.h"
class QDragEnterEvent;
class QDropEvent;
/**
* @brief Base class that handles drap & drop actions.
*/
class DragWidget : public QFrame
{
public:
DragWidget(QWidget *parent = 0);
protected:
void dragEnterEvent(QDragEnterEvent *event) Q_DECL_OVERRIDE;
void dragMoveEvent(QDragMoveEvent *event) Q_DECL_OVERRIDE;
void dropEvent(QDropEvent *event) Q_DECL_OVERRIDE;
void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
void mouseDoubleClickEvent(QMouseEvent * event) Q_DECL_OVERRIDE;
void paintEvent(QPaintEvent *event);
void deleteElement(DomElement *element);
private:
DomElement *createDomElement(int type);
DialogService* dialogService;
QMap<QString, QString> tmp;
};
#endif // DRAGWIDGET_H