| 360 | } |
| 361 | |
| 362 | bool canPan() const |
| 363 | { |
| 364 | if (!q->canZoom()) { |
| 365 | return false; |
| 366 | } |
| 367 | |
| 368 | const QSize zoomedImageSize = mDocument->size() * q->zoom(); |
| 369 | const QSize viewPortSize = q->boundingRect().size().toSize(); |
| 370 | const bool imageWiderThanViewport = zoomedImageSize.width() > viewPortSize.width(); |
| 371 | const bool imageTallerThanViewport = zoomedImageSize.height() > viewPortSize.height(); |
| 372 | return (imageWiderThanViewport || imageTallerThanViewport); |
| 373 | } |
| 374 | |
| 375 | void setDragPixmap(const QPixmap &pix) |
| 376 | { |
no test coverage detected