friendlypics2.dialogs.main_window module¶
GUI dialog defining behavior of main application window
-
class
friendlypics2.dialogs.main_window.
ImageItem
(file_path)[source]¶ Bases:
object
Abstraction around an image that appears in the main list view
- Parameters
file_path (pathlib.Path) – path to the file managed by this instance
-
class
friendlypics2.dialogs.main_window.
ImageModel
(folder)[source]¶ Bases:
QAbstractListModel
Qt model that manages a list of images
- Parameters
folder (pathlib.Path) – path containing images to be presented to the user
-
canFetchMore
(parent)[source]¶ Is there more data to load from our model
Used for lazy loading image thumbnails only when needed
- Parameters
parent (QModelIndex) – reference to the parent item containing the images to load
- Returns
True if there is more data to load from our model, False if not
- Return type
-
data
(index, role)[source]¶ retrieves data for a specific image given a specific role
- Parameters
index (QModelIndex) – index for the image to query
role – ItemDataRole of the role within the view where the data will be used
- Returns
returns the name of the file when using the Display role, and returns the image thumbnail when using the Decoration role
- Return type
-
fetchMore
(parent)[source]¶ Lazily loads more image data when needed
Triggered by the view class when the user scrolls below the current end of the viewable data
- Parameters
parent (QModelIndex) – reference to the parent item containing the images to load
-
staticMetaObject
= <PySide2.QtCore.QMetaObject object>¶
-
class
friendlypics2.dialogs.main_window.
MainWindow
[source]¶ Bases:
QMainWindow
Main window interface
-
closeEvent
(event)[source]¶ event handler called when the application is about to close
- Parameters
event (QCloseEvent) – reference to the event object being raised
-
staticMetaObject
= <PySide2.QtCore.QMetaObject object>¶
-