naturtag.widgets.images module#
Generic image widgets
- class naturtag.widgets.images.FullscreenPhoto(*args, **kwargs)#
Bases:
naturtag.widgets.images.NavButtonsMixin
,naturtag.widgets.images.PixmapLabel
- staticMetaObject = PySide6.QtCore.QMetaObject("FullscreenPhoto" inherits "PixmapLabel": )#
- class naturtag.widgets.images.HoverIcon(*args, **kwargs)#
Bases:
naturtag.widgets.images.IconLabel
- mousePressEvent(_)#
Placeholder to accept mouse press events
- mouseReleaseEvent(self, ev: PySide6.QtGui.QMouseEvent) None #
- on_click#
- staticMetaObject = PySide6.QtCore.QMetaObject("HoverIcon" inherits "IconLabel": Methods: #47 type=Signal, signature=on_click(PyObject), parameters=PyObject )#
- class naturtag.widgets.images.HoverMixin(*args, hover_icon=False, **kwargs)#
Bases:
naturtag.widgets.images.HoverMixinBase
Mixin that adds a transparent overlay to darken the image on hover (handled in QSS)
- enterEvent(event)#
- leaveEvent(event)#
- class naturtag.widgets.images.HoverMixinBase(*args, hover_icon=False, **kwargs)#
Bases:
object
Base class for HoverMixin, to allow activating overlay on parent hover
- resizeEvent(event)#
- class naturtag.widgets.images.IconLabel(icon_str, parent=None, secondary=False, size=32)#
Bases:
PySide6.QtWidgets.QLabel
- set_enabled(enabled=True)#
- staticMetaObject = PySide6.QtCore.QMetaObject("IconLabel" inherits "QLabel": )#
- class naturtag.widgets.images.ImageWindow(image_class=<class 'naturtag.widgets.images.FullscreenPhoto'>)#
Bases:
naturtag.widgets.layouts.StylableWidget
- display_image(selected_path, image_paths)#
Open window to a selected image, and save other available image paths for navigation
- property idx: int#
The index of the currently selected image
- Return type
int
- on_remove#
Request for image to be removed from list
- remove_image()#
Remove the current image from the list
- select_image_idx(idx)#
Select an image by index
- select_next_image()#
- select_prev_image()#
- set_pixmap_path(path)#
- staticMetaObject = PySide6.QtCore.QMetaObject("ImageWindow" inherits "StylableWidget": Methods: #34 type=Signal, signature=on_remove(PyObject), parameters=PyObject )#
- wrap_idx(increment)#
Increment and wrap the index around to the other side of the list
Bases:
object
Mixin for fullscreen images that adds left and right navigation buttons
Position nav buttons on left/right center
- class naturtag.widgets.images.PixmapLabel(parent=None, pixmap=None, path=None, url=None, description=None, resample=True, scale=True)#
Bases:
PySide6.QtWidgets.QLabel
- clear(self) None #
- get_pixmap(path=None, photo=None, size=None, url=None)#
Fetch a pixmap from either a local path or remote URL. This does not render the image, so it is safe to run from any thread.
- Return type
QPixmap
- heightForWidth(width)#
- Return type
int
- mousePressEvent(_)#
Placeholder to accept mouse press events
- mouseReleaseEvent(self, ev: PySide6.QtGui.QMouseEvent) None #
- on_click#
- paintEvent(event)#
Draw optional description text in the upper left corner of the image
- resizeEvent(self, event: PySide6.QtGui.QResizeEvent) None #
- scaledPixmap()#
- Return type
QPixmap
- setPixmap(pixmap)#
- set_pixmap_async(threadpool, priority=PySide6.QtCore.QThread.Priority.NormalPriority, path=None, photo=None, size='medium', url=None)#
Fetch a photo from a separate thread, and render it in the main thread when complete
- sizeHint()#
- Return type
QSize
- staticMetaObject = PySide6.QtCore.QMetaObject("PixmapLabel" inherits "QLabel": Methods: #47 type=Signal, signature=on_click(QLabel*), parameters=QLabel* )#