KDevelop API Documentation

HaskellProjectPart Class Reference

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

#include <haskellproject_part.h>

Inheritance diagram for HaskellProjectPart:

KDevProject KDevPlugin QObject KXMLGUIClient List of all members.

Public Slots

void loadProjectConfig ()
 loads config from project file


Public Member Functions

 HaskellProjectPart (QObject *parent, const char *name, const QStringList &)
 ~HaskellProjectPart ()
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 ()
 Returns the name of the main source.

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 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
 Absolute path (directory) from where the mainProgram() should be run.

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)

Private Slots

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

Private Member Functions

void listOfFiles (QStringList &result, QString path)
QString createCmdLine (QString srcFile)
QString createPackageString ()

Private Attributes

KAction_buildAction
KAction_runAction
QGuardedPtr< HaskellProjectWidget > m_widget
QString _buildDir
QString _projectDir
QString _projectName
QString _mainProg
QString _mainSource
QString _compilerExec
QString _compilerOpts
QStringList _sourceFiles

Detailed Description

This is the Haskell 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):
Peter Robinson

Maintainer(s):
Peter Robinson

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 42 of file haskellproject_part.h.


Constructor & Destructor Documentation

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

HaskellProjectPart::~HaskellProjectPart  ) 
 

Definition at line 79 of file haskellproject_part.cpp.


Member Function Documentation

QString HaskellProjectPart::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 197 of file haskellproject_part.cpp.

References mainSource(), and projectDirectory().

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

This does absolutelly nothing.

Implements KDevProject.

Definition at line 220 of file haskellproject_part.cpp.

References addFile().

Referenced by addFile().

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

This does absolutelly nothing.

Implements KDevProject.

Definition at line 215 of file haskellproject_part.cpp.

References addFiles().

Referenced by addFiles().

QStringList HaskellProjectPart::allFiles  )  const [virtual]
 

Returns everything in the project directory.

Implements KDevProject.

Definition at line 210 of file haskellproject_part.cpp.

References _sourceFiles.

QString HaskellProjectPart::buildDirectory  )  const [virtual]
 

The location of the main source file.

Implements KDevProject.

Definition at line 204 of file haskellproject_part.cpp.

References mainSource().

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

void HaskellProjectPart::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 348 of file haskellproject_part.cpp.

References changedFile().

Referenced by changedFile().

void HaskellProjectPart::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 343 of file haskellproject_part.cpp.

References changedFiles().

Referenced by changedFiles().

void HaskellProjectPart::closeProject  )  [virtual]
 

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

Implements KDevProject.

Definition at line 100 of file haskellproject_part.cpp.

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

Definition at line 407 of file haskellproject_part.cpp.

References configWidget().

Referenced by configWidget().

QString HaskellProjectPart::createCmdLine QString  srcFile  )  [private]
 

Definition at line 283 of file haskellproject_part.cpp.

References _compilerExec, _compilerOpts, buildDirectory(), createCmdLine(), createPackageString(), and mainProgram().

Referenced by createCmdLine(), and slotBuild().

KDevCompilerOptions * HaskellProjectPart::createCompilerOptions const QString name  ) 
 

Definition at line 416 of file haskellproject_part.cpp.

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

Referenced by HaskellProjectOptionsDlg::optionsButtonClicked().

QString HaskellProjectPart::createPackageString  )  [private]
 

Definition at line 277 of file haskellproject_part.cpp.

Referenced by createCmdLine().

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

Definition at line 449 of file haskellproject_part.cpp.

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

Referenced by defaultOptions(), and HaskellProjectOptionsDlg::setDefaultOptions().

void HaskellProjectPart::listOfFiles QStringList result,
QString  path
[private]
 

Definition at line 258 of file haskellproject_part.cpp.

References listOfFiles().

Referenced by listOfFiles().

void HaskellProjectPart::loadProjectConfig  )  [slot]
 

loads config from project file

Definition at line 373 of file haskellproject_part.cpp.

References _compilerExec, _compilerOpts, _mainSource, and KDevPlugin::projectDom().

Referenced by openProject(), and projectConfigWidget().

QString HaskellProjectPart::mainProgram bool  relative = false  )  const [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 132 of file haskellproject_part.cpp.

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

QString HaskellProjectPart::mainProgram  )  [virtual]
 

Returns the name of the main source.

Definition at line 457 of file haskellproject_part.cpp.

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

Referenced by createCmdLine(), mainProgram(), openProject(), and slotExecute().

QString HaskellProjectPart::mainSource  )  const [virtual]
 

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

Definition at line 246 of file haskellproject_part.cpp.

References _mainSource, and projectDirectory().

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

void HaskellProjectPart::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 85 of file haskellproject_part.cpp.

References _buildDir, _projectDir, _projectName, loadProjectConfig(), mainProgram(), openProject(), and KDevPlugin::projectDom().

Referenced by openProject().

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

Definition at line 353 of file haskellproject_part.cpp.

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

Referenced by projectConfigWidget().

QString HaskellProjectPart::projectDirectory  )  const [virtual]
 

Returns the canonical toplevel directory of the project.

Implements KDevProject.

Definition at line 105 of file haskellproject_part.cpp.

References _projectDir.

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

QString HaskellProjectPart::projectName  )  const [virtual]
 

Returns the name of the project.

Implements KDevProject.

Definition at line 110 of file haskellproject_part.cpp.

References _projectName.

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

This does absolutelly nothing.

Implements KDevProject.

Definition at line 228 of file haskellproject_part.cpp.

References removeFile().

Referenced by removeFile().

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

This does absolutelly nothing.

Implements KDevProject.

Definition at line 224 of file haskellproject_part.cpp.

References removeFiles().

Referenced by removeFiles().

QString HaskellProjectPart::runArguments  )  const [virtual]
 

Retuns a QString with the run command line arguments.

Implements KDevProject.

Definition at line 192 of file haskellproject_part.cpp.

References KDevPlugin::projectDom().

QString HaskellProjectPart::runDirectory  )  const [virtual]
 

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

Implements KDevProject.

Definition at line 171 of file haskellproject_part.cpp.

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

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

Retuns a PairList with the run environment variables.

Implements KDevProject.

Definition at line 116 of file haskellproject_part.cpp.

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

void HaskellProjectPart::setMainSource QString  fullPath  )  [virtual]
 

Definition at line 251 of file haskellproject_part.cpp.

References _mainSource, projectDirectory(), and setMainSource().

Referenced by setMainSource().

void HaskellProjectPart::slotBuild  )  [private, slot]
 

Definition at line 295 of file haskellproject_part.cpp.

References _compilerExec, buildDirectory(), createCmdLine(), mainSource(), KDevPlugin::makeFrontend(), KDevPlugin::partController(), KDevMakeFrontend::queueCommand(), and KDevPartController::saveAllFiles().

void HaskellProjectPart::slotExecute  )  [private, slot]
 

Definition at line 308 of file haskellproject_part.cpp.

References KDevPlugin::appFrontend(), buildDirectory(), mainProgram(), KDevPlugin::partController(), KDevPlugin::projectDom(), KDevPartController::saveAllFiles(), and KDevAppFrontend::startAppCommand().


Member Data Documentation

KAction* HaskellProjectPart::_buildAction [private]
 

Definition at line 98 of file haskellproject_part.h.

QString HaskellProjectPart::_buildDir [private]
 

Definition at line 105 of file haskellproject_part.h.

Referenced by openProject().

QString HaskellProjectPart::_compilerExec [private]
 

Definition at line 111 of file haskellproject_part.h.

Referenced by createCmdLine(), loadProjectConfig(), and slotBuild().

QString HaskellProjectPart::_compilerOpts [private]
 

Definition at line 112 of file haskellproject_part.h.

Referenced by createCmdLine(), and loadProjectConfig().

QString HaskellProjectPart::_mainProg [private]
 

Definition at line 109 of file haskellproject_part.h.

QString HaskellProjectPart::_mainSource [private]
 

Definition at line 110 of file haskellproject_part.h.

Referenced by loadProjectConfig(), mainSource(), and setMainSource().

QString HaskellProjectPart::_projectDir [private]
 

Definition at line 106 of file haskellproject_part.h.

Referenced by openProject(), and projectDirectory().

QString HaskellProjectPart::_projectName [private]
 

Definition at line 107 of file haskellproject_part.h.

Referenced by openProject(), and projectName().

KAction * HaskellProjectPart::_runAction [private]
 

Definition at line 98 of file haskellproject_part.h.

QStringList HaskellProjectPart::_sourceFiles [private]
 

Definition at line 114 of file haskellproject_part.h.

Referenced by allFiles().

QGuardedPtr<HaskellProjectWidget> HaskellProjectPart::m_widget [private]
 

Definition at line 99 of file haskellproject_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.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