|
|
|
|
@ -108,6 +108,10 @@ void ImageViewerWindow::resetView() {
|
|
|
|
|
m_dragging = false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void ImageViewerWindow::loadImage(const QImage& image) { |
|
|
|
|
m_image = QPixmap::fromImage(image); resetView(); update(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void ImageViewerWindow::clampOffset() { |
|
|
|
|
if (m_image.isNull()) { m_offset = QPointF(0, 0); return; } |
|
|
|
|
double baseW = (double)m_image.width() / width(); |
|
|
|
|
|