Changeset View
Changeset View
Standalone View
Standalone View
krusader/VFS/vfs.h
Context not available. | |||||
155 | // set the parent window to be used for dialogs | 155 | // set the parent window to be used for dialogs | ||
---|---|---|---|---|---|
156 | void setParentWindow(QWidget *widget) { parentWindow = widget; } | 156 | void setParentWindow(QWidget *widget) { parentWindow = widget; } | ||
157 | 157 | | |||
158 | bool startRefresh(const QUrl &directory = QUrl()); | ||||
159 | void stopRefresh(); | ||||
160 | | ||||
158 | public slots: | 161 | public slots: | ||
159 | /// Re-read the current directory files or change to another directory. Blocking. | 162 | /// Re-read the current directory files or change to another directory. Blocking. | ||
160 | /// Returns true if directory was read. Returns false if failed or refresh job was killed. | 163 | /// Returns true if directory was read. Returns false if failed or refresh job was killed. | ||
Context not available. | |||||
178 | /// Emitted before a directory path is opened for reading. Used for automounting. | 181 | /// Emitted before a directory path is opened for reading. Used for automounting. | ||
179 | void aboutToOpenDir(const QString &path); | 182 | void aboutToOpenDir(const QString &path); | ||
180 | 183 | | |||
184 | void refreshFinished(bool success); | ||||
185 | | ||||
181 | protected: | 186 | protected: | ||
182 | /// Fill the vfs dictionary with vfiles, must be implemented for each VFS. | 187 | /// Fill the vfs dictionary with vfiles, must be implemented for each VFS. | ||
183 | virtual bool refreshInternal(const QUrl &origin, bool showHidden) = 0; | 188 | virtual bool refreshInternal(const QUrl &origin, bool showHidden) = 0; | ||
184 | 189 | | |||
190 | virtual bool startRefreshInternal(const QUrl &directory, bool showHidden) = 0; | ||||
191 | | ||||
185 | /// Returns true if showing hidden files is set in config. | 192 | /// Returns true if showing hidden files is set in config. | ||
186 | bool showHiddenFiles(); | 193 | bool showHiddenFiles(); | ||
187 | /// Add a new vfile to the internal dictionary (while refreshing). | 194 | /// Add a new vfile to the internal dictionary (while refreshing). | ||
188 | inline void addVfile(vfile *vf) { _vfiles.insert(vf->vfile_getName(), vf); } | 195 | inline void addVfile(vfile *vf) { _new_vfiles.insert(vf->vfile_getName(), vf); } | ||
189 | 196 | | |||
190 | /// Calculate the size of a file or directory (recursive). | 197 | /// Calculate the size of a file or directory (recursive). | ||
191 | void calcSpace(const QUrl &url, KIO::filesize_t *totalSize, unsigned long *totalFiles, | 198 | void calcSpace(const QUrl &url, KIO::filesize_t *totalSize, unsigned long *totalFiles, | ||
Context not available. | |||||
204 | static vfile *createVFileFromKIO(const KIO::UDSEntry &_calcEntry, const QUrl &directory, | 211 | static vfile *createVFileFromKIO(const KIO::UDSEntry &_calcEntry, const QUrl &directory, | ||
205 | bool virt = false); | 212 | bool virt = false); | ||
206 | 213 | | |||
214 | void refreshResult(bool success); | ||||
215 | | ||||
207 | VFS_TYPE _type; // the vfs type. | 216 | VFS_TYPE _type; // the vfs type. | ||
208 | QUrl _currentDirectory; // the path or file the VFS originates from. | 217 | QUrl _currentDirectory; // the path or file the VFS originates from. | ||
209 | bool _isRefreshing; // true if vfs is busy with refreshing | | |||
210 | QPointer<QWidget> parentWindow; | 218 | QPointer<QWidget> parentWindow; | ||
211 | 219 | | |||
212 | protected slots: | 220 | protected slots: | ||
Context not available. | |||||
224 | void clear(vfileDict &vfiles); | 232 | void clear(vfileDict &vfiles); | ||
225 | 233 | | |||
226 | vfileDict _vfiles; // The list of files in the current dictionary | 234 | vfileDict _vfiles; // The list of files in the current dictionary | ||
235 | vfileDict _new_vfiles; | ||||
236 | | ||||
237 | bool _isRefreshing = false; // true if vfs is busy with refreshing | ||||
238 | bool _dirChange = false; | ||||
227 | 239 | | |||
228 | // used in the calcSpace function | 240 | // used in the calcSpace function | ||
229 | bool *_calcKdsBusy; | 241 | bool *_calcKdsBusy; | ||
Context not available. |