2019-10-22 14:33:31 +02:00
|
|
|
/****************************************************************************
|
|
|
|
|
**
|
2022-02-11 13:51:42 +01:00
|
|
|
** Copyright (C) 2022 The Qt Company Ltd.
|
2020-07-02 16:04:31 +02:00
|
|
|
** Contact: https://www.qt.io/licensing/
|
2019-10-22 14:33:31 +02:00
|
|
|
**
|
|
|
|
|
** This file is part of Qt Creator.
|
|
|
|
|
**
|
|
|
|
|
** Commercial License Usage
|
|
|
|
|
** Licensees holding valid commercial Qt licenses may use this file in
|
|
|
|
|
** accordance with the commercial license agreement provided with the
|
|
|
|
|
** Software or, alternatively, in accordance with the terms contained in
|
|
|
|
|
** a written agreement between you and The Qt Company. For licensing terms
|
|
|
|
|
** and conditions see https://www.qt.io/terms-conditions. For further
|
|
|
|
|
** information use the contact form at https://www.qt.io/contact-us.
|
|
|
|
|
**
|
|
|
|
|
** GNU General Public License Usage
|
|
|
|
|
** Alternatively, this file may be used under the terms of the GNU
|
|
|
|
|
** General Public License version 3 as published by the Free Software
|
|
|
|
|
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
|
|
|
|
** included in the packaging of this file. Please review the following
|
|
|
|
|
** information to ensure the GNU General Public License requirements will
|
|
|
|
|
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
|
|
|
|
**
|
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2022-02-11 13:51:42 +01:00
|
|
|
#include <utils/environmentfwd.h>
|
2022-02-14 18:01:04 +01:00
|
|
|
#include "mcusupport_global.h"
|
2022-02-16 16:48:28 +01:00
|
|
|
#include "mcukitmanager.h"
|
2022-02-14 18:01:04 +01:00
|
|
|
|
2019-10-22 14:33:31 +02:00
|
|
|
#include <QObject>
|
2019-10-23 06:44:21 +02:00
|
|
|
#include <QVector>
|
2020-03-25 15:09:02 +01:00
|
|
|
#include <QVersionNumber>
|
2019-10-22 14:33:31 +02:00
|
|
|
|
|
|
|
|
QT_FORWARD_DECLARE_CLASS(QWidget)
|
|
|
|
|
|
|
|
|
|
namespace Utils {
|
2020-03-18 03:17:35 +01:00
|
|
|
class FilePath;
|
2019-10-22 14:33:31 +02:00
|
|
|
class PathChooser;
|
2019-12-11 21:17:53 +01:00
|
|
|
class InfoLabel;
|
2022-02-15 11:18:56 +01:00
|
|
|
} // namespace Utils
|
2019-10-22 14:33:31 +02:00
|
|
|
|
|
|
|
|
namespace ProjectExplorer {
|
|
|
|
|
class Kit;
|
2020-02-26 16:41:52 +01:00
|
|
|
class ToolChain;
|
2022-02-11 13:51:42 +01:00
|
|
|
} // namespace ProjectExplorer
|
2019-10-22 14:33:31 +02:00
|
|
|
|
|
|
|
|
namespace McuSupport {
|
|
|
|
|
namespace Internal {
|
|
|
|
|
|
2022-02-11 13:51:42 +01:00
|
|
|
class McuAbstractPackage;
|
2022-02-01 14:30:35 +01:00
|
|
|
class McuToolChainPackage;
|
2022-02-16 16:48:28 +01:00
|
|
|
class McuTarget;
|
2019-10-22 14:33:31 +02:00
|
|
|
|
2021-10-27 06:55:29 +02:00
|
|
|
class McuSdkRepository
|
2021-09-29 17:23:11 +02:00
|
|
|
{
|
2021-10-27 06:55:29 +02:00
|
|
|
public:
|
2022-02-11 13:51:42 +01:00
|
|
|
QVector<McuAbstractPackage *> packages;
|
|
|
|
|
QVector<McuTarget *> mcuTargets;
|
2021-09-29 17:23:11 +02:00
|
|
|
|
|
|
|
|
void deletePackagesAndTargets();
|
|
|
|
|
};
|
|
|
|
|
|
2019-10-22 14:33:31 +02:00
|
|
|
class McuSupportOptions : public QObject
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
2022-02-11 13:51:42 +01:00
|
|
|
explicit McuSupportOptions(QObject *parent = nullptr);
|
2019-10-22 14:33:31 +02:00
|
|
|
~McuSupportOptions() override;
|
|
|
|
|
|
2022-02-11 13:51:42 +01:00
|
|
|
McuAbstractPackage *qtForMCUsSdkPackage = nullptr;
|
2021-09-29 17:23:11 +02:00
|
|
|
McuSdkRepository sdkRepository;
|
2019-10-22 14:33:31 +02:00
|
|
|
|
2020-03-18 03:17:35 +01:00
|
|
|
void setQulDir(const Utils::FilePath &dir);
|
2020-03-24 18:58:29 +01:00
|
|
|
static Utils::FilePath qulDirFromSettings();
|
2022-02-16 16:48:28 +01:00
|
|
|
static McuKitManager::UpgradeOption askForKitUpgrades();
|
2020-03-18 03:17:35 +01:00
|
|
|
|
2022-02-14 18:01:04 +01:00
|
|
|
static void registerQchFiles();
|
|
|
|
|
static void registerExamples();
|
|
|
|
|
|
|
|
|
|
static const QVersionNumber &minimalQulVersion();
|
|
|
|
|
|
|
|
|
|
void checkUpgradeableKits();
|
|
|
|
|
void populatePackagesAndTargets();
|
2022-02-16 16:48:28 +01:00
|
|
|
|
|
|
|
|
static bool kitsNeedQtVersion();
|
2022-02-21 13:41:57 +01:00
|
|
|
|
|
|
|
|
bool automaticKitCreationEnabled() const;
|
|
|
|
|
void setAutomaticKitCreationEnabled(const bool enabled);
|
|
|
|
|
void writeGeneralSettings() const;
|
|
|
|
|
static bool automaticKitCreationFromSettings();
|
2022-02-14 18:01:04 +01:00
|
|
|
private:
|
|
|
|
|
void deletePackagesAndTargets();
|
|
|
|
|
|
2022-02-21 13:41:57 +01:00
|
|
|
bool m_automaticKitCreation = true;
|
2022-02-14 18:01:04 +01:00
|
|
|
signals:
|
|
|
|
|
void packagesChanged();
|
|
|
|
|
};
|
|
|
|
|
|
2019-10-22 14:33:31 +02:00
|
|
|
|
|
|
|
|
} // namespace Internal
|
|
|
|
|
} // namespace McuSupport
|