KDevelop API Documentation

GenericProjectPart Class Reference

Generic build tool part Put a more detailed description of your part in these lines. More...

#include <genericproject_part.h>

Inheritance diagram for GenericProjectPart:

KDevProject KDevPlugin QObject KXMLGUIClient List of all members.

Signals

void mainGroupChanged (BuildGroupItem *group)

Public Member Functions

 GenericProjectPart (QObject *parent, const char *name, const QStringList &)
virtual ~GenericProjectPart ()
BuildGroupItemmainGroup ()
virtual void openProject (const QString &dirName, const QString &projectName)
 This method is invoked when the project is opened (i.e.

virtual void closeProject ()
 This method is invoked when the project is about to be closed.

virtual QString projectDirectory () const
 Returns the canonical toplevel directory of the project.

virtual QString projectName () const
 Returns the name of the project.

virtual DomUtil::PairList runEnvironmentVars () const
 The environment variables that sould be set before running mainProgram().

virtual QString mainProgram (bool relative=false) const
 Returns the absolute path to main binary program of the project.

virtual QString runDirectory () const
 Absolute path (directory) from where the mainProgram() should be run.

virtual QString runArguments () const
 The command line arguments that the mainProgram() should be run with.

virtual QString activeDirectory () const
 Returns the path (relative to the project directory) of the active directory.

virtual QString buildDirectory () const
 Returns the canonical build directory of the project.

virtual QStringList allFiles () const
 Returns a list of all files in the project.

virtual void addFiles (const QStringList &fileList)
 Adds a list of files to the project.

virtual void addFile (const QString &fileName)
 Adds a file to the project.

virtual void removeFiles (const QStringList &fileList)
 Removes a list of files from the project.

virtual void removeFile (const QString &fileName)
 Removes a file from the project.

KDevBuildSystembuildSystem () const

Private Member Functions

QStringList allFiles (BuildGroupItem *group, QStringList &path) const
QStringList allFiles (BuildTargetItem *target, QStringList &path) const
void loadProjectConfig (QString projectFile)
void parseGroup (const QDomElement &el, const GenericGroupListViewItem *parentGroup)
void parseTarget (const QDomElement &el, BuildGroupItem *group)
void parseFile (const QDomElement &el, BuildTargetItem *target)
GenericGroupListViewItemcreateGroupItem (const QDomElement &el, const GenericGroupListViewItem *parent=0)
BuildTargetItemcreateTargetItem (const QDomElement &el, BuildGroupItem *group)
BuildFileItemcreateFileItem (const QDomElement &el, BuildTargetItem *target)
void addFilePrivate (const QString &fileName, BuildTargetItem *tit)

Private Attributes

KDevBuildSystemm_buildSystem
QGuardedPtr< GenericProjectWidgetm_widget
GenericGroupListViewItemm_mainGroup
BuildGroupItemm_mainBuild
QString m_buildDir
QString m_projectDir
QString m_projectName
QString m_activeDir
QString m_runDir

Detailed Description

Generic build tool part Put a more detailed description of your part in these lines.

It can span over several lines. You can even use some html commands in these lines like: This is code, html links link text, and images.

Author(s):
Roberto Raggi

Alexander Dymo

Maintainer(s):
Alexander Dymo

Feature(s):
Describe the first feature

Describe the second feature ...

Describe the last feature

Bug:
Describe a the 1st bug that you know of, but probably hasn't been reported yet. ..

Describe a the nth bug that you know of, but probably hasn't been reported yet.

Requirement(s):
Describe a the 1st requirement of your part.

Describe a the 2nd requirement of your part. ...

Describe a the nth requirement of your part.

Todo:
Describe a the 1st TODO of your part.

Describe a the 2nd TODO of your part. ...

Describe a the nth TODO of your part.

F.A.Q.:
First frequenly asked question about your part ? Answer.

Second frequenly asked question about your part ? Answer. ...

Last frequenly asked question about your part ? Answer.

Note:
First note text.

Second note text. ...

Last note text.

Warning:
First warning text.

Second warning text. ...

Last warning text.

Definition at line 27 of file genericproject_part.h.


Constructor & Destructor Documentation

GenericProjectPart::GenericProjectPart QObject parent,
const char *  name,
const QStringList
 

GenericProjectPart::~GenericProjectPart  )  [virtual]
 

Definition at line 71 of file genericproject_part.cpp.

References m_widget, KDevPlugin::mainWindow(), and KDevMainWindow::removeView().


Member Function Documentation

QString GenericProjectPart::activeDirectory  )  const [virtual]
 

Returns the path (relative to the project directory) of the active directory.

All newly generated classes are added here.

Implements KDevProject.

Definition at line 180 of file genericproject_part.cpp.

References m_activeDir.

void GenericProjectPart::addFile const QString fileName  )  [virtual]
 

Adds a file to the project.

The given file name must be relative to the project directory.

Implements KDevProject.

Definition at line 215 of file genericproject_part.cpp.

References addFile(), and addFiles().

Referenced by addFile().

void GenericProjectPart::addFilePrivate const QString fileName,
BuildTargetItem tit
[private]
 

Definition at line 222 of file genericproject_part.cpp.

References addFilePrivate(), endl(), kdDebug(), m_widget, KURL::prettyURL(), projectDirectory(), and KURL::setPath().

Referenced by addFilePrivate(), and addFiles().

void GenericProjectPart::addFiles const QStringList fileList  )  [virtual]
 

Adds a list of files to the project.

Provided for convenience when adding many files. The given file names must be relative to the project directory.

Implements KDevProject.

Definition at line 196 of file genericproject_part.cpp.

References addFilePrivate(), addFiles(), endl(), BuildTargetItem::fileByName(), kdDebug(), m_projectDir, and m_widget.

Referenced by addFile(), addFiles(), and GenericProjectWidget::slotAddFiles().

QStringList GenericProjectPart::allFiles BuildTargetItem target,
QStringList path
const [private]
 

Definition at line 382 of file genericproject_part.cpp.

References file, BuildTargetItem::files(), and m_projectDir.

QStringList GenericProjectPart::allFiles BuildGroupItem group,
QStringList path
const [private]
 

Definition at line 357 of file genericproject_part.cpp.

References allFiles(), BuildGroupItem::groups(), m_mainBuild, BuildBaseItem::name(), and BuildGroupItem::targets().

QStringList GenericProjectPart::allFiles  )  const [virtual]
 

Returns a list of all files in the project.

The files are relative to the project directory.

Todo:
This is currently a bit broken because the autoproject part doesn't return header files here.

Implements KDevProject.

Definition at line 190 of file genericproject_part.cpp.

References m_mainBuild.

Referenced by allFiles().

QString GenericProjectPart::buildDirectory  )  const [virtual]
 

Returns the canonical build directory of the project.

If the separate build directory is not supported, this should return the same as projectDiretory().

Implements KDevProject.

Definition at line 185 of file genericproject_part.cpp.

References m_buildDir.

KDevBuildSystem * GenericProjectPart::buildSystem  )  const
 

Definition at line 352 of file genericproject_part.cpp.

References m_buildSystem.

Referenced by GenericProjectWidget::slotBuild(), GenericProjectWidget::slotBuildFile(), GenericProjectWidget::slotBuildGroup(), GenericProjectWidget::slotBuildTarget(), GenericProjectWidget::slotClean(), GenericProjectWidget::slotCleanGroup(), GenericProjectWidget::slotCleanTarget(), GenericProjectWidget::slotConfigureFile(), GenericProjectWidget::slotConfigureGroup(), GenericProjectWidget::slotConfigureTarget(), GenericProjectWidget::slotExecute(), GenericProjectWidget::slotExecuteGroup(), GenericProjectWidget::slotExecuteTarget(), GenericProjectWidget::slotInstall(), GenericProjectWidget::slotInstallGroup(), and GenericProjectWidget::slotInstallTarget().

void GenericProjectPart::closeProject  )  [virtual]
 

This method is invoked when the project is about to be closed.

Implements KDevProject.

Definition at line 146 of file genericproject_part.cpp.

BuildFileItem * GenericProjectPart::createFileItem const QDomElement el,
BuildTargetItem target
[private]
 

Definition at line 342 of file genericproject_part.cpp.

References createFileItem(), endl(), kdDebug(), BuildTargetItem::parentGroup(), BuildBaseItem::path(), projectDirectory(), and KURL::setPath().

Referenced by createFileItem(), and parseFile().

GenericGroupListViewItem * GenericProjectPart::createGroupItem const QDomElement el,
const GenericGroupListViewItem parent = 0
[private]
 

Definition at line 314 of file genericproject_part.cpp.

References createGroupItem(), endl(), GenericGroupListViewItem::groupItem(), kdDebug(), VariantSerializer::loadValue(), m_widget, and BuildBaseItem::setAttribute().

Referenced by createGroupItem(), and parseGroup().

BuildTargetItem * GenericProjectPart::createTargetItem const QDomElement el,
BuildGroupItem group
[private]
 

Definition at line 336 of file genericproject_part.cpp.

References createTargetItem().

Referenced by createTargetItem(), and parseTarget().

void GenericProjectPart::loadProjectConfig QString  projectFile  )  [private]
 

Definition at line 242 of file genericproject_part.cpp.

References endl(), kdDebug(), loadProjectConfig(), m_mainGroup, parseGroup(), projectDirectory(), and QDomDocument_toString().

Referenced by loadProjectConfig(), and openProject().

BuildGroupItem* GenericProjectPart::mainGroup  )  [inline]
 

Definition at line 34 of file genericproject_part.h.

References m_mainBuild.

void GenericProjectPart::mainGroupChanged BuildGroupItem group  )  [signal]
 

QString GenericProjectPart::mainProgram bool  relative = false  )  const [virtual]
 

Returns the absolute path to main binary program of the project.

Implements KDevProject.

Definition at line 165 of file genericproject_part.cpp.

References mainProgram().

Referenced by mainProgram().

void GenericProjectPart::openProject const QString dirName,
const QString projectName
[virtual]
 

This method is invoked when the project is opened (i.e.

actually just after this class has been instantiated). The first parameter is the project directory, which should afterwards be returned by the projectDirectory() method. The second parameter is the project name, which is equivalent with the project file name without the .kdevelop suffix.

Reimplemented from KDevProject.

Definition at line 84 of file genericproject_part.cpp.

References endl(), KDevBuildSystem::initProject(), kdDebug(), loadProjectConfig(), m_buildDir, m_buildSystem, m_projectDir, m_projectName, openProject(), KDevPlugin::projectDom(), and KService::Ptr.

Referenced by openProject().

void GenericProjectPart::parseFile const QDomElement el,
BuildTargetItem target
[private]
 

Definition at line 309 of file genericproject_part.cpp.

References createFileItem(), and parseFile().

Referenced by parseFile(), and parseTarget().

void GenericProjectPart::parseGroup const QDomElement el,
const GenericGroupListViewItem parentGroup
[private]
 

Definition at line 267 of file genericproject_part.cpp.

References createGroupItem(), endl(), GenericGroupListViewItem::groupItem(), kdDebug(), parseGroup(), and parseTarget().

Referenced by loadProjectConfig(), and parseGroup().

void GenericProjectPart::parseTarget const QDomElement el,
BuildGroupItem group
[private]
 

Definition at line 291 of file genericproject_part.cpp.

References createTargetItem(), endl(), kdDebug(), parseFile(), and parseTarget().

Referenced by parseGroup(), and parseTarget().

QString GenericProjectPart::projectDirectory  )  const [virtual]
 

Returns the canonical toplevel directory of the project.

Implements KDevProject.

Definition at line 150 of file genericproject_part.cpp.

References m_projectDir.

Referenced by addFilePrivate(), createFileItem(), loadProjectConfig(), GenericProjectWidget::slotAddFiles(), GenericProjectWidget::slotDeleteGroup(), GenericProjectWidget::slotNewFile(), GenericProjectWidget::slotNewGroup(), and GenericProjectWidget::takeTarget().

QString GenericProjectPart::projectName  )  const [virtual]
 

Returns the name of the project.

Implements KDevProject.

Definition at line 155 of file genericproject_part.cpp.

References m_projectName.

void GenericProjectPart::removeFile const QString fileName  )  [virtual]
 

Removes a file from the project.

The given file name must be relative to the project directory.

Implements KDevProject.

Definition at line 236 of file genericproject_part.cpp.

References removeFile(), and removeFiles().

Referenced by removeFile().

void GenericProjectPart::removeFiles const QStringList fileList  )  [virtual]
 

Removes a list of files from the project.

Provided for convenience when removing many files. The given file names must be relative to the project directory.

Implements KDevProject.

Definition at line 232 of file genericproject_part.cpp.

References removeFiles().

Referenced by removeFile(), and removeFiles().

QString GenericProjectPart::runArguments  )  const [virtual]
 

The command line arguments that the mainProgram() should be run with.

Implements KDevProject.

Definition at line 175 of file genericproject_part.cpp.

QString GenericProjectPart::runDirectory  )  const [virtual]
 

Absolute path (directory) from where the mainProgram() should be run.

Implements KDevProject.

Definition at line 170 of file genericproject_part.cpp.

References m_runDir.

DomUtil::PairList GenericProjectPart::runEnvironmentVars  )  const [virtual]
 

The environment variables that sould be set before running mainProgram().

Implements KDevProject.

Definition at line 160 of file genericproject_part.cpp.

References DomUtil::PairList.


Member Data Documentation

QString GenericProjectPart::m_activeDir [private]
 

Definition at line 84 of file genericproject_part.h.

Referenced by activeDirectory().

QString GenericProjectPart::m_buildDir [private]
 

Definition at line 81 of file genericproject_part.h.

Referenced by buildDirectory(), and openProject().

KDevBuildSystem* GenericProjectPart::m_buildSystem [private]
 

Definition at line 63 of file genericproject_part.h.

Referenced by buildSystem(), and openProject().

BuildGroupItem* GenericProjectPart::m_mainBuild [private]
 

Definition at line 79 of file genericproject_part.h.

Referenced by allFiles(), and mainGroup().

GenericGroupListViewItem* GenericProjectPart::m_mainGroup [private]
 

Definition at line 78 of file genericproject_part.h.

Referenced by loadProjectConfig().

QString GenericProjectPart::m_projectDir [private]
 

Definition at line 82 of file genericproject_part.h.

Referenced by addFiles(), allFiles(), openProject(), and projectDirectory().

QString GenericProjectPart::m_projectName [private]
 

Definition at line 83 of file genericproject_part.h.

Referenced by openProject(), and projectName().

QString GenericProjectPart::m_runDir [private]
 

Definition at line 85 of file genericproject_part.h.

Referenced by runDirectory().

QGuardedPtr<GenericProjectWidget> GenericProjectPart::m_widget [private]
 

Definition at line 77 of file genericproject_part.h.

Referenced by addFilePrivate(), addFiles(), createGroupItem(), and ~GenericProjectPart().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for KDevelop Version 3.0.4.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Oct 6 17:39:25 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003