2#ifndef MYTHUIFILEBROWSER_H_
3#define MYTHUIFILEBROWSER_H_
25 explicit MFileInfo(
const QString& fileName =
"", QString sgDir =
"",
bool isDir =
false,
32 void init(
const QString& fileName =
"", QString sgDir =
"",
bool isDir =
false,
35 QString fileName(
void)
const;
36 QString filePath(
void)
const;
37 bool isRemote(
void)
const {
return m_isRemote; }
38 bool isDir(
void)
const;
39 bool isFile(
void)
const;
40 bool isParentDir(
void)
const;
41 bool isExecutable(
void)
const;
42 QString absoluteFilePath(
void)
const;
43 qint64 size(
void)
const;
46 void setSize(qint64 size) { m_size = size; }
47 void setIsDir(
bool isDir) { m_isDir = isDir; m_isFile = !isDir; }
48 void setIsFile(
bool isFile) { m_isFile = isFile; m_isDir = !isFile; }
50 void setSGDir(QString sgDir) { m_storageGroupDir = std::move(sgDir); }
52 QString
hostName(
void)
const {
return m_hostName; }
55 QString
subDir(
void)
const {
return m_subDir; }
59 bool m_isRemote {
false};
62 bool m_isParentDir {
false};
83 bool Create(
void)
override;
85 void SetReturnEvent(QObject *retobject,
const QString &resultid);
88 void SetNameFilter(QStringList filter) { m_nameFilter = std::move(filter); }
92 void cancelPressed(
void);
93 void backPressed(
void);
94 void homePressed(
void);
95 void editLostFocus(
void);
98 void LoadPreview(
void);
101 void SetPath(
const QString &startPath);
102 static bool GetRemoteFileList(
const QString &url,
const QString &sgDir,
104 void updateFileList(
void);
105 void updateRemoteFileList(
void);
106 void updateLocalFileList(
void);
110 static bool IsImage(QString extension);
111 static QString FormatSize(int64_t size);
113 bool m_isRemote {
false};
115 QTimer *m_previewTimer {
nullptr};
123 QDir::Filters m_typeFilter {QDir::AllDirs | QDir::Drives |
124 QDir::Files | QDir::Readable |
125 QDir::Writable | QDir::Executable};
139 QObject *m_retObject {
nullptr};
QString subDir(void) const
QString m_storageGroupDir
void setIsFile(bool isFile)
void setIsDir(bool isDir)
QString hostName(void) const
void setSize(qint64 size)
void setSGDir(QString sgDir)
bool isRemote(void) const
QString storageGroupDir(void) const
QString storageGroup(void) const
void setIsParentDir(bool isParentDir)
void setFile(const QString &file)
Screen in which all other widgets are contained and rendered.
QString m_storageGroupDir
void SetTypeFilter(QDir::Filters filter)
void updateSelectedList(void)
~MythUIFileBrowser() override=default
void SetNameFilter(QStringList filter)
Image widget, displays a single image or multiple images in sequence.
This widget is used for grouping other widgets for display when a particular named state is called.
A text entry and edit widget.
All purpose text widget, displays a text string.
Q_DECLARE_METATYPE(MFileInfo)