| 65 | } |
| 66 | |
| 67 | bool SlidingPanel::insideRect(QPoint screenPos) { |
| 68 | const auto leftTop = mapToGlobal(QPoint(rect().left(), rect().top())); |
| 69 | const auto rightBottom = mapToGlobal(QPoint(rect().right(), rect().bottom())); |
| 70 | const auto globalRect = QRect(leftTop.x(), leftTop.y(), rightBottom.x(), rightBottom.y()); |
| 71 | return globalRect.contains(mapToGlobal(screenPos)); |
| 72 | } |
| 73 | |
| 74 | // #################################################################################################### |
| 75 |