MythTV  master
Public Slots | Public Member Functions | Private Types | Private Slots | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
GalleryThumbView Class Reference

Thumbnail screen. More...

#include <gallerythumbview.h>

Inheritance diagram for GalleryThumbView:
Inheritance graph
[legend]
Collaboration diagram for GalleryThumbView:
Collaboration graph
[legend]

Public Slots

void Start ()
 Start Thumbnail screen. More...
 
void Close () override
 Exit Gallery. More...
 
void ClearSgDb ()
 
- Public Slots inherited from MythScreenType
virtual void Close ()
 
- Public Slots inherited from MythUIType
void LoseFocus ()
 
bool TakeFocus ()
 
void Activate ()
 
void Hide (void)
 
void Show (void)
 
void Refresh (void)
 
void UpdateDependState (bool isDefault)
 
void UpdateDependState (MythUIType *dependee, bool isDefault)
 

Public Member Functions

 GalleryThumbView (MythScreenStack *parent, const char *name)
 Constructor. More...
 
 ~GalleryThumbView ()
 Destructor. More...
 
bool Create () override
 Initialises and shows the graphical elements. More...
 
- Public Member Functions inherited from MythScreenType
 MythScreenType (MythScreenStack *parent, const QString &name, bool fullscreen=true)
 
virtual ~MythScreenType ()
 
bool gestureEvent (MythGestureEvent *) override
 Mouse click/movement handler, receives mouse gesture events from the QCoreApplication event loop. More...
 
virtual void ShowMenu (void)
 
void doInit (void)
 
void LoadInForeground (void)
 
bool IsInitialized (void) const
 Has Init() been called on this screen? More...
 
bool IsFullscreen (void) const
 
void SetFullscreen (bool full)
 
MythUITypeGetFocusWidget (void) const
 
bool SetFocusWidget (MythUIType *widget=nullptr)
 
virtual bool NextPrevWidgetFocus (bool up_or_down)
 
void BuildFocusList (void)
 
MythScreenStackGetScreenStack () const
 
virtual void aboutToHide (void)
 
virtual void aboutToShow (void)
 
bool IsDeleting (void) const
 
void SetDeleting (bool deleting)
 
bool IsLoading (void)
 
bool IsLoaded (void)
 
MythPainterGetPainter (void) override
 
- Public Member Functions inherited from MythUIComposite
 MythUIComposite (QObject *parent, const QString &name)
 
virtual ~MythUIComposite ()=default
 
virtual void SetTextFromMap (const InfoMap &infoMap)
 
virtual void ResetMap (const InfoMap &infoMap)
 
- Public Member Functions inherited from MythUIType
 MythUIType (QObject *parent, const QString &name)
 
virtual void Reset (void)
 Reset the widget to it's original state, should not reset changes made by the theme. More...
 
void AddChild (MythUIType *child)
 Add a child UIType. More...
 
MythUITypeGetChild (const QString &name) const
 Get a named child of this UIType. More...
 
MythUITypeGetChildAt (const QPoint &p, bool recursive=true, bool focusable=true) const
 Return the first MythUIType at the given coordinates. More...
 
QList< MythUIType * > * GetAllChildren (void)
 Return a list of all child widgets. More...
 
void DeleteChild (const QString &name)
 Delete a named child of this UIType. More...
 
void DeleteChild (MythUIType *child)
 Delete the given UIType if it is a child of this UIType. More...
 
void DeleteAllChildren (void)
 Delete all child widgets. More...
 
bool NeedsRedraw (void) const
 
void ResetNeedsRedraw (void)
 
void SetRedraw (void)
 
void SetChildNeedsRedraw (MythUIType *child)
 
bool CanTakeFocus (void) const
 Return if this widget can accept input focus. More...
 
void SetCanTakeFocus (bool set=true)
 Set whether this widget can take focus. More...
 
void SetFocusOrder (int)
 
bool IsEnabled (void) const
 
void SetEnabled (bool enable)
 
bool MoveToTop (void)
 
bool MoveChildToTop (MythUIType *child)
 
void ActivateAnimations (MythUIAnimation::Trigger trigger)
 
QList< MythUIAnimation * > * GetAnimations (void)
 
virtual void Pulse (void)
 Pulse is called 70 times a second to trigger a single frame of an animation. More...
 
void Draw (MythPainter *p, int xoffset, int yoffset, int alphaMod=255, QRect clipRect=QRect())
 
void SetPosition (int x, int y)
 Convenience method, calls SetPosition(const MythPoint&) Override that instead to change functionality. More...
 
virtual void SetPosition (const MythPoint &point)
 
virtual MythPoint GetPosition (void) const
 
virtual void SetSize (const QSize &size)
 
virtual void SetMinSize (const MythPoint &size)
 Set the minimum size of this widget, for widgets which can be rescaled. More...
 
virtual QSize GetMinSize (void) const
 
virtual void SetArea (const MythRect &rect)
 
virtual void AdjustMinArea (int delta_x, int delta_y, int delta_w, int delta_h)
 Adjust the size of a sibling. More...
 
virtual void VanishSibling (void)
 
virtual void SetMinAreaParent (MythRect actual_area, MythRect allowed_area, MythUIType *child)
 Adjust the size of sibling objects within the button. More...
 
virtual void SetMinArea (const MythRect &rect)
 Set the minimum area based on the given size. More...
 
virtual MythRect GetArea (void) const
 If the object has a minimum area defined, return it, other wise return the default area. More...
 
virtual MythRect GetFullArea (void) const
 
virtual void RecalculateArea (bool recurse=true)
 
void ExpandArea (const MythRect &rect)
 
virtual QRegion GetDirtyArea (void) const
 
bool IsVisible (bool recurse=false) const
 
virtual void SetVisible (bool visible)
 
void MoveTo (QPoint destXY, QPoint speedXY)
 
void AdjustAlpha (int mode, int alphachange, int minalpha=0, int maxalpha=255)
 
void SetAlpha (int newalpha)
 
int GetAlpha (void) const
 
MythFontPropertiesGetFont (const QString &text) const
 
bool AddFont (const QString &text, MythFontProperties *fontProp)
 
void SetHelpText (const QString &text)
 
QString GetHelpText (void) const
 
void SetXMLLocation (const QString &filename, int where)
 
QString GetXMLLocation (void) const
 
void SetXMLName (const QString &name)
 
QString GetXMLName (void) const
 
bool IsDeferredLoading (bool recurse=false) const
 
void SetDeferLoad (bool defer)
 
virtual void LoadNow (void)
 Cause images in this and child widgets to be loaded. More...
 
bool ContainsPoint (const QPoint &point) const
 Check if the given point falls within this widgets area. More...
 
void SetPainter (MythPainter *painter)
 
void SetCentre (UIEffects::Centre centre)
 
void SetZoom (float zoom)
 
void SetHorizontalZoom (float zoom)
 
void SetVerticalZoom (float zoom)
 
void SetAngle (float angle)
 
void SetDependIsDefault (bool isDefault)
 
void SetReverseDependence (MythUIType *dependee, bool reverse)
 
void SetDependsMap (QMap< QString, QString > dependsMap)
 
QMap< QString, QString > GetDependsMap () const
 

Private Types

using IntPair = QPair< int, int >
 
using ThumbLocation = QPair< MythUIButtonListItem *, int >
 

Private Slots

void LoadData (int)
 Loads & displays images from database. More...
 
void SelectImage (int)
 Select item if it is displayed. More...
 
void ItemClicked (MythUIButtonListItem *)
 Action item click. More...
 
void SetUiSelection (MythUIButtonListItem *)
 Updates text widgets for selected item. More...
 
void Slideshow ()
 
void RecursiveSlideshow ()
 
void ShowDetails ()
 Shows exif info/details about an item. More...
 
void RotateCW ()
 
void RotateCCW ()
 
void FlipHorizontal ()
 
void FlipVertical ()
 
void ResetExif ()
 
void RotateCWMarked ()
 
void RotateCCWMarked ()
 
void FlipHorizontalMarked ()
 
void FlipVerticalMarked ()
 
void ResetExifMarked ()
 
void MarkItem (bool=true)
 Mark or unmark a single item. More...
 
void UnmarkItem ()
 
void MarkAll (bool=true)
 Mark or unmark all items. More...
 
void UnmarkAll ()
 
void MarkInvertAll ()
 Invert all marked items. More...
 
void HideItem (bool hide=true)
 Hide or unhide item. More...
 
void Unhide ()
 
void HideMarked (bool hide=true)
 Hide or unhide marked items. More...
 
void UnhideMarked ()
 
void ShowRenameInput ()
 Show dialog to allow input. More...
 
void ShowHidden (bool show=true)
 Show or hide hidden files. More...
 
void HideHidden ()
 
void SetCover (bool reset=false)
 Set or reset thumbnails to use for a directory cover. More...
 
void ResetCover ()
 
void ShowType (int=kPicAndVideo)
 Show/hide pictures or videos. More...
 
void HidePictures ()
 
void HideVideos ()
 
void ZoomIn ()
 Use smaller buttonlist widgets. More...
 
void ZoomOut ()
 Use larger buttonlist widgets. More...
 
void ShowSettings ()
 Show configuration screen. More...
 
void StartScan (bool start=true)
 Action scan request. More...
 
void StopScan ()
 
void DeleteItem ()
 Confirm user deletion of an item. More...
 
void DeleteMarked ()
 Confirm user deletion of marked files. More...
 
void Import ()
 Executes user 'Import command'. More...
 
void MakeDir ()
 Show dialog to input new directory name. More...
 
void Eject ()
 Remove local device (or Import) from Gallery. More...
 
void Copy (bool deleteAfter=false)
 Copy marked images to selected dir. If no marked files, use previously marked files. Will not overwrite/duplicate existing files on destination host. More...
 
void Move ()
 Move marked images to selected dir. If no marked files, use previously marked files. Will not overwrite/duplicate existing files on destination host. More...
 
void ShowPassword ()
 Displays dialog to accept password. More...
 
void RepeatOn (int on=1)
 
void RepeatOff ()
 

Private Member Functions

bool keyPressEvent (QKeyEvent *) override
 Handle keypresses. More...
 
void mediaEvent (MythMediaEvent *event) override
 Media/Device status event handler, received from MythMediaMonitor. More...
 
void customEvent (QEvent *) override
 Handle custom events. More...
 
void RemoveImages (const QStringList &ids, bool deleted=true)
 Cleanup UI & image caches when a device is removed. More...
 
void BuildImageList ()
 Displays all images in current view. More...
 
void ResetUiSelection ()
 Clears all text widgets for selected item. More...
 
void TransformItem (ImageFileTransform tran=kRotateCW)
 Apply transform to an image. More...
 
void TransformMarked (ImageFileTransform tran=kRotateCW)
 Apply transform to marked images. More...
 
void UpdateImageItem (MythUIButtonListItem *)
 Initialises a single buttonlist item. More...
 
void UpdateScanProgress (const QString &, int, int)
 Update progressbar with scan status. More...
 
void StartSlideshow (ImageSlideShowType mode)
 Start slideshow screen. More...
 
void SelectZoomWidget (int change)
 Change buttonlist to use a different size. More...
 
QString CheckThumbnail (MythUIButtonListItem *, const ImagePtrK &, ImageIdList &request, int)
 Verify thumbnail is known to exist. More...
 
void MenuMain ()
 Shows the main menu when the MENU button was pressed. More...
 
void MenuShow (MythMenu *)
 Add a Show submenu. More...
 
void MenuMarked (MythMenu *)
 Adds a Marking submenu. More...
 
void MenuPaste (MythMenu *)
 Add a Paste submenu. More...
 
void MenuTransform (MythMenu *)
 Add a Transform submenu. More...
 
void MenuAction (MythMenu *)
 Add a Action submenu. More...
 
void MenuSlideshow (MythMenu *)
 Add a Slideshow submenu. More...
 
bool DirSelectUp ()
 Goes up one directory level. More...
 
void DirSelectDown ()
 Goes one directory level down. More...
 
void ShowDialog (const QString &, const QString &="")
 Show a confirmation dialog. More...
 

Static Private Member Functions

static void UpdateThumbnail (MythUIButtonListItem *, const ImagePtrK &, const QString &url, int)
 Update the buttonlist item with a thumbnail. More...
 

Private Attributes

MythUIButtonListm_imageList {nullptr}
 
MythUITextm_captionText {nullptr}
 
MythUITextm_crumbsText {nullptr}
 
MythUITextm_emptyText {nullptr}
 
MythUITextm_hideFilterText {nullptr}
 
MythUITextm_typeFilterText {nullptr}
 
MythUITextm_positionText {nullptr}
 
MythUITextm_scanProgressText {nullptr}
 
MythUIProgressBarm_scanProgressBar {nullptr}
 
QList< MythUIButtonList * > m_zoomWidgets
 Theme buttonlist widgets implementing zoom levels. More...
 
int m_zoomLevel {0}
 
MythScreenStackm_popupStack
 
ImageManagerFem_mgr
 Manages the images. More...
 
DirectoryViewm_view {nullptr}
 List of images comprising the view. More...
 
InfoList m_infoList
 Image details overlay. More...
 
QHash< QString, IntPairm_scanProgress
 Last scan updates received from scanners. More...
 
QSet< QString > m_scanActive
 Scanners currently scanning. More...
 
MenuSubjects m_menuState
 Current selection/marked files when menu is invoked. More...
 
QHash< int, ThumbLocationm_pendingMap
 Buttons waiting for thumbnails to be created. More...
 
QSet< int > m_thumbExists
 Images where thumbnails are known to exist. More...
 
bool m_editsAllowed {false}
 Edit privileges. More...
 

Additional Inherited Members

- Signals inherited from MythScreenType
void Exiting ()
 
- Signals inherited from MythUIType
void RequestUpdate ()
 
void RequestUpdate (const QRect &)
 
void RequestRegionUpdate (const QRect &)
 
void TakingFocus ()
 
void LosingFocus ()
 
void Showing ()
 
void Hiding ()
 
void Enabling ()
 
void Disabling ()
 
void FinishedMoving ()
 
void FinishedFading ()
 
void DependChanged (bool isDefault)
 
- Static Public Member Functions inherited from XMLParseBase
static QString getFirstText (QDomElement &element)
 
static bool parseBool (const QString &text)
 
static bool parseBool (QDomElement &element)
 
static MythPoint parsePoint (const QString &text, bool normalize=true)
 
static MythPoint parsePoint (QDomElement &element, bool normalize=true)
 
static QSize parseSize (const QString &text, bool normalize=true)
 
static QSize parseSize (QDomElement &element, bool normalize=true)
 
static MythRect parseRect (const QString &text, bool normalize=true)
 
static MythRect parseRect (QDomElement &element, bool normalize=true)
 
static int parseAlignment (const QString &text)
 
static int parseAlignment (QDomElement &element)
 
static QBrush parseGradient (const QDomElement &element)
 
static QString parseText (QDomElement &element)
 
static MythUITypeGetGlobalObjectStore (void)
 
static void ClearGlobalObjectStore (void)
 
static void ParseChildren (const QString &filename, QDomElement &element, MythUIType *parent, bool showWarnings)
 
static MythUITypeParseUIType (const QString &filename, QDomElement &element, const QString &type, MythUIType *parent, MythScreenType *screen, bool showWarnings, QMap< QString, QString > &parentDependsMap)
 
static bool WindowExists (const QString &xmlfile, const QString &windowname)
 
static bool LoadWindowFromXML (const QString &xmlfile, const QString &windowname, MythUIType *parent)
 
static bool LoadBaseTheme (void)
 
static bool LoadBaseTheme (const QString &baseTheme)
 
static bool CopyWindowFromBase (const QString &windowname, MythScreenType *win)
 
- Protected Member Functions inherited from MythScreenType
 MythScreenType (MythUIType *parent, const QString &name, bool fullscreen=true)
 
void CopyFrom (MythUIType *base) override
 Copy this widgets state from another. More...
 
void CreateCopy (MythUIType *parent) override
 Copy the state of this widget to the one given, it must be of the same type. More...
 
bool ParseElement (const QString &filename, QDomElement &element, bool showWarnings) override
 Parse the xml definition of this widget setting the state of the object accordingly. More...
 
virtual void Load (void)
 Load data which will ultimately be displayed on-screen or used to determine what appears on-screen (See Warning) More...
 
virtual void Init (void)
 Used after calling Load() to assign data to widgets and other UI initilisation which is prohibited in Load() More...
 
void LoadInBackground (const QString &message="")
 
void ReloadInBackground (void)
 
void OpenBusyPopup (const QString &message="")
 
void CloseBusyPopup (void)
 
void SetBusyPopupMessage (const QString &message)
 
void ResetBusyPopup (void)
 
- Protected Member Functions inherited from MythUIType
virtual ~MythUIType ()
 
void customEvent (QEvent *event) override
 
virtual void DrawSelf (MythPainter *p, int xoffset, int yoffset, int alphaMod, QRect clipRect)
 
void AddFocusableChildrenToList (QMap< int, MythUIType * > &focusList)
 
void HandleAlphaPulse ()
 Handle one frame of an alpha (transparency) change animation. More...
 
void HandleMovementPulse ()
 Handle one frame of a movement animation. More...
 
int CalcAlpha (int alphamod)
 
void ConnectDependants (bool recurse=false)
 
virtual void Finalize (void)
 Perform any post-xml parsing initialisation tasks. More...
 
- Static Protected Member Functions inherited from MythUIType
static int NormX (const int width)
 
static int NormY (const int height)
 
- Protected Attributes inherited from MythScreenType
bool m_FullScreen {false}
 
bool m_IsDeleting {false}
 
QSemaphore m_LoadLock {1}
 
volatile bool m_IsLoading {false}
 
volatile bool m_IsLoaded {false}
 
bool m_IsInitialized {false}
 
MythUITypem_CurrentFocusWidget {nullptr}
 
QMap< int, MythUIType * > m_FocusWidgetList
 
MythScreenStackm_ScreenStack {nullptr}
 
MythUIBusyDialogm_BusyPopup {nullptr}
 
QRegion m_SavedMask
 
- Protected Attributes inherited from MythUIType
QList< MythUIType * > m_ChildrenList
 
QMap< QString, QString > m_dependsMap
 
QList< QPair< MythUIType *, bool > > m_dependsValue
 
QList< int > m_dependOperator
 
bool m_Visible {true}
 
bool m_HasFocus {false}
 
bool m_CanHaveFocus {false}
 
bool m_Enabled {true}
 
bool m_EnableInitiator {false}
 
bool m_Initiator {false}
 
bool m_Vanish {false}
 
bool m_Vanished {false}
 
bool m_IsDependDefault {false}
 
QMap< MythUIType *, boolm_ReverseDepend
 
int m_focusOrder {0}
 
MythRect m_Area {0,0,0,0}
 
MythRect m_MinArea {0,0,0,0}
 
MythPoint m_MinSize
 
QRegion m_DirtyRegion {0,0,0,0}
 
bool m_NeedsRedraw {false}
 
UIEffects m_Effects
 
int m_AlphaChangeMode {0}
 
int m_AlphaChange {0}
 
int m_AlphaMin {0}
 
int m_AlphaMax {255}
 
bool m_Moving {false}
 
QPoint m_XYDestination {0,0}
 
QPoint m_XYSpeed {0,0}
 
FontMapm_Fonts {nullptr}
 
MythUITypem_Parent {nullptr}
 
MythPainterm_Painter {nullptr}
 
QList< MythUIAnimation * > m_animations
 
QString m_helptext
 
QString m_xmlName
 
QString m_xmlLocation
 
bool m_deferload {false}
 
QColor m_BorderColor {Qt::black}
 

Detailed Description

Thumbnail screen.

Definition at line 23 of file gallerythumbview.h.

Member Typedef Documentation

◆ IntPair

using GalleryThumbView::IntPair = QPair<int,int>
private

Definition at line 117 of file gallerythumbview.h.

◆ ThumbLocation

Definition at line 147 of file gallerythumbview.h.

Constructor & Destructor Documentation

◆ GalleryThumbView()

GalleryThumbView::GalleryThumbView ( MythScreenStack parent,
const char *  name 
)

Constructor.

Parameters
parentThe screen parent
nameThe name of the screen

Definition at line 151 of file gallerythumbview.cpp.

◆ ~GalleryThumbView()

GalleryThumbView::~GalleryThumbView ( )

Destructor.

Definition at line 170 of file gallerythumbview.cpp.

Member Function Documentation

◆ Create()

bool GalleryThumbView::Create ( void  )
overridevirtual

Initialises and shows the graphical elements.

Reimplemented from MythScreenType.

Definition at line 199 of file gallerythumbview.cpp.

◆ Start

void GalleryThumbView::Start ( void  )
slot

Start Thumbnail screen.

Definition at line 582 of file gallerythumbview.cpp.

◆ Close

void GalleryThumbView::Close ( void  )
overrideslot

Exit Gallery.

Definition at line 180 of file gallerythumbview.cpp.

◆ ClearSgDb

void GalleryThumbView::ClearSgDb ( )
inlineslot

Definition at line 34 of file gallerythumbview.h.

Referenced by ShowSettings().

◆ keyPressEvent()

bool GalleryThumbView::keyPressEvent ( QKeyEvent *  event)
overrideprivatevirtual

Handle keypresses.

Parameters
eventThe pressed key

Reimplemented from MythScreenType.

Definition at line 263 of file gallerythumbview.cpp.

◆ mediaEvent()

void GalleryThumbView::mediaEvent ( MythMediaEvent event)
inlineoverrideprivatevirtual

Media/Device status event handler, received from MythMediaMonitor.

Parameters
eventMedia event

Reimplemented from MythUIType.

Definition at line 38 of file gallerythumbview.h.

◆ customEvent()

void GalleryThumbView::customEvent ( QEvent *  event)
overrideprivate

Handle custom events.

Parameters
eventThe custom event

Definition at line 349 of file gallerythumbview.cpp.

◆ RemoveImages()

void GalleryThumbView::RemoveImages ( const QStringList &  ids,
bool  deleted = true 
)
private

Cleanup UI & image caches when a device is removed.

Parameters
idsList of ids to remove from image cache
deletedIf true, images are also deleted from view

Definition at line 558 of file gallerythumbview.cpp.

Referenced by customEvent().

◆ BuildImageList()

void GalleryThumbView::BuildImageList ( )
private

Displays all images in current view.

Definition at line 641 of file gallerythumbview.cpp.

Referenced by customEvent(), LoadData(), MarkAll(), MarkInvertAll(), MarkItem(), SelectImage(), ShowSettings(), ZoomIn(), and ZoomOut().

◆ ResetUiSelection()

void GalleryThumbView::ResetUiSelection ( )
private

Clears all text widgets for selected item.

Definition at line 922 of file gallerythumbview.cpp.

Referenced by LoadData().

◆ TransformItem()

void GalleryThumbView::TransformItem ( ImageFileTransform  transform = kRotateCW)
private

Apply transform to an image.

Parameters
transformRotation/Flip

Definition at line 1512 of file gallerythumbview.cpp.

Referenced by FlipHorizontal(), FlipVertical(), ResetExif(), RotateCCW(), and RotateCW().

◆ TransformMarked()

void GalleryThumbView::TransformMarked ( ImageFileTransform  transform = kRotateCW)
private

Apply transform to marked images.

Parameters
transformRotation/Flip

Definition at line 1530 of file gallerythumbview.cpp.

Referenced by FlipHorizontalMarked(), FlipVerticalMarked(), ResetExifMarked(), RotateCCWMarked(), and RotateCWMarked().

◆ UpdateImageItem()

void GalleryThumbView::UpdateImageItem ( MythUIButtonListItem item)
private

Initialises a single buttonlist item.

Parameters
itemThe buttonlist item

Definition at line 685 of file gallerythumbview.cpp.

Referenced by BuildImageList().

◆ UpdateScanProgress()

void GalleryThumbView::UpdateScanProgress ( const QString &  scanner,
int  current,
int  total 
)
private

Update progressbar with scan status.

Combines progress of both BE & FE scanners

Parameters
scannerScanner id
currentNumber of images scanned
totalTotal number of images to scan

Definition at line 842 of file gallerythumbview.cpp.

Referenced by customEvent(), and Start().

◆ StartSlideshow()

void GalleryThumbView::StartSlideshow ( ImageSlideShowType  mode)
private

Start slideshow screen.

Parameters
modeBrowse, Normal or Recursive

Definition at line 1395 of file gallerythumbview.cpp.

Referenced by ItemClicked(), RecursiveSlideshow(), and Slideshow().

◆ SelectZoomWidget()

void GalleryThumbView::SelectZoomWidget ( int  change)
private

Change buttonlist to use a different size.

Parameters
changeAdjustment, +1 to use bigger buttons, -1 for smaller buttons

Definition at line 1797 of file gallerythumbview.cpp.

Referenced by Create(), ZoomIn(), and ZoomOut().

◆ CheckThumbnail()

QString GalleryThumbView::CheckThumbnail ( MythUIButtonListItem item,
const ImagePtrK im,
ImageIdList request,
int  index 
)
private

Verify thumbnail is known to exist.

Thumbnails are only displayed when known to exist on the BE. Otherwise repeated failures to load them severely hinders performance. Note a single specific BE request is much faster than scanning the image cache

Parameters
itemThe buttonlist item being constructed
imImage data
requestList of ids that are unknown
indexThumbnail index in buttonlist item (Dirs use 4 thumbnails)
Returns
QString URL of thumbnail

Definition at line 788 of file gallerythumbview.cpp.

Referenced by UpdateImageItem().

◆ UpdateThumbnail()

void GalleryThumbView::UpdateThumbnail ( MythUIButtonListItem button,
const ImagePtrK im,
const QString &  url,
int  index 
)
staticprivate

Update the buttonlist item with a thumbnail.

Parameters
buttonButtonlist item to update
imImage data
urlURL of the thumbnail
indexIndex of the thumbnail on the button

Definition at line 815 of file gallerythumbview.cpp.

Referenced by customEvent(), and UpdateImageItem().

◆ MenuMain()

void GalleryThumbView::MenuMain ( )
private

Shows the main menu when the MENU button was pressed.

Definition at line 1002 of file gallerythumbview.cpp.

Referenced by keyPressEvent().

◆ MenuShow()

void GalleryThumbView::MenuShow ( MythMenu mainMenu)
private

Add a Show submenu.

Parameters
mainMenuParent menu

Definition at line 1280 of file gallerythumbview.cpp.

Referenced by MenuMain().

◆ MenuMarked()

void GalleryThumbView::MenuMarked ( MythMenu mainMenu)
private

Adds a Marking submenu.

Parameters
mainMenuParent menu

Definition at line 1045 of file gallerythumbview.cpp.

Referenced by MenuMain().

◆ MenuPaste()

void GalleryThumbView::MenuPaste ( MythMenu mainMenu)
private

Add a Paste submenu.

Parameters
mainMenuParent menu

Definition at line 1098 of file gallerythumbview.cpp.

Referenced by MenuMain().

◆ MenuTransform()

void GalleryThumbView::MenuTransform ( MythMenu mainMenu)
private

Add a Transform submenu.

Parameters
mainMenuParent menu

Definition at line 1127 of file gallerythumbview.cpp.

Referenced by MenuMain().

◆ MenuAction()

void GalleryThumbView::MenuAction ( MythMenu mainMenu)
private

Add a Action submenu.

Parameters
mainMenuParent menu

Definition at line 1163 of file gallerythumbview.cpp.

Referenced by MenuMain().

◆ MenuSlideshow()

void GalleryThumbView::MenuSlideshow ( MythMenu mainMenu)
private

Add a Slideshow submenu.

Parameters
mainMenuParent menu

Definition at line 1229 of file gallerythumbview.cpp.

Referenced by MenuMain().

◆ DirSelectUp()

bool GalleryThumbView::DirSelectUp ( )
private

Goes up one directory level.

Definition at line 1427 of file gallerythumbview.cpp.

Referenced by ItemClicked(), and keyPressEvent().

◆ DirSelectDown()

void GalleryThumbView::DirSelectDown ( )
private

Goes one directory level down.

Definition at line 1448 of file gallerythumbview.cpp.

Referenced by ItemClicked().

◆ ShowDialog()

void GalleryThumbView::ShowDialog ( const QString &  msg,
const QString &  event = "" 
)
private

Show a confirmation dialog.

Parameters
msgText to display
eventEvent label

Definition at line 1677 of file gallerythumbview.cpp.

Referenced by DeleteItem(), and DeleteMarked().

◆ LoadData

void GalleryThumbView::LoadData ( int  parent)
privateslot

Loads & displays images from database.

Parameters
parentId of parent dir

Definition at line 606 of file gallerythumbview.cpp.

Referenced by customEvent(), DirSelectDown(), DirSelectUp(), ShowHidden(), ShowSettings(), ShowType(), and Start().

◆ SelectImage

void GalleryThumbView::SelectImage ( int  id)
privateslot

Select item if it is displayed.

Parameters
idImage id

Definition at line 1340 of file gallerythumbview.cpp.

Referenced by StartSlideshow().

◆ ItemClicked

void GalleryThumbView::ItemClicked ( MythUIButtonListItem item)
privateslot

Action item click.

Parameters
itemButtonlist item

Definition at line 1352 of file gallerythumbview.cpp.

Referenced by SelectZoomWidget().

◆ SetUiSelection

void GalleryThumbView::SetUiSelection ( MythUIButtonListItem item)
privateslot

Updates text widgets for selected item.

Parameters
itemThe selected buttonlist item

Definition at line 945 of file gallerythumbview.cpp.

Referenced by SelectZoomWidget().

◆ Slideshow

void GalleryThumbView::Slideshow ( )
inlineprivateslot

Definition at line 70 of file gallerythumbview.h.

Referenced by keyPressEvent(), and MenuSlideshow().

◆ RecursiveSlideshow

void GalleryThumbView::RecursiveSlideshow ( )
inlineprivateslot

Definition at line 71 of file gallerythumbview.h.

Referenced by keyPressEvent(), and MenuSlideshow().

◆ ShowDetails

void GalleryThumbView::ShowDetails ( )
privateslot

Shows exif info/details about an item.

Definition at line 1716 of file gallerythumbview.cpp.

Referenced by keyPressEvent(), and MenuShow().

◆ RotateCW

void GalleryThumbView::RotateCW ( )
inlineprivateslot

Definition at line 73 of file gallerythumbview.h.

Referenced by keyPressEvent(), and MenuTransform().

◆ RotateCCW

void GalleryThumbView::RotateCCW ( )
inlineprivateslot

Definition at line 74 of file gallerythumbview.h.

Referenced by keyPressEvent(), and MenuTransform().

◆ FlipHorizontal

void GalleryThumbView::FlipHorizontal ( )
inlineprivateslot

Definition at line 75 of file gallerythumbview.h.

Referenced by keyPressEvent(), and MenuTransform().

◆ FlipVertical

void GalleryThumbView::FlipVertical ( )
inlineprivateslot

Definition at line 76 of file gallerythumbview.h.

Referenced by keyPressEvent(), and MenuTransform().

◆ ResetExif

void GalleryThumbView::ResetExif ( )
inlineprivateslot

Definition at line 77 of file gallerythumbview.h.

Referenced by MenuTransform().

◆ RotateCWMarked

void GalleryThumbView::RotateCWMarked ( )
inlineprivateslot

Definition at line 78 of file gallerythumbview.h.

Referenced by MenuTransform().

◆ RotateCCWMarked

void GalleryThumbView::RotateCCWMarked ( )
inlineprivateslot

Definition at line 79 of file gallerythumbview.h.

Referenced by MenuTransform().

◆ FlipHorizontalMarked

void GalleryThumbView::FlipHorizontalMarked ( )
inlineprivateslot

Definition at line 80 of file gallerythumbview.h.

Referenced by MenuTransform().

◆ FlipVerticalMarked

void GalleryThumbView::FlipVerticalMarked ( )
inlineprivateslot

Definition at line 81 of file gallerythumbview.h.

Referenced by MenuTransform().

◆ ResetExifMarked

void GalleryThumbView::ResetExifMarked ( )
inlineprivateslot

Definition at line 82 of file gallerythumbview.h.

Referenced by MenuTransform().

◆ MarkItem

void GalleryThumbView::MarkItem ( bool  mark = true)
privateslot

Mark or unmark a single item.

Parameters
markMark if true, otherwise unmark

Definition at line 1466 of file gallerythumbview.cpp.

Referenced by keyPressEvent(), MenuMarked(), and UnmarkItem().

◆ UnmarkItem

void GalleryThumbView::UnmarkItem ( )
inlineprivateslot

Definition at line 84 of file gallerythumbview.h.

Referenced by MenuMarked().

◆ MarkAll

void GalleryThumbView::MarkAll ( bool  mark = true)
privateslot

Mark or unmark all items.

Parameters
markMark if true, otherwise unmark

Definition at line 1484 of file gallerythumbview.cpp.

Referenced by MenuMarked(), and UnmarkAll().

◆ UnmarkAll

void GalleryThumbView::UnmarkAll ( )
inlineprivateslot

Definition at line 86 of file gallerythumbview.h.

Referenced by MenuMarked().

◆ MarkInvertAll

void GalleryThumbView::MarkInvertAll ( )
privateslot

Invert all marked items.

Definition at line 1499 of file gallerythumbview.cpp.

Referenced by MenuMarked().

◆ HideItem

void GalleryThumbView::HideItem ( bool  hide = true)
privateslot

Hide or unhide item.

Parameters
hideHide if true; otherwise unhide

Definition at line 1542 of file gallerythumbview.cpp.

Referenced by MenuAction(), and Unhide().

◆ Unhide

void GalleryThumbView::Unhide ( )
inlineprivateslot

Definition at line 89 of file gallerythumbview.h.

Referenced by MenuAction().

◆ HideMarked

void GalleryThumbView::HideMarked ( bool  hide = true)
privateslot

Hide or unhide marked items.

Parameters
hideHide if true; otherwise unhide

Definition at line 1566 of file gallerythumbview.cpp.

Referenced by MenuAction(), and UnhideMarked().

◆ UnhideMarked

void GalleryThumbView::UnhideMarked ( )
inlineprivateslot

Definition at line 91 of file gallerythumbview.h.

Referenced by MenuAction().

◆ ShowRenameInput

void GalleryThumbView::ShowRenameInput ( )
privateslot

Show dialog to allow input.

Definition at line 1694 of file gallerythumbview.cpp.

Referenced by MenuAction().

◆ ShowHidden

void GalleryThumbView::ShowHidden ( bool  show = true)
privateslot

Show or hide hidden files.

Parameters
showShow hidden, if true. Otherwise hide hidden

Definition at line 1658 of file gallerythumbview.cpp.

Referenced by HideHidden(), and MenuShow().

◆ HideHidden

void GalleryThumbView::HideHidden ( )
inlineprivateslot

Definition at line 94 of file gallerythumbview.h.

Referenced by MenuShow().

◆ SetCover

void GalleryThumbView::SetCover ( bool  reset = false)
privateslot

Set or reset thumbnails to use for a directory cover.

Parameters
resetReset cover if true, otherwise assign selected item as cover of parent

Definition at line 1760 of file gallerythumbview.cpp.

Referenced by MenuAction(), and ResetCover().

◆ ResetCover

void GalleryThumbView::ResetCover ( )
inlineprivateslot

Definition at line 96 of file gallerythumbview.h.

Referenced by MenuAction().

◆ ShowType

void GalleryThumbView::ShowType ( int  type = kPicAndVideo)
privateslot

Show/hide pictures or videos.

Definition at line 1742 of file gallerythumbview.cpp.

Referenced by HidePictures(), HideVideos(), and MenuShow().

◆ HidePictures

void GalleryThumbView::HidePictures ( )
inlineprivateslot

Definition at line 98 of file gallerythumbview.h.

Referenced by MenuShow().

◆ HideVideos

void GalleryThumbView::HideVideos ( )
inlineprivateslot

Definition at line 99 of file gallerythumbview.h.

Referenced by MenuShow().

◆ ZoomIn

void GalleryThumbView::ZoomIn ( void  )
privateslot

Use smaller buttonlist widgets.

Definition at line 1786 of file gallerythumbview.cpp.

Referenced by keyPressEvent(), and MenuShow().

◆ ZoomOut

void GalleryThumbView::ZoomOut ( void  )
privateslot

Use larger buttonlist widgets.

Definition at line 1776 of file gallerythumbview.cpp.

Referenced by keyPressEvent(), and MenuShow().

◆ ShowSettings

void GalleryThumbView::ShowSettings ( )
privateslot

Show configuration screen.

Definition at line 1605 of file gallerythumbview.cpp.

Referenced by MenuMain().

◆ StartScan

void GalleryThumbView::StartScan ( bool  start = true)
privateslot

Action scan request.

Parameters
startStart scan, if true. Otherwise stop scan

Definition at line 1383 of file gallerythumbview.cpp.

Referenced by MenuMain(), and StopScan().

◆ StopScan

void GalleryThumbView::StopScan ( )
inlineprivateslot

Definition at line 104 of file gallerythumbview.h.

Referenced by MenuMain().

◆ DeleteItem

void GalleryThumbView::DeleteItem ( )
privateslot

Confirm user deletion of an item.

Definition at line 1584 of file gallerythumbview.cpp.

Referenced by MenuAction().

◆ DeleteMarked

void GalleryThumbView::DeleteMarked ( )
privateslot

Confirm user deletion of marked files.

Definition at line 1595 of file gallerythumbview.cpp.

Referenced by MenuAction().

◆ Import

void GalleryThumbView::Import ( )
privateslot

Executes user 'Import command'.

Definition at line 2101 of file gallerythumbview.cpp.

Referenced by MenuAction().

◆ MakeDir

void GalleryThumbView::MakeDir ( )
privateslot

Show dialog to input new directory name.

Definition at line 1837 of file gallerythumbview.cpp.

Referenced by MenuAction().

◆ Eject

void GalleryThumbView::Eject ( )
privateslot

Remove local device (or Import) from Gallery.

Definition at line 1855 of file gallerythumbview.cpp.

Referenced by MenuAction().

◆ Copy

void GalleryThumbView::Copy ( bool  deleteAfter = false)
privateslot

Copy marked images to selected dir. If no marked files, use previously marked files. Will not overwrite/duplicate existing files on destination host.

Copies files and dir subtrees and updates Db to preserve states such as hidden, orientation & cover. Attempts to copy all files and reports the number of failures (but not which ones)

Parameters
deleteAfterIf set, source images will be deleted after being successfully copied.

Definition at line 1872 of file gallerythumbview.cpp.

Referenced by MenuPaste(), and Move().

◆ Move

void GalleryThumbView::Move ( )
privateslot

Move marked images to selected dir. If no marked files, use previously marked files. Will not overwrite/duplicate existing files on destination host.

When moving between different hosts the files are copied then deleted. When moving on same host the files are renamed by the filesystem (which may also copy/delete). The Db is updated to preserve states such as hidden, orientation & cover. Attempts to move all files and reports the number of failures (but not which ones) Successful moves are unmarked, failed ones remain marked.

Definition at line 1999 of file gallerythumbview.cpp.

Referenced by MenuPaste().

◆ ShowPassword

void GalleryThumbView::ShowPassword ( )
privateslot

Displays dialog to accept password.

Definition at line 1725 of file gallerythumbview.cpp.

Referenced by MenuMain().

◆ RepeatOn

void GalleryThumbView::RepeatOn ( int  on = 1)
inlineprivateslot

Definition at line 113 of file gallerythumbview.h.

Referenced by MenuSlideshow(), and RepeatOff().

◆ RepeatOff

void GalleryThumbView::RepeatOff ( )
inlineprivateslot

Definition at line 114 of file gallerythumbview.h.

Referenced by MenuSlideshow().

Member Data Documentation

◆ m_imageList

MythUIButtonList* GalleryThumbView::m_imageList {nullptr}
private

Definition at line 120 of file gallerythumbview.h.

Referenced by BuildImageList(), LoadData(), and SelectZoomWidget().

◆ m_captionText

MythUIText* GalleryThumbView::m_captionText {nullptr}
private

Definition at line 121 of file gallerythumbview.h.

Referenced by Create(), ResetUiSelection(), and SetUiSelection().

◆ m_crumbsText

MythUIText* GalleryThumbView::m_crumbsText {nullptr}
private

Definition at line 122 of file gallerythumbview.h.

Referenced by Create(), ResetUiSelection(), and SetUiSelection().

◆ m_emptyText

MythUIText* GalleryThumbView::m_emptyText {nullptr}
private

Definition at line 123 of file gallerythumbview.h.

Referenced by Create(), and LoadData().

◆ m_hideFilterText

MythUIText* GalleryThumbView::m_hideFilterText {nullptr}
private

Definition at line 124 of file gallerythumbview.h.

Referenced by Create(), ResetUiSelection(), and SetUiSelection().

◆ m_typeFilterText

MythUIText* GalleryThumbView::m_typeFilterText {nullptr}
private

Definition at line 125 of file gallerythumbview.h.

Referenced by Create(), ResetUiSelection(), and SetUiSelection().

◆ m_positionText

MythUIText* GalleryThumbView::m_positionText {nullptr}
private

Definition at line 126 of file gallerythumbview.h.

Referenced by Create(), ResetUiSelection(), and SetUiSelection().

◆ m_scanProgressText

MythUIText* GalleryThumbView::m_scanProgressText {nullptr}
private

Definition at line 127 of file gallerythumbview.h.

Referenced by Create(), and UpdateScanProgress().

◆ m_scanProgressBar

MythUIProgressBar* GalleryThumbView::m_scanProgressBar {nullptr}
private

Definition at line 128 of file gallerythumbview.h.

Referenced by Create(), and UpdateScanProgress().

◆ m_zoomWidgets

QList<MythUIButtonList *> GalleryThumbView::m_zoomWidgets
private

Theme buttonlist widgets implementing zoom levels.

Definition at line 131 of file gallerythumbview.h.

Referenced by Create(), MenuShow(), and SelectZoomWidget().

◆ m_zoomLevel

int GalleryThumbView::m_zoomLevel {0}
private

Definition at line 132 of file gallerythumbview.h.

Referenced by Create(), MenuShow(), and SelectZoomWidget().

◆ m_popupStack

MythScreenStack& GalleryThumbView::m_popupStack
private

Definition at line 134 of file gallerythumbview.h.

Referenced by MakeDir(), MenuMain(), ShowDialog(), ShowPassword(), and ShowRenameInput().

◆ m_mgr

ImageManagerFe& GalleryThumbView::m_mgr
private

◆ m_view

DirectoryView* GalleryThumbView::m_view {nullptr}
private

◆ m_infoList

InfoList GalleryThumbView::m_infoList
private

Image details overlay.

Definition at line 137 of file gallerythumbview.h.

Referenced by Create(), customEvent(), keyPressEvent(), LoadData(), MenuShow(), SetUiSelection(), and ShowDetails().

◆ m_scanProgress

QHash<QString, IntPair> GalleryThumbView::m_scanProgress
private

Last scan updates received from scanners.

Definition at line 140 of file gallerythumbview.h.

Referenced by UpdateScanProgress().

◆ m_scanActive

QSet<QString> GalleryThumbView::m_scanActive
private

Scanners currently scanning.

Definition at line 142 of file gallerythumbview.h.

Referenced by MenuMain(), and UpdateScanProgress().

◆ m_menuState

MenuSubjects GalleryThumbView::m_menuState
private

◆ m_pendingMap

QHash<int, ThumbLocation> GalleryThumbView::m_pendingMap
private

Buttons waiting for thumbnails to be created.

Definition at line 149 of file gallerythumbview.h.

Referenced by BuildImageList(), CheckThumbnail(), and customEvent().

◆ m_thumbExists

QSet<int> GalleryThumbView::m_thumbExists
private

Images where thumbnails are known to exist.

Definition at line 151 of file gallerythumbview.h.

Referenced by CheckThumbnail(), customEvent(), and RemoveImages().

◆ m_editsAllowed

bool GalleryThumbView::m_editsAllowed {false}
private

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