aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmldesignerbase/qmldesignerbaseplugin.h
blob: ec9ca6b28790352ed548f9f3fc8fbe3d0875e821 (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
// Copyright (C) 2023 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 "qmldesignerbase_global.h"

#include <extensionsystem/iplugin.h>

#include <memory>

QT_BEGIN_NAMESPACE
class QStyle;
QT_END_NAMESPACE

namespace QmlDesigner {

class QMLDESIGNERBASE_EXPORT QmlDesignerBasePlugin final : public ExtensionSystem::IPlugin
{
    Q_OBJECT
    Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "QmlDesignerBase.json")

public:
    QmlDesignerBasePlugin();
    ~QmlDesignerBasePlugin();

    static QmlDesignerBasePlugin &instance();

    static class DesignerSettings &settings();
    static QStyle *style();
    static class StudioConfigSettingsPage *studioConfigSettingsPage();

    static bool experimentalFeaturesEnabled();
    static QByteArray experimentalFeaturesSettingsKey();

    static void enableLiteMode();
    static bool isLiteModeEnabled();

private:
    Utils::Result<> initialize(const QStringList &arguments) final;

private:
    class Data;
    std::unique_ptr<Data> d;
    bool m_enableLiteMode = false;
};

} // namespace QmlDesigner