forked from qt-creator/qt-creator
QmlDesigner: Remove the standalone view3D window implementation
Task-number: QDS-1692 Change-Id: I6c04aaee9ab6a119cfcc22ee2e19b808bb95ae0a Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
This commit is contained in:
committed by
Miikka Heikkinen
parent
5b8fe22337
commit
fb843d3442
@@ -27,9 +27,7 @@ HEADERS += $$PWD/changeauxiliarycommand.h
|
||||
HEADERS += $$PWD/removesharedmemorycommand.h
|
||||
HEADERS += $$PWD/puppetalivecommand.h
|
||||
HEADERS += $$PWD/changeselectioncommand.h
|
||||
HEADERS += $$PWD/drop3dlibraryitemcommand.h
|
||||
HEADERS += $$PWD/update3dviewstatecommand.h
|
||||
HEADERS += $$PWD/view3dclosedcommand.h
|
||||
HEADERS += $$PWD/puppettocreatorcommand.h
|
||||
HEADERS += $$PWD/inputeventcommand.h
|
||||
HEADERS += $$PWD/view3dactioncommand.h
|
||||
@@ -61,9 +59,7 @@ SOURCES += $$PWD/changeauxiliarycommand.cpp
|
||||
SOURCES += $$PWD/removesharedmemorycommand.cpp
|
||||
SOURCES += $$PWD/puppetalivecommand.cpp
|
||||
SOURCES += $$PWD/changeselectioncommand.cpp
|
||||
SOURCES += $$PWD/drop3dlibraryitemcommand.cpp
|
||||
SOURCES += $$PWD/update3dviewstatecommand.cpp
|
||||
SOURCES += $$PWD/view3dclosedcommand.cpp
|
||||
SOURCES += $$PWD/puppettocreatorcommand.cpp
|
||||
SOURCES += $$PWD/inputeventcommand.cpp
|
||||
SOURCES += $$PWD/view3dactioncommand.cpp
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2019 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of Qt Creator.
|
||||
**
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "drop3dlibraryitemcommand.h"
|
||||
|
||||
#include <QDataStream>
|
||||
|
||||
namespace QmlDesigner {
|
||||
|
||||
Drop3DLibraryItemCommand::Drop3DLibraryItemCommand(const QByteArray &itemData, qint32 sceneRootId)
|
||||
: m_itemData(itemData),
|
||||
m_sceneRootId(sceneRootId)
|
||||
{
|
||||
}
|
||||
|
||||
QDataStream &operator<<(QDataStream &out, const Drop3DLibraryItemCommand &command)
|
||||
{
|
||||
out << command.itemData();
|
||||
out << command.sceneRootId();
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
QDataStream &operator>>(QDataStream &in, Drop3DLibraryItemCommand &command)
|
||||
{
|
||||
in >> command.m_itemData;
|
||||
in >> command.m_sceneRootId;
|
||||
|
||||
return in;
|
||||
}
|
||||
|
||||
bool operator==(const Drop3DLibraryItemCommand &first, const Drop3DLibraryItemCommand &second)
|
||||
{
|
||||
return first.m_itemData == second.m_itemData && first.m_sceneRootId == second.m_sceneRootId;
|
||||
}
|
||||
|
||||
} // namespace QmlDesigner
|
||||
@@ -1,61 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2019 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of Qt Creator.
|
||||
**
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QVector>
|
||||
#include <QDataStream>
|
||||
#include <QMimeData>
|
||||
|
||||
#include "instancecontainer.h"
|
||||
|
||||
namespace QmlDesigner {
|
||||
|
||||
class Drop3DLibraryItemCommand
|
||||
{
|
||||
friend QDataStream &operator>>(QDataStream &in, Drop3DLibraryItemCommand &command);
|
||||
friend QDebug operator<<(QDebug debug, const Drop3DLibraryItemCommand &command);
|
||||
friend bool operator==(const Drop3DLibraryItemCommand &first,
|
||||
const Drop3DLibraryItemCommand &second);
|
||||
|
||||
public:
|
||||
explicit Drop3DLibraryItemCommand(const QByteArray &itemData, qint32 sceneRootId);
|
||||
Drop3DLibraryItemCommand() = default;
|
||||
|
||||
QByteArray itemData() const { return m_itemData; }
|
||||
qint32 sceneRootId() const { return m_sceneRootId; }
|
||||
|
||||
private:
|
||||
QByteArray m_itemData;
|
||||
qint32 m_sceneRootId;
|
||||
};
|
||||
|
||||
QDataStream &operator<<(QDataStream &out, const Drop3DLibraryItemCommand &command);
|
||||
QDataStream &operator>>(QDataStream &in, Drop3DLibraryItemCommand &command);
|
||||
bool operator==(const Drop3DLibraryItemCommand &first, const Drop3DLibraryItemCommand &second);
|
||||
|
||||
} // namespace QmlDesigner
|
||||
|
||||
Q_DECLARE_METATYPE(QmlDesigner::Drop3DLibraryItemCommand)
|
||||
@@ -34,7 +34,7 @@ namespace QmlDesigner {
|
||||
class PuppetToCreatorCommand
|
||||
{
|
||||
public:
|
||||
enum Type { KeyPressed, Edit3DToolState, Render3DView, ActiveSceneChanged, None };
|
||||
enum Type { Edit3DToolState, Render3DView, ActiveSceneChanged, None };
|
||||
|
||||
PuppetToCreatorCommand(Type type, const QVariant &data);
|
||||
PuppetToCreatorCommand() = default;
|
||||
|
||||
@@ -30,47 +30,12 @@
|
||||
|
||||
namespace QmlDesigner {
|
||||
|
||||
Update3dViewStateCommand::Update3dViewStateCommand(Qt::WindowStates previousStates,
|
||||
Qt::WindowStates currentStates)
|
||||
: m_previousStates(previousStates)
|
||||
, m_currentStates(currentStates)
|
||||
, m_type(Update3dViewStateCommand::StateChange)
|
||||
{
|
||||
}
|
||||
|
||||
Update3dViewStateCommand::Update3dViewStateCommand(bool active, bool hasPopup)
|
||||
: m_active(active)
|
||||
, m_hasPopup(hasPopup)
|
||||
, m_type(Update3dViewStateCommand::ActiveChange)
|
||||
{
|
||||
}
|
||||
|
||||
Update3dViewStateCommand::Update3dViewStateCommand(const QSize &size)
|
||||
: m_size(size)
|
||||
, m_type(Update3dViewStateCommand::SizeChange)
|
||||
{
|
||||
}
|
||||
|
||||
Qt::WindowStates Update3dViewStateCommand::previousStates() const
|
||||
{
|
||||
return m_previousStates;
|
||||
}
|
||||
|
||||
Qt::WindowStates Update3dViewStateCommand::currentStates() const
|
||||
{
|
||||
return m_currentStates;
|
||||
}
|
||||
|
||||
bool Update3dViewStateCommand::isActive() const
|
||||
{
|
||||
return m_active;
|
||||
}
|
||||
|
||||
bool Update3dViewStateCommand::hasPopup() const
|
||||
{
|
||||
return m_hasPopup;
|
||||
}
|
||||
|
||||
QSize Update3dViewStateCommand::size() const
|
||||
{
|
||||
return m_size;
|
||||
@@ -83,10 +48,6 @@ Update3dViewStateCommand::Type Update3dViewStateCommand::type() const
|
||||
|
||||
QDataStream &operator<<(QDataStream &out, const Update3dViewStateCommand &command)
|
||||
{
|
||||
out << command.previousStates();
|
||||
out << command.currentStates();
|
||||
out << qint32(command.isActive());
|
||||
out << qint32(command.hasPopup());
|
||||
out << qint32(command.type());
|
||||
out << command.size();
|
||||
|
||||
@@ -95,16 +56,8 @@ QDataStream &operator<<(QDataStream &out, const Update3dViewStateCommand &comman
|
||||
|
||||
QDataStream &operator>>(QDataStream &in, Update3dViewStateCommand &command)
|
||||
{
|
||||
in >> command.m_previousStates;
|
||||
in >> command.m_currentStates;
|
||||
qint32 active;
|
||||
qint32 hasPopup;
|
||||
qint32 type;
|
||||
in >> active;
|
||||
in >> hasPopup;
|
||||
in >> type;
|
||||
command.m_active = active;
|
||||
command.m_hasPopup = hasPopup;
|
||||
command.m_type = Update3dViewStateCommand::Type(type);
|
||||
in >> command.m_size;
|
||||
|
||||
|
||||
@@ -36,28 +36,15 @@ class Update3dViewStateCommand
|
||||
friend QDebug operator<<(QDebug debug, const Update3dViewStateCommand &command);
|
||||
|
||||
public:
|
||||
enum Type { StateChange, ActiveChange, SizeChange, Empty };
|
||||
enum Type { SizeChange, Empty };
|
||||
|
||||
explicit Update3dViewStateCommand(Qt::WindowStates previousStates, Qt::WindowStates currentStates);
|
||||
explicit Update3dViewStateCommand(bool active, bool hasPopup);
|
||||
explicit Update3dViewStateCommand(const QSize &size);
|
||||
Update3dViewStateCommand() = default;
|
||||
|
||||
Qt::WindowStates previousStates() const;
|
||||
Qt::WindowStates currentStates() const;
|
||||
|
||||
bool isActive() const;
|
||||
bool hasPopup() const;
|
||||
QSize size() const;
|
||||
|
||||
Type type() const;
|
||||
|
||||
private:
|
||||
Qt::WindowStates m_previousStates = Qt::WindowNoState;
|
||||
Qt::WindowStates m_currentStates = Qt::WindowNoState;
|
||||
|
||||
bool m_active = false;
|
||||
bool m_hasPopup = false;
|
||||
QSize m_size;
|
||||
|
||||
Type m_type = Empty;
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of Qt Creator.
|
||||
**
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "view3dclosedcommand.h"
|
||||
|
||||
namespace QmlDesigner {
|
||||
|
||||
View3DClosedCommand::View3DClosedCommand() = default;
|
||||
|
||||
QDataStream &operator<<(QDataStream &out, const View3DClosedCommand &/*command*/)
|
||||
{
|
||||
return out;
|
||||
}
|
||||
|
||||
QDataStream &operator>>(QDataStream &in, View3DClosedCommand &/*command*/)
|
||||
{
|
||||
return in;
|
||||
}
|
||||
|
||||
QDebug operator<<(QDebug debug, const View3DClosedCommand &/*command*/)
|
||||
{
|
||||
return debug.nospace() << "View3DClosedCommand()";
|
||||
}
|
||||
|
||||
} // namespace QmlDesigner
|
||||
@@ -1,47 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of Qt Creator.
|
||||
**
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <qmetatype.h>
|
||||
#include <QDataStream>
|
||||
#include <QDebug>
|
||||
|
||||
namespace QmlDesigner {
|
||||
|
||||
class View3DClosedCommand
|
||||
{
|
||||
public:
|
||||
View3DClosedCommand();
|
||||
};
|
||||
|
||||
QDataStream &operator<<(QDataStream &out, const View3DClosedCommand &command);
|
||||
QDataStream &operator>>(QDataStream &in, View3DClosedCommand &command);
|
||||
|
||||
QDebug operator<<(QDebug debug, const View3DClosedCommand &command);
|
||||
|
||||
} // namespace QmlDesigner
|
||||
|
||||
Q_DECLARE_METATYPE(QmlDesigner::View3DClosedCommand)
|
||||
Reference in New Issue
Block a user