blob: ad0af9db4b35c120d0ee4d429033403dc881f66a (
plain)
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
|
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#pragma once
#include "cmakeconfigitem.h"
#include <projectexplorer/projectnodes.h>
namespace CMakeProjectManager::Internal {
class CMakeInputsNode : public ProjectExplorer::ProjectNode
{
public:
CMakeInputsNode(const Utils::FilePath &cmakeLists);
};
class CMakePresetsNode : public ProjectExplorer::ProjectNode
{
public:
CMakePresetsNode(const Utils::FilePath &projectPath);
};
class CMakeListsNode : public ProjectExplorer::ProjectNode
{
bool m_hasSubprojectBuildSupport{false};
public:
CMakeListsNode(const Utils::FilePath &cmakeListPath);
bool showInSimpleTree() const final;
std::optional<Utils::FilePath> visibleAfterAddFileAction() const override;
bool canAddSubProject(const Utils::FilePath &subProjectFilePath) const override;
bool addSubProject(const Utils::FilePath &subProjectFilePath) override;
QStringList subProjectFileNamePatterns() const override;
bool hasSubprojectBuildSupport() const;
void setHasSubprojectBuildSupport(bool hasSubprojectBuildSupport);
};
class CMakeProjectNode : public ProjectExplorer::ProjectNode
{
public:
CMakeProjectNode(const Utils::FilePath &directory);
bool canAddSubProject(const Utils::FilePath &subProjectFilePath) const override;
bool addSubProject(const Utils::FilePath &subProjectFilePath) override;
QStringList subProjectFileNamePatterns() const override;
QString tooltip() const final;
};
class CMakeTargetNode : public ProjectExplorer::ProjectNode
{
public:
CMakeTargetNode(const Utils::FilePath &directory, const QString &target);
void setTargetInformation(const QList<Utils::FilePath> &artifacts, const QString &type);
QString tooltip() const final;
QString buildKey() const final;
Utils::FilePath buildDirectory() const;
void setBuildDirectory(const Utils::FilePath &directory);
std::optional<Utils::FilePath> visibleAfterAddFileAction() const override;
void build() override;
QVariant data(Utils::Id role) const override;
void setConfig(const CMakeConfig &config);
void setVisibleAfterAddFileAction(bool visibleAfterAddFileAction);
using ProjectExplorer::Node::setFilePath;
private:
QString m_tooltip;
Utils::FilePath m_buildDirectory;
Utils::FilePath m_artifact;
CMakeConfig m_config;
bool m_visibleAfterAddFileAction = true;
};
} // CMakeProjectManager::Internal
|