2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2019 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
|
|
|
|
|
|
|
|
|
|
#include <QMetaType>
|
2020-02-11 11:33:25 +02:00
|
|
|
#include <QtCore/qsize.h>
|
2019-11-13 11:16:55 +01:00
|
|
|
|
|
|
|
|
namespace QmlDesigner {
|
|
|
|
|
|
2019-12-11 21:29:10 +02:00
|
|
|
class Update3dViewStateCommand
|
2019-11-13 11:16:55 +01:00
|
|
|
{
|
2019-12-11 21:29:10 +02:00
|
|
|
friend QDataStream &operator>>(QDataStream &in, Update3dViewStateCommand &command);
|
|
|
|
|
friend QDebug operator<<(QDebug debug, const Update3dViewStateCommand &command);
|
2019-11-13 11:16:55 +01:00
|
|
|
|
|
|
|
|
public:
|
2020-03-02 15:51:28 +02:00
|
|
|
enum Type { SizeChange, Empty };
|
2019-12-11 21:29:10 +02:00
|
|
|
|
2020-02-11 11:33:25 +02:00
|
|
|
explicit Update3dViewStateCommand(const QSize &size);
|
2019-12-11 21:29:10 +02:00
|
|
|
Update3dViewStateCommand() = default;
|
|
|
|
|
|
2020-02-11 11:33:25 +02:00
|
|
|
QSize size() const;
|
2019-12-11 21:29:10 +02:00
|
|
|
Type type() const;
|
2019-11-13 11:16:55 +01:00
|
|
|
|
|
|
|
|
private:
|
2020-02-11 11:33:25 +02:00
|
|
|
QSize m_size;
|
2019-12-11 21:29:10 +02:00
|
|
|
|
|
|
|
|
Type m_type = Empty;
|
2019-11-13 11:16:55 +01:00
|
|
|
};
|
|
|
|
|
|
2019-12-11 21:29:10 +02:00
|
|
|
QDataStream &operator<<(QDataStream &out, const Update3dViewStateCommand &command);
|
|
|
|
|
QDataStream &operator>>(QDataStream &in, Update3dViewStateCommand &command);
|
2019-11-13 11:16:55 +01:00
|
|
|
|
2019-12-11 21:29:10 +02:00
|
|
|
QDebug operator<<(QDebug debug, const Update3dViewStateCommand &command);
|
2019-11-13 11:16:55 +01:00
|
|
|
|
|
|
|
|
} // namespace QmlDesigner
|
|
|
|
|
|
2019-12-11 21:29:10 +02:00
|
|
|
Q_DECLARE_METATYPE(QmlDesigner::Update3dViewStateCommand)
|