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 <mythfrontend/gallerythumbview.h>

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

Public Slots

void Start ()
 Start Thumbnail screen. More...
 
void Close () override
 Exit Gallery. More...
 
static 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 () override
 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)
 
 ~MythScreenType () override
 
bool inputMethodEvent (QInputMethodEvent *event) override
 Input Method event handler. More...
 
bool gestureEvent (MythGestureEvent *event) 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) const
 
bool IsLoaded (void) const
 
MythPainterGetPainter (void) override
 
- Public Member Functions inherited from MythUIComposite
 MythUIComposite (QObject *parent, const QString &name)
 
 ~MythUIComposite () override=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 (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...
 
QList< MythUIType * > GetAllDescendants (void)
 
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 order)
 
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...
 
void SetPosition (QPoint point)
 
virtual void SetPosition (const MythPoint &point)
 
virtual MythPoint GetPosition (void) const
 
virtual void SetSize (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 (QRect 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 (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 parent)
 Loads & displays images from database. More...
 
void SelectImage (int id)
 Select item if it is displayed. More...
 
void ItemClicked (MythUIButtonListItem *item)
 Action item click. More...
 
void SetUiSelection (MythUIButtonListItem *item)
 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 DoMarkItem (bool mark)
 Mark or unmark a single item. More...
 
void MarkItem ()
 
void UnmarkItem ()
 
void DoMarkAll (bool mark=true)
 Mark or unmark all items. More...
 
void MarkAll ()
 
void UnmarkAll ()
 
void MarkInvertAll ()
 Invert all marked items. More...
 
void DoHideItem (bool hide=true)
 Hide or unhide item. More...
 
void HideItem ()
 
void Unhide ()
 
void DoHideMarked (bool hide=true)
 Hide or unhide marked items. More...
 
void HideMarked ()
 
void UnhideMarked ()
 
void ShowRenameInput ()
 Show dialog to allow input. More...
 
void DoShowHidden (bool show=true)
 Show or hide hidden files. More...
 
void ShowHidden ()
 
void HideHidden ()
 
void DoSetCover (bool reset=false)
 Set or reset thumbnails to use for a directory cover. More...
 
void SetCover ()
 
void ResetCover ()
 
void DoShowType (int type)
 Show/hide pictures or videos. More...
 
void ShowType ()
 
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 DoScanAction (bool start)
 Action scan request. More...
 
void StartScan ()
 
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)
 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 Copy ()
 
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...
 
static void DoRepeat (int on)
 
static void RepeatOn ()
 
static void RepeatOff ()
 

Private Member Functions

bool keyPressEvent (QKeyEvent *event) override
 Handle keypresses. More...
 
void mediaEvent (MythMediaEvent *event) override
 Media/Device status event handler, received from MythMediaMonitor. More...
 
void customEvent (QEvent *event) 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 *item)
 Initialises a single buttonlist item. More...
 
void UpdateScanProgress (const QString &scanner, int current, int total)
 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 *item, const ImagePtrK &im, ImageIdList &request, int index)
 Verify thumbnail is known to exist. More...
 
void MenuMain ()
 Shows the main menu when the MENU button was pressed. More...
 
void MenuShow (MythMenu *mainMenu)
 Add a Show submenu. More...
 
void MenuMarked (MythMenu *mainMenu)
 Adds a Marking submenu. More...
 
void MenuPaste (MythMenu *mainMenu)
 Add a Paste submenu. More...
 
void MenuTransform (MythMenu *mainMenu)
 Add a Transform submenu. More...
 
void MenuAction (MythMenu *mainMenu)
 Add a Action submenu. More...
 
void MenuSlideshow (MythMenu *mainMenu)
 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 &msg, const QString &event="")
 Show a confirmation dialog. More...
 

Static Private Member Functions

static void UpdateThumbnail (MythUIButtonListItem *button, const ImagePtrK &im, const QString &url, int index)
 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...
 
QMultiHash< 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 RequestRegionUpdate (const QRect &)
 
void TakingFocus ()
 
void LosingFocus ()
 
void VisibilityChanged (bool Visible)
 
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
 ~MythUIType () override
 
void customEvent (QEvent *event) override
 
virtual void DrawSelf (MythPainter *p, int xoffset, int yoffset, int alphaMod, QRect clipRect)
 
void AddFocusableChildrenToList (FocusInfoType &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) const
 
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 (int width)
 
static int NormY (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}
 
FocusInfoType 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 127 of file gallerythumbview.h.

◆ ThumbLocation

Definition at line 157 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 163 of file gallerythumbview.cpp.

◆ ~GalleryThumbView()

GalleryThumbView::~GalleryThumbView ( )
override

Destructor.

Definition at line 182 of file gallerythumbview.cpp.

Member Function Documentation

◆ Create()

bool GalleryThumbView::Create ( )
overridevirtual

Initialises and shows the graphical elements.

Reimplemented from MythScreenType.

Definition at line 211 of file gallerythumbview.cpp.

◆ Start

void GalleryThumbView::Start ( )
slot

Start Thumbnail screen.

Definition at line 606 of file gallerythumbview.cpp.

◆ Close

void GalleryThumbView::Close ( )
overrideslot

Exit Gallery.

Definition at line 192 of file gallerythumbview.cpp.

◆ ClearSgDb

static void GalleryThumbView::ClearSgDb ( )
inlinestaticslot

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 275 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 369 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 582 of file gallerythumbview.cpp.

Referenced by customEvent().

◆ BuildImageList()

void GalleryThumbView::BuildImageList ( )
private

Displays all images in current view.

Definition at line 665 of file gallerythumbview.cpp.

Referenced by customEvent(), DoMarkAll(), DoMarkItem(), LoadData(), MarkInvertAll(), SelectImage(), ShowSettings(), ZoomIn(), and ZoomOut().

◆ ResetUiSelection()

void GalleryThumbView::ResetUiSelection ( )
private

Clears all text widgets for selected item.

Definition at line 957 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 1560 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 1578 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 713 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 876 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 1437 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 1853 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 820 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 847 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 1038 of file gallerythumbview.cpp.

Referenced by keyPressEvent().

◆ MenuShow()

void GalleryThumbView::MenuShow ( MythMenu mainMenu)
private

Add a Show submenu.

Parameters
mainMenuParent menu

Definition at line 1320 of file gallerythumbview.cpp.

Referenced by MenuMain().

◆ MenuMarked()

void GalleryThumbView::MenuMarked ( MythMenu mainMenu)
private

Adds a Marking submenu.

Parameters
mainMenuParent menu

Definition at line 1081 of file gallerythumbview.cpp.

Referenced by MenuMain().

◆ MenuPaste()

void GalleryThumbView::MenuPaste ( MythMenu mainMenu)
private

Add a Paste submenu.

Parameters
mainMenuParent menu

Definition at line 1134 of file gallerythumbview.cpp.

Referenced by MenuMain().

◆ MenuTransform()

void GalleryThumbView::MenuTransform ( MythMenu mainMenu)
private

Add a Transform submenu.

Parameters
mainMenuParent menu

Definition at line 1163 of file gallerythumbview.cpp.

Referenced by MenuMain().

◆ MenuAction()

void GalleryThumbView::MenuAction ( MythMenu mainMenu)
private

Add a Action submenu.

Parameters
mainMenuParent menu

Definition at line 1199 of file gallerythumbview.cpp.

Referenced by MenuMain().

◆ MenuSlideshow()

void GalleryThumbView::MenuSlideshow ( MythMenu mainMenu)
private

Add a Slideshow submenu.

Parameters
mainMenuParent menu

Definition at line 1267 of file gallerythumbview.cpp.

Referenced by MenuMain().

◆ DirSelectUp()

bool GalleryThumbView::DirSelectUp ( )
private

Goes up one directory level.

Definition at line 1475 of file gallerythumbview.cpp.

Referenced by ItemClicked(), and keyPressEvent().

◆ DirSelectDown()

void GalleryThumbView::DirSelectDown ( )
private

Goes one directory level down.

Definition at line 1496 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 1727 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 630 of file gallerythumbview.cpp.

Referenced by customEvent(), DirSelectDown(), DirSelectUp(), DoShowHidden(), DoShowType(), ShowSettings(), and Start().

◆ SelectImage

void GalleryThumbView::SelectImage ( int  id)
privateslot

Select item if it is displayed.

Parameters
idImage id

Definition at line 1382 of file gallerythumbview.cpp.

Referenced by StartSlideshow().

◆ ItemClicked

void GalleryThumbView::ItemClicked ( MythUIButtonListItem item)
privateslot

Action item click.

Parameters
itemButtonlist item

Definition at line 1394 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 980 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 1770 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().

◆ DoMarkItem

void GalleryThumbView::DoMarkItem ( bool  mark)
privateslot

Mark or unmark a single item.

Parameters
markMark if true, otherwise unmark

Definition at line 1514 of file gallerythumbview.cpp.

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

◆ MarkItem

void GalleryThumbView::MarkItem ( )
inlineprivateslot

Definition at line 84 of file gallerythumbview.h.

Referenced by MenuMarked().

◆ UnmarkItem

void GalleryThumbView::UnmarkItem ( )
inlineprivateslot

Definition at line 85 of file gallerythumbview.h.

Referenced by MenuMarked().

◆ DoMarkAll

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

Mark or unmark all items.

Parameters
markMark if true, otherwise unmark

Definition at line 1532 of file gallerythumbview.cpp.

Referenced by MarkAll(), and UnmarkAll().

◆ MarkAll

void GalleryThumbView::MarkAll ( )
inlineprivateslot

Definition at line 87 of file gallerythumbview.h.

Referenced by MenuMarked().

◆ UnmarkAll

void GalleryThumbView::UnmarkAll ( )
inlineprivateslot

Definition at line 88 of file gallerythumbview.h.

Referenced by MenuMarked().

◆ MarkInvertAll

void GalleryThumbView::MarkInvertAll ( )
privateslot

Invert all marked items.

Definition at line 1547 of file gallerythumbview.cpp.

Referenced by MenuMarked().

◆ DoHideItem

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

Hide or unhide item.

Parameters
hideHide if true; otherwise unhide

Definition at line 1590 of file gallerythumbview.cpp.

Referenced by HideItem(), and Unhide().

◆ HideItem

void GalleryThumbView::HideItem ( )
inlineprivateslot

Definition at line 91 of file gallerythumbview.h.

Referenced by MenuAction().

◆ Unhide

void GalleryThumbView::Unhide ( )
inlineprivateslot

Definition at line 92 of file gallerythumbview.h.

Referenced by MenuAction().

◆ DoHideMarked

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

Hide or unhide marked items.

Parameters
hideHide if true; otherwise unhide

Definition at line 1615 of file gallerythumbview.cpp.

Referenced by HideMarked(), and UnhideMarked().

◆ HideMarked

void GalleryThumbView::HideMarked ( )
inlineprivateslot

Definition at line 94 of file gallerythumbview.h.

Referenced by MenuAction().

◆ UnhideMarked

void GalleryThumbView::UnhideMarked ( )
inlineprivateslot

Definition at line 95 of file gallerythumbview.h.

Referenced by MenuAction().

◆ ShowRenameInput

void GalleryThumbView::ShowRenameInput ( )
privateslot

Show dialog to allow input.

Definition at line 1746 of file gallerythumbview.cpp.

Referenced by MenuAction().

◆ DoShowHidden

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

Show or hide hidden files.

Parameters
showShow hidden, if true. Otherwise hide hidden

Definition at line 1708 of file gallerythumbview.cpp.

Referenced by HideHidden(), and ShowHidden().

◆ ShowHidden

void GalleryThumbView::ShowHidden ( )
inlineprivateslot

Definition at line 98 of file gallerythumbview.h.

Referenced by MenuShow().

◆ HideHidden

void GalleryThumbView::HideHidden ( )
inlineprivateslot

Definition at line 99 of file gallerythumbview.h.

Referenced by MenuShow().

◆ DoSetCover

void GalleryThumbView::DoSetCover ( 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 1816 of file gallerythumbview.cpp.

Referenced by ResetCover(), and SetCover().

◆ SetCover

void GalleryThumbView::SetCover ( )
inlineprivateslot

Definition at line 101 of file gallerythumbview.h.

Referenced by MenuAction().

◆ ResetCover

void GalleryThumbView::ResetCover ( )
inlineprivateslot

Definition at line 102 of file gallerythumbview.h.

Referenced by MenuAction().

◆ DoShowType

void GalleryThumbView::DoShowType ( int  type)
privateslot

Show/hide pictures or videos.

Definition at line 1798 of file gallerythumbview.cpp.

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

◆ ShowType

void GalleryThumbView::ShowType ( )
inlineprivateslot

Definition at line 104 of file gallerythumbview.h.

Referenced by MenuShow().

◆ HidePictures

void GalleryThumbView::HidePictures ( )
inlineprivateslot

Definition at line 105 of file gallerythumbview.h.

Referenced by MenuShow().

◆ HideVideos

void GalleryThumbView::HideVideos ( )
inlineprivateslot

Definition at line 106 of file gallerythumbview.h.

Referenced by MenuShow().

◆ ZoomIn

void GalleryThumbView::ZoomIn ( )
privateslot

Use smaller buttonlist widgets.

Definition at line 1842 of file gallerythumbview.cpp.

Referenced by keyPressEvent(), and MenuShow().

◆ ZoomOut

void GalleryThumbView::ZoomOut ( )
privateslot

Use larger buttonlist widgets.

Definition at line 1832 of file gallerythumbview.cpp.

Referenced by keyPressEvent(), and MenuShow().

◆ ShowSettings

void GalleryThumbView::ShowSettings ( )
privateslot

Show configuration screen.

Definition at line 1655 of file gallerythumbview.cpp.

Referenced by MenuMain().

◆ DoScanAction

void GalleryThumbView::DoScanAction ( bool  start)
privateslot

Action scan request.

Parameters
startStart scan, if true. Otherwise stop scan

Definition at line 1425 of file gallerythumbview.cpp.

Referenced by StartScan(), and StopScan().

◆ StartScan

void GalleryThumbView::StartScan ( )
inlineprivateslot

Definition at line 111 of file gallerythumbview.h.

Referenced by MenuMain().

◆ StopScan

void GalleryThumbView::StopScan ( )
inlineprivateslot

Definition at line 112 of file gallerythumbview.h.

Referenced by MenuMain().

◆ DeleteItem

void GalleryThumbView::DeleteItem ( )
privateslot

Confirm user deletion of an item.

Definition at line 1634 of file gallerythumbview.cpp.

Referenced by MenuAction().

◆ DeleteMarked

void GalleryThumbView::DeleteMarked ( )
privateslot

Confirm user deletion of marked files.

Definition at line 1645 of file gallerythumbview.cpp.

Referenced by MenuAction().

◆ Import

void GalleryThumbView::Import ( )
privateslot

Executes user 'Import command'.

Definition at line 2164 of file gallerythumbview.cpp.

Referenced by MenuAction().

◆ MakeDir

void GalleryThumbView::MakeDir ( )
privateslot

Show dialog to input new directory name.

Definition at line 1892 of file gallerythumbview.cpp.

Referenced by MenuAction().

◆ Eject

void GalleryThumbView::Eject ( )
privateslot

Remove local device (or Import) from Gallery.

Definition at line 1912 of file gallerythumbview.cpp.

Referenced by MenuAction().

◆ Copy [1/2]

void GalleryThumbView::Copy ( bool  deleteAfter)
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 1929 of file gallerythumbview.cpp.

◆ Copy [2/2]

void GalleryThumbView::Copy ( )
inlineprivateslot

Definition at line 119 of file gallerythumbview.h.

Referenced by Copy(), 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 2057 of file gallerythumbview.cpp.

Referenced by MenuPaste().

◆ ShowPassword

void GalleryThumbView::ShowPassword ( )
privateslot

Displays dialog to accept password.

Definition at line 1779 of file gallerythumbview.cpp.

Referenced by MenuMain().

◆ DoRepeat

static void GalleryThumbView::DoRepeat ( int  on)
inlinestaticprivateslot

Definition at line 122 of file gallerythumbview.h.

Referenced by RepeatOff(), and RepeatOn().

◆ RepeatOn

static void GalleryThumbView::RepeatOn ( )
inlinestaticprivateslot

Definition at line 123 of file gallerythumbview.h.

Referenced by MenuSlideshow().

◆ RepeatOff

static void GalleryThumbView::RepeatOff ( )
inlinestaticprivateslot

Definition at line 124 of file gallerythumbview.h.

Referenced by MenuSlideshow().

Member Data Documentation

◆ m_imageList

MythUIButtonList* GalleryThumbView::m_imageList {nullptr}
private

Definition at line 130 of file gallerythumbview.h.

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

◆ m_captionText

MythUIText* GalleryThumbView::m_captionText {nullptr}
private

Definition at line 131 of file gallerythumbview.h.

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

◆ m_crumbsText

MythUIText* GalleryThumbView::m_crumbsText {nullptr}
private

Definition at line 132 of file gallerythumbview.h.

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

◆ m_emptyText

MythUIText* GalleryThumbView::m_emptyText {nullptr}
private

Definition at line 133 of file gallerythumbview.h.

Referenced by Create(), and LoadData().

◆ m_hideFilterText

MythUIText* GalleryThumbView::m_hideFilterText {nullptr}
private

Definition at line 134 of file gallerythumbview.h.

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

◆ m_typeFilterText

MythUIText* GalleryThumbView::m_typeFilterText {nullptr}
private

Definition at line 135 of file gallerythumbview.h.

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

◆ m_positionText

MythUIText* GalleryThumbView::m_positionText {nullptr}
private

Definition at line 136 of file gallerythumbview.h.

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

◆ m_scanProgressText

MythUIText* GalleryThumbView::m_scanProgressText {nullptr}
private

Definition at line 137 of file gallerythumbview.h.

Referenced by Create(), and UpdateScanProgress().

◆ m_scanProgressBar

MythUIProgressBar* GalleryThumbView::m_scanProgressBar {nullptr}
private

Definition at line 138 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 141 of file gallerythumbview.h.

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

◆ m_zoomLevel

int GalleryThumbView::m_zoomLevel {0}
private

Definition at line 142 of file gallerythumbview.h.

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

◆ m_popupStack

MythScreenStack& GalleryThumbView::m_popupStack
private

Definition at line 144 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 147 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 150 of file gallerythumbview.h.

Referenced by UpdateScanProgress().

◆ m_scanActive

QSet<QString> GalleryThumbView::m_scanActive
private

Scanners currently scanning.

Definition at line 152 of file gallerythumbview.h.

Referenced by MenuMain(), and UpdateScanProgress().

◆ m_menuState

MenuSubjects GalleryThumbView::m_menuState
private

◆ m_pendingMap

QMultiHash<int, ThumbLocation> GalleryThumbView::m_pendingMap
private

Buttons waiting for thumbnails to be created.

Definition at line 159 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 161 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: