1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
|
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: http://www.qt-project.org/
**
**
** GNU Lesser General Public License Usage
**
** 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.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** Other Usage
**
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
**
**************************************************************************/
#ifndef QTSUPPORT_QTPROFILEINFORMATION_H
#define QTSUPPORT_QTPROFILEINFORMATION_H
#include "qtsupport_global.h"
#include <projectexplorer/profileinformation.h>
#include "baseqtversion.h"
namespace QtSupport {
class QTSUPPORT_EXPORT QtProfileInformation : public ProjectExplorer::ProfileInformation
{
Q_OBJECT
public:
QtProfileInformation();
Core::Id dataId() const;
unsigned int priority() const; // the higher the closer to the top.
QVariant defaultValue(ProjectExplorer::Profile *p) const;
QList<ProjectExplorer::Task> validate(ProjectExplorer::Profile *p) const;
ProjectExplorer::ProfileConfigWidget *createConfigWidget(ProjectExplorer::Profile *p) const;
ItemList toUserOutput(ProjectExplorer::Profile *p) const;
void addToEnvironment(const ProjectExplorer::Profile *p, Utils::Environment &env) const;
static int qtVersionId(const ProjectExplorer::Profile *p);
static void setQtVersionId(ProjectExplorer::Profile *p, const int id);
static BaseQtVersion *qtVersion(const ProjectExplorer::Profile *p);
static void setQtVersion(ProjectExplorer::Profile *p, const BaseQtVersion *v);
};
class QTSUPPORT_EXPORT QtTypeProfileMatcher : public ProjectExplorer::ProfileMatcher
{
public:
QtTypeProfileMatcher(const QString &type);
bool matches(const ProjectExplorer::Profile *p) const;
private:
QString m_type;
};
class QTSUPPORT_EXPORT QtPlatformProfileMatcher : public ProjectExplorer::ProfileMatcher
{
public:
QtPlatformProfileMatcher(const QString &platform);
bool matches(const ProjectExplorer::Profile *p) const;
private:
QString m_platform;
};
class QTSUPPORT_EXPORT QtVersionProfileMatcher : public ProjectExplorer::ProfileMatcher
{
public:
explicit QtVersionProfileMatcher(const Core::FeatureSet &required = Core::FeatureSet(),
const QtVersionNumber &min = QtVersionNumber(0, 0, 0),
const QtVersionNumber &max = QtVersionNumber(INT_MAX, INT_MAX, INT_MAX)) :
m_min(min), m_max(max), m_features(required)
{ }
bool matches(const ProjectExplorer::Profile *p) const;
private:
QtVersionNumber m_min;
QtVersionNumber m_max;
Core::FeatureSet m_features;
};
} // namespace QtSupport
#endif // QTSUPPORT_QTPROFILEINFORMATION_H
|