aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmldesigner/components/componentcore/svgpasteaction.h
blob: 880e4078079a163f69b1b4cf2f17a58d5ae51b0b (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
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
#pragma once

#include <qmlitemnode.h>

#include <QDomDocument>

namespace QmlDesigner {

struct CSSProperty
{
    QString directive;
    QString value;
};

using CSSRule = std::vector<CSSProperty>;
using CSSRules = QHash<QString, CSSRule>;
using PropertyMap = QHash<QByteArray, QVariant>;

class SVGPasteAction
{
public:
    SVGPasteAction();

    bool containsSVG(const QString &str);

    QmlObjectNode createQmlObjectNode(QmlDesigner::ModelNode &targetNode);

private:
    QDomDocument m_domDocument;
};

} // namespace QmlDesigner