Image view item for QML. More...
Inherits QQuickPaintedItem.
Public Member Functions | |
None | register (cls, str uri="CvbQuick", int version_major=1, int version_minor=0, str qml_name="ImageView") |
Convenience method to register this type or a derived type in QML. More... | |
bool | try_translate (self, PySide2.QtCore.QPointF translation) |
This method can be called from QML! More... | |
bool | try_zoom_in (self) |
Tries to zoom in. More... | |
bool | try_zoom_out (self) |
Tries to zoom out. More... | |
Properties | |
hoverPixel = property | |
The image pixel value the mouse is currently hovered over. More... | |
hoverPosition = property | |
Get the point the mouse is hovering over. More... | |
image = property | |
Get or set the image controller for this view item. More... | |
imageAnchor = property | |
Get the reference point for mouse operations in image coordinates. More... | |
imageRect = property | |
Get the rectangle described by the image buffer associated with the view. More... | |
sourceRect = property | |
Get the rectangle inside the image rectangle that is actually rendered. More... | |
targetRect = property | |
Get the rectangle inside the view rectangle the image is actually rendered to. More... | |
uploadMode = property | |
Get or set the current upload mode (as integer). More... | |
viewAnchor = property | |
Get the reference point for mouse operations in view coordinates. More... | |
viewRect = property | |
Get the rectangle this items covers. More... | |
zoomFactor = property | |
Get or set the view's zoom factor. More... | |
Image view item for QML.
This class (or an extended subclass) should be registered in QML. The item provides an image display. Instances should only be created from QML.
For convenience see ImageViewItem.register
See examples for available properties.
None register | ( | cls, | |
str | uri = "CvbQuick" , |
||
int | version_major = 1 , |
||
int | version_minor = 0 , |
||
str | qml_name = "ImageView" |
||
) |
Convenience method to register this type or a derived type in QML.
Basically just calls qmlRegisterType(...).
uri : str URI forwarded to Qt.
version_major : int Major version forwarded to Qt.
version_minor : int Minor version forwarded to Qt.
qml_name : str Name in QML forwarded to Qt.
bool try_translate | ( | self, | |
PySide2.QtCore.QPointF | translation | ||
) |
This method can be called from QML!
translation : QPointF Point interpreted as vector to translate.
bool True if successful, false otherwise.
bool try_zoom_in | ( | self | ) |
Tries to zoom in.
This method can be called from QML!
bool True if successful, false otherwise.
bool try_zoom_out | ( | self | ) |
Tries to zoom out.
This method can be called from QML!
bool True if successful, false otherwise.
|
static |
The image pixel value the mouse is currently hovered over.
If the value is undefined an empty list is returned.
This is a QML property!
|
static |
Get the point the mouse is hovering over.
This is a QML property!
|
static |
Get or set the image controller for this view item.
Usually you set an image controller object as context property and assign it to the view's image property.
This is a QML property!
|
static |
Get the reference point for mouse operations in image coordinates.
This is a QML property!
|
static |
Get the rectangle described by the image buffer associated with the view.
This is a QML property!
|
static |
Get the rectangle inside the image rectangle that is actually rendered.
This is a QML property!
|
static |
Get the rectangle inside the view rectangle the image is actually rendered to.
This is a QML property!
|
static |
Get or set the current upload mode (as integer).
This is a QML property!
|
static |
Get the reference point for mouse operations in view coordinates.
This is a QML property!
|
static |
Get the rectangle this items covers.
This is a QML property!
|
static |
Get or set the view's zoom factor.
This is a QML property!