2012-10-02 09:12:39 +02:00
|
|
|
/****************************************************************************
|
2011-02-22 12:08:19 +01:00
|
|
|
**
|
2016-01-15 14:59:14 +01:00
|
|
|
** Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
** Contact: https://www.qt.io/licensing/
|
2011-02-22 12:08:19 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** This file is part of Qt Creator.
|
2011-02-22 12:08:19 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** 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
|
2016-01-15 14:59:14 +01:00
|
|
|
** 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.
|
2011-02-22 12:08:19 +01:00
|
|
|
**
|
2015-09-18 11:34:48 +02:00
|
|
|
** GNU General Public License Usage
|
|
|
|
** Alternatively, this file may be used under the terms of the GNU
|
2016-01-15 14:59:14 +01:00
|
|
|
** 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.
|
2011-02-22 12:08:19 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
****************************************************************************/
|
2011-02-22 12:08:19 +01:00
|
|
|
|
2010-11-24 14:52:06 +01:00
|
|
|
#include "nodeinstanceserverinterface.h"
|
|
|
|
#include <qmetatype.h>
|
|
|
|
|
|
|
|
#include "propertyabstractcontainer.h"
|
|
|
|
#include "propertyvaluecontainer.h"
|
|
|
|
#include "propertybindingcontainer.h"
|
|
|
|
#include "instancecontainer.h"
|
|
|
|
#include "createinstancescommand.h"
|
|
|
|
#include "createscenecommand.h"
|
|
|
|
#include "changevaluescommand.h"
|
|
|
|
#include "changebindingscommand.h"
|
2011-06-08 17:02:03 +02:00
|
|
|
#include "changeauxiliarycommand.h"
|
2010-11-24 14:52:06 +01:00
|
|
|
#include "changefileurlcommand.h"
|
|
|
|
#include "removeinstancescommand.h"
|
|
|
|
#include "clearscenecommand.h"
|
|
|
|
#include "removepropertiescommand.h"
|
|
|
|
#include "reparentinstancescommand.h"
|
|
|
|
#include "changeidscommand.h"
|
|
|
|
#include "changestatecommand.h"
|
2010-12-09 16:09:37 +01:00
|
|
|
#include "completecomponentcommand.h"
|
2011-01-05 13:23:33 +01:00
|
|
|
#include "addimportcontainer.h"
|
2011-06-08 17:02:03 +02:00
|
|
|
#include "changenodesourcecommand.h"
|
2010-11-24 14:52:06 +01:00
|
|
|
|
|
|
|
#include "informationchangedcommand.h"
|
|
|
|
#include "pixmapchangedcommand.h"
|
|
|
|
#include "valueschangedcommand.h"
|
2010-11-30 17:46:57 +01:00
|
|
|
#include "childrenchangedcommand.h"
|
2010-11-30 21:32:52 +01:00
|
|
|
#include "imagecontainer.h"
|
|
|
|
#include "statepreviewimagechangedcommand.h"
|
2010-12-09 16:09:37 +01:00
|
|
|
#include "componentcompletedcommand.h"
|
2011-01-18 18:23:28 +01:00
|
|
|
#include "synchronizecommand.h"
|
2011-07-06 15:48:21 +02:00
|
|
|
#include "tokencommand.h"
|
2012-09-11 15:11:34 +02:00
|
|
|
#include "removesharedmemorycommand.h"
|
2012-09-24 14:12:55 +02:00
|
|
|
#include "endpuppetcommand.h"
|
2012-11-05 16:42:31 +01:00
|
|
|
#include "debugoutputcommand.h"
|
2014-06-18 11:17:59 +02:00
|
|
|
#include "puppetalivecommand.h"
|
2010-11-24 14:52:06 +01:00
|
|
|
|
2013-12-16 12:50:32 +01:00
|
|
|
#include <enumeration.h>
|
|
|
|
|
2010-11-24 14:52:06 +01:00
|
|
|
namespace QmlDesigner {
|
|
|
|
|
|
|
|
static bool isRegistered=false;
|
|
|
|
|
|
|
|
NodeInstanceServerInterface::NodeInstanceServerInterface(QObject *parent) :
|
|
|
|
QObject(parent)
|
|
|
|
{
|
|
|
|
registerCommands();
|
|
|
|
}
|
|
|
|
|
|
|
|
void NodeInstanceServerInterface::registerCommands()
|
|
|
|
{
|
|
|
|
if (isRegistered)
|
|
|
|
return;
|
|
|
|
|
|
|
|
isRegistered = true;
|
|
|
|
|
|
|
|
qRegisterMetaType<CreateInstancesCommand>("CreateInstancesCommand");
|
|
|
|
qRegisterMetaTypeStreamOperators<CreateInstancesCommand>("CreateInstancesCommand");
|
|
|
|
|
|
|
|
qRegisterMetaType<ClearSceneCommand>("ClearSceneCommand");
|
|
|
|
qRegisterMetaTypeStreamOperators<ClearSceneCommand>("ClearSceneCommand");
|
|
|
|
|
|
|
|
qRegisterMetaType<CreateSceneCommand>("CreateSceneCommand");
|
|
|
|
qRegisterMetaTypeStreamOperators<CreateSceneCommand>("CreateSceneCommand");
|
|
|
|
|
|
|
|
qRegisterMetaType<ChangeBindingsCommand>("ChangeBindingsCommand");
|
|
|
|
qRegisterMetaTypeStreamOperators<ChangeBindingsCommand>("ChangeBindingsCommand");
|
|
|
|
|
|
|
|
qRegisterMetaType<ChangeValuesCommand>("ChangeValuesCommand");
|
|
|
|
qRegisterMetaTypeStreamOperators<ChangeValuesCommand>("ChangeValuesCommand");
|
|
|
|
|
|
|
|
qRegisterMetaType<ChangeFileUrlCommand>("ChangeFileUrlCommand");
|
|
|
|
qRegisterMetaTypeStreamOperators<ChangeFileUrlCommand>("ChangeFileUrlCommand");
|
|
|
|
|
|
|
|
qRegisterMetaType<ChangeStateCommand>("ChangeStateCommand");
|
2012-09-20 10:19:43 +02:00
|
|
|
qRegisterMetaTypeStreamOperators<ChangeStateCommand>("ChangeStateCommand");
|
2010-11-24 14:52:06 +01:00
|
|
|
|
|
|
|
qRegisterMetaType<RemoveInstancesCommand>("RemoveInstancesCommand");
|
|
|
|
qRegisterMetaTypeStreamOperators<RemoveInstancesCommand>("RemoveInstancesCommand");
|
|
|
|
|
|
|
|
qRegisterMetaType<RemovePropertiesCommand>("RemovePropertiesCommand");
|
|
|
|
qRegisterMetaTypeStreamOperators<RemovePropertiesCommand>("RemovePropertiesCommand");
|
|
|
|
|
|
|
|
qRegisterMetaType<ReparentInstancesCommand>("ReparentInstancesCommand");
|
|
|
|
qRegisterMetaTypeStreamOperators<ReparentInstancesCommand>("ReparentInstancesCommand");
|
|
|
|
|
|
|
|
qRegisterMetaType<ChangeIdsCommand>("ChangeIdsCommand");
|
|
|
|
qRegisterMetaTypeStreamOperators<ChangeIdsCommand>("ChangeIdsCommand");
|
|
|
|
|
2012-09-25 15:27:40 +02:00
|
|
|
qRegisterMetaType<PropertyAbstractContainer>("PropertyAbstractContainer");
|
|
|
|
qRegisterMetaTypeStreamOperators<PropertyAbstractContainer>("PropertyAbstractContainer");
|
2010-11-24 14:52:06 +01:00
|
|
|
|
|
|
|
qRegisterMetaType<InformationChangedCommand>("InformationChangedCommand");
|
|
|
|
qRegisterMetaTypeStreamOperators<InformationChangedCommand>("InformationChangedCommand");
|
|
|
|
|
|
|
|
qRegisterMetaType<ValuesChangedCommand>("ValuesChangedCommand");
|
|
|
|
qRegisterMetaTypeStreamOperators<ValuesChangedCommand>("ValuesChangedCommand");
|
|
|
|
|
|
|
|
qRegisterMetaType<PixmapChangedCommand>("PixmapChangedCommand");
|
|
|
|
qRegisterMetaTypeStreamOperators<PixmapChangedCommand>("PixmapChangedCommand");
|
|
|
|
|
|
|
|
qRegisterMetaType<InformationContainer>("InformationContainer");
|
|
|
|
qRegisterMetaTypeStreamOperators<InformationContainer>("InformationContainer");
|
|
|
|
|
|
|
|
qRegisterMetaType<PropertyValueContainer>("PropertyValueContainer");
|
|
|
|
qRegisterMetaTypeStreamOperators<PropertyValueContainer>("PropertyValueContainer");
|
|
|
|
|
|
|
|
qRegisterMetaType<PropertyBindingContainer>("PropertyBindingContainer");
|
|
|
|
qRegisterMetaTypeStreamOperators<PropertyBindingContainer>("PropertyBindingContainer");
|
|
|
|
|
|
|
|
qRegisterMetaType<PropertyAbstractContainer>("PropertyAbstractContainer");
|
|
|
|
qRegisterMetaTypeStreamOperators<PropertyAbstractContainer>("PropertyAbstractContainer");
|
|
|
|
|
|
|
|
qRegisterMetaType<InstanceContainer>("InstanceContainer");
|
|
|
|
qRegisterMetaTypeStreamOperators<InstanceContainer>("InstanceContainer");
|
|
|
|
|
|
|
|
qRegisterMetaType<IdContainer>("IdContainer");
|
|
|
|
qRegisterMetaTypeStreamOperators<IdContainer>("IdContainer");
|
2010-11-25 12:49:13 +01:00
|
|
|
|
2010-11-30 17:46:57 +01:00
|
|
|
qRegisterMetaType<ChildrenChangedCommand>("ChildrenChangedCommand");
|
|
|
|
qRegisterMetaTypeStreamOperators<ChildrenChangedCommand>("ChildrenChangedCommand");
|
2010-11-30 21:32:52 +01:00
|
|
|
|
|
|
|
qRegisterMetaType<ImageContainer>("ImageContainer");
|
|
|
|
qRegisterMetaTypeStreamOperators<ImageContainer>("ImageContainer");
|
|
|
|
|
|
|
|
qRegisterMetaType<StatePreviewImageChangedCommand>("StatePreviewImageChangedCommand");
|
|
|
|
qRegisterMetaTypeStreamOperators<StatePreviewImageChangedCommand>("StatePreviewImageChangedCommand");
|
2010-12-09 16:09:37 +01:00
|
|
|
|
|
|
|
qRegisterMetaType<CompleteComponentCommand>("CompleteComponentCommand");
|
|
|
|
qRegisterMetaTypeStreamOperators<CompleteComponentCommand>("CompleteComponentCommand");
|
|
|
|
|
|
|
|
qRegisterMetaType<ComponentCompletedCommand>("ComponentCompletedCommand");
|
|
|
|
qRegisterMetaTypeStreamOperators<ComponentCompletedCommand>("ComponentCompletedCommand");
|
2011-01-05 13:23:33 +01:00
|
|
|
|
|
|
|
qRegisterMetaType<AddImportContainer>("AddImportContainer");
|
|
|
|
qRegisterMetaTypeStreamOperators<AddImportContainer>("AddImportContainer");
|
2011-01-18 18:23:28 +01:00
|
|
|
|
|
|
|
qRegisterMetaType<SynchronizeCommand>("SynchronizeCommand");
|
|
|
|
qRegisterMetaTypeStreamOperators<SynchronizeCommand>("SynchronizeCommand");
|
2011-05-06 13:08:46 +02:00
|
|
|
|
2011-06-08 17:02:03 +02:00
|
|
|
qRegisterMetaType<ChangeNodeSourceCommand>("ChangeNodeSourceCommand");
|
|
|
|
qRegisterMetaTypeStreamOperators<ChangeNodeSourceCommand>("ChangeNodeSourceCommand");
|
2011-05-06 13:08:46 +02:00
|
|
|
|
2011-06-08 17:02:03 +02:00
|
|
|
qRegisterMetaType<ChangeAuxiliaryCommand>("ChangeAuxiliaryCommand");
|
|
|
|
qRegisterMetaTypeStreamOperators<ChangeAuxiliaryCommand>("ChangeAuxiliaryCommand");
|
2011-07-06 15:48:21 +02:00
|
|
|
|
|
|
|
qRegisterMetaType<TokenCommand>("TokenCommand");
|
|
|
|
qRegisterMetaTypeStreamOperators<TokenCommand>("TokenCommand");
|
2012-09-11 15:11:34 +02:00
|
|
|
|
|
|
|
qRegisterMetaType<RemoveSharedMemoryCommand>("RemoveSharedMemoryCommand");
|
|
|
|
qRegisterMetaTypeStreamOperators<RemoveSharedMemoryCommand>("RemoveSharedMemoryCommand");
|
2012-09-24 14:12:55 +02:00
|
|
|
|
|
|
|
qRegisterMetaType<EndPuppetCommand>("EndPuppetCommand");
|
|
|
|
qRegisterMetaTypeStreamOperators<EndPuppetCommand>("EndPuppetCommand");
|
2012-11-05 16:42:31 +01:00
|
|
|
|
|
|
|
qRegisterMetaType<DebugOutputCommand>("DebugOutputCommand");
|
|
|
|
qRegisterMetaTypeStreamOperators<DebugOutputCommand>("DebugOutputCommand");
|
2013-12-16 12:50:32 +01:00
|
|
|
|
|
|
|
qRegisterMetaType<Enumeration>("Enumeration");
|
|
|
|
qRegisterMetaTypeStreamOperators<Enumeration>("Enumeration");
|
2014-06-18 11:17:59 +02:00
|
|
|
|
|
|
|
qRegisterMetaType<PuppetAliveCommand>("PuppetAliveCommand");
|
|
|
|
qRegisterMetaTypeStreamOperators<PuppetAliveCommand>("PuppetAliveCommand");
|
2010-11-24 14:52:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|