Changeset View
Changeset View
Standalone View
Standalone View
krusader/FileSystem/filesystem.h
Show First 20 Lines • Show All 41 Lines • ▼ Show 20 Line(s) | |||||
42 | #include <QDropEvent> | 42 | #include <QDropEvent> | ||
43 | // QtWidgets | 43 | // QtWidgets | ||
44 | #include <QWidget> | 44 | #include <QWidget> | ||
45 | 45 | | |||
46 | #include <KIO/CopyJob> | 46 | #include <KIO/CopyJob> | ||
47 | 47 | | |||
48 | #include "fileitem.h" | 48 | #include "fileitem.h" | ||
49 | #include "krquery.h" | 49 | #include "krquery.h" | ||
50 | #include "../JobMan/jobman.h" | ||||
50 | 51 | | |||
51 | 52 | | |||
52 | /** | 53 | /** | ||
53 | * An abstract filesystem. Use the implementations of this class for all file operations. | 54 | * An abstract filesystem. Use the implementations of this class for all file operations. | ||
54 | * | 55 | * | ||
55 | * It represents a directory and gives access to its files. All common file operations | 56 | * It represents a directory and gives access to its files. All common file operations | ||
56 | * are supported. Methods with absolute URL as argument can be used independently from the current | 57 | * are supported. Methods with absolute URL as argument can be used independently from the current | ||
57 | * directory. Otherwise - if the methods argument is a file name - the operation is performed inside | 58 | * directory. Otherwise - if the methods argument is a file name - the operation is performed inside | ||
Show All 23 Lines | 81 | inline bool isRoot() const { | |||
81 | const QString path = _currentDirectory.path(); | 82 | const QString path = _currentDirectory.path(); | ||
82 | return path.isEmpty() || path == "/"; | 83 | return path.isEmpty() || path == "/"; | ||
83 | } | 84 | } | ||
84 | 85 | | |||
85 | /// Copy (copy, move or link) files in this filesystem. | 86 | /// Copy (copy, move or link) files in this filesystem. | ||
86 | /// Destination is absolute URL. May implemented async. | 87 | /// Destination is absolute URL. May implemented async. | ||
87 | virtual void copyFiles(const QList<QUrl> &urls, const QUrl &destination, | 88 | virtual void copyFiles(const QList<QUrl> &urls, const QUrl &destination, | ||
88 | KIO::CopyJob::CopyMode mode = KIO::CopyJob::Copy, | 89 | KIO::CopyJob::CopyMode mode = KIO::CopyJob::Copy, | ||
89 | bool showProgressInfo = true, bool reverseQueueMode = false, bool startPaused = false) = 0; | 90 | bool showProgressInfo = true, | ||
91 | JobMan::StartMode startMode = JobMan::Default) = 0; | ||||
90 | /// Handle file dropping in this filesystem. Destination is absolute URL. May implemented async. | 92 | /// Handle file dropping in this filesystem. Destination is absolute URL. May implemented async. | ||
91 | virtual void dropFiles(const QUrl &destination, QDropEvent *event) = 0; | 93 | virtual void dropFiles(const QUrl &destination, QDropEvent *event) = 0; | ||
92 | 94 | | |||
93 | /// Copy (copy, move or link) files to the current filesystem directory or to "dir", the | 95 | /// Copy (copy, move or link) files to the current filesystem directory or to "dir", the | ||
94 | /// directory name relative to the current dir. May implemented async. | 96 | /// directory name relative to the current dir. May implemented async. | ||
95 | virtual void addFiles(const QList<QUrl> &fileUrls, KIO::CopyJob::CopyMode mode, | 97 | virtual void addFiles(const QList<QUrl> &fileUrls, KIO::CopyJob::CopyMode mode, | ||
96 | QString dir = "") = 0; | 98 | QString dir = "") = 0; | ||
97 | /// Create a new directory in the current directory. May implemented async. | 99 | /// Create a new directory in the current directory. May implemented async. | ||
▲ Show 20 Lines • Show All 146 Lines • Show Last 20 Lines |