aboutsummaryrefslogtreecommitdiffstats
path: root/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/viewconfig.cpp
blob: 39f108e49a20743304388dcb275a9b869e81af52 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0 WITH Qt-GPL-exception-1.0

#include "viewconfig.h"
#include <QtGlobal>

bool ViewConfig::isQuick3DMode()
{
    static bool mode3D = qEnvironmentVariableIsSet("QMLDESIGNER_QUICK3D_MODE");
    return mode3D;
}

static bool particleViewEnabled = false;
void ViewConfig::enableParticleView(bool enable)
{
    particleViewEnabled = enable;
}

bool ViewConfig::isParticleViewMode()
{
    static bool particleviewmode = !qEnvironmentVariableIsSet("QT_QUICK3D_DISABLE_PARTICLE_SYSTEMS");
    return particleviewmode && particleViewEnabled;
}