1 /**************************************************************************
3 ** This file is part of Qt Creator
5 ** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
7 ** Contact: Nokia Corporation (info@qt.nokia.com)
10 ** GNU Lesser General Public License Usage
12 ** This file may be used under the terms of the GNU Lesser General Public
13 ** License version 2.1 as published by the Free Software Foundation and
14 ** appearing in the file LICENSE.LGPL included in the packaging of this file.
15 ** Please review the following information to ensure the GNU Lesser General
16 ** Public License version 2.1 requirements will be met:
17 ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
19 ** In addition, as a special exception, Nokia gives you certain additional
20 ** rights. These rights are described in the Nokia Qt LGPL Exception
21 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
25 ** Alternatively, this file may be used in accordance with the terms and
26 ** conditions contained in a signed written agreement between you and Nokia.
28 ** If you have questions regarding the use of this file, please contact
29 ** Nokia at qt-info@nokia.com.
31 **************************************************************************/
33 #ifndef GENERICBUILDCONFIGURATION_H
34 #define GENERICBUILDCONFIGURATION_H
36 #include <projectexplorer/buildconfiguration.h>
38 namespace GenericProjectManager {
42 class GenericBuildConfigurationFactory;
44 class GenericBuildConfiguration : public ProjectExplorer::BuildConfiguration
47 friend class GenericBuildConfigurationFactory;
50 explicit GenericBuildConfiguration(GenericTarget *parent);
51 virtual ~GenericBuildConfiguration();
53 GenericTarget *genericTarget() const;
55 virtual QString buildDirectory() const;
57 QString rawBuildDirectory() const;
58 void setBuildDirectory(const QString &buildDirectory);
60 QVariantMap toMap() const;
62 ProjectExplorer::IOutputParser *createOutputParser() const;
64 BuildType buildType() const;
67 GenericBuildConfiguration(GenericTarget *parent, GenericBuildConfiguration *source);
68 GenericBuildConfiguration(GenericTarget *parent, const QString &id);
69 virtual bool fromMap(const QVariantMap &map);
72 QString m_buildDirectory;
75 class GenericBuildConfigurationFactory : public ProjectExplorer::IBuildConfigurationFactory
80 explicit GenericBuildConfigurationFactory(QObject *parent = 0);
81 virtual ~GenericBuildConfigurationFactory();
83 QStringList availableCreationIds(ProjectExplorer::Target *parent) const;
84 QString displayNameForId(const QString &id) const;
86 bool canCreate(ProjectExplorer::Target *parent, const QString &id) const;
87 ProjectExplorer::BuildConfiguration *create(ProjectExplorer::Target *parent, const QString &id);
88 bool canClone(ProjectExplorer::Target *parent, ProjectExplorer::BuildConfiguration *source) const;
89 ProjectExplorer::BuildConfiguration *clone(ProjectExplorer::Target *parent, ProjectExplorer::BuildConfiguration *source);
90 bool canRestore(ProjectExplorer::Target *parent, const QVariantMap &map) const;
91 ProjectExplorer::BuildConfiguration *restore(ProjectExplorer::Target *parent, const QVariantMap &map);
94 } // namespace GenericProjectManager
95 } // namespace Internal
96 #endif // GENERICBUILDCONFIGURATION_H