OSDN Git Service

Update license.
[qt-creator-jp/qt-creator-jp.git] / src / plugins / genericprojectmanager / genericbuildconfiguration.h
1 /**************************************************************************
2 **
3 ** This file is part of Qt Creator
4 **
5 ** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
6 **
7 ** Contact: Nokia Corporation (info@qt.nokia.com)
8 **
9 **
10 ** GNU Lesser General Public License Usage
11 **
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.
18 **
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.
22 **
23 ** Other Usage
24 **
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.
27 **
28 ** If you have questions regarding the use of this file, please contact
29 ** Nokia at qt-info@nokia.com.
30 **
31 **************************************************************************/
32
33 #ifndef GENERICBUILDCONFIGURATION_H
34 #define GENERICBUILDCONFIGURATION_H
35
36 #include <projectexplorer/buildconfiguration.h>
37
38 namespace GenericProjectManager {
39 namespace Internal {
40
41 class GenericTarget;
42 class GenericBuildConfigurationFactory;
43
44 class GenericBuildConfiguration : public ProjectExplorer::BuildConfiguration
45 {
46     Q_OBJECT
47     friend class GenericBuildConfigurationFactory;
48
49 public:
50     explicit GenericBuildConfiguration(GenericTarget *parent);
51     virtual ~GenericBuildConfiguration();
52
53     GenericTarget *genericTarget() const;
54
55     virtual QString buildDirectory() const;
56
57     QString rawBuildDirectory() const;
58     void setBuildDirectory(const QString &buildDirectory);
59
60     QVariantMap toMap() const;
61
62     ProjectExplorer::IOutputParser *createOutputParser() const;
63
64     BuildType buildType() const;
65
66 protected:
67     GenericBuildConfiguration(GenericTarget *parent, GenericBuildConfiguration *source);
68     GenericBuildConfiguration(GenericTarget *parent, const QString &id);
69     virtual bool fromMap(const QVariantMap &map);
70
71 private:
72     QString m_buildDirectory;
73 };
74
75 class GenericBuildConfigurationFactory : public ProjectExplorer::IBuildConfigurationFactory
76 {
77     Q_OBJECT
78
79 public:
80     explicit GenericBuildConfigurationFactory(QObject *parent = 0);
81     virtual ~GenericBuildConfigurationFactory();
82
83     QStringList availableCreationIds(ProjectExplorer::Target *parent) const;
84     QString displayNameForId(const QString &id) const;
85
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);
92 };
93
94 } // namespace GenericProjectManager
95 } // namespace Internal
96 #endif // GENERICBUILDCONFIGURATION_H