Changeset View
Changeset View
Standalone View
Standalone View
krusader/FileSystem/virtualfilesystem.h
Show First 20 Lines • Show All 45 Lines • ▼ Show 20 Line(s) | |||||
46 | { | 46 | { | ||
47 | Q_OBJECT | 47 | Q_OBJECT | ||
48 | public: | 48 | public: | ||
49 | VirtualFileSystem(); | 49 | VirtualFileSystem(); | ||
50 | 50 | | |||
51 | /// Create virtual files in this filesystem. Copy mode and showProgressInfo are ignored. | 51 | /// Create virtual files in this filesystem. Copy mode and showProgressInfo are ignored. | ||
52 | void copyFiles(const QList<QUrl> &urls, const QUrl &destination, | 52 | void copyFiles(const QList<QUrl> &urls, const QUrl &destination, | ||
53 | KIO::CopyJob::CopyMode mode = KIO::CopyJob::Copy, bool showProgressInfo = false, | 53 | KIO::CopyJob::CopyMode mode = KIO::CopyJob::Copy, bool showProgressInfo = false, | ||
54 | JobMan::StartMode startMode = JobMan::Start) Q_DECL_OVERRIDE; | 54 | JobMan::StartMode startMode = JobMan::Start) override; | ||
55 | /// Handle file dropping in this filesystem: Always creates virtual files. | 55 | /// Handle file dropping in this filesystem: Always creates virtual files. | ||
56 | void dropFiles(const QUrl &destination, QDropEvent *event) Q_DECL_OVERRIDE; | 56 | void dropFiles(const QUrl &destination, QDropEvent *event) override; | ||
57 | 57 | | |||
58 | /// Add virtual files to the current directory. | 58 | /// Add virtual files to the current directory. | ||
59 | void addFiles(const QList<QUrl> &fileUrls, KIO::CopyJob::CopyMode mode = KIO::CopyJob::Copy, | 59 | void addFiles(const QList<QUrl> &fileUrls, KIO::CopyJob::CopyMode mode = KIO::CopyJob::Copy, | ||
60 | const QString &dir = "") Q_DECL_OVERRIDE; | 60 | const QString &dir = "") override; | ||
61 | /// Create a virtual directory. Only possible in the root directory. | 61 | /// Create a virtual directory. Only possible in the root directory. | ||
62 | void mkDir(const QString &name) Q_DECL_OVERRIDE; | 62 | void mkDir(const QString &name) override; | ||
63 | /// Rename a (real) file in the current directory. | 63 | /// Rename a (real) file in the current directory. | ||
64 | void rename(const QString &fileName, const QString &newName) Q_DECL_OVERRIDE; | 64 | void rename(const QString &fileName, const QString &newName) override; | ||
65 | /// Returns the URL of the real file or an empty URL if file with name does not exist. | 65 | /// Returns the URL of the real file or an empty URL if file with name does not exist. | ||
66 | QUrl getUrl(const QString& name) const Q_DECL_OVERRIDE; | 66 | QUrl getUrl(const QString& name) const override; | ||
67 | bool canMoveToTrash(const QStringList &fileNames) const Q_DECL_OVERRIDE; | 67 | bool canMoveToTrash(const QStringList &fileNames) const override; | ||
68 | 68 | | |||
69 | /// Remove virtual files or directories. Real files stay untouched. | 69 | /// Remove virtual files or directories. Real files stay untouched. | ||
70 | void remove(const QStringList &fileNames); | 70 | void remove(const QStringList &fileNames); | ||
71 | /// Set meta information to be displayed in UI for the current directory | 71 | /// Set meta information to be displayed in UI for the current directory | ||
72 | void setMetaInformation(const QString &info); | 72 | void setMetaInformation(const QString &info); | ||
73 | 73 | | |||
74 | protected: | 74 | protected: | ||
75 | bool refreshInternal(const QUrl &origin, bool onlyScan) Q_DECL_OVERRIDE; | 75 | bool refreshInternal(const QUrl &origin, bool onlyScan) override; | ||
76 | 76 | | |||
77 | private: | 77 | private: | ||
78 | /// Return current dir: "/" or pure directory name | 78 | /// Return current dir: "/" or pure directory name | ||
79 | inline QString currentDir() { | 79 | inline QString currentDir() { | ||
80 | const QString path = _currentDirectory.path().mid(1); // remove slash | 80 | const QString path = _currentDirectory.path().mid(1); // remove slash | ||
81 | return path.isEmpty() ? "/" : path; | 81 | return path.isEmpty() ? "/" : path; | ||
82 | } | 82 | } | ||
83 | void mkDirInternal(const QString& name); | 83 | void mkDirInternal(const QString& name); | ||
Show All 24 Lines |