| 
									
										
										
										
											2012-10-02 09:12:39 +02:00
										 |  |  | /****************************************************************************
 | 
					
						
							| 
									
										
										
										
											2011-02-22 12:08:19 +01:00
										 |  |  | ** | 
					
						
							| 
									
										
										
										
											2013-01-28 17:12:19 +01:00
										 |  |  | ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). | 
					
						
							| 
									
										
										
										
											2012-10-02 09:12:39 +02:00
										 |  |  | ** Contact: http://www.qt-project.org/legal
 | 
					
						
							| 
									
										
										
										
											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 | 
					
						
							|  |  |  | ** a written agreement between you and Digia.  For licensing terms and | 
					
						
							|  |  |  | ** conditions see http://qt.digia.com/licensing.  For further information
 | 
					
						
							|  |  |  | ** use the contact form at http://qt.digia.com/contact-us.
 | 
					
						
							| 
									
										
										
										
											2011-02-22 12:08:19 +01:00
										 |  |  | ** | 
					
						
							|  |  |  | ** GNU Lesser General Public License Usage | 
					
						
							| 
									
										
										
										
											2012-10-02 09:12:39 +02:00
										 |  |  | ** Alternatively, this file may be used under the terms of the GNU Lesser | 
					
						
							|  |  |  | ** General Public License version 2.1 as published by the Free Software | 
					
						
							|  |  |  | ** Foundation and appearing in the file LICENSE.LGPL included in the | 
					
						
							|  |  |  | ** packaging of this file.  Please review the following information to | 
					
						
							|  |  |  | ** ensure the GNU Lesser General Public License version 2.1 requirements | 
					
						
							|  |  |  | ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
 | 
					
						
							|  |  |  | ** | 
					
						
							|  |  |  | ** In addition, as a special exception, Digia gives you certain additional | 
					
						
							|  |  |  | ** rights.  These rights are described in the Digia Qt LGPL Exception | 
					
						
							| 
									
										
										
										
											2011-02-22 12:08:19 +01:00
										 |  |  | ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. | 
					
						
							|  |  |  | ** | 
					
						
							| 
									
										
										
										
											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"
 | 
					
						
							| 
									
										
										
										
											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"); | 
					
						
							| 
									
										
										
										
											2010-11-24 14:52:06 +01:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | } |