2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0 WITH Qt-GPL-exception-1.0
|
2011-02-22 12:08:19 +01:00
|
|
|
|
2016-03-18 07:55:01 +01:00
|
|
|
#pragma once
|
2010-11-24 14:52:06 +01:00
|
|
|
|
2022-04-11 17:20:37 +02:00
|
|
|
#include <QSize>
|
2011-01-04 16:22:21 +01:00
|
|
|
#include <QUrl>
|
|
|
|
|
#include <QVector>
|
2022-05-31 16:19:29 +03:00
|
|
|
#include <QList>
|
|
|
|
|
#include <QColor>
|
2022-04-11 17:20:37 +02:00
|
|
|
#include <qmetatype.h>
|
2011-01-04 16:22:21 +01:00
|
|
|
|
|
|
|
|
#include "instancecontainer.h"
|
|
|
|
|
#include "reparentcontainer.h"
|
|
|
|
|
#include "idcontainer.h"
|
2016-09-29 15:30:29 +02:00
|
|
|
#include "mockuptypecontainer.h"
|
2011-01-04 16:22:21 +01:00
|
|
|
#include "propertyvaluecontainer.h"
|
|
|
|
|
#include "propertybindingcontainer.h"
|
2011-01-05 13:23:33 +01:00
|
|
|
#include "addimportcontainer.h"
|
2010-11-24 14:52:06 +01:00
|
|
|
|
|
|
|
|
namespace QmlDesigner {
|
|
|
|
|
|
|
|
|
|
class CreateSceneCommand
|
|
|
|
|
{
|
|
|
|
|
public:
|
2020-11-09 16:35:00 +01:00
|
|
|
CreateSceneCommand() = default;
|
|
|
|
|
explicit CreateSceneCommand(const QVector<InstanceContainer> &instanceContainer,
|
|
|
|
|
const QVector<ReparentContainer> &reparentContainer,
|
|
|
|
|
const QVector<IdContainer> &idVector,
|
|
|
|
|
const QVector<PropertyValueContainer> &valueChangeVector,
|
|
|
|
|
const QVector<PropertyBindingContainer> &bindingChangeVector,
|
|
|
|
|
const QVector<PropertyValueContainer> &auxiliaryChangeVector,
|
|
|
|
|
const QVector<AddImportContainer> &importVector,
|
|
|
|
|
const QVector<MockupTypeContainer> &mockupTypeVector,
|
|
|
|
|
const QUrl &fileUrl,
|
2021-01-25 17:33:05 +02:00
|
|
|
const QUrl &resourceUrl,
|
2020-11-09 16:35:00 +01:00
|
|
|
const QHash<QString, QVariantMap> &edit3dToolStates,
|
|
|
|
|
const QString &language,
|
2022-04-11 17:20:37 +02:00
|
|
|
QSize captureImageMinimumSize,
|
|
|
|
|
QSize captureImageMaximumSize,
|
2022-05-31 16:19:29 +03:00
|
|
|
qint32 stateInstanceId,
|
2022-06-08 18:00:09 +03:00
|
|
|
const QList<QColor> &edit3dBackgroundColor,
|
|
|
|
|
const QColor &edit3dGridColor)
|
2020-11-09 16:35:00 +01:00
|
|
|
: instances(instanceContainer)
|
|
|
|
|
, reparentInstances(reparentContainer)
|
|
|
|
|
, ids(idVector)
|
|
|
|
|
, valueChanges(valueChangeVector)
|
|
|
|
|
, bindingChanges(bindingChangeVector)
|
|
|
|
|
, auxiliaryChanges(auxiliaryChangeVector)
|
|
|
|
|
, imports(importVector)
|
|
|
|
|
, mockupTypes(mockupTypeVector)
|
|
|
|
|
, fileUrl(fileUrl)
|
2021-01-25 17:33:05 +02:00
|
|
|
, resourceUrl(resourceUrl)
|
2020-11-09 16:35:00 +01:00
|
|
|
, edit3dToolStates(edit3dToolStates)
|
|
|
|
|
, language(language)
|
2022-04-11 17:20:37 +02:00
|
|
|
, captureImageMinimumSize(captureImageMinimumSize)
|
|
|
|
|
, captureImageMaximumSize(captureImageMaximumSize)
|
2020-11-09 16:35:00 +01:00
|
|
|
, stateInstanceId{stateInstanceId}
|
2022-05-31 16:19:29 +03:00
|
|
|
, edit3dBackgroundColor{edit3dBackgroundColor}
|
2022-06-08 18:00:09 +03:00
|
|
|
, edit3dGridColor{edit3dGridColor}
|
2020-11-09 16:35:00 +01:00
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
friend QDataStream &operator<<(QDataStream &out, const CreateSceneCommand &command)
|
|
|
|
|
{
|
|
|
|
|
out << command.instances;
|
|
|
|
|
out << command.reparentInstances;
|
|
|
|
|
out << command.ids;
|
|
|
|
|
out << command.valueChanges;
|
|
|
|
|
out << command.bindingChanges;
|
|
|
|
|
out << command.auxiliaryChanges;
|
|
|
|
|
out << command.imports;
|
|
|
|
|
out << command.mockupTypes;
|
|
|
|
|
out << command.fileUrl;
|
2021-01-25 17:33:05 +02:00
|
|
|
out << command.resourceUrl;
|
2020-11-09 16:35:00 +01:00
|
|
|
out << command.edit3dToolStates;
|
|
|
|
|
out << command.language;
|
|
|
|
|
out << command.stateInstanceId;
|
2022-04-11 17:20:37 +02:00
|
|
|
out << command.captureImageMinimumSize;
|
|
|
|
|
out << command.captureImageMaximumSize;
|
2022-05-31 16:19:29 +03:00
|
|
|
out << command.edit3dBackgroundColor;
|
2022-06-08 18:00:09 +03:00
|
|
|
out << command.edit3dGridColor;
|
2020-11-09 16:35:00 +01:00
|
|
|
|
|
|
|
|
return out;
|
|
|
|
|
}
|
2011-01-04 16:22:21 +01:00
|
|
|
|
2020-11-09 16:35:00 +01:00
|
|
|
friend QDataStream &operator>>(QDataStream &in, CreateSceneCommand &command)
|
|
|
|
|
{
|
|
|
|
|
in >> command.instances;
|
|
|
|
|
in >> command.reparentInstances;
|
|
|
|
|
in >> command.ids;
|
|
|
|
|
in >> command.valueChanges;
|
|
|
|
|
in >> command.bindingChanges;
|
|
|
|
|
in >> command.auxiliaryChanges;
|
|
|
|
|
in >> command.imports;
|
|
|
|
|
in >> command.mockupTypes;
|
|
|
|
|
in >> command.fileUrl;
|
2021-01-25 17:33:05 +02:00
|
|
|
in >> command.resourceUrl;
|
2020-11-09 16:35:00 +01:00
|
|
|
in >> command.edit3dToolStates;
|
|
|
|
|
in >> command.language;
|
|
|
|
|
in >> command.stateInstanceId;
|
2022-04-11 17:20:37 +02:00
|
|
|
in >> command.captureImageMinimumSize;
|
|
|
|
|
in >> command.captureImageMaximumSize;
|
2022-05-31 16:19:29 +03:00
|
|
|
in >> command.edit3dBackgroundColor;
|
2022-06-08 18:00:09 +03:00
|
|
|
in >> command.edit3dGridColor;
|
2011-01-04 16:22:21 +01:00
|
|
|
|
2020-11-09 16:35:00 +01:00
|
|
|
return in;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
QVector<InstanceContainer> instances;
|
|
|
|
|
QVector<ReparentContainer> reparentInstances;
|
|
|
|
|
QVector<IdContainer> ids;
|
|
|
|
|
QVector<PropertyValueContainer> valueChanges;
|
|
|
|
|
QVector<PropertyBindingContainer> bindingChanges;
|
|
|
|
|
QVector<PropertyValueContainer> auxiliaryChanges;
|
|
|
|
|
QVector<AddImportContainer> imports;
|
|
|
|
|
QVector<MockupTypeContainer> mockupTypes;
|
|
|
|
|
QUrl fileUrl;
|
2021-01-25 17:33:05 +02:00
|
|
|
QUrl resourceUrl;
|
2020-11-09 16:35:00 +01:00
|
|
|
QHash<QString, QVariantMap> edit3dToolStates;
|
|
|
|
|
QString language;
|
2022-04-11 17:20:37 +02:00
|
|
|
QSize captureImageMinimumSize;
|
|
|
|
|
QSize captureImageMaximumSize;
|
2020-11-09 16:35:00 +01:00
|
|
|
qint32 stateInstanceId = 0;
|
2022-05-31 16:19:29 +03:00
|
|
|
QList<QColor> edit3dBackgroundColor;
|
2022-06-08 18:00:09 +03:00
|
|
|
QColor edit3dGridColor;
|
2010-11-24 14:52:06 +01:00
|
|
|
};
|
|
|
|
|
|
2020-11-09 16:35:00 +01:00
|
|
|
QDebug operator<<(QDebug debug, const CreateSceneCommand &command);
|
2010-11-24 14:52:06 +01:00
|
|
|
|
2020-11-09 16:35:00 +01:00
|
|
|
} // namespace QmlDesigner
|
2010-11-24 14:52:06 +01:00
|
|
|
|
2010-12-16 11:25:28 +01:00
|
|
|
Q_DECLARE_METATYPE(QmlDesigner::CreateSceneCommand)
|