kdevplatform/project
abstractfilemanagerplugin.cpp
Go to the documentation of this file.
132 qCDebug(FILEMANAGER) << "Deleting dir watcher took" << timer.elapsed() / 1000.0 << "seconds for project" << project->name();
142 qCDebug(FILEMANAGER) << "adding job" << listJob << item << item->path() << "for project" << item->project();
148 q, [&] (FileManagerListJob* job, ProjectFolderItem* baseItem, const KIO::UDSEntryList& entries) {
370 QString(), KStandardGuiItem::cont(), KStandardGuiItem::cancel(), QStringLiteral("GenericManagerRenameToFiltered")
376 const auto parentItems = item->project()->foldersForPath(IndexedString(newPath.parent().pathOrUrl()));
421 qCWarning(FILEMANAGER) << "Folder" << path << "in project" << folder->project()->name() << "wasn't yet being watched";
441 this, [this] (IProject* project) { Q_D(AbstractFileManagerPlugin); d->projectClosing(project); });
479 qCDebug(FILEMANAGER) << "imported new project" << project->name() << "at" << projectRoot->path();
506 watcher->addDir(project->path().toLocalFile(), KDirWatch::WatchSubDirs | KDirWatch:: WatchFiles );
614 bool AbstractFileManagerPlugin::moveFilesAndFolders(const QList< ProjectBaseItem* >& items, ProjectFolderItem* newParent)
652 bool AbstractFileManagerPlugin::copyFilesAndFolders(const Path::List& items, ProjectFolderItem* newParent)
684 ProjectFileItem* AbstractFileManagerPlugin::createFileItem( IProject* project, const Path& path,
690 ProjectFolderItem* AbstractFileManagerPlugin::createFolderItem( IProject* project, const Path& path,
Implementation of the ProjectBaseItem interface that is specific to a folder.
Definition: projectmodel.h:268
virtual ProjectBaseItem * parent() const
Definition: projectmodel.cpp:309
bool copyFilesAndFolders(const Path::List &items, ProjectFolderItem *newParent) override
Copy files and folders within a given project.
Definition: abstractfilemanagerplugin.cpp:652
KJob * createImportJob(ProjectFolderItem *item) override
This method creates an import job for the given item.
Definition: abstractfilemanagerplugin.cpp:515
void addSubDir(ProjectFolderItem *item)
Definition: filemanagerlistjob.cpp:89
void fileAdded(KDevelop::ProjectFileItem *file)
singleShot
bool renameFolder(ProjectFolderItem *folder, const Path &newPath) override
Rename a folder in the project.
Definition: abstractfilemanagerplugin.cpp:569
Interface that allows a developer to implement the three basic types of items you would see in a mult...
Definition: projectmodel.h:101
virtual ProjectFileItem * file() const
Definition: projectmodel.cpp:521
void remove(IProject *project)
Remove the managed filters of the given project.
Definition: projectfiltermanager.cpp:169
A helper class to manage project filtering in file managers.
Definition: projectfiltermanager.h:52
virtual bool isValid(const Path &path, const bool isFolder, IProject *project) const
Filter interface making it possible to hide files and folders from a project.
Definition: abstractfilemanagerplugin.cpp:676
bool renameFile(ProjectFileItem *file, const Path &newPath) override
Rename a file in the project.
Definition: abstractfilemanagerplugin.cpp:577
virtual ProjectFolderItem * folder() const
Definition: projectmodel.cpp:506
void folderRemoved(KDevelop::ProjectFolderItem *folder)
Definition: projectmodel.h:31
bool exists() const
ProjectBaseItem * child(int row) const
Definition: projectmodel.cpp:198
AbstractFileManagerPlugin(const QString &componentName, QObject *parent=nullptr, const QVariantList &args=QVariantList())
Definition: abstractfilemanagerplugin.cpp:433
bool removeFilesAndFolders(const QList< ProjectBaseItem * > &items) override
Remove files or folders from the project and delete them from disk.
Definition: abstractfilemanagerplugin.cpp:585
bool KDEVPLATFORMPROJECT_EXPORT createFile(const QUrl &file)
Creates a file at url.
Definition: helper.cpp:99
Files are supported by the manager.
Definition: iprojectfilemanager.h:66
void entries(FileManagerListJob *job, ProjectFolderItem *baseItem, const KIO::UDSEntryList &entries)
KDirWatch * projectWatcher(IProject *project) const
Definition: abstractfilemanagerplugin.cpp:696
bool KDEVPLATFORMPROJECT_EXPORT copyUrl(const KDevelop::IProject *project, const QUrl &source, const QUrl &target)
Copies anything at source to target.
Definition: helper.cpp:211
Folders are supported by the manager.
Definition: iprojectfilemanager.h:64
This class can be used as a common base for file managers.
Definition: abstractfilemanagerplugin.h:43
void folderAdded(KDevelop::ProjectFolderItem *folder)
virtual ProjectFolderItem * createFolderItem(IProject *project, const Path &path, ProjectBaseItem *parent=nullptr)
Customization hook enabling you to create custom FolderItems if required.
Definition: abstractfilemanagerplugin.cpp:690
QUrl fromLocalFile(const QString &localFile)
ProjectBaseItem * takeRow(int row)
Returns and removes the item at the given row if there is one.
Definition: projectmodel.cpp:213
bool moveFilesAndFolders(const QList< ProjectBaseItem * > &items, ProjectFolderItem *newParent) override
Move files and folders within a given project.
Definition: abstractfilemanagerplugin.cpp:614
void fileRemoved(KDevelop::ProjectFileItem *file)
qint64 elapsed() const
An interface to project file management.
Definition: iprojectfilemanager.h:55
bool startsWith(const QString &s, Qt::CaseSensitivity cs) const
Features features() const override
Definition: abstractfilemanagerplugin.cpp:460
void rowsAboutToBeRemoved(const QModelIndex &parent, int start, int end)
bool reload(ProjectFolderItem *item) override
Reload an item in the project.
Definition: abstractfilemanagerplugin.cpp:522
void handleRemovedItem(ProjectBaseItem *item)
Definition: filemanagerlistjob.cpp:97
ProjectFileItem * addFile(const Path &file, ProjectFolderItem *parent) override
Add a file to a folder and create it on disk.
Definition: abstractfilemanagerplugin.cpp:551
bool KDEVPLATFORMPROJECT_EXPORT createFolder(const QUrl &folder)
Creates a folder at url.
Definition: helper.cpp:132
ProjectFolderItem * folder() const override
Definition: projectmodel.cpp:618
Definition: abstractfilemanagerplugin.h:33
ProjectFolderItem * addFolder(const Path &folder, ProjectFolderItem *parent) override
Add a folder to the project and create it on disk.
Definition: abstractfilemanagerplugin.cpp:532
bool KDEVPLATFORMPROJECT_EXPORT renameUrl(const KDevelop::IProject *project, const QUrl &oldname, const QUrl &newname)
Renames anything at oldname to oldname.
Definition: helper.cpp:150
QList< ProjectFolderItem * > parse(ProjectFolderItem *item) override
This method initialize the model item.
Definition: abstractfilemanagerplugin.cpp:465
ProjectFolderItem * import(IProject *project) override
This method creates the root item from the file.
Definition: abstractfilemanagerplugin.cpp:473
bool KDEVPLATFORMPROJECT_EXPORT removeUrl(const KDevelop::IProject *project, const QUrl &url, const bool isFolder)
Deletes the url at url.
Definition: helper.cpp:50
~AbstractFileManagerPlugin() override
bool isValid() const
virtual ProjectFileItem * createFileItem(IProject *project, const Path &path, ProjectBaseItem *parent)
Customization hook enabling you to create custom FileItems if required.
Definition: abstractfilemanagerplugin.cpp:684
void start()
void appendRow(ProjectBaseItem *item)
Adds a new child item to this item.
Definition: projectmodel.cpp:422
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Wed Mar 3 2021 00:37:59 by doxygen 1.8.16 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2021 The KDE developers.
Generated on Wed Mar 3 2021 00:37:59 by doxygen 1.8.16 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.