23 "Exif.Photo.ExposureTime",
24 "Exif.Photo.ShutterSpeedValue",
26 "Exif.Photo.ApertureValue",
27 "Exif.Photo.ExposureBiasValue",
29 "Exif.Photo.FocalLength",
30 "Exif.Photo.FocalLengthIn35mmFilm",
32 "Exif.Photo.MeteringMode",
33 "Exif.Photo.PixelXDimension",
34 "Exif.Photo.PixelYDimension",
36 "FFmpeg.format.format_long_name",
37 "FFmpeg.format.duration",
38 "FFmpeg.format.creation_time",
39 "FFmpeg.format.model",
42 "FFmpeg.stream0:.codec_long_name",
43 "FFmpeg.stream1:.codec_long_name",
44 "FFmpeg.stream0:.width",
45 "FFmpeg.stream1:.width",
46 "FFmpeg.stream0:.height",
47 "FFmpeg.stream1:.height",
48 "FFmpeg.stream0:.sample_rate",
49 "FFmpeg.stream1:.sample_rate",
50 "FFmpeg.stream0:.rotate",
51 "FFmpeg.stream1:.rotate" };
147 infoMap.insert(
"name", name);
148 infoMap.insert(
"value", value);
150 item->SetTextFromMap(infoMap);
168 report << tr(
"%Ln image(s)",
"", imageCount);
170 report << tr(
"%Ln video(s)",
"", videoCount);
172 report << tr(
"%Ln directory(ies)",
"", dirCount);
181 int64_t total = fsInfo.getTotalSpace();
182 int64_t used = fsInfo.getUsedSpace();
183 int64_t free = fsInfo.getFreeSpace();
186 CreateButton(tr(
"Free space"), tr(
"%L1 (%L2\%) Used: %L3 / %L4")
188 .arg(100 * free / total)
242 tagPath = tr(
"Storage Group");
251 CreateButton(tr(
"Path"), QString(
"%1%2 %3").arg(host, tagPath, clone));
277 QList groups = tags.uniqueKeys();
278 for (
const QString & group : std::as_const(groups))
281 using TagList = QList<QStringList>;
282 TagList tagList = tags.values(group);
283 TagList::const_iterator i = tagList.constEnd();
288 while (i-- != tagList.constBegin())
294 while (i-- != tagList.constBegin())
static QString FormatSize(int sizeKib)
void GetDescendantCount(int id, int &dirs, int &pics, int &videos, int &sizeKb) const
Return counts of dirs, pics and videos in the subtree of a dir. Also dir size.
Represents a picture, video or directory.
int m_id
Uniquely identifies an image (file/dir).
std::chrono::seconds m_date
Image creation date, from Exif metadata.
QString m_filePath
Absolute for local images. Usually SG-relative for remotes.
std::chrono::seconds m_modTime
Filesystem modified datestamp.
int m_type
Type of node: dir, video etc.
The image manager for use by Frontends.
void RequestMetaData(int id)
Requests all exif/ffmpeg tags for an image, which returns by event.
QString DeviceCaption(ImageItemK &im) const
Return translated device name.
void Display(ImageItemK &im, const QStringList &tagStrings)
Build list of metadata tags.
void Update(const ImagePtrK &im)
Populates available exif details for the current image/dir.
ImageManagerFe & m_mgr
Image Manager.
QTimer m_timer
Clears list if no new metadata arrives.
InfoList(MythScreenType &screen)
Constructor.
MythUIButtonList * m_btnList
Overlay buttonlist.
void CreateCount(ImageItemK &im)
Creates buttons detailing dir counts & size.
bool Hide()
Remove infolist from display.
InfoVisibleState m_infoVisible
Info list state.
void Toggle(const ImagePtrK &im)
Toggle infolist state for an image. Focusable widgets toggle between Basic & Full info....
void CreateButton(const QString &name, const QString &value)
Populate a buttonlist item with exif tag name & value.
bool Create(bool focusable)
Initialise buttonlist from XML.
MythScreenType & m_screen
Parent screen.
QString GetHostName(void)
Screen in which all other widgets are contained and rendered.
bool SetFocusWidget(MythUIType *widget=nullptr)
void SetCanTakeFocus(bool set=true)
Set whether this widget can take focus.
bool CanTakeFocus(void) const
Return if this widget can accept input focus.
virtual void SetVisible(bool visible)
static QSet< QString > kBasicInfoSet
The exif/video tags comprising the Basic file info.
The info/details overlay that shows image metadata.
@ kNoInfo
Details not displayed.
@ kBasicInfo
Shows just the most useful exif tags.
@ kFullInfo
Shows all exif tags.
QSharedPointer< ImageItemK > ImagePtrK
static constexpr int GALLERY_DB_ID
static constexpr int PHOTO_DB_ID
@ kCloneDir
A device sub dir comprised from multiple SG dirs.
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
QHash< QString, QString > InfoMap
MBASE_PUBLIC QDateTime fromSecsSinceEpoch(int64_t seconds)
This function takes the number of seconds since the start of the epoch and returns a QDateTime with t...
QString toString(const QDateTime &raw_dt, uint format)
Returns formatted string representing the time.
@ kDateTimeFull
Default local time.
@ kAddYear
Add year to string if not included.
static bool Assign(ContainerType *container, UIType *&item, const QString &name, bool *err=nullptr)