KDevelop API Documentation

buildtools/custommakefiles/customprojectpart.h

Go to the documentation of this file.
00001 /*************************************************************************** 00002 * Copyright (C) 2001-2002 by Bernd Gehrmann * 00003 * bernd@kdevelop.org * 00004 * * 00005 * This program is free software; you can redistribute it and/or modify * 00006 * it under the terms of the GNU General Public License as published by * 00007 * the Free Software Foundation; either version 2 of the License, or * 00008 * (at your option) any later version. * 00009 * * 00010 ***************************************************************************/ 00011 00012 #ifndef _CUSTOMPROJECTPART_H_ 00013 #define _CUSTOMPROJECTPART_H_ 00014 00015 #include <qdict.h> 00016 #include <qguardedptr.h> 00017 #include <qmap.h> 00018 #include <qdatetime.h> 00019 00020 #include <kdevproject.h> 00021 00022 class QListViewItem; 00023 class QPopupMenu; 00024 class QStringList; 00025 class KDialogBase; 00026 class CustomProjectWidget; 00027 class Context; 00028 class KSelectAction; 00029 00030 class CustomProjectPart : public KDevProject 00031 { 00032 Q_OBJECT 00033 00034 public: 00035 CustomProjectPart( QObject *parent, const char *name, const QStringList & ); 00036 ~CustomProjectPart(); 00037 00038 QStringList allMakeEnvironments() const; 00039 QString currentMakeEnvironment() const; 00040 00041 bool isDirty(); 00042 00043 protected: 00044 virtual void openProject(const QString &dirName, const QString &projectName); 00045 virtual void closeProject(); 00046 00047 virtual QString projectDirectory() const; 00048 virtual QString projectName() const; 00049 virtual QString mainProgram(bool relative = false) const; 00050 virtual QString activeDirectory() const; 00051 virtual QStringList allFiles() const; 00052 virtual void addFile(const QString &fileName); 00053 virtual void addFiles ( const QStringList& fileList ); 00054 virtual void removeFile(const QString &fileName); 00055 virtual void removeFiles ( const QStringList &fileList ); 00056 virtual QString buildDirectory() const; 00057 virtual QString runDirectory() const; 00058 virtual QString runArguments() const; 00059 virtual DomUtil::PairList runEnvironmentVars() const; 00060 00061 00062 private slots: 00063 void projectConfigWidget(KDialogBase *dlg); 00064 void contextMenu(QPopupMenu *popup, const Context *context); 00065 void slotAddToProject(); 00066 void slotRemoveFromProject(); 00067 void slotChooseActiveDirectory(); 00068 void slotBuild(); 00069 void slotCompileFile(); 00070 void slotClean(); 00071 void slotExecute(); 00072 void updateTargetMenu(); 00073 void targetMenuActivated(int id); 00074 void updateMakeEnvironmentsMenu(); 00075 void makeEnvironmentsMenuActivated(int id); 00076 void slotCommandFinished( const QString& command ); 00077 void slotCommandFailed( const QString& command ); 00078 00079 private: 00080 void populateProject(); 00081 void startMakeCommand(const QString &dir, const QString &target); 00082 QString makeEnvironment() const; 00083 00084 QString m_projectDirectory; 00085 QString m_projectName; 00086 QStringList m_sourceFiles; 00087 QPopupMenu *m_targetMenu; 00088 KSelectAction *m_makeEnvironmentsSelector; 00089 QStringList m_targets; 00090 QString m_contextFileName; 00091 QString m_contextDirName; 00092 00093 QMap<QString, QDateTime> m_timestamp; 00094 bool m_executeAfterBuild; 00095 QString m_buildCommand; 00096 bool m_lastCompilationFailed; 00097 }; 00098 00099 #endif
KDE Logo
This file is part of the documentation for KDevelop Version 3.0.4.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Oct 19 08:01:36 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003