1
/* This file is part of the KDE project
2
Copyright 2001 Matthias Hoelzer-Kluepfel <hoelzer@kde.org>
3
Copyright 2001-2002 Bernd Gehrmann <bernd@kdevelop.org>
4
Copyright 2002-2003 Roberto Raggi <roberto@kdevelop.org>
5
Copyright 2002 Simon Hausmann <hausmann@kde.org>
6
Copyright 2003 Jens Dagerbo <jens.dagerbo@swipnet.se>
7
Copyright 2003 Mario Scalas <mario.scalas@libero.it>
8
Copyright 2003-2004 Alexander Dymo <adymo@kdevelop.org>
9
Copyright 2006 Matt Rogers <mattr@kde.org>
10
Copyright 2007 Andreas Pakulat <apaku@gmx.de>
12
This library is free software; you can redistribute it and/or
13
modify it under the terms of the GNU Library General Public
14
License as published by the Free Software Foundation; either
15
version 2 of the License, or (at your option) any later version.
17
This library is distributed in the hope that it will be useful,
18
but WITHOUT ANY WARRANTY; without even the implied warranty of
19
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20
Library General Public License for more details.
22
You should have received a copy of the GNU Library General Public License
23
along with this library; see the file COPYING.LIB. If not, write to
24
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
25
Boston, MA 02110-1301, USA.
27
#ifndef KDEVPLATFORM_DUMBPROJECT_H
28
#define KDEVPLATFORM_DUMBPROJECT_H
30
#include <shell/project.h>
34
template<typename T> class QList;
41
class IProjectFileManager;
42
class IBuildSystemManager;
43
class ProjectFileItem;
46
class DumbProject : public Project
50
DumbProject(QObject *parent = 0);
53
virtual ~DumbProject();
55
/** Get a list of all files in the project */
56
virtual int fileCount() const;
57
virtual ProjectFileItem* fileAt( int i ) const;
59
virtual QList<ProjectFileItem*> files() const;
61
virtual QList<ProjectFileItem*> filesForUrl( const KUrl& ) const;
63
QString projectTempFile() const;
64
QString developerTempFile() const;
65
KUrl developerFileUrl() const;
66
virtual void reloadModel();
67
virtual KUrl projectFileUrl() const;
68
virtual KSharedConfig::Ptr projectConfiguration() const;
71
virtual bool open(const KUrl &projectFileUrl);
76
* @brief Get the project folder
77
* @return The canonical absolute directory of the project.
79
virtual Q_SCRIPTABLE const KUrl folder() const;
81
/** Returns the name of the project. */
82
virtual Q_SCRIPTABLE QString name() const;
85
* Get the file manager for the project
87
* @return the file manager for the project, if one exists; otherwise null
89
IProjectFileManager* projectFileManager() const;
92
* Get the build system manager for the project
94
* @return the build system manager for the project, if one exists; otherwise null
96
IBuildSystemManager* buildSystemManager() const;
98
IPlugin* versionControlPlugin() const;
101
* Get the plugin that manages the project
102
* This can be used to get other interfaces like IBuildSystemManager
104
IPlugin* managerPlugin() const;
107
* Set the manager plugin for the project.
109
void setManagerPlugin( IPlugin* manager );
112
* With this the top-level project item can be retrieved
114
ProjectFolderItem* projectItem() const;
117
* Find the url relative to the project directory equivalent to @a absoluteUrl.
118
* This function does not check to see if the file is contained within the
119
* project; for that, use inProject().
121
* @param absoluteUrl Absolute url to convert
122
* @deprecated use KUrl::relativeUrl instead
123
* @returns absoluteUrl relative to projectDirectory()
125
KUrl relativeUrl(const KUrl& absoluteUrl) const;
128
* Check if the url specified by @a url is part of the project.
129
* @a url can be either a relative url (to the project directory) or
132
* @param url the url to check
134
* @return true if the url @a url is a part of the project.
136
bool inProject(const KUrl &url) const;
139
class DumbProjectPrivate* const d;