version 2.33.0
ImageView - add imageCursor get/set
This commit is contained in:
+2
-2
@@ -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)
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user