KDevelop API Documentation

PascalProjectPart Class Reference

This is the Pascal build tool part. More...

#include <pascalproject_part.h>

Inheritance diagram for PascalProjectPart:

Inheritance graph
[legend]
Collaboration diagram for PascalProjectPart:

Collaboration graph
[legend]
List of all members.

Public Slots

void loadProjectConfig ()
 loads config from project file

Public Member Functions

 PascalProjectPart (QObject *parent, const char *name, const QStringList &)
 ~PascalProjectPart ()
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 mainProgram (bool relative=false) const
 Returns the name of the main source file without extension.
virtual QString mainSource () const
 Main source file (like src/main.pp).
virtual void setMainSource (QString fullPath)
virtual QString projectDirectory () const
 Returns the canonical toplevel directory of the project.
virtual QString projectName () const
 Returns the name of the project.
virtual QString activeDirectory () const
 Returns the path (relative to the project directory) of the active directory.
virtual QString buildDirectory () const
 The location of the main source file.
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.
virtual QStringList allFiles () const
 Returns everything in the project directory.
virtual void addFile (const QString &fileName)
 This does absolutelly nothing.
virtual void addFiles (const QStringList &fileList)
 This does absolutelly nothing.
virtual void removeFile (const QString &fileName)
 This does absolutelly nothing.
virtual void removeFiles (const QStringList &fileList)
 This does absolutelly nothing.
virtual void changedFiles (const QStringList &fileList)
 Notifies the project of changes to the files.
virtual void changedFile (const QString &fileName)
 Notifies the project of a change to one of the files.
KDevCompilerOptionscreateCompilerOptions (const QString &name)
virtual QString defaultOptions (const QString compiler) const
QStringList distFiles () const
 Returns a list of files that are part of the distribution but not under project control.

Private Slots

void slotBuild ()
void slotExecute ()
void projectConfigWidget (KDialogBase *dlg)
void configWidget (KDialogBase *dlg)

Private Member Functions

void listOfFiles (QStringList &result, QString path) const

Private Attributes

QGuardedPtr< PascalProjectWidgetm_widget
QString m_buildDir
QString m_projectDir
QString m_projectName
QString m_mainProg
QString m_mainSource
QString m_compilerExec
QString m_compilerOpts
QStringList m_sourceFiles

Detailed Description

This is the Pascal build tool part.

Common build tool part part for all available pascal compilers (gpc, fpc, dcc). It holds no project file list and tries to abstract from their specifics.

Author(s):
Alexander Dymo

Maintainer(s):
Alexander Dymo

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

Definition at line 22 of file pascalproject_part.h.


Constructor & Destructor Documentation

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

PascalProjectPart::~PascalProjectPart  ) 
 

Definition at line 92 of file pascalproject_part.cpp.


Member Function Documentation

QString PascalProjectPart::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 285 of file pascalproject_part.cpp.

References mainSource(), and projectDirectory().

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

This does absolutelly nothing.

Implements KDevProject.

Definition at line 328 of file pascalproject_part.cpp.

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

This does absolutelly nothing.

Implements KDevProject.

Definition at line 332 of file pascalproject_part.cpp.

QStringList PascalProjectPart::allFiles  )  const [virtual]
 

Returns everything in the project directory.

Implements KDevProject.

Definition at line 318 of file pascalproject_part.cpp.

Referenced by distFiles().

QString PascalProjectPart::buildDirectory  )  const [virtual]
 

The location of the main source file.

Implements KDevProject.

Definition at line 291 of file pascalproject_part.cpp.

References mainSource().

Referenced by mainProgram(), projectConfigWidget(), runDirectory(), slotBuild(), and slotExecute().

void PascalProjectPart::changedFile const QString fileName  )  [virtual]
 

Notifies the project of a change to one of the files.

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

Reimplemented from KDevProject.

Definition at line 408 of file pascalproject_part.cpp.

References KDevProject::changedFile().

void PascalProjectPart::changedFiles const QStringList fileList  )  [virtual]
 

Notifies the project of changes to the files.

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

Reimplemented from KDevProject.

Definition at line 403 of file pascalproject_part.cpp.

References KDevProject::changedFiles().

void PascalProjectPart::closeProject  )  [virtual]
 

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

Implements KDevProject.

Definition at line 175 of file pascalproject_part.cpp.

void PascalProjectPart::configWidget KDialogBase dlg  )  [private, slot]
 

Definition at line 450 of file pascalproject_part.cpp.

References KDialogBase::addVBoxPage().

KDevCompilerOptions * PascalProjectPart::createCompilerOptions const QString name  ) 
 

Definition at line 458 of file pascalproject_part.cpp.

References KLibFactory::create(), KMessageBox::error(), KLibLoader::factory(), kdDebug(), KLibLoader::lastErrorMessage(), KService::Ptr, KLibLoader::self(), and KService::serviceByDesktopName().

Referenced by PascalProjectOptionsDlg::optionsButtonClicked(), and PascalGlobalOptionsDlg::optionsButtonClicked().

QString PascalProjectPart::defaultOptions const QString  compiler  )  const [virtual]
 

Definition at line 491 of file pascalproject_part.cpp.

References KGlobal::config(), KConfigBase::readPathEntry(), and KConfigBase::setGroup().

Referenced by PascalProjectOptionsDlg::setDefaultOptions().

QStringList PascalProjectPart::distFiles  )  const [virtual]
 

Returns a list of files that are part of the distribution but not under project control.

Implements KDevProject.

Definition at line 504 of file pascalproject_part.cpp.

References allFiles(), and projectDirectory().

void PascalProjectPart::listOfFiles QStringList result,
QString  path
const [private]
 

Definition at line 297 of file pascalproject_part.cpp.

References KDevPlugin::d.

void PascalProjectPart::loadProjectConfig  )  [slot]
 

loads config from project file

Definition at line 428 of file pascalproject_part.cpp.

References m_compilerExec, m_compilerOpts, m_mainSource, KDevPlugin::projectDom(), and DomUtil::readEntry().

Referenced by openProject(), and projectConfigWidget().

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

Returns the name of the main source file without extension.

All pascal compilers call the binary by that way

Fixme:
put the code below into use!

Implements KDevProject.

Definition at line 226 of file pascalproject_part.cpp.

References buildDirectory(), mainSource(), projectDirectory(), KDevPlugin::projectDom(), and DomUtil::readEntry().

Referenced by slotExecute().

QString PascalProjectPart::mainSource  )  const [virtual]
 

Main source file (like src/main.pp).

Definition at line 265 of file pascalproject_part.cpp.

References projectDirectory().

Referenced by activeDirectory(), buildDirectory(), mainProgram(), and slotBuild().

void PascalProjectPart::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 113 of file pascalproject_part.cpp.

References kdDebug(), KDevPlugin::languageSupport(), KMimeType::List, loadProjectConfig(), m_buildDir, m_projectDir, m_projectName, m_sourceFiles, matchesPattern(), KDevLanguageSupport::mimeTypes(), KDevProject::openProject(), KDevPlugin::projectDom(), DomUtil::readEntry(), and DomUtil::writeEntry().

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

Definition at line 413 of file pascalproject_part.cpp.

References KDialogBase::addVBoxPage(), buildDirectory(), loadProjectConfig(), RunOptionsWidgetBase::mainprogram_label, and KDevPlugin::projectDom().

QString PascalProjectPart::projectDirectory  )  const [virtual]
 

Returns the canonical toplevel directory of the project.

Implements KDevProject.

Definition at line 275 of file pascalproject_part.cpp.

Referenced by activeDirectory(), distFiles(), mainProgram(), mainSource(), PascalProjectOptionsDlg::readConfig(), PascalProjectOptionsDlg::saveConfig(), and setMainSource().

QString PascalProjectPart::projectName  )  const [virtual]
 

Returns the name of the project.

Implements KDevProject.

Definition at line 280 of file pascalproject_part.cpp.

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

This does absolutelly nothing.

Implements KDevProject.

Definition at line 336 of file pascalproject_part.cpp.

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

This does absolutelly nothing.

Implements KDevProject.

Definition at line 340 of file pascalproject_part.cpp.

QString PascalProjectPart::runArguments  )  const [virtual]
 

Retuns a QString with the run command line arguments.

Implements KDevProject.

Definition at line 260 of file pascalproject_part.cpp.

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

QString PascalProjectPart::runDirectory  )  const [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 195 of file pascalproject_part.cpp.

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

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

Retuns a PairList with the run environment variables.

Implements KDevProject.

Definition at line 180 of file pascalproject_part.cpp.

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

void PascalProjectPart::setMainSource QString  fullPath  )  [virtual]
 

Definition at line 270 of file pascalproject_part.cpp.

References m_mainSource, and projectDirectory().

void PascalProjectPart::slotBuild  )  [private, slot]
 

Definition at line 344 of file pascalproject_part.cpp.

References buildDirectory(), m_compilerExec, m_compilerOpts, mainSource(), KDevPlugin::makeFrontend(), KDevPlugin::partController(), KDevMakeFrontend::queueCommand(), KProcess::quote(), KDevPartController::saveAllFiles(), and KMessageBox::sorry().

void PascalProjectPart::slotExecute  )  [private, slot]
 

Definition at line 366 of file pascalproject_part.cpp.

References KDevPlugin::appFrontend(), buildDirectory(), mainProgram(), DomUtil::PairList, KDevPlugin::partController(), KDevPlugin::projectDom(), EnvVarTools::quote(), DomUtil::readBoolEntry(), DomUtil::readEntry(), DomUtil::readPairListEntry(), KDevPartController::saveAllFiles(), and KDevAppFrontend::startAppCommand().


Member Data Documentation

QString PascalProjectPart::m_buildDir [private]
 

Definition at line 82 of file pascalproject_part.h.

Referenced by openProject().

QString PascalProjectPart::m_compilerExec [private]
 

Definition at line 88 of file pascalproject_part.h.

Referenced by loadProjectConfig(), and slotBuild().

QString PascalProjectPart::m_compilerOpts [private]
 

Definition at line 89 of file pascalproject_part.h.

Referenced by loadProjectConfig(), and slotBuild().

QString PascalProjectPart::m_mainProg [private]
 

Definition at line 86 of file pascalproject_part.h.

QString PascalProjectPart::m_mainSource [private]
 

Definition at line 87 of file pascalproject_part.h.

Referenced by loadProjectConfig(), and setMainSource().

QString PascalProjectPart::m_projectDir [private]
 

Definition at line 83 of file pascalproject_part.h.

Referenced by openProject().

QString PascalProjectPart::m_projectName [private]
 

Definition at line 84 of file pascalproject_part.h.

Referenced by openProject().

QStringList PascalProjectPart::m_sourceFiles [private]
 

Definition at line 91 of file pascalproject_part.h.

Referenced by openProject().

QGuardedPtr<PascalProjectWidget> PascalProjectPart::m_widget [private]
 

Definition at line 78 of file pascalproject_part.h.


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for KDevelop Version 3.1.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Feb 22 09:45:19 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003