MCPcopy Create free account
hub / github.com/KDE/gwenview / canPan

Method canPan

lib/documentview/documentview.cpp:362–373  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers 1

sceneEventFilterMethod · 0.80

Calls 4

canZoomMethod · 0.80
sizeMethod · 0.45
zoomMethod · 0.45
boundingRectMethod · 0.45

Tested by

no test coverage detected