TrollProjectPart Class Reference
A projectmanager for qmake based projects. More...
#include <trollprojectpart.h>
Inheritance diagram for TrollProjectPart:

Public Member Functions | |
TrollProjectPart (QObject *parent, const char *name, const QStringList &args) | |
~TrollProjectPart () | |
bool | isTMakeProject () const |
bool | isDirty () |
virtual Options | options () |
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 & | getQMakeHeader () |
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 | slotCommandFinished (const QString &command) |
Private Member Functions | |
void | startQMakeCommand (const QString &dir) |
void | execute (const QString &directory, const QString &command) |
void | queueCmd (const QString &dir, const QString &cmd) |
QString | makeEnvironment () |
bool | isValidQtDir (const QString &path) const |
QStringList | availableQtDirList () const |
Private Attributes | |
QGuardedPtr< TrollProjectWidget > | m_widget |
QString | m_qmakeHeader |
QString | m_projectName |
bool | m_tmakeProject |
QMap< QString, QDateTime > | m_timestamp |
bool | m_executeAfterBuild |
QString | m_buildCommand |
QString | m_defaultQtDir |
QStringList | m_availableQtDirList |
Detailed Description
A projectmanager for qmake based projects.Loads and maintains .pro files (qmake project files). The trollprojectpart supports subprojects and qmake scopes. Qmake projects can be configured on project, subproject and file level. It will regenerate a projects .pro files dynamically as you add,remove or reconfigure (sub)projects. Unsupported qmake features will be left unchanged (hopefully) no major testing has been run yet.
- Feature(s):
- Loads and maintains .pro files (qmake project files).
Supports subprojects and qmake scopes.
Qmake projects can be configured on project, subproject and file level.
Regenerates a projects .pro files dynamically as you add, remove or reconfigure (sub)projects.
Unsupported qmake features will be left unchanged (hopefully) no major testing has been run yet.
- Requirement(s):
- QMake >= 3.0.3
- Todo:
- Relative directories (priority 1) By default a qmake projects created with kdevelop must be distributable, therefore all directory-selections must be relative the subproject where it is used (user can override this ofcourse). So when a select-directory dialog is opened getRelativeDirectory() (#include pathutil.h) should be called.
Ignore shell-expressions and qmake-functions (priority 2-3) FileBuffer should recognize and ignore shell-expressions and qmake-functions. (Jakob Simon-Gaarde says: I'm on this one)
Definition at line 30 of file trollprojectpart.h.
Constructor & Destructor Documentation
|
|
|
Definition at line 175 of file trollprojectpart.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 358 of file trollprojectpart.cpp. References KDevPlugin::projectDom(). |
|
Adds a file to the project. The given file name must be relative to the project directory. Implements KDevProject. Definition at line 372 of file trollprojectpart.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 380 of file trollprojectpart.cpp. References addFiles(), m_widget, and projectDirectory(). Referenced by addFile(), addFiles(), and TrollProjectWidget::slotDetailsContextMenu(). |
|
Returns a list of all files in the project. The files are relative to the project directory.
Implements KDevProject. Definition at line 366 of file trollprojectpart.cpp. References m_widget. Referenced by isDirty(), and slotCommandFinished(). |
|
Definition at line 549 of file trollprojectpart.cpp. References isValidQtDir(). |
|
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 260 of file trollprojectpart.cpp. References m_widget. Referenced by mainProgram(), projectConfigWidget(), and runDirectory(). |
|
This method is invoked when the project is about to be closed.
Implements KDevProject. Definition at line 248 of file trollprojectpart.cpp. References m_widget. |
|
|
|
Definition at line 55 of file trollprojectpart.h. References m_qmakeHeader. Referenced by TrollProjectWidget::getHeader(). |
|
Definition at line 521 of file trollprojectpart.cpp. References allFiles(), m_timestamp, and projectDirectory(). |
|
Definition at line 38 of file trollprojectpart.h. References m_tmakeProject. Referenced by TrollProjectWidget::parseScope(), TrollProjectWidget::slotDetailsExecuted(), startQMakeCommand(), and TrollProjectWidget::updateProjectFile(). |
|
Definition at line 544 of file trollprojectpart.cpp. References isValidQtDir(). Referenced by availableQtDirList(), and isValidQtDir(). |
|
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 322 of file trollprojectpart.cpp. References buildDirectory(), m_widget, mainProgram(), KDevPlugin::projectDom(), and runDirectory(). Referenced by mainProgram(), and TrollProjectWidget::slotExecuteProject(). |
|
Definition at line 182 of file trollprojectpart.cpp. References m_defaultQtDir, DomUtil::PairList, KDevPlugin::projectDom(), and EnvVarTools::quote(). Referenced by TrollProjectWidget::constructMakeCommandLine(), TrollProjectWidget::startMakeCommand(), and startQMakeCommand(). |
|
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 233 of file trollprojectpart.cpp. References m_projectName, m_widget, openProject(), and KDevPlugin::projectDom(). Referenced by openProject(). |
|
Definition at line 539 of file trollprojectpart.cpp. |
|
Definition at line 219 of file trollprojectpart.cpp. References KDialogBase::addVBoxPage(), buildDirectory(), projectConfigWidget(), and KDevPlugin::projectDom(). Referenced by projectConfigWidget(). |
|
Returns the canonical toplevel directory of the project.
Implements KDevProject. Definition at line 254 of file trollprojectpart.cpp. References m_widget. Referenced by TrollProjectWidget::addFiles(), addFiles(), isDirty(), slotCommandFinished(), and TrollProjectWidget::slotDetailsContextMenu(). |
|
Returns the name of the project.
Implements KDevProject. Definition at line 265 of file trollprojectpart.cpp. References m_projectName. |
|
|
Removes a file from the project. The given file name must be relative to the project directory. Implements KDevProject. Definition at line 393 of file trollprojectpart.cpp. References removeFile(). 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 402 of file trollprojectpart.cpp. References removeFiles(). Referenced by removeFiles(). |
|
Retuns a QString with the run command line arguments.
Implements KDevProject. Definition at line 352 of file trollprojectpart.cpp. References KDevPlugin::projectDom(). |
|
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 287 of file trollprojectpart.cpp. References buildDirectory(), m_widget, and KDevPlugin::projectDom(). Referenced by mainProgram(). |
|
Retuns a PairList with the run environment variables.
Implements KDevProject. Definition at line 272 of file trollprojectpart.cpp. References KDevPlugin::projectDom(). |
|
Definition at line 494 of file trollprojectpart.cpp. References allFiles(), m_buildCommand, m_executeAfterBuild, m_timestamp, m_widget, KDevProject::projectCompiled(), projectDirectory(), and slotCommandFinished(). Referenced by slotCommandFinished(). |
|
Definition at line 468 of file trollprojectpart.cpp. References isTMakeProject(), makeEnvironment(), KDevPlugin::makeFrontend(), KDevMakeFrontend::queueCommand(), and startQMakeCommand(). Referenced by TrollProjectWidget::createMakefileIfMissing(), TrollProjectWidget::slotOverviewContextMenu(), and startQMakeCommand(). |
Member Data Documentation
|
Definition at line 87 of file trollprojectpart.h. |
|
Definition at line 85 of file trollprojectpart.h. Referenced by slotCommandFinished(). |
|
Definition at line 86 of file trollprojectpart.h. Referenced by makeEnvironment(). |
|
Definition at line 84 of file trollprojectpart.h. Referenced by slotCommandFinished(). |
|
Definition at line 80 of file trollprojectpart.h. Referenced by openProject(), and projectName(). |
|
Definition at line 79 of file trollprojectpart.h. Referenced by getQMakeHeader(). |
|
Definition at line 83 of file trollprojectpart.h. Referenced by isDirty(), and slotCommandFinished(). |
|
Definition at line 81 of file trollprojectpart.h. Referenced by isTMakeProject(). |
|
Definition at line 78 of file trollprojectpart.h. Referenced by addFiles(), allFiles(), buildDirectory(), closeProject(), mainProgram(), openProject(), projectDirectory(), runDirectory(), slotCommandFinished(), and ~TrollProjectPart(). |
The documentation for this class was generated from the following files:
- buildtools/qmake/trollprojectpart.h
- buildtools/qmake/trollprojectpart.cpp