2009-03-10 14:20:07 +01:00
|
|
|
/**************************************************************************
|
|
|
|
|
**
|
|
|
|
|
** This file is part of Qt Creator
|
|
|
|
|
**
|
|
|
|
|
** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
|
|
|
**
|
2009-06-17 00:01:27 +10:00
|
|
|
** Contact: Nokia Corporation (qt-info@nokia.com)
|
2009-03-10 14:20:07 +01:00
|
|
|
**
|
|
|
|
|
** Commercial Usage
|
|
|
|
|
**
|
|
|
|
|
** Licensees holding valid Qt Commercial licenses may use this file in
|
|
|
|
|
** accordance with the Qt Commercial License Agreement provided with the
|
|
|
|
|
** Software or, alternatively, in accordance with the terms contained in
|
|
|
|
|
** a written agreement between you and Nokia.
|
|
|
|
|
**
|
|
|
|
|
** GNU Lesser General Public License Usage
|
|
|
|
|
**
|
|
|
|
|
** Alternatively, this file may be used under the terms of the GNU Lesser
|
|
|
|
|
** General Public License version 2.1 as published by the Free Software
|
|
|
|
|
** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
|
|
|
** packaging of this file. Please review the following information to
|
|
|
|
|
** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
|
|
|
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
|
|
|
**
|
|
|
|
|
** If you are unsure which license is appropriate for your use, please
|
2009-08-14 09:30:56 +02:00
|
|
|
** contact the sales department at http://qt.nokia.com/contact.
|
2009-03-10 14:20:07 +01:00
|
|
|
**
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
|
2009-03-18 15:58:36 +01:00
|
|
|
#ifndef GENERICMAKESTEP_H
|
|
|
|
|
#define GENERICMAKESTEP_H
|
2009-03-10 14:20:07 +01:00
|
|
|
|
2009-05-05 14:56:59 +02:00
|
|
|
#include <projectexplorer/abstractmakestep.h>
|
2009-03-10 14:20:07 +01:00
|
|
|
|
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
|
|
|
class QListWidgetItem;
|
|
|
|
|
|
2009-03-18 15:58:36 +01:00
|
|
|
namespace Ui {
|
|
|
|
|
class GenericMakeStep;
|
|
|
|
|
}
|
2009-03-19 11:35:25 +01:00
|
|
|
QT_END_NAMESPACE
|
2009-03-18 15:58:36 +01:00
|
|
|
|
2009-03-10 14:20:07 +01:00
|
|
|
namespace GenericProjectManager {
|
|
|
|
|
namespace Internal {
|
|
|
|
|
|
|
|
|
|
class GenericProject;
|
2009-10-15 19:06:51 +02:00
|
|
|
class GenericMakeStepConfigWidget;
|
|
|
|
|
|
|
|
|
|
struct GenericMakeStepSettings
|
|
|
|
|
{
|
2009-10-27 14:16:28 +01:00
|
|
|
|
2009-10-15 19:06:51 +02:00
|
|
|
};
|
2009-03-10 14:20:07 +01:00
|
|
|
|
2009-05-05 14:56:59 +02:00
|
|
|
class GenericMakeStep : public ProjectExplorer::AbstractMakeStep
|
2009-03-10 14:20:07 +01:00
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
2009-10-15 19:06:51 +02:00
|
|
|
friend class GenericMakeStepConfigWidget; // TODO remove again?
|
2009-03-10 14:20:07 +01:00
|
|
|
public:
|
2009-10-27 14:16:28 +01:00
|
|
|
GenericMakeStep(GenericProject *pro, ProjectExplorer::BuildConfiguration *bc);
|
|
|
|
|
GenericMakeStep(GenericMakeStep *bs, ProjectExplorer::BuildConfiguration *bc);
|
2009-03-18 13:33:00 +01:00
|
|
|
~GenericMakeStep();
|
2009-10-27 14:16:28 +01:00
|
|
|
virtual bool init();
|
2009-03-10 14:20:07 +01:00
|
|
|
|
|
|
|
|
virtual void run(QFutureInterface<bool> &fi);
|
|
|
|
|
|
|
|
|
|
virtual QString name();
|
|
|
|
|
virtual QString displayName();
|
|
|
|
|
virtual ProjectExplorer::BuildStepConfigWidget *createConfigWidget();
|
|
|
|
|
virtual bool immutable() const;
|
|
|
|
|
GenericProject *project() const;
|
2009-10-27 14:16:28 +01:00
|
|
|
bool buildsTarget(const QString &target) const;
|
|
|
|
|
void setBuildTarget(const QString &target, bool on);
|
|
|
|
|
QStringList replacedArguments() const;
|
|
|
|
|
QString makeCommand() const;
|
2009-10-15 19:06:51 +02:00
|
|
|
|
2009-10-27 14:16:28 +01:00
|
|
|
virtual void restoreFromLocalMap(const QMap<QString, QVariant> &map);
|
|
|
|
|
virtual void storeIntoLocalMap(QMap<QString, QVariant> &map);
|
2009-03-10 14:20:07 +01:00
|
|
|
private:
|
|
|
|
|
GenericProject *m_pro;
|
2009-10-27 14:16:28 +01:00
|
|
|
QStringList m_buildTargets;
|
|
|
|
|
QStringList m_makeArguments;
|
|
|
|
|
QString m_makeCommand;
|
2009-03-10 14:20:07 +01:00
|
|
|
};
|
|
|
|
|
|
2009-03-18 13:33:00 +01:00
|
|
|
class GenericMakeStepConfigWidget :public ProjectExplorer::BuildStepConfigWidget
|
2009-03-10 14:20:07 +01:00
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
public:
|
2009-03-18 13:33:00 +01:00
|
|
|
GenericMakeStepConfigWidget(GenericMakeStep *makeStep);
|
2009-03-10 14:20:07 +01:00
|
|
|
virtual QString displayName() const;
|
2009-10-27 14:16:28 +01:00
|
|
|
virtual void init();
|
2009-08-06 15:31:32 +02:00
|
|
|
virtual QString summaryText() const;
|
2009-03-10 14:20:07 +01:00
|
|
|
private slots:
|
|
|
|
|
void itemChanged(QListWidgetItem*);
|
2009-03-18 15:58:36 +01:00
|
|
|
void makeLineEditTextEdited();
|
|
|
|
|
void makeArgumentsLineEditTextEdited();
|
2009-08-12 17:02:28 +02:00
|
|
|
void updateMakeOverrrideLabel();
|
2009-08-06 18:31:46 +02:00
|
|
|
void updateDetails();
|
2009-08-17 18:19:16 +02:00
|
|
|
private:
|
2009-03-18 15:58:36 +01:00
|
|
|
Ui::GenericMakeStep *m_ui;
|
2009-03-18 13:33:00 +01:00
|
|
|
GenericMakeStep *m_makeStep;
|
2009-08-06 18:31:46 +02:00
|
|
|
QString m_summaryText;
|
2009-03-10 14:20:07 +01:00
|
|
|
};
|
|
|
|
|
|
2009-03-18 13:33:00 +01:00
|
|
|
class GenericMakeStepFactory : public ProjectExplorer::IBuildStepFactory
|
2009-03-10 14:20:07 +01:00
|
|
|
{
|
|
|
|
|
virtual bool canCreate(const QString &name) const;
|
2009-10-27 14:16:28 +01:00
|
|
|
virtual ProjectExplorer::BuildStep *create(ProjectExplorer::Project *pro,
|
|
|
|
|
ProjectExplorer::BuildConfiguration *bc,
|
|
|
|
|
const QString &name) const;
|
|
|
|
|
virtual ProjectExplorer::BuildStep *clone(ProjectExplorer::BuildStep *bs,
|
|
|
|
|
ProjectExplorer::BuildConfiguration *bc) const;
|
2009-03-10 14:20:07 +01:00
|
|
|
virtual QStringList canCreateForProject(ProjectExplorer::Project *pro) const;
|
|
|
|
|
virtual QString displayNameForName(const QString &name) const;
|
|
|
|
|
};
|
|
|
|
|
|
2009-03-18 12:18:59 +01:00
|
|
|
} // namespace Internal
|
|
|
|
|
} // namespace GenericProjectManager
|
2009-03-10 14:20:07 +01:00
|
|
|
|
2009-03-18 15:58:36 +01:00
|
|
|
#endif // GENERICMAKESTEP_H
|