2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
|
2008-12-02 14:09:21 +01:00
|
|
|
|
2016-01-27 10:14:00 +01:00
|
|
|
#pragma once
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2019-03-06 14:17:17 +02:00
|
|
|
#include "cmakeconfigitem.h"
|
|
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
#include <projectexplorer/projectnodes.h>
|
|
|
|
|
|
|
|
|
|
namespace CMakeProjectManager {
|
|
|
|
|
namespace Internal {
|
|
|
|
|
|
2016-11-07 18:20:47 +01:00
|
|
|
class CMakeInputsNode : public ProjectExplorer::ProjectNode
|
|
|
|
|
{
|
|
|
|
|
public:
|
2019-05-28 13:49:26 +02:00
|
|
|
CMakeInputsNode(const Utils::FilePath &cmakeLists);
|
2016-11-07 18:20:47 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class CMakeListsNode : public ProjectExplorer::ProjectNode
|
|
|
|
|
{
|
|
|
|
|
public:
|
2019-05-28 13:49:26 +02:00
|
|
|
CMakeListsNode(const Utils::FilePath &cmakeListPath);
|
2016-11-07 18:20:47 +01:00
|
|
|
|
|
|
|
|
bool showInSimpleTree() const final;
|
2019-05-28 13:49:26 +02:00
|
|
|
Utils::optional<Utils::FilePath> visibleAfterAddFileAction() const override;
|
2016-11-07 18:20:47 +01:00
|
|
|
};
|
|
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
class CMakeProjectNode : public ProjectExplorer::ProjectNode
|
|
|
|
|
{
|
|
|
|
|
public:
|
2019-05-28 13:49:26 +02:00
|
|
|
CMakeProjectNode(const Utils::FilePath &directory);
|
2016-11-07 18:20:47 +01:00
|
|
|
|
|
|
|
|
QString tooltip() const final;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class CMakeTargetNode : public ProjectExplorer::ProjectNode
|
|
|
|
|
{
|
|
|
|
|
public:
|
2019-05-28 13:49:26 +02:00
|
|
|
CMakeTargetNode(const Utils::FilePath &directory, const QString &target);
|
2017-08-02 15:10:42 +02:00
|
|
|
|
2019-05-28 13:49:26 +02:00
|
|
|
void setTargetInformation(const QList<Utils::FilePath> &artifacts, const QString &type);
|
2016-11-07 18:20:47 +01:00
|
|
|
|
|
|
|
|
QString tooltip() const final;
|
2018-12-18 10:10:53 +01:00
|
|
|
QString buildKey() const final;
|
2019-05-26 23:48:40 +03:00
|
|
|
Utils::FilePath buildDirectory() const;
|
|
|
|
|
void setBuildDirectory(const Utils::FilePath &directory);
|
2016-11-07 18:20:47 +01:00
|
|
|
|
2019-05-28 13:49:26 +02:00
|
|
|
Utils::optional<Utils::FilePath> visibleAfterAddFileAction() const override;
|
2018-02-13 18:14:03 +01:00
|
|
|
|
2019-06-03 17:36:02 +02:00
|
|
|
void build() override;
|
|
|
|
|
|
2020-06-26 13:59:38 +02:00
|
|
|
QVariant data(Utils::Id role) const override;
|
2019-03-06 14:17:17 +02:00
|
|
|
void setConfig(const CMakeConfig &config);
|
|
|
|
|
|
2016-11-07 18:20:47 +01:00
|
|
|
private:
|
|
|
|
|
QString m_tooltip;
|
2019-05-26 23:48:40 +03:00
|
|
|
Utils::FilePath m_buildDirectory;
|
2021-01-29 17:01:10 +01:00
|
|
|
Utils::FilePath m_artifact;
|
2019-03-06 14:17:17 +02:00
|
|
|
CMakeConfig m_config;
|
2008-12-02 12:01:29 +01:00
|
|
|
};
|
2008-12-02 14:09:21 +01:00
|
|
|
|
|
|
|
|
} // namespace Internal
|
|
|
|
|
} // namespace CMakeProjectManager
|