MythTV  master
Public Member Functions | List of all members
TreeView Class Reference

A datastore of images for display by a screen. Provides an ordered list of images (no dirs) from a directory subtree. Default ordering is a depth-first traversal of the tree. More...

#include <mythfrontend/galleryviews.h>

Inheritance diagram for TreeView:
[legend]
Collaboration diagram for TreeView:
[legend]

Public Member Functions

 TreeView (SlideOrderType order)
 
bool LoadFromDb (int parentId) override
 Populate view from database as images of a directory sub-tree. Default order of a tree is depth-first traversal. More...
 
- Public Member Functions inherited from FlatView
 FlatView (SlideOrderType order)
 
virtual ~FlatView ()
 
int GetParentId () const
 
ImageListK GetAllNodes () const
 Get all images/dirs in view. More...
 
ImagePtrK GetSelected () const
 Get current selection. More...
 
ImagePtrK HasNext (int inc) const
 Peeks at next image in view but does not advance iterator. More...
 
ImagePtrK HasPrev (int inc) const
 Peeks at previous image in view but does not decrement iterator. More...
 
ImagePtrK Next (int inc)
 Advance iterator and return next image, wrapping if necessary. Regenerates unordered views on wrap. More...
 
ImagePtrK Prev (int inc)
 Decrements iterator and returns previous image. Wraps at start. More...
 
QString GetPosition () const
 Get positional status. More...
 
bool Select (int id, int fallback=0)
 Selects first occurrence of an image. More...
 
QStringList ClearImage (int id, bool remove=false)
 Clear file from UI cache and optionally from view. More...
 
void ClearCache ()
 Clears UI cache. More...
 
bool Update (int id)
 Updates view with images that have been updated. More...
 
void Rotate (int id)
 Rotate view so that starting image is at front. More...
 
void Clear (bool resetParent=true)
 Reset view. More...
 
QString GetCachedThumbUrl (int id) const
 

Additional Inherited Members

- Protected Member Functions inherited from FlatView
void Populate (ImageList &files)
 Fills view with Db images, re-ordering them as required. More...
 
void Cache (int id, int parent, const QString &url, const QString &thumb)
 Cache image properties to optimize UI. More...
 
- Static Protected Member Functions inherited from FlatView
static WeightList CalculateSeasonalWeights (ImageList &files)
 This method calculates a weight for the item based on how closely it was taken to the current time of year. This means that New Year's pictures will be displayed very frequently on every New Year's, and that anniversary pictures will be favored again every anniversary. The weights are chosen using a beta distribution with a tunable shape parameter. More...
 
- Protected Attributes inherited from FlatView
int m_parentId {-1}
 
SlideOrderType m_order {kOrdered}
 
ImageManagerFem_mgr
 
QHash< int, ImagePtrKm_images
 Image objects currently displayed. More...
 
ImageIdList m_sequence
 The sequence in which to display images. More...
 
int m_active {0}
 Sequence index of current selected image. More...
 
QHash< int, FileCacheEntrym_fileCache
 Caches displayed image files. More...
 

Detailed Description

A datastore of images for display by a screen. Provides an ordered list of images (no dirs) from a directory subtree. Default ordering is a depth-first traversal of the tree.

Definition at line 217 of file galleryviews.h.

Constructor & Destructor Documentation

◆ TreeView()

TreeView::TreeView ( SlideOrderType  order)
inlineexplicit

Definition at line 220 of file galleryviews.h.

Member Function Documentation

◆ LoadFromDb()

bool TreeView::LoadFromDb ( int  parentId)
overridevirtual

Populate view from database as images of a directory sub-tree. Default order of a tree is depth-first traversal.

Parameters
parentIdThe dir id, if valid. Otherwise the view is refreshed using the existing parent dir
Returns
bool True if resulting view is not empty

Reimplemented from FlatView.

Definition at line 949 of file galleryviews.cpp.


The documentation for this class was generated from the following files: