aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/effectcomposer/effectcomposerview.h
blob: 074e768068d996f5f4ada10c51b0fd79532ce811 (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
// Copyright (C) 2023 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>
#include <modelnode.h>

#include <generatedcomponentutils.h>

#include <QPointer>

namespace EffectComposer {

class EffectComposerWidget;

class EffectComposerView : public QmlDesigner::AbstractView
{
    Q_DECLARE_TR_FUNCTIONS(EffectComposer::EffectComposerView)
public:
    EffectComposerView(QmlDesigner::ExternalDependenciesInterface &externalDependencies);
    ~EffectComposerView() override;

    bool hasWidget() const override;
    QmlDesigner::WidgetInfo widgetInfo() override;

    // AbstractView
    void modelAttached(QmlDesigner::Model *model) override;
    void modelAboutToBeDetached(QmlDesigner::Model *model) override;
    void selectedNodesChanged(const QList<QmlDesigner::ModelNode> &selectedNodeList,
                              const QList<QmlDesigner::ModelNode> &lastSelectedNodeList) override;

    void dragStarted(QMimeData *mimeData) override;
    void dragEnded() override;

    void highlightSupportedProperties(bool highlight, const QString &suffix = {});

    static void registerDeclarativeTypes();

private:
    void customNotification(const AbstractView *view, const QString &identifier,
                            const QList<QmlDesigner::ModelNode> &nodeList, const QList<QVariant> &data) override;

    QPointer<EffectComposerWidget> m_widget;
    QString m_currProjectPath;
    QmlDesigner::GeneratedComponentUtils m_componentUtils;
};

} // namespace EffectComposer