summaryrefslogtreecommitdiffstats
path: root/buildtools/autotools/autoprojectpart.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit114a878c64ce6f8223cfd22d76a20eb16d177e5e (patch)
treeacaf47eb0fa12142d3896416a69e74cbf5a72242 /buildtools/autotools/autoprojectpart.h
downloadtdevelop-114a878c64ce6f8223cfd22d76a20eb16d177e5e.tar.gz
tdevelop-114a878c64ce6f8223cfd22d76a20eb16d177e5e.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'buildtools/autotools/autoprojectpart.h')
-rw-r--r--buildtools/autotools/autoprojectpart.h153
1 files changed, 153 insertions, 0 deletions
diff --git a/buildtools/autotools/autoprojectpart.h b/buildtools/autotools/autoprojectpart.h
new file mode 100644
index 00000000..d0862cc3
--- /dev/null
+++ b/buildtools/autotools/autoprojectpart.h
@@ -0,0 +1,153 @@
+/***************************************************************************
+* Copyright (C) 2001-2002 by Bernd Gehrmann *
+* bernd@kdevelop.org *
+* *
+* Copyright (C) 2002 by Victor R�er *
+* victor_roeder@gmx.de *
+* *
+* This program is free software; you can redistribute it and/or modify *
+* it under the terms of the GNU General Public License as published by *
+* the Free Software Foundation; either version 2 of the License, or *
+* (at your option) any later version. *
+* *
+***************************************************************************/
+
+#ifndef _AUTOPROJECTPART_H_
+#define _AUTOPROJECTPART_H_
+
+#include <qdict.h>
+#include <qguardedptr.h>
+#include <qmap.h>
+#include <qdatetime.h>
+#include <qdir.h>
+#include <kdevgenericfactory.h>
+#include "kdevbuildtool.h"
+
+class QDomElement;
+class QStringList;
+class KDialogBase;
+class AutoProjectWidget;
+class KSelectAction;
+class TargetItem;
+class ConfigWidgetProxy;
+
+class AutoProjectPart : public KDevBuildTool
+{
+ Q_OBJECT
+
+public:
+ AutoProjectPart( QObject *parent, const char *name, const QStringList &args );
+ virtual ~AutoProjectPart();
+
+ /**
+ * Implementation of the KDevProject interface.
+ */
+ virtual QString projectDirectory() const;
+ virtual QString projectName() const;
+ virtual DomUtil::PairList runEnvironmentVars() const;
+ virtual QString runDirectory() const;
+ virtual QString mainProgram() const;
+ virtual QString debugArguments() const;
+ virtual QString runArguments() const;
+ virtual QString environString() const;
+ virtual QString activeDirectory() const;
+ virtual QStringList allFiles() const;
+ virtual void addFile( const QString &fileName );
+ virtual void addFiles ( const QStringList& fileList );
+ virtual void removeFile( const QString &fileName );
+ virtual void removeFiles ( const QStringList& fileList );
+ virtual QString buildDirectory() const;
+ virtual Options options() const;
+
+ /**
+ * Implementation of the KDevPlugin interface.
+ */
+ virtual void restorePartialProjectSession ( const QDomElement* el );
+ virtual void savePartialProjectSession ( QDomElement* el );
+
+ /**
+ * automake specific methods.
+ */
+ QStringList allBuildConfigs() const;
+ QString currentBuildConfig() const;
+ QString topsourceDirectory() const;
+ void startMakeCommand( const QString &dir, const QString &target, bool withKdesu = false );
+ void startSimpleMakeCommand( const QString &dir, const QString &command, 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;
+ QString getAutoConfFile(const QString& dir);
+
+protected:
+ /**
+ * Reimplemented from KDevProject. These methods are only
+ * for use by the application core.
+ */
+ virtual void openProject( const QString &dirName, const QString &projectName );
+ virtual void closeProject();
+
+private slots:
+ // void projectConfigWidget(KDialogBase *dlg);
+ void slotAddTranslation();
+ void slotBuild();
+ void slotBuildActiveTarget();
+ void slotCompileFile();
+ void slotClean();
+ void slotDistClean();
+ void slotInstall();
+ void slotInstallWithKdesu();
+ void slotMakefilecvs();
+ void slotMakeMessages();
+ void slotConfigure();
+ void slotExecute();
+ void slotExecute2();
+ 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 slotImportExisting();
+ void insertConfigWidget( const KDialogBase* dlg, QWidget * page, unsigned int );
+
+
+private:
+ QGuardedPtr<AutoProjectWidget> m_widget;
+ QString m_projectName;
+ QString m_projectPath;
+ KSelectAction *buildConfigAction;
+
+ QString makeEnvironment() const;
+ void setWantautotools();
+ QString makefileCvsCommand() const;
+ QString configureCommand() const;
+
+ 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;
+ QString m_runProg;
+
+ ConfigWidgetProxy * _configProxy;
+
+ // Enble AutoProjectWidget to emit our signals
+ friend class AutoProjectWidget;
+ friend class AddSubprojectDialog;
+ friend class FileItem;
+
+ // For make commands queuing
+ QString constructMakeCommandLine( const QString &dir, const QString &target ) const;
+ bool queueInternalLibDependenciesBuild( TargetItem* titem, QStringList& list );
+};
+
+typedef KDevGenericFactory<AutoProjectPart> AutoProjectFactory;
+
+#endif
+// kate: indent-mode csands; tab-width 4;