forked from analogdevicesinc/scopy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdragzone.h
43 lines (34 loc) · 819 Bytes
/
dragzone.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
35
36
37
38
39
40
41
42
43
#ifndef DRAGZONE_H
#define DRAGZONE_H
#include <QWidget>
#include <QMouseEvent>
#include <QDragMoveEvent>
#include <QDropEvent>
#include <QMimeData>
namespace Ui {
class DragZone;
}
namespace adiscope{
class DragZone : public QWidget
{
Q_OBJECT
public:
explicit DragZone(QWidget *parent = 0);
~DragZone();
bool eventFilter(QObject *watched, QEvent *event);
int getPosition() const;
void setPosition(int value);
Q_SIGNALS:
void requestPositionChange(int, int, bool);
void highlightLastSeparator(bool);
private Q_SLOTS:
void dragEnterEvent(QDragEnterEvent *event);
void dragMoveEvent(QDragMoveEvent *event);
void dragLeaveEvent(QDragLeaveEvent *event);
void dropEvent(QDropEvent *event);
private:
Ui::DragZone *ui;
int position;
};
}
#endif // DRAGZONE_H