2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2016 The Qt Company Ltd.
|
2022-12-21 10:12:09 +01:00
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
2009-05-04 12:19:22 +02:00
|
|
|
|
2016-03-18 07:55:01 +01:00
|
|
|
#pragma once
|
2009-05-04 12:19:22 +02:00
|
|
|
|
2022-05-06 14:27:58 +03:00
|
|
|
#include <coreplugin/editormanager/editormanager.h>
|
2009-05-04 12:19:22 +02:00
|
|
|
#include <extensionsystem/iplugin.h>
|
2021-09-21 12:31:19 +02:00
|
|
|
#include <utils/filepath.h>
|
2009-05-04 12:19:22 +02:00
|
|
|
|
|
|
|
|
namespace QmlProjectManager {
|
2018-02-15 14:51:31 +01:00
|
|
|
namespace Internal {
|
2011-07-21 10:40:56 +02:00
|
|
|
|
2020-01-29 04:15:25 +03:00
|
|
|
class QmlProjectPlugin final : public ExtensionSystem::IPlugin
|
2009-05-04 12:19:22 +02:00
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
2012-02-21 16:52:28 +01:00
|
|
|
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "QmlProjectManager.json")
|
2009-05-04 12:19:22 +02:00
|
|
|
|
|
|
|
|
public:
|
2018-02-15 14:51:31 +01:00
|
|
|
QmlProjectPlugin() = default;
|
|
|
|
|
~QmlProjectPlugin() final;
|
2009-05-04 12:19:22 +02:00
|
|
|
|
2021-09-21 12:31:19 +02:00
|
|
|
static void openQDS(const Utils::FilePath &fileName);
|
2021-11-17 10:03:50 +01:00
|
|
|
static Utils::FilePath qdsInstallationEntry();
|
2021-09-21 12:31:19 +02:00
|
|
|
static bool qdsInstallationExists();
|
2022-05-06 14:27:58 +03:00
|
|
|
static bool checkIfEditorIsuiQml(Core::IEditor *editor);
|
|
|
|
|
static Utils::FilePath projectFilePath();
|
|
|
|
|
static Utils::FilePaths rootCmakeFiles();
|
|
|
|
|
static QString qtVersion(const Utils::FilePath &projectFilePath);
|
|
|
|
|
static QString qdsVersion(const Utils::FilePath &projectFilePath);
|
2022-06-20 23:51:16 +02:00
|
|
|
static void openInQDSWithProject(const Utils::FilePath &filePath);
|
|
|
|
|
static const QString readFileContents(const Utils::FilePath &filePath);
|
2022-05-06 14:27:58 +03:00
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
|
void editorModeChanged(Utils::Id newMode, Utils::Id oldMode);
|
|
|
|
|
void openQtc(bool permanent = false);
|
|
|
|
|
void openQds(bool permanent = false);
|
2021-09-21 12:31:19 +02:00
|
|
|
|
2018-02-15 14:51:31 +01:00
|
|
|
private:
|
2023-01-20 12:28:36 +01:00
|
|
|
void initialize() final;
|
2022-05-06 14:27:58 +03:00
|
|
|
void displayQmlLandingPage();
|
|
|
|
|
void hideQmlLandingPage();
|
2022-05-25 14:15:17 +03:00
|
|
|
void updateQmlLandingPageProjectInfo(const Utils::FilePath &projectFile);
|
2018-04-06 14:13:07 +02:00
|
|
|
|
2019-03-13 12:22:44 +01:00
|
|
|
class QmlProjectPluginPrivate *d = nullptr;
|
2009-05-04 12:19:22 +02:00
|
|
|
};
|
|
|
|
|
|
2018-02-15 14:51:31 +01:00
|
|
|
} // namespace Internal
|
2009-05-04 12:19:22 +02:00
|
|
|
} // namespace QmlProject
|