Changeset View
Changeset View
Standalone View
Standalone View
src/ViewContainerTabBar.cpp
Show First 20 Lines • Show All 75 Lines • ▼ Show 20 Line(s) | 70 | { | |||
---|---|---|---|---|---|
76 | QTabBar::mousePressEvent(event); | 76 | QTabBar::mousePressEvent(event); | ||
77 | } | 77 | } | ||
78 | 78 | | |||
79 | void ViewContainerTabBar::mouseMoveEvent(QMouseEvent *event) | 79 | void ViewContainerTabBar::mouseMoveEvent(QMouseEvent *event) | ||
80 | { | 80 | { | ||
81 | if (event->buttons() == Qt::LeftButton) { | 81 | if (event->buttons() == Qt::LeftButton) { | ||
82 | QPoint dragPos = _dragStart - event->pos(); | 82 | QPoint dragPos = _dragStart - event->pos(); | ||
83 | if (dragPos.manhattanLength() > QApplication::startDragDistance() | 83 | if (dragPos.manhattanLength() > QApplication::startDragDistance() | ||
84 | && _mousePressTimer->elapsed() > QApplication::startDragTime()) { | 84 | || _mousePressTimer->elapsed() > QApplication::startDragTime()) { | ||
85 | int tab = tabAt(_dragStart); | 85 | int tab = tabAt(_dragStart); | ||
86 | if (tab != -1) { | 86 | if (tab != -1) { | ||
87 | emit initiateDrag(tab); | 87 | emit initiateDrag(tab); | ||
88 | } | 88 | } | ||
89 | } | 89 | } | ||
90 | } | 90 | } | ||
91 | QTabBar::mouseMoveEvent(event); | 91 | QTabBar::mouseMoveEvent(event); | ||
92 | } | 92 | } | ||
▲ Show 20 Lines • Show All 183 Lines • Show Last 20 Lines |