~bzoltan/kubuntu-packaging/decouple_cmake_plugin

« back to all changes in this revision

Viewing changes to src/plugins/projectexplorer/buildconfiguration.h

  • Committer: Timo Jyrinki
  • Date: 2013-11-15 12:25:23 UTC
  • mfrom: (1.1.28)
  • Revision ID: timo.jyrinki@canonical.com-20131115122523-i2kyamsu4gs2mu1m
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
#include "projectconfiguration.h"
35
35
 
36
36
#include <utils/environment.h>
 
37
#include <utils/fileutils.h>
37
38
 
38
 
namespace Utils {
39
 
class AbstractMacroExpander;
40
 
}
 
39
namespace Utils { class AbstractMacroExpander; }
41
40
 
42
41
namespace ProjectExplorer {
43
42
 
44
43
class BuildConfiguration;
 
44
class BuildInfo;
45
45
class NamedWidget;
46
46
class BuildStepList;
47
47
class Kit;
56
56
    // ctors are protected
57
57
    virtual ~BuildConfiguration();
58
58
 
59
 
    virtual QString buildDirectory() const = 0;
 
59
    Utils::FileName buildDirectory() const;
 
60
    Utils::FileName rawBuildDirectory() const;
60
61
 
61
62
    virtual ProjectExplorer::NamedWidget *createConfigWidget() = 0;
62
63
    virtual QList<NamedWidget *> createSubConfigWidgets();
99
100
    BuildConfiguration(Target *target, const Core::Id id);
100
101
    BuildConfiguration(Target *target, BuildConfiguration *source);
101
102
 
 
103
    virtual void setBuildDirectory(const Utils::FileName &dir);
102
104
    void cloneSteps(BuildConfiguration *source);
103
105
 
104
106
private slots:
105
107
    void handleKitUpdate();
 
108
    void emitBuildDirectoryChanged();
106
109
 
107
110
private:
108
111
    void emitEnvironmentChanged();
111
114
    QList<Utils::EnvironmentItem> m_userEnvironmentChanges;
112
115
    QList<BuildStepList *> m_stepLists;
113
116
    Utils::AbstractMacroExpander *m_macroExpander;
 
117
    Utils::FileName m_buildDirectory;
 
118
    Utils::FileName m_lastEmmitedBuildDirectory;
114
119
    mutable Utils::Environment m_cachedEnvironment;
115
120
};
116
121
 
123
128
    explicit IBuildConfigurationFactory(QObject *parent = 0);
124
129
    virtual ~IBuildConfigurationFactory();
125
130
 
126
 
    // used to show the list of possible additons to a target, returns a list of types
127
 
    virtual QList<Core::Id> availableCreationIds(const Target *parent) const = 0;
128
 
    // used to translate the types to names to display to the user
129
 
    virtual QString displayNameForId(const Core::Id id) const = 0;
130
 
 
131
 
    virtual bool canCreate(const Target *parent, const Core::Id id) const = 0;
132
 
    virtual BuildConfiguration *create(Target *parent, const Core::Id id, const QString &name = QString()) = 0;
 
131
    // The priority is negative if this factory can not create anything for the target.
 
132
    // It is 0 for the "default" factory that wants to handle the target.
 
133
    // Add 100 for each specialization.
 
134
    virtual int priority(const Target *parent) const = 0;
 
135
    // List of build information that can be used to create a new build configuration via
 
136
    // "Add Build Configuration" button.
 
137
    virtual QList<BuildInfo *> availableBuilds(const Target *parent) const = 0;
 
138
 
 
139
    virtual int priority(const Kit *k, const QString &projectPath) const = 0;
 
140
    // List of build information that can be used to initially set up a new build configuration.
 
141
    virtual QList<BuildInfo *> availableSetups(const Kit *k, const QString &projectPath) const = 0;
 
142
 
 
143
    virtual BuildConfiguration *create(Target *parent, const BuildInfo *info) const = 0;
 
144
 
133
145
    // used to recreate the runConfigurations when restoring settings
134
146
    virtual bool canRestore(const Target *parent, const QVariantMap &map) const = 0;
135
147
    virtual BuildConfiguration *restore(Target *parent, const QVariantMap &map) = 0;
137
149
    virtual BuildConfiguration *clone(Target *parent, BuildConfiguration *product) = 0;
138
150
 
139
151
    static IBuildConfigurationFactory *find(Target *parent, const QVariantMap &map);
 
152
    static IBuildConfigurationFactory *find(Kit *k, const QString &projectPath);
140
153
    static IBuildConfigurationFactory *find(Target *parent);
141
154
    static IBuildConfigurationFactory *find(Target *parent, BuildConfiguration *bc);
142
155