MythTV
master
|
Represents a picture, video or directory. More...
#include <libmythmetadata/imagetypes.h>
Public Member Functions | |
ImageItem (int id=0) | |
bool | IsDevice () const |
bool | IsDirectory () const |
bool | IsFile () const |
bool | IsLocal () const |
Static Public Member Functions | |
static bool | IsLocalId (int id) |
Determine image type (local/remote) from its id. Root/Gallery is remote. More... | |
static bool | IsLocalParent (int id) |
Parents of locals are locals or root. More... | |
static int | ToLocalId (int id) |
Converts a DB id (positive) to an id of a local image (negative) More... | |
static QString | ToLocalId (const QString &id) |
static int | ToDbId (int id) |
Converts local image ids (negative) to Db ids (positive) More... | |
static QString | ToDbId (QString ids) |
static StringPair | PartitionIds (const ImageIdList &ids) |
Separates list of ids into a list of local ids and a list of remote ids. More... | |
Public Attributes | |
int | m_id |
Uniquely identifies an image (file/dir). More... | |
QString | m_baseName |
File/Dir name with extension (no path) More... | |
QString | m_filePath |
Absolute for local images. Usually SG-relative for remotes. More... | |
QString | m_extension |
Image file extension. More... | |
int | m_device { 0 } |
Id of media device. Always 0 (SG) for remotes, 1+ for local devices. More... | |
int | m_parentId { 0 } |
Id of parent dir. More... | |
int | m_type { 0 } |
Type of node: dir, video etc. More... | |
std::chrono::seconds | m_modTime { 0s } |
Filesystem modified datestamp. More... | |
int | m_size { 0 } |
Filesize (files only) More... | |
std::chrono::seconds | m_date { 0s } |
Image creation date, from Exif metadata. More... | |
int | m_orientation { 0 } |
Image orientation. More... | |
QString | m_comment |
User comment, from Exif metadata. More... | |
bool | m_isHidden { false } |
If true, image won't be shown. More... | |
int | m_userThumbnail { 0 } |
Id of thumbnail to use as cover (dirs only) More... | |
QString | m_url |
QString | m_thumbPath |
Myth URL of image (abs filepath for locals) More... | |
QList< ThumbPair > | m_thumbNails |
int | m_dirCount { 0 } |
Id & URLs of thumbnail(s). 1 for a file, 4 for dirs. More... | |
int | m_fileCount { 0 } |
Number of child images (dirs only) More... | |
Represents a picture, video or directory.
Definition at line 68 of file imagetypes.h.
|
inlineexplicit |
Definition at line 71 of file imagetypes.h.
|
inline |
Definition at line 116 of file imagetypes.h.
Referenced by InfoList::CreateCount(), ImageManagerFe::CrumbName(), and InfoList::Display().
|
inline |
Definition at line 117 of file imagetypes.h.
Referenced by InfoList::Display().
|
inline |
Definition at line 118 of file imagetypes.h.
Referenced by InfoList::Display().
|
inline |
Definition at line 119 of file imagetypes.h.
Referenced by InfoList::CreateCount(), ImageManagerFe::CrumbName(), and ImageManagerFe::DeviceCaption().
|
inlinestatic |
Determine image type (local/remote) from its id. Root/Gallery is remote.
Definition at line 122 of file imagetypes.h.
Referenced by ImageManagerFe::CreateImages(), ImageDbReader::GetChildren(), ImageDbReader::GetDescendantCount(), ImageDbReader::GetDirectory(), ImageDbReader::GetImageTree(), ImageManagerFe::MakeDir(), GalleryThumbView::Move(), PartitionIds(), ImageManagerFe::RequestMetaData(), and ImageManagerFe::SetCover().
|
inlinestatic |
Parents of locals are locals or root.
Definition at line 124 of file imagetypes.h.
Referenced by ImageDbReader::GetChildren(), ImageDbReader::GetDirectory(), and ImageDbReader::GetImageTree().
|
inlinestatic |
Converts a DB id (positive) to an id of a local image (negative)
Definition at line 127 of file imagetypes.h.
Referenced by ImageAdapterLocal::ImageId().
|
inlinestatic |
Definition at line 128 of file imagetypes.h.
|
inlinestatic |
Converts local image ids (negative) to Db ids (positive)
Definition at line 131 of file imagetypes.h.
Referenced by ImageAdapterLocal::DbId(), and ImageAdapterLocal::DbIds().
|
inlinestatic |
Definition at line 132 of file imagetypes.h.
|
inlinestatic |
Separates list of ids into a list of local ids and a list of remote ids.
ids | List of local/remote image ids |
Definition at line 140 of file imagetypes.h.
Referenced by ImageManagerFe::ChangeOrientation(), ImageManagerFe::CreateThumbnails(), ImageManagerFe::DeleteFiles(), ImageDbReader::GetDescendants(), ImageDbReader::GetImages(), and ImageManagerFe::HideFiles().
int ImageItem::m_id |
Uniquely identifies an image (file/dir).
Assigned by Db auto-incremnent Remote (Storage Group) images are positive - as in Db. Local images are negative - the negated Db id
Definition at line 89 of file imagetypes.h.
Referenced by DirectoryView::Cache(), InfoList::CreateCount(), ImageManagerFe::DeviceCaption(), InfoList::Display(), DirectoryView::LoadDirThumbs(), DirectoryView::PopulateFromCache(), and ImageDb< ImageAdapterLocal >::UpdateDbImage().
QString ImageItem::m_baseName |
File/Dir name with extension (no path)
Definition at line 92 of file imagetypes.h.
Referenced by ImageManagerFe::CrumbName().
QString ImageItem::m_filePath |
Absolute for local images. Usually SG-relative for remotes.
Definition at line 93 of file imagetypes.h.
Referenced by InfoList::CreateCount(), ImageManagerFe::CrumbName(), ImageHandler< ImageDbSg >::HandleDbCreate(), ImageDb< ImageAdapterLocal >::InsertDbImage(), ImageAdapterBase::ThumbPath(), and ImageDb< ImageAdapterLocal >::UpdateDbImage().
QString ImageItem::m_extension |
Image file extension.
Definition at line 94 of file imagetypes.h.
Referenced by ImageDb< ImageAdapterLocal >::InsertDbImage(), and ImageDb< ImageAdapterLocal >::UpdateDbImage().
int ImageItem::m_device { 0 } |
Id of media device. Always 0 (SG) for remotes, 1+ for local devices.
Definition at line 95 of file imagetypes.h.
Referenced by ImageManagerFe::CrumbName(), ImageManagerFe::DeviceCaption(), ImageDb< ImageAdapterLocal >::InsertDbImage(), and ImageDb< ImageAdapterLocal >::UpdateDbImage().
int ImageItem::m_parentId { 0 } |
Id of parent dir.
Definition at line 96 of file imagetypes.h.
Referenced by DirectoryView::Cache(), ImageDb< ImageAdapterLocal >::InsertDbImage(), and ImageDb< ImageAdapterLocal >::UpdateDbImage().
int ImageItem::m_type { 0 } |
Type of node: dir, video etc.
Definition at line 97 of file imagetypes.h.
Referenced by InfoList::Display(), ImageHandler< ImageDbSg >::HandleDbCreate(), ImageDb< ImageAdapterLocal >::InsertDbImage(), ImageAdapterBase::ThumbPath(), and ImageDb< ImageAdapterLocal >::UpdateDbImage().
std::chrono::seconds ImageItem::m_modTime { 0s } |
Filesystem modified datestamp.
Definition at line 98 of file imagetypes.h.
Referenced by InfoList::Display(), ImageDb< ImageAdapterLocal >::InsertDbImage(), and ImageDb< ImageAdapterLocal >::UpdateDbImage().
int ImageItem::m_size { 0 } |
Filesize (files only)
Definition at line 99 of file imagetypes.h.
Referenced by ImageDb< ImageAdapterLocal >::InsertDbImage(), and ImageDb< ImageAdapterLocal >::UpdateDbImage().
std::chrono::seconds ImageItem::m_date { 0s } |
Image creation date, from Exif metadata.
Definition at line 100 of file imagetypes.h.
Referenced by InfoList::Display(), ImageDb< ImageAdapterLocal >::InsertDbImage(), and ImageDb< ImageAdapterLocal >::UpdateDbImage().
int ImageItem::m_orientation { 0 } |
Image orientation.
Definition at line 101 of file imagetypes.h.
Referenced by ImageHandler< ImageDbSg >::HandleDbCreate(), ImageDb< ImageAdapterLocal >::InsertDbImage(), and ImageDb< ImageAdapterLocal >::UpdateDbImage().
QString ImageItem::m_comment |
User comment, from Exif metadata.
Definition at line 102 of file imagetypes.h.
Referenced by ImageDb< ImageAdapterLocal >::InsertDbImage(), and ImageDb< ImageAdapterLocal >::UpdateDbImage().
If true, image won't be shown.
Definition at line 105 of file imagetypes.h.
Referenced by ImageHandler< ImageDbSg >::HandleDbCreate(), ImageDb< ImageAdapterLocal >::InsertDbImage(), and ImageDb< ImageAdapterLocal >::UpdateDbImage().
int ImageItem::m_userThumbnail { 0 } |
Id of thumbnail to use as cover (dirs only)
Definition at line 106 of file imagetypes.h.
Referenced by ImageHandler< ImageDbSg >::HandleDbCreate(), ImageDb< ImageAdapterLocal >::InsertDbImage(), DirectoryView::PopulateThumbs(), and ImageDb< ImageAdapterLocal >::UpdateDbImage().
QString ImageItem::m_url |
Definition at line 109 of file imagetypes.h.
QString ImageItem::m_thumbPath |
Myth URL of image (abs filepath for locals)
Absolute path of thumbnail
Definition at line 110 of file imagetypes.h.
QList<ThumbPair> ImageItem::m_thumbNails |
Definition at line 111 of file imagetypes.h.
Referenced by DirectoryView::Cache(), DirectoryView::PopulateFromCache(), and DirectoryView::PopulateThumbs().
int ImageItem::m_dirCount { 0 } |
Id & URLs of thumbnail(s). 1 for a file, 4 for dirs.
Number of child sub-dirs (dirs only)
Definition at line 112 of file imagetypes.h.
Referenced by DirectoryView::Cache(), DirectoryView::PopulateFromCache(), and DirectoryView::PopulateThumbs().
int ImageItem::m_fileCount { 0 } |
Number of child images (dirs only)
Definition at line 113 of file imagetypes.h.
Referenced by DirectoryView::Cache(), DirectoryView::PopulateFromCache(), and DirectoryView::PopulateThumbs().