2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2020 The Qt Company Ltd.
|
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0 WITH Qt-GPL-exception-1.0
|
2019-11-13 11:16:55 +01:00
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2022-09-14 11:46:08 +02:00
|
|
|
#include <nodeinstanceglobal.h>
|
|
|
|
|
|
2019-11-13 11:16:55 +01:00
|
|
|
#include <QMetaType>
|
2022-05-31 16:19:29 +03:00
|
|
|
#include <QVariant>
|
2019-11-13 11:16:55 +01:00
|
|
|
|
|
|
|
|
namespace QmlDesigner {
|
|
|
|
|
|
2020-02-11 11:33:25 +02:00
|
|
|
class View3DActionCommand
|
2019-11-13 11:16:55 +01:00
|
|
|
{
|
2020-02-11 11:33:25 +02:00
|
|
|
friend QDataStream &operator>>(QDataStream &in, View3DActionCommand &command);
|
|
|
|
|
friend QDebug operator<<(QDebug debug, const View3DActionCommand &command);
|
2019-11-13 11:16:55 +01:00
|
|
|
|
|
|
|
|
public:
|
2022-09-14 11:46:08 +02:00
|
|
|
View3DActionCommand(View3DActionType type, const QVariant &value);
|
2021-10-19 10:04:15 +03:00
|
|
|
|
2020-02-11 11:33:25 +02:00
|
|
|
View3DActionCommand() = default;
|
|
|
|
|
|
|
|
|
|
bool isEnabled() const;
|
2022-05-31 16:19:29 +03:00
|
|
|
QVariant value() const;
|
2022-09-14 11:46:08 +02:00
|
|
|
View3DActionType type() const;
|
2021-10-19 10:04:15 +03:00
|
|
|
int position() const;
|
2019-11-13 11:16:55 +01:00
|
|
|
|
|
|
|
|
private:
|
2022-09-14 11:46:08 +02:00
|
|
|
View3DActionType m_type = View3DActionType::Empty;
|
2022-05-31 16:19:29 +03:00
|
|
|
QVariant m_value;
|
2019-11-13 11:16:55 +01:00
|
|
|
};
|
|
|
|
|
|
2020-02-11 11:33:25 +02:00
|
|
|
QDataStream &operator<<(QDataStream &out, const View3DActionCommand &command);
|
|
|
|
|
QDataStream &operator>>(QDataStream &in, View3DActionCommand &command);
|
2019-11-13 11:16:55 +01:00
|
|
|
|
2020-02-11 11:33:25 +02:00
|
|
|
QDebug operator<<(QDebug debug, const View3DActionCommand &command);
|
2022-09-14 11:46:08 +02:00
|
|
|
QDebug operator<<(QDebug debug, View3DActionType type);
|
2019-11-13 11:16:55 +01:00
|
|
|
|
|
|
|
|
} // namespace QmlDesigner
|
|
|
|
|
|
2020-02-11 11:33:25 +02:00
|
|
|
Q_DECLARE_METATYPE(QmlDesigner::View3DActionCommand)
|