diff --git a/CMakeLists.txt b/CMakeLists.txt index 1199ca0..3f4a82d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,8 +3,8 @@ cmake_policy(SET CMP0017 NEW) # need include() with .cmake cmake_policy(SET CMP0072 NEW) # FindOpenGL prefers GLVND by default project(QAD) set(QAD_MAJOR 2) -set(QAD_MINOR 32) -set(QAD_REVISION 5) +set(QAD_MINOR 33) +set(QAD_REVISION 0) set(QAD_SUFFIX ) set(QAD_COMPANY SHS) set(QAD_DOMAIN org.SHS) diff --git a/libs/widgets/image_view.cpp b/libs/widgets/image_view.cpp index 2ddc2e5..44282e6 100644 --- a/libs/widgets/image_view.cpp +++ b/libs/widgets/image_view.cpp @@ -93,6 +93,17 @@ void ImageView::setSmoothBigImages(bool yes) { } +void ImageView::setImageCursor(const QCursor & cursor) { + if (item) item->setCursor(cursor); +} + + +QCursor ImageView::imageCursor() const { + if (item) return item->cursor(); + return {}; +} + + void ImageView::mouseDoubleClickEvent(QMouseEvent *) { autofit(); } diff --git a/libs/widgets/image_view.h b/libs/widgets/image_view.h index 6d58439..d305d4d 100644 --- a/libs/widgets/image_view.h +++ b/libs/widgets/image_view.h @@ -48,6 +48,9 @@ public: bool isSmoothBigImages() const { return smooth_big; } void setSmoothBigImages(bool yes); + void setImageCursor(const QCursor & cursor); + QCursor imageCursor() const; + public slots: void autofit(); void setPixmap(QPixmap pixmap);