20 DIRS = DRIVE | DIR | SYMLINK | SPECIAL,
24 Q_DECLARE_FLAGS(TYPES, TYPE)
31 enum class ColumnValue {
41 [[nodiscard]]
static QString HeaderData(
int section);
42 [[nodiscard]] QVariant Data(
int column);
44 [[nodiscard]]
int ChildCount();
45 [[nodiscard]]
static int ColumnCount();
53 int RemoveChild(
int index);
57 [[nodiscard]]
int IndexOf(
const QString& szPath);
58 [[nodiscard]]
int IndexOfParent();
66 [[nodiscard]]
const State GetState()
const;
67 void SetState(State s);
69 [[nodiscard]] QString GetPath();
70 [[nodiscard]] QString GetName();
72 [[nodiscard]] quint64 GetSize();
73 void SetSize(quint64 size);
75 [[nodiscard]] TYPES GetType();
76 [[nodiscard]]
bool IsDir();
77 [[nodiscard]] QIcon Icon();
79 [[nodiscard]] QDateTime GetCreateTime();
80 void SetCreateTime(
const QDateTime &date);
81 [[nodiscard]] QDateTime GetLastModified();
82 void SetLastModified(
const QDateTime& date);
84 void SetPermissions(QFileDevice::Permissions privileges);
85 [[nodiscard]] QFileDevice::Permissions GetPermissions();
87 [[nodiscard]] QString GetOwner();
88 void SetOwner(QString szOwner);
92 QVector<CRemoteFileSystem*> m_vChild;
96 QDateTime m_createTime;
97 QDateTime m_lastModifed;
98 QFileDevice::Permissions m_Permissions;
112 QObject *parent =
nullptr,
113 CRemoteFileSystem::TYPES filter = CRemoteFileSystem::TYPE::ALL
117 QModelIndex SetRootPath(
const QString &szPath);
119 [[nodiscard]]
CRemoteFileSystem* GetRemoteFileSystemFromIndex(
const QModelIndex &index)
const;
120 [[nodiscard]] CRemoteFileSystem::TYPES GetFilter();
122 void CreateDir(QModelIndex index,
const QString& dir);
123 void RemoveDir(QModelIndex index);
125 QVariant headerData(
int section,
126 Qt::Orientation orientation,
127 int role = Qt::DisplayRole)
const override;
130 [[nodiscard]] QModelIndex index(
const QString& szPath)
const;
131 QModelIndex index(
int row,
int column,
const QModelIndex &parent = QModelIndex())
const override;
132 QModelIndex parent(
const QModelIndex &index)
const override;
134 int rowCount(
const QModelIndex &parent = QModelIndex())
const override;
135 int columnCount(
const QModelIndex &parent = QModelIndex())
const override;
137 virtual Qt::ItemFlags flags(
const QModelIndex &index)
const override;
138 virtual bool setData(
const QModelIndex &index,
const QVariant &value,
int role)
override;
139 QVariant data(
const QModelIndex &index,
int role = Qt::DisplayRole)
const override;
140 virtual void fetchMore(
const QModelIndex &parent)
override;
141 virtual bool canFetchMore(
const QModelIndex &parent)
const override;
145 void sigMakeDir(
const QString& dir);
146 void sigRemoveDir(
const QString& szPath);
147 void sigRemoveFile(
const QString& szFile);
148 void sigRename(
const QString& oldName,
const QString& newName);
151 QVector<QSharedPointer<CRemoteFileSystem> > contents,
156 CRemoteFileSystem::TYPES m_Filter;
157 QList<CRemoteFileSystem*> m_GetFolder;