Changeset View
Changeset View
Standalone View
Standalone View
krusader/FileSystem/filesystem.h
Show First 20 Lines • Show All 58 Lines • ▼ Show 20 Line(s) | 57 | public: | |||
---|---|---|---|---|---|
59 | enum FS_TYPE { | 59 | enum FS_TYPE { | ||
60 | /// Virtual filesystem. Krusaders custom virt:/ protocol | 60 | /// Virtual filesystem. Krusaders custom virt:/ protocol | ||
61 | FS_VIRTUAL, | 61 | FS_VIRTUAL, | ||
62 | /// Filesystem supporting all KIO protocols (file:/, ftp:/, smb:/, etc.) | 62 | /// Filesystem supporting all KIO protocols (file:/, ftp:/, smb:/, etc.) | ||
63 | FS_DEFAULT | 63 | FS_DEFAULT | ||
64 | }; | 64 | }; | ||
65 | 65 | | |||
66 | FileSystem(); | 66 | FileSystem(); | ||
67 | virtual ~FileSystem(); | 67 | ~FileSystem() override; | ||
68 | 68 | | |||
69 | // DirListerInterface implementation | 69 | // DirListerInterface implementation | ||
70 | inline QList<FileItem *> fileItems() const Q_DECL_OVERRIDE { return _fileItems.values(); } | 70 | inline QList<FileItem *> fileItems() const Q_DECL_OVERRIDE { return _fileItems.values(); } | ||
71 | inline unsigned long numFileItems() const Q_DECL_OVERRIDE { return _fileItems.count(); } | 71 | inline unsigned long numFileItems() const Q_DECL_OVERRIDE { return _fileItems.count(); } | ||
72 | inline bool isRoot() const Q_DECL_OVERRIDE { | 72 | inline bool isRoot() const Q_DECL_OVERRIDE { | ||
73 | const QString path = _currentDirectory.path(); | 73 | const QString path = _currentDirectory.path(); | ||
74 | return path.isEmpty() || path == "/"; | 74 | return path.isEmpty() || path == "/"; | ||
75 | } | 75 | } | ||
▲ Show 20 Lines • Show All 108 Lines • ▼ Show 20 Line(s) | 170 | signals: | |||
184 | /// Emitted before a directory path is opened for reading. Used for automounting. | 184 | /// Emitted before a directory path is opened for reading. Used for automounting. | ||
185 | void aboutToOpenDir(const QString &path); | 185 | void aboutToOpenDir(const QString &path); | ||
186 | 186 | | |||
187 | protected: | 187 | protected: | ||
188 | /// Fill the filesystem dictionary with file items, must be implemented for each filesystem. | 188 | /// Fill the filesystem dictionary with file items, must be implemented for each filesystem. | ||
189 | virtual bool refreshInternal(const QUrl &origin, bool stayInDir) = 0; | 189 | virtual bool refreshInternal(const QUrl &origin, bool stayInDir) = 0; | ||
190 | 190 | | |||
191 | /// Connect the result signal of a file operation job - source URLs. | 191 | /// Connect the result signal of a file operation job - source URLs. | ||
192 | void connectJobToSources(KJob *job, const QList<QUrl> urls); | 192 | void connectJobToSources(KJob *job, const QList<QUrl>& urls); | ||
193 | /// Connect the result signal of a file operation job - destination URL. | 193 | /// Connect the result signal of a file operation job - destination URL. | ||
194 | void connectJobToDestination(KJob *job, const QUrl &destination); | 194 | void connectJobToDestination(KJob *job, const QUrl &destination); | ||
195 | /// Returns true if showing hidden files is set in config. | 195 | /// Returns true if showing hidden files is set in config. | ||
196 | bool showHiddenFiles(); | 196 | bool showHiddenFiles(); | ||
197 | /// Add a new file item to the internal dictionary (while refreshing). | 197 | /// Add a new file item to the internal dictionary (while refreshing). | ||
198 | void addFileItem(FileItem *item); | 198 | void addFileItem(FileItem *item); | ||
199 | 199 | | |||
200 | FS_TYPE _type; // the filesystem type. | 200 | FS_TYPE _type; // the filesystem type. | ||
Show All 21 Lines |