2#ifndef MYTHUIFILEBROWSER_H_
3#define MYTHUIFILEBROWSER_H_
26 explicit MFileInfo(
const QString& fileName =
"", QString sgDir =
"",
bool isDir =
false,
33 void init(
const QString& fileName =
"", QString sgDir =
"",
bool isDir =
false,
36 QString fileName(
void)
const;
37 QString filePath(
void)
const;
38 bool isRemote(
void)
const {
return m_isRemote; }
39 bool isDir(
void)
const;
40 bool isFile(
void)
const;
41 bool isParentDir(
void)
const;
42 bool isExecutable(
void)
const;
43 QString absoluteFilePath(
void)
const;
44 qint64 size(
void)
const;
47 void setSize(qint64 size) { m_size = size; }
48 void setIsDir(
bool isDir) { m_isDir = isDir; m_isFile = !isDir; }
49 void setIsFile(
bool isFile) { m_isFile = isFile; m_isDir = !isFile; }
51 void setSGDir(QString sgDir) { m_storageGroupDir = std::move(sgDir); }
53 QString
hostName(
void)
const {
return m_hostName; }
56 QString
subDir(
void)
const {
return m_subDir; }
60 bool m_isRemote {
false};
63 bool m_isParentDir {
false};
84 bool Create(
void)
override;
86 void SetReturnEvent(QObject *retobject,
const QString &resultid);
89 void SetNameFilter(QStringList filter) { m_nameFilter = std::move(filter); }
93 void cancelPressed(
void);
94 void backPressed(
void);
95 void homePressed(
void);
96 void editLostFocus(
void);
99 void LoadPreview(
void);
102 void SetPath(
const QString &startPath);
103 static bool GetRemoteFileList(
const QString &url,
const QString &sgDir,
105 void updateFileList(
void);
106 void updateRemoteFileList(
void);
107 void updateLocalFileList(
void);
111 static bool IsImage(QString extension);
112 static QString FormatSize(int64_t size);
114 bool m_isRemote {
false};
116 QTimer *m_previewTimer {
nullptr};
124 QDir::Filters m_typeFilter {QDir::AllDirs | QDir::Drives |
125 QDir::Files | QDir::Readable |
126 QDir::Writable | QDir::Executable};
140 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)