aboutsummaryrefslogtreecommitdiffstats
path: root/share/qtcreator/qml/qmlpuppet/commands
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2020-06-08 16:04:15 +0200
committerEike Ziller <eike.ziller@qt.io>2020-06-08 16:04:15 +0200
commitc644e7c80aa752c6154fa36fdc3ce47e0e17e758 (patch)
tree7aea6f2d15477c7dc0b0e4aa9e00156920c65b1d /share/qtcreator/qml/qmlpuppet/commands
parentbfcd1149eb688707a5495ce63f39e93bcf0c0a54 (diff)
parent42cad8970819c650c73f5daa4b6ea2f775ff7ad0 (diff)
Merge remote-tracking branch 'origin/qds-1.59'
Conflicts: src/plugins/qmldesigner/components/formeditor/formeditoritem.cpp src/plugins/qmlpreview/qmlpreviewconnectionmanager.cpp Change-Id: Ifa7c66330c1995378280cdb4c57c30015dc11b68
Diffstat (limited to 'share/qtcreator/qml/qmlpuppet/commands')
-rw-r--r--share/qtcreator/qml/qmlpuppet/commands/changelanguagecommand.cpp47
-rw-r--r--share/qtcreator/qml/qmlpuppet/commands/changelanguagecommand.h51
-rw-r--r--share/qtcreator/qml/qmlpuppet/commands/changepreviewimagesizecommand.cpp46
-rw-r--r--share/qtcreator/qml/qmlpuppet/commands/changepreviewimagesizecommand.h50
-rw-r--r--share/qtcreator/qml/qmlpuppet/commands/commands.pri4
5 files changed, 198 insertions, 0 deletions
diff --git a/share/qtcreator/qml/qmlpuppet/commands/changelanguagecommand.cpp b/share/qtcreator/qml/qmlpuppet/commands/changelanguagecommand.cpp
new file mode 100644
index 0000000000..2d6e080563
--- /dev/null
+++ b/share/qtcreator/qml/qmlpuppet/commands/changelanguagecommand.cpp
@@ -0,0 +1,47 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 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 "changelanguagecommand.h"
+
+#include <QDebug>
+
+namespace QmlDesigner {
+
+QDataStream &operator<<(QDataStream &out, const ChangeLanguageCommand &command)
+{
+ return out << command.language;
+}
+
+QDataStream &operator>>(QDataStream &in, ChangeLanguageCommand &command)
+{
+ return in >> command.language;
+}
+
+QDebug operator<<(QDebug debug, const ChangeLanguageCommand &command)
+{
+ return debug.nospace() << "ChangeLanguageCommand(" << command.language << ")";
+}
+
+} // namespace QmlDesigner
diff --git a/share/qtcreator/qml/qmlpuppet/commands/changelanguagecommand.h b/share/qtcreator/qml/qmlpuppet/commands/changelanguagecommand.h
new file mode 100644
index 0000000000..d3309c2f73
--- /dev/null
+++ b/share/qtcreator/qml/qmlpuppet/commands/changelanguagecommand.h
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 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>
+#include <QString>
+
+namespace QmlDesigner {
+
+class ChangeLanguageCommand
+{
+public:
+ ChangeLanguageCommand() = default;
+ ChangeLanguageCommand(const QString &language)
+ : language(language)
+ {}
+
+ friend QDataStream &operator<<(QDataStream &out, const ChangeLanguageCommand &command);
+ friend QDataStream &operator>>(QDataStream &in, ChangeLanguageCommand &command);
+ friend QDebug operator<<(QDebug debug, const ChangeLanguageCommand &command);
+
+public:
+ QString language;
+};
+
+} // namespace QmlDesigner
+
+Q_DECLARE_METATYPE(QmlDesigner::ChangeLanguageCommand)
diff --git a/share/qtcreator/qml/qmlpuppet/commands/changepreviewimagesizecommand.cpp b/share/qtcreator/qml/qmlpuppet/commands/changepreviewimagesizecommand.cpp
new file mode 100644
index 0000000000..95fa0a5101
--- /dev/null
+++ b/share/qtcreator/qml/qmlpuppet/commands/changepreviewimagesizecommand.cpp
@@ -0,0 +1,46 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 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 "changepreviewimagesizecommand.h"
+
+#include <QDebug>
+
+namespace QmlDesigner {
+
+QDataStream &operator<<(QDataStream &out, const ChangePreviewImageSizeCommand &command)
+{
+ return out << command.size;
+}
+
+QDataStream &operator>>(QDataStream &in, ChangePreviewImageSizeCommand &command)
+{
+ return in >> command.size;
+}
+
+QDebug operator<<(QDebug debug, const ChangePreviewImageSizeCommand &command)
+{
+ return debug.nospace() << "ChangePreviewImageSizeCommand(" << command.size << ")";
+}
+
+} // namespace QmlDesigner
diff --git a/share/qtcreator/qml/qmlpuppet/commands/changepreviewimagesizecommand.h b/share/qtcreator/qml/qmlpuppet/commands/changepreviewimagesizecommand.h
new file mode 100644
index 0000000000..98e94e13ca
--- /dev/null
+++ b/share/qtcreator/qml/qmlpuppet/commands/changepreviewimagesizecommand.h
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 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>
+#include <QSize>
+
+namespace QmlDesigner {
+
+class ChangePreviewImageSizeCommand
+{
+public:
+ ChangePreviewImageSizeCommand() = default;
+ ChangePreviewImageSizeCommand(const QSize &size)
+ : size(size)
+ {}
+
+ friend QDataStream &operator<<(QDataStream &out, const ChangePreviewImageSizeCommand &command);
+ friend QDataStream &operator>>(QDataStream &in, ChangePreviewImageSizeCommand &command);
+ friend QDebug operator<<(QDebug debug, const ChangePreviewImageSizeCommand &command);
+
+public:
+ QSize size;
+};
+
+} // namespace QmlDesigner
+
+Q_DECLARE_METATYPE(QmlDesigner::ChangePreviewImageSizeCommand)
diff --git a/share/qtcreator/qml/qmlpuppet/commands/commands.pri b/share/qtcreator/qml/qmlpuppet/commands/commands.pri
index 1bc858831e..03a44ae750 100644
--- a/share/qtcreator/qml/qmlpuppet/commands/commands.pri
+++ b/share/qtcreator/qml/qmlpuppet/commands/commands.pri
@@ -1,6 +1,8 @@
INCLUDEPATH += $$PWD/
HEADERS += $$PWD/synchronizecommand.h
+HEADERS += $$PWD/changepreviewimagesizecommand.h
+HEADERS += $$PWD/changelanguagecommand.h
HEADERS += $$PWD//debugoutputcommand.h
HEADERS += $$PWD/endpuppetcommand.h
HEADERS += $$PWD/tokencommand.h
@@ -33,6 +35,8 @@ HEADERS += $$PWD/inputeventcommand.h
HEADERS += $$PWD/view3dactioncommand.h
SOURCES += $$PWD/synchronizecommand.cpp
+SOURCES += $$PWD/changepreviewimagesizecommand.cpp
+SOURCES += $$PWD/changelanguagecommand.cpp
SOURCES += $$PWD/debugoutputcommand.cpp
SOURCES += $$PWD/endpuppetcommand.cpp
SOURCES += $$PWD/tokencommand.cpp