AutoProjectPart Class Reference
Autoprojectpart is a projectmanager for Automake based projects. More...
#include <autoprojectpart.h>
Inheritance diagram for AutoProjectPart:


Public Member Functions | |
AutoProjectPart (QObject *parent, const char *name, const QStringList &args) | |
virtual | ~AutoProjectPart () |
virtual QString | projectDirectory () const |
Implementation of the KDevProject interface. | |
virtual QString | projectName () const |
Returns the name of the project. | |
virtual DomUtil::PairList | runEnvironmentVars () const |
Retuns a PairList with the run environment variables. | |
virtual QString | runDirectory () const |
Retuns the currently selected run directory If no main Program was selected in the Run Options dialog use the currently active target instead to calculate it. | |
virtual QString | mainProgram (bool relative=false) const |
Retuns the currently selected main program If no main Program was selected in the Run Options dialog use the currently active target instead. | |
virtual QString | runArguments () const |
Retuns a QString with the run command line arguments. | |
virtual QString | environString () const |
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 Options | options () const |
virtual void | restorePartialProjectSession (const QDomElement *el) |
Implementation of the KDevPlugin interface. | |
virtual void | savePartialProjectSession (QDomElement *el) |
QStringList | allBuildConfigs () const |
automake specific methods. | |
QString | currentBuildConfig () const |
QString | topsourceDirectory () const |
void | startMakeCommand (const QString &dir, const QString &target, bool withKdesu=false) |
void | buildTarget (QString relpath, TargetItem *titem) |
void | executeTarget (const QDir &dir, const TargetItem *titem) |
void | needMakefileCvs () |
bool | isDirty () |
bool | isKDE () const |
QStringList | distFiles () const |
Returns a list of files that are part of the distribution but not under project control. | |
Protected Member Functions | |
virtual void | openProject (const QString &dirName, const QString &projectName) |
Reimplemented from KDevProject. | |
virtual void | closeProject () |
This method is invoked when the project is about to be closed. | |
Private Slots | |
void | slotAddTranslation () |
void | slotBuild () |
void | slotBuildActiveTarget () |
void | slotCompileFile () |
void | slotClean () |
void | slotDistClean () |
void | slotInstall () |
void | slotInstallWithKdesu () |
void | slotMakefilecvs () |
void | slotMakeMessages () |
void | slotConfigure () |
void | slotExecute () |
Checks if the currently selected main program or, if no main Program was selected in the Run Options dialog, the currently active target is up-to-date and builds it if necessary. | |
void | slotExecute2 () |
Executes the currently selected main program. | |
void | slotExecuteTargetAfterBuild (const QString &command) |
void | slotNotExecuteTargetAfterBuildFailed (const QString &command) |
void | slotBuildConfigChanged (const QString &config) |
void | slotBuildConfigAboutToShow () |
void | slotCommandFinished (const QString &command) |
void | slotCommandFailed (const QString &command) |
void | insertConfigWidget (const KDialogBase *dlg, QWidget *page, unsigned int) |
Private Member Functions | |
QString | makeEnvironment () const |
void | setWantautotools () |
QString | makefileCvsCommand () const |
QString | configureCommand () const |
QString | constructMakeCommandLine (const QString &dir, const QString &target) const |
void | queueInternalLibDependenciesBuild (TargetItem *titem) |
Adds the make command for the libraries that the target depends on to the make frontend queue (this is a recursive function). | |
Private Attributes | |
QGuardedPtr< AutoProjectWidget > | m_widget |
QString | m_projectName |
QString | m_projectPath |
KSelectAction * | buildConfigAction |
QMap< QString, QDateTime > | m_timestamp |
bool | m_executeAfterBuild |
QString | m_buildCommand |
bool | m_needMakefileCvs |
bool | m_lastCompilationFailed |
bool | m_isKDE |
QPair< QDir, TargetItem * > | m_executeTargetAfterBuild |
ConfigWidgetProxy * | _configProxy |
Friends | |
class | AutoProjectWidget |
class | AddSubprojectDialog |
class | FileItem |
Detailed Description
Autoprojectpart is a projectmanager for Automake based projects.Loads and maintains Makefile.am files.
- Feature(s):
- supports creating subprojects, targets, services (.desktop) and applications (.desktop).
Automake projects can be configured on subprojects, targets (except DATA and HEADER targets).
It will regenerate the projects Makefile.am files dynamically as you add or reconfigure subprojects**.
Unsupported automake features will be left unchanged (hopefully), no major testing has been run yet (at least not by myself).
- Bug:
- bugs in autoproject component at Bugzilla database
Lower Automake Manager view does not update it's view when adding a subproject (and targets, etc to the new subproject)
If removing the Active Target, update the .kdevelop file, too!
- Note:
- If you want to change the default implemention for running/starting the binary please add the following to your project file with this configuration the "Automake Manager" doesn't insert the menuentry "execute program" and doesn't show the "Run Options" in the project configuration.
<kdevautoproject> <run> <disable_default>true</disable_default> </run> </kdevautoproject>
Now you can implement this features with your own special plugin. For an example please look at the projects generated for GBA using the VisualBoy Advance Plugin. This plugin starts a GBA binary with an emulator. -- Sandy Meier
Definition at line 36 of file autoprojectpart.h.
Constructor & Destructor Documentation
|
|
|
Definition at line 240 of file autoprojectpart.cpp. References m_widget, KDevPlugin::mainWindow(), and KDevMainWindow::removeView(). |
Member Function Documentation
|
Returns the path (relative to the project directory) of the active directory. All newly generated classes are added here. Implements KDevProject. Definition at line 469 of file autoprojectpart.cpp. References m_widget. Referenced by mainProgram(), runDirectory(), and slotBuildActiveTarget(). |
|
Adds a file to the project. The given file name must be relative to the project directory. Implements KDevProject. Definition at line 522 of file autoprojectpart.cpp. References addFiles(). |
|
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 530 of file autoprojectpart.cpp. References KMessageBox::information(), and m_widget. Referenced by addFile(), and AutoDetailsView::slotDetailsContextMenu(). |
|
automake specific methods.
Definition at line 583 of file autoprojectpart.cpp. References kdDebug(), and KDevPlugin::projectDom(). Referenced by ConfigureOptionsWidget::ConfigureOptionsWidget(), currentBuildConfig(), and slotBuildConfigAboutToShow(). |
|
Returns a list of all files in the project. The files are relative to the project directory. Implements KDevProject. Definition at line 475 of file autoprojectpart.cpp. References m_widget. Referenced by distFiles(), isDirty(), and slotCommandFinished(). |
|
|
Definition at line 791 of file autoprojectpart.cpp. References buildDirectory(), constructMakeCommandLine(), m_buildCommand, KDevPlugin::makeFrontend(), TargetItem::name, KDevPlugin::partController(), TargetItem::primary, KDevMakeFrontend::queueCommand(), queueInternalLibDependenciesBuild(), and KDevPartController::saveAllFiles(). Referenced by executeTarget(), slotBuildActiveTarget(), and AutoDetailsView::slotBuildTarget(). |
|
This method is invoked when the project is about to be closed.
Implements KDevProject. Definition at line 327 of file autoprojectpart.cpp. References m_widget. |
|
Definition at line 871 of file autoprojectpart.cpp. References buildDirectory(), currentBuildConfig(), DomUtil::PairList, KDevPlugin::projectDom(), KProcess::quote(), EnvVarTools::quote(), DomUtil::readEntry(), DomUtil::readPairListEntry(), and topsourceDirectory(). Referenced by AddSubprojectDialog::accept(), constructMakeCommandLine(), and slotConfigure(). |
|
Definition at line 642 of file autoprojectpart.cpp. References buildDirectory(), configureCommand(), kdDebug(), m_widget, makeEnvironment(), makefileCvsCommand(), KDevPlugin::projectDom(), KMessageBox::questionYesNo(), KProcess::quote(), DomUtil::readBoolEntry(), DomUtil::readEntry(), and DomUtil::readIntEntry(). Referenced by buildTarget(), queueInternalLibDependenciesBuild(), slotExecuteTargetAfterBuild(), slotNotExecuteTargetAfterBuildFailed(), and startMakeCommand(). |
|
Definition at line 604 of file autoprojectpart.cpp. References allBuildConfigs(), KDevPlugin::projectDom(), and DomUtil::readEntry(). Referenced by buildDirectory(), configureCommand(), ConfigureOptionsWidget::ConfigureOptionsWidget(), slotBuildConfigAboutToShow(), SubprojectOptionsDialog::SubprojectOptionsDialog(), and topsourceDirectory(). |
|
Returns a list of files that are part of the distribution but not under project control.
Implements KDevProject. Definition at line 1323 of file autoprojectpart.cpp. References allFiles(), projectDirectory(), and recursiveATFind(). |
|
Definition at line 1132 of file autoprojectpart.cpp. References DomUtil::PairList, EnvVarTools::quote(), and runEnvironmentVars(). Referenced by executeTarget(), and slotExecute2(). |
|
|
Definition at line 273 of file autoprojectpart.cpp. References buildDirectory(), CONFIGURE_OPTIONS, MAKE_OPTIONS, RunOptionsWidgetBase::programGroupBox, KDevPlugin::projectDom(), DomUtil::readBoolEntry(), and RUN_OPTIONS. |
|
Definition at line 1258 of file autoprojectpart.cpp. References allFiles(), m_timestamp, and projectDirectory(). Referenced by slotExecute(). |
|
Definition at line 1283 of file autoprojectpart.cpp. Referenced by AddSubprojectDialog::accept(), AutoSubprojectView::initActions(), AddExistingDirectoriesDialog::slotOk(), and AutoSubprojectView::slotRemoveSubproject(). |
|
Retuns the currently selected main program If no main Program was selected in the Run Options dialog use the currently active target instead. The returned string can be: if /kdevautoproject/run/directoryradio == executable The executable name if /kdevautoproject/run/directoryradio == build The path to executable relative to build directory if /kdevautoproject/run/directoryradio == custom or relative == false The absolute path to executable Implements KDevProject. Definition at line 399 of file autoprojectpart.cpp. References activeDirectory(), buildDirectory(), kdDebug(), m_widget, TargetItem::name, TargetItem::primary, KDevPlugin::projectDom(), and DomUtil::readEntry(). Referenced by slotExecute2(). |
|
Definition at line 494 of file autoprojectpart.cpp. References DomUtil::PairList, KDevPlugin::projectDom(), EnvVarTools::quote(), and DomUtil::readPairListEntry(). Referenced by constructMakeCommandLine(), and makefileCvsCommand(). |
|
Definition at line 949 of file autoprojectpart.cpp. References kdDebug(), m_widget, makeEnvironment(), KDevPlugin::projectDom(), KProcess::quote(), DomUtil::readEntry(), DomUtil::readIntEntry(), KMessageBox::sorry(), and topsourceDirectory(). Referenced by constructMakeCommandLine(), and slotMakefilecvs(). |
|
Definition at line 1278 of file autoprojectpart.cpp. References m_needMakefileCvs. Referenced by AddSubprojectDialog::accept(), and AddExistingDirectoriesDialog::slotOk(). |
|
Reimplemented from KDevProject. These methods are only for use by the application core. Reimplemented from KDevProject. Definition at line 305 of file autoprojectpart.cpp. References kdDebug(), m_projectName, m_projectPath, m_widget, KDevProject::openProject(), KDevPlugin::projectDom(), DomUtil::readBoolEntry(), DomUtil::readEntry(), and DomUtil::writeEntry(). |
|
Reimplemented from KDevProject. Definition at line 1288 of file autoprojectpart.cpp. |
|
|
Returns the name of the project.
Implements KDevProject. Definition at line 339 of file autoprojectpart.cpp. Referenced by AutoSubprojectView::loadMakefileams(). |
|
Adds the make command for the libraries that the target depends on to the make frontend queue (this is a recursive function).
Definition at line 718 of file autoprojectpart.cpp. References buildDirectory(), constructMakeCommandLine(), kdDebug(), TargetItem::ldadd, TargetItem::libadd, m_widget, KDevPlugin::makeFrontend(), TargetItem::name, TargetItem::primary, KDevMakeFrontend::queueCommand(), and SubprojectItem::targets. Referenced by buildTarget(). |
|
Removes a file from the project. The given file name must be relative to the project directory. Implements KDevProject. Definition at line 567 of file autoprojectpart.cpp. References removeFiles(). |
|
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 575 of file autoprojectpart.cpp. References m_widget, and KDevProject::removedFilesFromProject(). Referenced by removeFile(). |
|
Implementation of the KDevPlugin interface.
Reimplemented from KDevPlugin. Definition at line 1197 of file autoprojectpart.cpp. References m_widget. |
|
Retuns a QString with the run command line arguments.
Implements KDevProject. Definition at line 451 of file autoprojectpart.cpp. References m_widget, KDevPlugin::projectDom(), and DomUtil::readEntry(). Referenced by slotExecute2(). |
|
Retuns the currently selected run directory If no main Program was selected in the Run Options dialog use the currently active target instead to calculate it. The returned string can be: if /kdevautoproject/run/directoryradio == executable The directory where the executable is if /kdevautoproject/run/directoryradio == build The directory where the executable is relative to build directory if /kdevautoproject/run/directoryradio == custom The custom directory absolute path Implements KDevProject. Definition at line 363 of file autoprojectpart.cpp. References activeDirectory(), buildDirectory(), KDevPlugin::projectDom(), and DomUtil::readEntry(). Referenced by slotExecute2(). |
|
Retuns a PairList with the run environment variables.
Implements KDevProject. Definition at line 346 of file autoprojectpart.cpp. References DomUtil::PairList, KDevPlugin::projectDom(), and DomUtil::readPairListEntry(). Referenced by environString(). |
|
Reimplemented from KDevPlugin. Definition at line 1202 of file autoprojectpart.cpp. References KMessageBox::information(), kdDebug(), and m_widget. |
|
Definition at line 481 of file autoprojectpart.cpp. References DomUtil::elementByPath(), DomUtil::Pair, DomUtil::PairList, KDevPlugin::projectDom(), and DomUtil::writePairListEntry(). |
|
Definition at line 1176 of file autoprojectpart.cpp. References m_widget. |
|
Definition at line 777 of file autoprojectpart.cpp. References buildDirectory(), m_needMakefileCvs, slotConfigure(), slotMakefilecvs(), and startMakeCommand(). Referenced by slotExecute(), and slotInstallWithKdesu(). |
|
Definition at line 831 of file autoprojectpart.cpp. References activeDirectory(), buildTarget(), and m_widget. Referenced by slotExecute(). |
|
Definition at line 1190 of file autoprojectpart.cpp. References allBuildConfigs(), buildConfigAction, currentBuildConfig(), KSelectAction::setCurrentItem(), and KSelectAction::setItems(). |
|
Definition at line 1183 of file autoprojectpart.cpp. References kdDebug(), KDevPlugin::projectDom(), and DomUtil::writeEntry(). |
|
Definition at line 1011 of file autoprojectpart.cpp. References buildDirectory(), and startMakeCommand(). |
|
Definition at line 1251 of file autoprojectpart.cpp. References k_funcinfo, kdDebug(), and m_lastCompilationFailed. |
|
Definition at line 1221 of file autoprojectpart.cpp. References allFiles(), k_funcinfo, kdDebug(), m_buildCommand, m_executeAfterBuild, m_lastCompilationFailed, m_timestamp, KDevProject::projectCompiled(), projectDirectory(), and slotExecute(). |
|
Definition at line 844 of file autoprojectpart.cpp. References KParts::PartManager::activePart(), buildDirectory(), KURL::isLocalFile(), kdDebug(), m_widget, KDevPlugin::partController(), KURL::path(), projectDirectory(), KMessageBox::sorry(), startMakeCommand(), and KParts::ReadOnlyPart::url(). |
|
Definition at line 940 of file autoprojectpart.cpp. References buildDirectory(), configureCommand(), KDevPlugin::makeFrontend(), and KDevMakeFrontend::queueCommand(). Referenced by slotBuild(). |
|
Definition at line 1017 of file autoprojectpart.cpp. References buildDirectory(), and startMakeCommand(). |
|
Checks if the currently selected main program or, if no main Program was selected in the Run Options dialog, the currently active target is up-to-date and builds it if necessary. In the end checks if the program is already running and if not calls the slotExecute2() function to execute it or asks the user what to do. Definition at line 1035 of file autoprojectpart.cpp. References KDevPlugin::appFrontend(), isDirty(), KDevAppFrontend::isRunning(), m_executeAfterBuild, m_widget, KDevPlugin::partController(), KDevPlugin::projectDom(), KMessageBox::questionYesNo(), DomUtil::readBoolEntry(), DomUtil::readEntry(), KDevPartController::saveAllFiles(), slotBuild(), slotBuildActiveTarget(), slotExecute2(), and KDevAppFrontend::stopApplication(). Referenced by slotCommandFinished(). |
|
Executes the currently selected main program. If no main Program was selected in the Run Options dialog the currently active target is executed instead. Definition at line 1150 of file autoprojectpart.cpp. References KDevPlugin::appFrontend(), environString(), kdDebug(), mainProgram(), KDevPlugin::projectDom(), DomUtil::readBoolEntry(), runArguments(), runDirectory(), and KDevAppFrontend::startAppCommand(). Referenced by slotExecute(). |
|
Definition at line 1104 of file autoprojectpart.cpp. References constructMakeCommandLine(), executeTarget(), m_executeTargetAfterBuild, and KDevPlugin::makeFrontend(). Referenced by executeTarget(), and slotNotExecuteTargetAfterBuildFailed(). |
|
Definition at line 994 of file autoprojectpart.cpp. References buildDirectory(), and startMakeCommand(). |
|
Definition at line 1000 of file autoprojectpart.cpp. References buildDirectory(), slotBuild(), and startMakeCommand(). |
|
Definition at line 984 of file autoprojectpart.cpp. References makefileCvsCommand(), KDevPlugin::makeFrontend(), projectDirectory(), and KDevMakeFrontend::queueCommand(). Referenced by slotBuild(). |
|
Definition at line 1023 of file autoprojectpart.cpp. References buildDirectory(), and startMakeCommand(). |
|
Definition at line 1116 of file autoprojectpart.cpp. References constructMakeCommandLine(), m_executeTargetAfterBuild, KDevPlugin::makeFrontend(), and slotExecuteTargetAfterBuild(). Referenced by executeTarget(). |
|
|
Definition at line 629 of file autoprojectpart.cpp. References currentBuildConfig(), projectDirectory(), KDevPlugin::projectDom(), and DomUtil::readEntry(). Referenced by buildDirectory(), configureCommand(), and makefileCvsCommand(). |
Friends And Related Function Documentation
|
Definition at line 139 of file autoprojectpart.h. |
|
Definition at line 138 of file autoprojectpart.h. |
|
Definition at line 140 of file autoprojectpart.h. |
Member Data Documentation
|
Definition at line 135 of file autoprojectpart.h. |
|
Definition at line 120 of file autoprojectpart.h. Referenced by slotBuildConfigAboutToShow(). |
|
Definition at line 129 of file autoprojectpart.h. Referenced by buildTarget(), slotCommandFinished(), and startMakeCommand(). |
|
Definition at line 128 of file autoprojectpart.h. Referenced by slotCommandFinished(), and slotExecute(). |
|
Definition at line 133 of file autoprojectpart.h. Referenced by executeTarget(), slotExecuteTargetAfterBuild(), and slotNotExecuteTargetAfterBuildFailed(). |
|
Definition at line 132 of file autoprojectpart.h. |
|
Definition at line 131 of file autoprojectpart.h. Referenced by slotCommandFailed(), and slotCommandFinished(). |
|
Definition at line 130 of file autoprojectpart.h. Referenced by needMakefileCvs(), and slotBuild(). |
|
Definition at line 118 of file autoprojectpart.h. Referenced by openProject(). |
|
Definition at line 119 of file autoprojectpart.h. Referenced by openProject(). |
|
Definition at line 127 of file autoprojectpart.h. Referenced by isDirty(), and slotCommandFinished(). |
|
The documentation for this class was generated from the following files:
- buildtools/autotools/autoprojectpart.h
- buildtools/autotools/autoprojectpart.cpp