From 114a878c64ce6f8223cfd22d76a20eb16d177e5e Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- lib/interfaces/kdevproject.h | 218 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 218 insertions(+) create mode 100644 lib/interfaces/kdevproject.h (limited to 'lib/interfaces/kdevproject.h') diff --git a/lib/interfaces/kdevproject.h b/lib/interfaces/kdevproject.h new file mode 100644 index 00000000..64c8ed80 --- /dev/null +++ b/lib/interfaces/kdevproject.h @@ -0,0 +1,218 @@ +/* This file is part of the KDE project + Copyright (C) 2001 Matthias Hoelzer-Kluepfel + Copyright (C) 2001-2002 Bernd Gehrmann + Copyright (C) 2002-2003 Roberto Raggi + Copyright (C) 2002 Simon Hausmann + Copyright (C) 2003 Jens Dagerbo + Copyright (C) 2003 Mario Scalas + Copyright (C) 2003-2004 Alexander Dymo + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ +#ifndef KDEVPROJECT_H +#define KDEVPROJECT_H + +#include "kdevplugin.h" +#include "domutil.h" + +#include +#include + +/** +@file kdevproject.h +KDevelop project interface. +*/ + +class QTimer; + +/** +KDevelop project interface. +Plugins implementing the KDevProject interfaces are used to manage projects. + +Project can be considered as a way of grouping files (in text editors) or +as a way of providing support for a build system (like it is done in KDevelop IDE buildtools). +*/ +class KDevProject: public KDevPlugin +{ + Q_OBJECT +public: + /**Constructs a project plugin. + @param info Important information about the plugin - plugin internal and generic + (GUI) name, description, a list of authors, etc. That information is used to show + plugin information in various places like "about application" dialog, plugin selector + dialog, etc. Plugin does not take ownership on info object, also its lifetime should + be equal to the lifetime of the plugin. + @param parent The parent object for the plugin. Parent object must implement @ref KDevApi + interface. Otherwise the plugin will not be constructed. + @param name The internal name which identifies the plugin.*/ + KDevProject(const KDevPluginInfo *info, QObject *parent=0, const char *name=0); + /**Destructor.*/ + virtual ~KDevProject(); + + /**Options of the project plugin.*/ + enum Options { + UsesOtherBuildSystem = 0 /**/run/directoryradio == executable + * The directory where the executable is. + * if //run/directoryradio == build + * The build directory. + * if /kdevautoproject/run/directoryradio == custom + * The custom directory absolute path. + * Derived classes are supposed to explicitly call this implementation + */ + QString defaultRunDirectory(const QString& projectPluginName) const; + +private slots: + void buildFileMap(); + void slotBuildFileMap(); + void slotAddFilesToFileMap(const QStringList & fileList ); + void slotRemoveFilesFromFileMap(const QStringList & fileList ); + +signals: + /**Emitted when a new list of files has been added to the + project. Provided for convenience when many files were added. + @param fileList The file names relative to the project directory.*/ + void addedFilesToProject(const QStringList& fileList); + + /**Emitted when a list of files has been removed from the project. + Provided for convenience when many files were removed. + @param fileList The file names relative to the project directory.*/ + void removedFilesFromProject(const QStringList& fileList); + + /**Emitted when a list of files has changed in the project. + @param fileList The file names relative to the project directory.*/ + void changedFilesInProject(const QStringList& fileList); + + /**Emitted when one compile related command (make, make install, make ...) ends sucessfuly. + Used to reparse the files after a sucessful compilation.*/ + void projectCompiled(); + + /**Emitted when the active directory of the project changes + * @param olddir The old active directory + * @param newdir The new active directory + */ + void activeDirectoryChanged( const QString& olddir, const QString& newdir ); + +private: + class Private; + Private *d; +}; + +#endif -- cgit v1.2.3