MythTV
master
|
Common filesystem facilities. More...
#include <libmythmetadata/imagemanager.h>
Public Member Functions | |
QDir | GetImageFilters () const |
Get filters for detecting recognised images/videos. More... | |
ImageNodeType | GetImageType (const QString &ext) const |
Determine file type from its extension. More... | |
Public Member Functions inherited from DeviceManager | |
QStringList | CloseDevices (int devId, const QString &action) |
Remove a device (or all devices) More... | |
QString | DeviceMount (int devId) const |
Get path at which the device is mounted. More... | |
QString | DeviceName (int devId) const |
Get model name of the device. More... | |
int | DeviceCount () const |
QString | ThumbDir (int fs) const |
Static Public Member Functions | |
static QStringList | SupportedImages () |
Return recognised pictures. More... | |
static QStringList | SupportedVideos () |
Return recognised video extensions. More... | |
static QString | ConstructPath (const QString &path, const QString &name) |
Assembles a canonical file path without corrupting its absolute/relative nature. More... | |
static QString | BaseNameOf (const QString &path) |
Extracts file name (incl extension) from a filepath. More... | |
static QString | PathOf (const QString &path) |
Extracts path from a filepath. More... | |
static QString | FormatSize (int sizeKib) |
static QString | GetAbsThumbPath (const QString &devPath, const QString &path) |
Get absolute filepath for thumbnail of an image. More... | |
static QString | ThumbPath (const ImageItem &im) |
Thumbnails of videos are a JPEG snapshot with jpg suffix appended. More... | |
Protected Member Functions | |
ImageAdapterBase () | |
Constructor. More... | |
virtual | ~ImageAdapterBase ()=default |
Protected Member Functions inherited from DeviceManager | |
int | OpenDevice (const QString &name, const QString &mount, MythMediaDevice *media=nullptr, QTemporaryDir *dir=nullptr) |
Define a new device and assign it a unique id. If the device is already known, its existing id is returned. More... | |
int | LocateMount (const QString &mount) const |
Find the id of a device. More... | |
StringMap | GetDeviceDirs () const |
Get all known devices. More... | |
QList< int > | GetAbsentees () |
Get list of mountpoints for non-import devices. More... | |
DeviceManager ()=default | |
~DeviceManager () | |
Private Attributes | |
QDir | m_dirFilter |
A pre-configured dir for reading image/video files. More... | |
QStringList | m_imageFileExt |
List of file extensions recognised as pictures. More... | |
QStringList | m_videoFileExt |
List of file extensions recognised as videos. More... | |
Common filesystem facilities.
Definition at line 124 of file imagemanager.h.
|
protected |
Constructor.
Definition at line 286 of file imagemanager.cpp.
|
protectedvirtualdefault |
|
static |
Return recognised pictures.
Definition at line 310 of file imagemanager.cpp.
Referenced by internal_media_init().
|
static |
Return recognised video extensions.
Definition at line 325 of file imagemanager.cpp.
Referenced by internal_media_init().
|
inlinestatic |
Assembles a canonical file path without corrupting its absolute/relative nature.
Definition at line 132 of file imagemanager.h.
Referenced by GalleryThumbView::Copy(), and GalleryThumbView::Move().
|
inlinestatic |
Extracts file name (incl extension) from a filepath.
Definition at line 136 of file imagemanager.h.
Referenced by ReadMetaThread::run().
|
inlinestatic |
Extracts path from a filepath.
Definition at line 140 of file imagemanager.h.
Referenced by ReadMetaThread::run().
|
inlinestatic |
Definition at line 143 of file imagemanager.h.
Referenced by InfoList::CreateCount(), TransferThread::run(), and ReadMetaThread::run().
|
inlinestatic |
Get absolute filepath for thumbnail of an image.
Definition at line 148 of file imagemanager.h.
Referenced by ImageAdapterLocal::CreateItem(), ImageAdapterSg::CreateItem(), and ImageAdapterLocal::MakeThumbUrl().
|
inlinestatic |
Thumbnails of videos are a JPEG snapshot with jpg suffix appended.
Definition at line 155 of file imagemanager.h.
Referenced by ImageAdapterLocal::CreateItem(), and ImageAdapterSg::CreateItem().
|
inline |
Get filters for detecting recognised images/videos.
Supported pictures are determined by QImage; supported videos are determined from the mythplayer settings (Video Associations)
Definition at line 165 of file imagemanager.h.
|
inline |
Determine file type from its extension.
Definition at line 168 of file imagemanager.h.
Referenced by ImageAdapterLocal::CreateItem(), and ImageAdapterSg::CreateItem().
|
private |
A pre-configured dir for reading image/video files.
Definition at line 182 of file imagemanager.h.
Referenced by ImageAdapterBase().
|
private |
List of file extensions recognised as pictures.
Definition at line 184 of file imagemanager.h.
Referenced by ImageAdapterBase().
|
private |
List of file extensions recognised as videos.
Definition at line 186 of file imagemanager.h.
Referenced by ImageAdapterBase().