21 DIRS = DRIVE | DIR | SYMLINK | SPECIAL,
25 Q_DECLARE_FLAGS(TYPES, TYPE)
32 enum class ColumnValue {
42 [[nodiscard]]
static QString HeaderData(
int section);
43 [[nodiscard]] QVariant Data(
int column);
45 [[nodiscard]]
int ChildCount();
46 [[nodiscard]]
static int ColumnCount();
54 int RemoveChild(
int index);
58 [[nodiscard]]
int IndexOf(
const QString& szPath);
59 [[nodiscard]]
int IndexOfParent();
67 [[nodiscard]]
const State GetState()
const;
68 void SetState(State s);
70 [[nodiscard]] QString GetPath();
71 [[nodiscard]] QString GetName();
73 [[nodiscard]] quint64 GetSize();
74 void SetSize(quint64 size);
76 [[nodiscard]] TYPES GetType();
77 [[nodiscard]]
bool IsDir();
78 [[nodiscard]] QIcon Icon();
80 [[nodiscard]] QDateTime GetCreateTime();
81 void SetCreateTime(
const QDateTime &date);
82 [[nodiscard]] QDateTime GetLastModified();
83 void SetLastModified(
const QDateTime& date);
85 void SetPermissions(QFileDevice::Permissions privileges);
86 [[nodiscard]] QFileDevice::Permissions GetPermissions();
88 [[nodiscard]] QString GetOwner();
89 void SetOwner(QString szOwner);
93 QVector<CRemoteFileSystem*> m_vChild;
97 QDateTime m_createTime;
98 QDateTime m_lastModifed;
99 QFileDevice::Permissions m_Permissions;
110 QObject *parent =
nullptr,
111 CRemoteFileSystem::TYPES filter = CRemoteFileSystem::TYPE::ALL
115 QModelIndex SetRootPath(
const QString &szPath);
117 [[nodiscard]]
CRemoteFileSystem* GetRemoteFileSystemFromIndex(
const QModelIndex &index)
const;
118 [[nodiscard]] CRemoteFileSystem::TYPES GetFilter();
120 void CreateDir(QModelIndex index,
const QString& dir);
121 void RemoveDir(QModelIndex index);
123 QVariant headerData(
int section,
124 Qt::Orientation orientation,
125 int role = Qt::DisplayRole)
const override;
128 [[nodiscard]] QModelIndex index(
const QString& szPath)
const;
129 QModelIndex index(
int row,
int column,
const QModelIndex &parent = QModelIndex())
const override;
130 QModelIndex parent(
const QModelIndex &index)
const override;
132 int rowCount(
const QModelIndex &parent = QModelIndex())
const override;
133 int columnCount(
const QModelIndex &parent = QModelIndex())
const override;
135 virtual Qt::ItemFlags flags(
const QModelIndex &index)
const override;
136 virtual bool setData(
const QModelIndex &index,
const QVariant &value,
int role)
override;
137 QVariant data(
const QModelIndex &index,
int role = Qt::DisplayRole)
const override;
138 virtual void fetchMore(
const QModelIndex &parent)
override;
139 virtual bool canFetchMore(
const QModelIndex &parent)
const override;
143 void sigMakeDir(
const QString& dir);
144 void sigRemoveDir(
const QString& szPath);
145 void sigRemoveFile(
const QString& szFile);
146 void sigRename(
const QString& oldName,
const QString& newName);
149 QVector<QSharedPointer<CRemoteFileSystem> > contents,
154 CRemoteFileSystem::TYPES m_Filter;
155 QList<CRemoteFileSystem*> m_GetFolder;