Add ExtraPropertyEditorManager plugin

Task-number: QDS-14898
Change-Id: Ie6cd7fcd33e792574f7ea7fbae979e3eb4a61b4c
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
This commit is contained in:
Andrzej Biniek
2025-03-26 11:21:29 +01:00
committed by spyro-adb
parent e0cc2a3ebe
commit 581afd3350
7 changed files with 120 additions and 0 deletions

View File

@@ -111,6 +111,7 @@ if (WITH_QMLDESIGNER)
endif()
add_subdirectory(qmldesigner ${qmldesigner_builddir})
add_subdirectory(qmldesignerlite)
add_subdirectory(extrapropertyeditormanager)
add_subdirectory(effectcomposer)
add_subdirectory(studiowelcome)
add_subdirectory(insight)

View File

@@ -0,0 +1,12 @@
add_qtc_plugin(ExtraPropertyEditorManager
CONDITION TARGET QtCreator::QmlDesigner AND NOT QTC_USE_QML_DESIGNER_LITE
PLUGIN_DEPENDS
QtCreator::QmlDesigner
DEPENDS
Qt::Core Qt::CorePrivate QtCreator::Utils
SOURCES
extrapropertyeditormanagerplugin.cpp
extrapropertyeditormanagerplugin.h
extrapropertyeditorview.cpp
extrapropertyeditorview.h
)

View File

@@ -0,0 +1,19 @@
{
"Id" : "extrapropertyeditormanager",
"DisplayName" : "Extra Property Editor Manager",
"Name" : "ExtraPropertyEditorManager",
"Version" : "${IDE_VERSION}",
"CompatVersion" : "${IDE_VERSION_COMPAT}",
"VendorId" : "theqtcompany",
"Vendor" : "The Qt Company Ltd",
"Copyright" : "${IDE_COPYRIGHT}",
"License" : [ "Commercial Usage",
"",
"Licensees holding valid Qt Enterprise licenses may use this plugin in accordance with the Qt Enterprise License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and The Qt Company."
],
"Description" : "Plugin for displaying additional instances of property editor.",
"Url" : "https://www.qt.io",
"DocumentationUrl" : "https://doc.qt.io/qtdesignstudio",
"DisabledByDefault": "${NOT_BUILDING_DESIGNSTUDIO}",
${IDE_PLUGIN_DEPENDENCIES}
}

View File

@@ -0,0 +1,28 @@
// Copyright (C) 2025 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "extrapropertyeditormanagerplugin.h"
#include "extrapropertyeditorview.h"
#include <coreplugin/icore.h>
#include <qmldesignerplugin.h>
namespace ExtraPropertyEditorManager {
bool ExtraPropertyEditorManagerPlugin::initialize(const QStringList &arguments, QString *errorString)
{
return ExtensionSystem::IPlugin::initialize(arguments, errorString);
}
bool ExtraPropertyEditorManagerPlugin::delayedInitialize()
{
auto *designerPlugin = QmlDesigner::QmlDesignerPlugin::instance();
auto &viewManager = designerPlugin->viewManager();
viewManager.registerView(std::make_unique<QmlDesigner::ExtraPropertyEditorView>(
designerPlugin->imageCache(),
QmlDesigner::QmlDesignerPlugin::externalDependenciesForPluginInitializationOnly()));
return true;
}
} // namespace ExtraPropertyEditorManager

View File

@@ -0,0 +1,18 @@
// Copyright (C) 2025 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include <extensionsystem/iplugin.h>
namespace ExtraPropertyEditorManager {
class ExtraPropertyEditorManagerPlugin : public ExtensionSystem::IPlugin
{
Q_OBJECT
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE
"ExtraPropertyEditorManager.json")
public:
bool initialize(const QStringList &arguments, QString *errorString) override;
bool delayedInitialize() override;
};
} // namespace ExtraPropertyEditorManager

View File

@@ -0,0 +1,19 @@
// Copyright (C) 2025 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "extrapropertyeditorview.h"
#include <qmldesignerplugin.h>
namespace QmlDesigner {
ExtraPropertyEditorView::ExtraPropertyEditorView(class AsynchronousImageCache &imageCache,
ExternalDependenciesInterface &externalDependencies)
: AbstractView{externalDependencies}
, m_imageCache{imageCache}
, m_externalDependencies{externalDependencies}
{}
ExtraPropertyEditorView::~ExtraPropertyEditorView() {};
} // namespace QmlDesigner

View File

@@ -0,0 +1,23 @@
// Copyright (C) 2025 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#pragma once
#include <abstractview.h>
namespace QmlDesigner {
class ExtraPropertyEditorView : public AbstractView
{
Q_OBJECT
public:
ExtraPropertyEditorView(class AsynchronousImageCache &imageCache,
ExternalDependenciesInterface &externalDependencies);
~ExtraPropertyEditorView() override;
private:
AsynchronousImageCache &m_imageCache;
ExternalDependenciesInterface &m_externalDependencies;
};
} // namespace QmlDesigner