KDevelop API Documentation

ScriptProjectPart Class Reference

This is the script build tool part Put a more detailed description of your part in these lines. More...

#include <scriptprojectpart.h>

Inheritance diagram for ScriptProjectPart:

KDevProject KDevPlugin QObject KXMLGUIClient List of all members.

Public Member Functions

 ScriptProjectPart (QObject *parent, const char *name, const QStringList &args)
 ~ScriptProjectPart ()

Protected Member Functions

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 QString mainProgram (bool relative=false) const
 Retuns the currently selected main program The returned string can be: if run/directoryradio == executable The executable name if run/directoryradio == build The path to executable relative to build directory if run/directoryradio == custom or relative == false The absolute path to executable.

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

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

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

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

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

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

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

virtual QString runDirectory () const
 Retuns the currently selected run directory The returned string can be: if run/directoryradio == executable The directory where the executable is if run/directoryradio == build The directory where the executable is relative to build directory if run/directoryradio == custom The custom directory absolute path.

virtual QString runArguments () const
 Retuns a QString with the run command line arguments.

virtual DomUtil::PairList runEnvironmentVars () const
 Retuns a PairList with the run environment variables.


Private Slots

void projectConfigWidget (KDialogBase *dlg)
void slotNewFile ()

Private Attributes

QString m_projectDirectory
QString m_projectName
QStringList m_sourceFiles

Detailed Description

This is the script 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):
Bernd Gehrmann

Unmaintained:
This part is currently un-maintained

Deprecated:
This class is deprecated, use GenericProjectPart (buildtools/generic) instead.

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 26 of file scriptprojectpart.h.


Constructor & Destructor Documentation

ScriptProjectPart::ScriptProjectPart QObject parent,
const char *  name,
const QStringList args
 

ScriptProjectPart::~ScriptProjectPart  ) 
 

Definition at line 63 of file scriptprojectpart.cpp.


Member Function Documentation

QString ScriptProjectPart::activeDirectory  )  const [protected, 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 269 of file scriptprojectpart.cpp.

References KDevPlugin::projectDom().

void ScriptProjectPart::addFile const QString fileName  )  [protected, virtual]
 

Adds a file to the project.

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

Implements KDevProject.

Definition at line 291 of file scriptprojectpart.cpp.

References addFile(), addFiles(), endl(), and kdDebug().

Referenced by ScriptNewFileDialog::accept(), and addFile().

void ScriptProjectPart::addFiles const QStringList fileList  )  [protected, 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 301 of file scriptprojectpart.cpp.

References addFiles(), and m_sourceFiles.

Referenced by addFile(), addFiles(), and removeFile().

QStringList ScriptProjectPart::allFiles  )  const [protected, 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 277 of file scriptprojectpart.cpp.

References m_sourceFiles.

QString ScriptProjectPart::buildDirectory  )  const [protected, 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 180 of file scriptprojectpart.cpp.

References m_projectDirectory.

Referenced by mainProgram(), and runDirectory().

void ScriptProjectPart::closeProject  )  [protected, virtual]
 

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

Implements KDevProject.

Definition at line 169 of file scriptprojectpart.cpp.

QString ScriptProjectPart::mainProgram bool  relative = false  )  const [protected, virtual]
 

Retuns the currently selected main program The returned string can be: if run/directoryradio == executable The executable name if run/directoryradio == build The path to executable relative to build directory if run/directoryradio == custom or relative == false The absolute path to executable.

Implements KDevProject.

Definition at line 238 of file scriptprojectpart.cpp.

References buildDirectory(), mainProgram(), and KDevPlugin::projectDom().

Referenced by mainProgram().

void ScriptProjectPart::openProject const QString dirName,
const QString projectName
[protected, 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 93 of file scriptprojectpart.cpp.

References endl(), kdDebug(), KDevPlugin::languageSupport(), KMimeType::List, m_projectDirectory, m_projectName, m_sourceFiles, matchesPattern(), KDevLanguageSupport::mimeTypes(), openProject(), and KDevPlugin::projectDom().

Referenced by openProject().

void ScriptProjectPart::projectConfigWidget KDialogBase dlg  )  [private, slot]
 

Definition at line 67 of file scriptprojectpart.cpp.

References KDialogBase::addVBoxPage(), and projectConfigWidget().

Referenced by projectConfigWidget().

QString ScriptProjectPart::projectDirectory  )  const [protected, virtual]
 

Returns the canonical toplevel directory of the project.

Implements KDevProject.

Definition at line 174 of file scriptprojectpart.cpp.

References m_projectDirectory.

QString ScriptProjectPart::projectName  )  const [protected, virtual]
 

Returns the name of the project.

Implements KDevProject.

Definition at line 185 of file scriptprojectpart.cpp.

References m_projectName.

void ScriptProjectPart::removeFile const QString fileName  )  [protected, virtual]
 

Removes a file from the project.

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

Implements KDevProject.

Definition at line 313 of file scriptprojectpart.cpp.

References addFiles(), and removeFile().

Referenced by removeFile().

void ScriptProjectPart::removeFiles const QStringList fileList  )  [protected, 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 321 of file scriptprojectpart.cpp.

References m_sourceFiles, and removeFiles().

Referenced by removeFiles().

QString ScriptProjectPart::runArguments  )  const [protected, virtual]
 

Retuns a QString with the run command line arguments.

Implements KDevProject.

Definition at line 263 of file scriptprojectpart.cpp.

References KDevPlugin::projectDom().

QString ScriptProjectPart::runDirectory  )  const [protected, virtual]
 

Retuns the currently selected run directory The returned string can be: if run/directoryradio == executable The directory where the executable is if run/directoryradio == build The directory where the executable is relative to build directory if run/directoryradio == custom The custom directory absolute path.

Implements KDevProject.

Definition at line 207 of file scriptprojectpart.cpp.

References buildDirectory(), and KDevPlugin::projectDom().

DomUtil::PairList ScriptProjectPart::runEnvironmentVars  )  const [protected, virtual]
 

Retuns a PairList with the run environment variables.

Implements KDevProject.

Definition at line 192 of file scriptprojectpart.cpp.

References DomUtil::PairList, and KDevPlugin::projectDom().

void ScriptProjectPart::slotNewFile  )  [private, slot]
 

Definition at line 333 of file scriptprojectpart.cpp.


Member Data Documentation

QString ScriptProjectPart::m_projectDirectory [private]
 

Definition at line 57 of file scriptprojectpart.h.

Referenced by buildDirectory(), openProject(), and projectDirectory().

QString ScriptProjectPart::m_projectName [private]
 

Definition at line 58 of file scriptprojectpart.h.

Referenced by openProject(), and projectName().

QStringList ScriptProjectPart::m_sourceFiles [private]
 

Definition at line 59 of file scriptprojectpart.h.

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


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:29 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003