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 | 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 | needMakefileCvs () |
bool | isDirty () |
bool | isKDE () const |
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 | 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 |
ConfigWidgetProxy * | _configProxy |
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 35 of file autoprojectpart.h.
Constructor & Destructor Documentation
|
|
|
Definition at line 240 of file autoprojectpart.cpp. References _configProxy, 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 addFile(), and addFiles(). Referenced by addFile(). |
|
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 addFiles(), and m_widget. Referenced by addFile(), addFiles(), and AutoDetailsView::slotDetailsContextMenu(). |
|
automake specific methods.
Definition at line 583 of file autoprojectpart.cpp. References endl(), kdDebug(), and KDevPlugin::projectDom(). Referenced by 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 isDirty(), and slotCommandFinished(). |
|
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 616 of file autoprojectpart.cpp. References currentBuildConfig(), projectDirectory(), KDevPlugin::projectDom(), and topsourceDirectory(). Referenced by AddTranslationDialog::accept(), buildTarget(), configureCommand(), constructMakeCommandLine(), insertConfigWidget(), mainProgram(), queueInternalLibDependenciesBuild(), runDirectory(), ConfigureOptionsWidget::saveSettings(), slotBuild(), AutoSubprojectView::slotBuildSubproject(), slotClean(), AutoSubprojectView::slotCleanSubproject(), slotCompileFile(), slotConfigure(), slotDistClean(), AutoSubprojectView::slotForceReeditSubproject(), slotInstall(), AutoSubprojectView::slotInstallSubproject(), AutoSubprojectView::slotInstallSuSubproject(), slotInstallWithKdesu(), slotMakeMessages(), and AutoSubprojectView::slotRemoveSubproject(). |
|
Definition at line 783 of file autoprojectpart.cpp. References buildDirectory(), buildTarget(), constructMakeCommandLine(), m_buildCommand, KDevPlugin::makeFrontend(), TargetItem::name, KDevPlugin::partController(), TargetItem::primary, KDevMakeFrontend::queueCommand(), queueInternalLibDependenciesBuild(), and KDevPartController::saveAllFiles(). Referenced by buildTarget(), 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 866 of file autoprojectpart.cpp. References buildDirectory(), currentBuildConfig(), KDevPlugin::projectDom(), and topsourceDirectory(). Referenced by AddSubprojectDialog::accept(), constructMakeCommandLine(), and slotConfigure(). |
|
Definition at line 642 of file autoprojectpart.cpp. References buildDirectory(), configureCommand(), constructMakeCommandLine(), m_widget, makeEnvironment(), makefileCvsCommand(), and KDevPlugin::projectDom(). Referenced by buildTarget(), constructMakeCommandLine(), queueInternalLibDependenciesBuild(), and startMakeCommand(). |
|
Definition at line 604 of file autoprojectpart.cpp. References allBuildConfigs(), and KDevPlugin::projectDom(). Referenced by buildDirectory(), configureCommand(), slotBuildConfigAboutToShow(), SubprojectOptionsDialog::SubprojectOptionsDialog(), and topsourceDirectory(). |
|
Definition at line 273 of file autoprojectpart.cpp. References buildDirectory(), CONFIGURE_OPTIONS, insertConfigWidget(), MAKE_OPTIONS, RunOptionsWidgetBase::programGroupBox, KDevPlugin::projectDom(), and RUN_OPTIONS. Referenced by insertConfigWidget(). |
|
Definition at line 1170 of file autoprojectpart.cpp. References allFiles(), m_lastCompilationFailed, m_timestamp, and projectDirectory(). Referenced by slotExecute(). |
|
Definition at line 1195 of file autoprojectpart.cpp. References m_isKDE. 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(), endl(), kdDebug(), m_widget, mainProgram(), TargetItem::name, TargetItem::primary, and KDevPlugin::projectDom(). Referenced by mainProgram(), and slotExecute2(). |
|
Definition at line 494 of file autoprojectpart.cpp. References KDevPlugin::projectDom(), and EnvVarTools::quote(). Referenced by constructMakeCommandLine(), and makefileCvsCommand(). |
|
Definition at line 931 of file autoprojectpart.cpp. References m_widget, makeEnvironment(), KDevPlugin::projectDom(), and topsourceDirectory(). Referenced by constructMakeCommandLine(), and slotMakefilecvs(). |
|
Definition at line 1190 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 endl(), kdDebug(), m_projectName, m_projectPath, m_widget, openProject(), and KDevPlugin::projectDom(). Referenced by openProject(). |
|
Reimplemented from KDevProject. Definition at line 1200 of file autoprojectpart.cpp. |
|
|
Returns the name of the project.
Implements KDevProject. Definition at line 339 of file autoprojectpart.cpp. References m_projectName. 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 710 of file autoprojectpart.cpp. References buildDirectory(), constructMakeCommandLine(), endl(), kdDebug(), TargetItem::ldadd, TargetItem::libadd, m_widget, KDevPlugin::makeFrontend(), TargetItem::name, TargetItem::primary, KDevMakeFrontend::queueCommand(), queueInternalLibDependenciesBuild(), and SubprojectItem::targets. Referenced by buildTarget(), and queueInternalLibDependenciesBuild(). |
|
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 removeFile(), and removeFiles(). Referenced by removeFile(). |
|
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 removeFiles(). Referenced by removeFile(), and removeFiles(). |
|
Implementation of the KDevPlugin interface.
Reimplemented from KDevPlugin. Definition at line 1109 of file autoprojectpart.cpp. References m_widget, and restorePartialProjectSession(). Referenced by restorePartialProjectSession(). |
|
Retuns a QString with the run command line arguments.
Implements KDevProject. Definition at line 451 of file autoprojectpart.cpp. References m_widget, and KDevPlugin::projectDom(). 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(), and KDevPlugin::projectDom(). Referenced by slotExecute2(). |
|
Retuns a PairList with the run environment variables.
Implements KDevProject. Definition at line 346 of file autoprojectpart.cpp. References DomUtil::PairList, and KDevPlugin::projectDom(). Referenced by slotExecute2(). |
|
Reimplemented from KDevPlugin. Definition at line 1114 of file autoprojectpart.cpp. References endl(), kdDebug(), m_widget, and savePartialProjectSession(). Referenced by savePartialProjectSession(). |
|
Definition at line 481 of file autoprojectpart.cpp. References DomUtil::Pair, and KDevPlugin::projectDom(). |
|
Definition at line 1088 of file autoprojectpart.cpp. References m_widget. |
|
Definition at line 769 of file autoprojectpart.cpp. References buildDirectory(), m_needMakefileCvs, slotConfigure(), slotMakefilecvs(), and startMakeCommand(). Referenced by slotExecute(), and slotInstallWithKdesu(). |
|
Definition at line 823 of file autoprojectpart.cpp. References activeDirectory(), buildTarget(), KDevMainWindow::lowerView(), m_widget, and KDevPlugin::mainWindow(). Referenced by slotExecute(). |
|
Definition at line 1102 of file autoprojectpart.cpp. References allBuildConfigs(), buildConfigAction, currentBuildConfig(), KSelectAction::setCurrentItem(), and KSelectAction::setItems(). |
|
Definition at line 1095 of file autoprojectpart.cpp. References endl(), kdDebug(), KDevPlugin::projectDom(), and slotBuildConfigChanged(). Referenced by slotBuildConfigChanged(). |
|
Definition at line 985 of file autoprojectpart.cpp. References buildDirectory(), and startMakeCommand(). |
|
Definition at line 1163 of file autoprojectpart.cpp. References endl(), k_funcinfo, kdDebug(), m_lastCompilationFailed, and slotCommandFailed(). Referenced by slotCommandFailed(). |
|
Definition at line 1133 of file autoprojectpart.cpp. References allFiles(), endl(), k_funcinfo, kdDebug(), m_buildCommand, m_executeAfterBuild, m_lastCompilationFailed, m_timestamp, KDevProject::projectCompiled(), projectDirectory(), slotCommandFinished(), and slotExecute(). Referenced by slotCommandFinished(). |
|
Definition at line 839 of file autoprojectpart.cpp. References KParts::PartManager::activePart(), buildDirectory(), endl(), KURL::isLocalFile(), kdDebug(), m_widget, KDevPlugin::partController(), KURL::path(), projectDirectory(), startMakeCommand(), and KParts::ReadOnlyPart::url(). |
|
Definition at line 922 of file autoprojectpart.cpp. References buildDirectory(), configureCommand(), KDevPlugin::makeFrontend(), and KDevMakeFrontend::queueCommand(). Referenced by slotBuild(). |
|
Definition at line 991 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 1009 of file autoprojectpart.cpp. References KDevPlugin::appFrontend(), isDirty(), KDevAppFrontend::isRunning(), m_executeAfterBuild, m_widget, KDevPlugin::partController(), KDevPlugin::projectDom(), 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 1041 of file autoprojectpart.cpp. References KDevPlugin::appFrontend(), endl(), kdDebug(), mainProgram(), KDevPlugin::projectDom(), EnvVarTools::quote(), runArguments(), runDirectory(), runEnvironmentVars(), and KDevAppFrontend::startAppCommand(). Referenced by slotExecute(). |
|
Definition at line 968 of file autoprojectpart.cpp. References buildDirectory(), and startMakeCommand(). |
|
Definition at line 974 of file autoprojectpart.cpp. References buildDirectory(), slotBuild(), and startMakeCommand(). |
|
Definition at line 958 of file autoprojectpart.cpp. References makefileCvsCommand(), KDevPlugin::makeFrontend(), projectDirectory(), and KDevMakeFrontend::queueCommand(). Referenced by slotBuild(). |
|
Definition at line 997 of file autoprojectpart.cpp. References buildDirectory(), and startMakeCommand(). |
|
|
Definition at line 629 of file autoprojectpart.cpp. References currentBuildConfig(), projectDirectory(), and KDevPlugin::projectDom(). Referenced by buildDirectory(), configureCommand(), and makefileCvsCommand(). |
Member Data Documentation
|
Definition at line 128 of file autoprojectpart.h. Referenced by ~AutoProjectPart(). |
|
Definition at line 114 of file autoprojectpart.h. Referenced by slotBuildConfigAboutToShow(). |
|
Definition at line 123 of file autoprojectpart.h. Referenced by buildTarget(), slotCommandFinished(), and startMakeCommand(). |
|
Definition at line 122 of file autoprojectpart.h. Referenced by slotCommandFinished(), and slotExecute(). |
|
Definition at line 126 of file autoprojectpart.h. Referenced by isKDE(). |
|
Definition at line 125 of file autoprojectpart.h. Referenced by isDirty(), slotCommandFailed(), and slotCommandFinished(). |
|
Definition at line 124 of file autoprojectpart.h. Referenced by needMakefileCvs(), and slotBuild(). |
|
Definition at line 112 of file autoprojectpart.h. Referenced by openProject(), and projectName(). |
|
Definition at line 113 of file autoprojectpart.h. Referenced by openProject(), and projectDirectory(). |
|
Definition at line 121 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