| | 605 | } |
|---|
| | 606 | |
|---|
| | 607 | void EventHandler::setPanScrollCursor() |
|---|
| | 608 | { |
|---|
| | 609 | // At the original click location we draw a 4 arrowed icon. Over this icon there won't be any scroll |
|---|
| | 610 | // So we don't want to change the cursor over this area |
|---|
| | 611 | const int noScrollRadius = 9; |
|---|
| | 612 | bool east = m_panScrollStartPos.x() < (m_currentMousePosition.x() - noScrollRadius); |
|---|
| | 613 | bool west = m_panScrollStartPos.x() > (m_currentMousePosition.x() + noScrollRadius); |
|---|
| | 614 | bool north = m_panScrollStartPos.y() > (m_currentMousePosition.y() + noScrollRadius); |
|---|
| | 615 | bool south = m_panScrollStartPos.y() < (m_currentMousePosition.y() - noScrollRadius); |
|---|
| | 616 | |
|---|
| | 617 | if (north) { |
|---|
| | 618 | if (east) |
|---|
| | 619 | m_frame->view()->setCursor(northEastPanningCursor()); |
|---|
| | 620 | else if (west) |
|---|
| | 621 | m_frame->view()->setCursor(northWestPanningCursor()); |
|---|
| | 622 | else |
|---|
| | 623 | m_frame->view()->setCursor(northPanningCursor()); |
|---|
| | 624 | } else if (south) { |
|---|
| | 625 | if (east) |
|---|
| | 626 | m_frame->view()->setCursor(southEastPanningCursor()); |
|---|
| | 627 | else if (west) |
|---|
| | 628 | m_frame->view()->setCursor(southWestPanningCursor()); |
|---|
| | 629 | else |
|---|
| | 630 | m_frame->view()->setCursor(southPanningCursor()); |
|---|
| | 631 | } else if (east) |
|---|
| | 632 | m_frame->view()->setCursor(eastPanningCursor()); |
|---|
| | 633 | else if (west) |
|---|
| | 634 | m_frame->view()->setCursor(westPanningCursor()); |
|---|
| | 635 | else |
|---|
| | 636 | m_frame->view()->setCursor(middlePanningCursor()); |
|---|