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-30 17:46:57 +01:00
|
|
|
|
|
|
|
|
#include <QMetaType>
|
|
|
|
|
#include <QVector>
|
2011-06-30 17:30:17 +02:00
|
|
|
#include "informationcontainer.h"
|
2010-11-30 17:46:57 +01:00
|
|
|
|
|
|
|
|
namespace QmlDesigner {
|
|
|
|
|
|
|
|
|
|
class ChildrenChangedCommand
|
|
|
|
|
{
|
|
|
|
|
friend QDataStream &operator>>(QDataStream &in, ChildrenChangedCommand &command);
|
2013-07-04 17:06:31 +02:00
|
|
|
friend bool operator ==(const ChildrenChangedCommand &first, const ChildrenChangedCommand &second);
|
|
|
|
|
|
2010-11-30 17:46:57 +01:00
|
|
|
public:
|
|
|
|
|
ChildrenChangedCommand();
|
2013-06-06 16:03:46 +02:00
|
|
|
explicit ChildrenChangedCommand(qint32 parentInstanceId, const QVector<qint32> &childrenInstancesconst, const QVector<InformationContainer> &informationVector);
|
2010-11-30 17:46:57 +01:00
|
|
|
|
|
|
|
|
QVector<qint32> childrenInstances() const;
|
|
|
|
|
qint32 parentInstanceId() const;
|
2011-06-30 17:30:17 +02:00
|
|
|
QVector<InformationContainer> informations() const;
|
2010-11-30 17:46:57 +01:00
|
|
|
|
2013-07-04 17:06:31 +02:00
|
|
|
void sort();
|
|
|
|
|
|
2010-11-30 17:46:57 +01:00
|
|
|
private:
|
|
|
|
|
qint32 m_parentInstanceId;
|
|
|
|
|
QVector<qint32> m_childrenVector;
|
2011-06-30 17:30:17 +02:00
|
|
|
QVector<InformationContainer> m_informationVector;
|
2010-11-30 17:46:57 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
QDataStream &operator<<(QDataStream &out, const ChildrenChangedCommand &command);
|
|
|
|
|
QDataStream &operator>>(QDataStream &in, ChildrenChangedCommand &command);
|
|
|
|
|
|
2013-07-04 17:06:31 +02:00
|
|
|
bool operator ==(const ChildrenChangedCommand &first, const ChildrenChangedCommand &second);
|
2013-07-16 17:00:07 +02:00
|
|
|
QDebug operator <<(QDebug debug, const ChildrenChangedCommand &command);
|
2013-07-04 17:06:31 +02:00
|
|
|
|
2010-11-30 17:46:57 +01:00
|
|
|
} // namespace QmlDesigner
|
|
|
|
|
|
2010-12-16 11:25:28 +01:00
|
|
|
Q_DECLARE_METATYPE(QmlDesigner::ChildrenChangedCommand)
|