• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdevelop API Reference
  • KDE Home
  • Contact Us
 

kdevplatform/project

  • sources
  • kfour-appscomplete
  • kdevelop
  • kdevplatform
  • project
  • interfaces
iprojectfilemanager.h
Go to the documentation of this file.
1 /* This file is part of KDevelop
2  Copyright 2004 Roberto Raggi <[email protected]>
3  Copyright 2006 Matt Rogers <[email protected]>
4  Copyright 2006 Hamish Rodda <[email protected]>
5  Copyright 2007 Andreas Pakulat <[email protected]
6  Copyright 2012 Milian Wolff <[email protected]>
7 
8  This library is free software; you can redistribute it and/or
9  modify it under the terms of the GNU Library General Public
10  License as published by the Free Software Foundation; either
11  version 2 of the License, or (at your option) any later version.
12 
13  This library is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  Library General Public License for more details.
17 
18  You should have received a copy of the GNU Library General Public License
19  along with this library; see the file COPYING.LIB. If not, write to
20  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21  Boston, MA 02110-1301, USA.
22 */
23 #ifndef KDEVPLATFORM_IPROJECTFILEMANAGER_H
24 #define KDEVPLATFORM_IPROJECTFILEMANAGER_H
25 
26 #include <QObject>
27 
28 #include <project/projectexport.h>
29 
30 #include <util/path.h>
31 
32 class KJob;
33 
34 namespace KDevelop
35 {
36 
37 class IProject;
38 class ProjectBaseItem;
39 class ProjectFolderItem;
40 class ProjectFileItem;
41 
55 class KDEVPLATFORMPROJECT_EXPORT IProjectFileManager
56 {
57 public:
58 
59  virtual ~IProjectFileManager();
61  enum Feature
62  {
63  None = 0 ,
64  Folders = 1 << 0,
65  Targets = 1 << 1,
66  Files = 1 << 2
67  };
68  Q_DECLARE_FLAGS( Features, Feature )
69 
70 
73  virtual Features features() const = 0;
74 
79  virtual QList<ProjectFolderItem*> parse(ProjectFolderItem *dom) = 0;
80 
85  virtual ProjectFolderItem *import(IProject *project) = 0;
86 
95  virtual KJob* createImportJob(ProjectFolderItem* item);
96 
103  virtual ProjectFolderItem* addFolder(const Path& folder, ProjectFolderItem* parent) = 0;
104 
111  virtual ProjectFileItem* addFile(const Path& file, ProjectFolderItem *parent) = 0;
112 
121  virtual bool removeFilesAndFolders(const QList<ProjectBaseItem*> &items) = 0;
122 
131  virtual bool moveFilesAndFolders(const QList< KDevelop::ProjectBaseItem* > &items, KDevelop::ProjectFolderItem* newParent) = 0;
132 
141  virtual bool copyFilesAndFolders(const Path::List &items, KDevelop::ProjectFolderItem* newParent) = 0;
142 
148  virtual bool renameFile(ProjectFileItem* file, const Path& newPath) = 0;
149 
155  virtual bool renameFolder(ProjectFolderItem* oldFolder, const Path& newPath) = 0;
156 
162  virtual bool reload(ProjectFolderItem* item) = 0;
163 
164 Q_SIGNALS:
165  void folderAdded(KDevelop::ProjectFolderItem* folder);
166  void folderRemoved(KDevelop::ProjectFolderItem* folder);
167  void folderRenamed(const KDevelop::Path& oldFolder, KDevelop::ProjectFolderItem* newFolder);
168 
169  void fileAdded(KDevelop::ProjectFileItem* file);
170  void fileRemoved(KDevelop::ProjectFileItem* file);
171  void fileRenamed(const KDevelop::Path& oldFile, KDevelop::ProjectFileItem* newFile);
172 };
173 
174 #if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0)
175 Q_DECLARE_OPERATORS_FOR_FLAGS(IProjectFileManager::Features)
176 #endif
177 
178 }
179 
180 #if QT_VERSION < QT_VERSION_CHECK(5, 12, 0)
181 Q_DECLARE_OPERATORS_FOR_FLAGS(KDevelop::IProjectFileManager::Features)
182 #endif
183 
184 Q_DECLARE_INTERFACE( KDevelop::IProjectFileManager, "org.kdevelop.IProjectFileManager")
185 
186 #endif
KDevelop::ProjectFolderItem
Implementation of the ProjectBaseItem interface that is specific to a folder.
Definition: projectmodel.h:268
KDevelop::ProjectFileItem
Object which represents a file.
Definition: projectmodel.h:383
QList
Definition: projectmodel.h:31
KJob
KDevelop::IProjectFileManager::Feature
Feature
Features the file manager supports.
Definition: iprojectfilemanager.h:61
KDevelop::IProjectFileManager
An interface to project file management.
Definition: iprojectfilemanager.h:55
KDevelop
Definition: abstractfilemanagerplugin.h:33
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Wed Apr 14 2021 23:30:57 by doxygen 1.8.16 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kdevplatform/project

Skip menu "kdevplatform/project"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdevelop API Reference

Skip menu "kdevelop API Reference"
  • kdevplatform
  •   debugger
  •   documentation
  •   interfaces
  •   language
  •     assistant
  •     backgroundparser
  •     checks
  •     classmodel
  •     codecompletion
  •     codegen
  •     duchain
  •     editor
  •     highlighting
  •     interfaces
  •     util
  •   outputview
  •   project
  •   serialization
  •   shell
  •   sublime
  •   tests
  •   util
  •   vcs

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal