-
Notifications
You must be signed in to change notification settings - Fork 1
/
GuiDrag.h
45 lines (36 loc) · 1.01 KB
/
GuiDrag.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
44
45
/*
* Copyright (C) 2013 Rajendran Thirupugalsamy
* See LICENSE for full copyright and license information.
* See COPYING for distribution information.
*/
#ifndef GUIDRAG_H
#define GUIDRAG_H
#include <QGridLayout>
#include <QToolButton>
#include "GuiBase.h"
class GuiBase;
class GuiTabBar;
class GuiDragDropSite : public QWidget {
public:
enum GuiDragDropLocation {
DRAG_DROP_NONE,
DRAG_DROP_ON_TERMINAL,
DRAG_DROP_ON_TABBAR
};
private:
QGridLayout layout;
GuiDragDropLocation drop_loc;
int tabind;
QToolButton btn[5];
public:
GuiBase::SplitType drop_mode;
GuiDragDropSite(QWidget *parent = NULL);
GuiBase::SplitType updateDropMode(const QPoint &pos);
int updateDropOnTabBar(const QPoint &pos, GuiTabBar *tab);
void clearDropMode();
void paintEvent(QPaintEvent *e);
GuiBase::SplitType get_drop_mode() { return drop_mode; }
int get_tabind() { return tabind; }
GuiDragDropLocation get_drop_loc() { return drop_loc; }
};
#endif // GUIDRAG_H