| 
									
										
										
										
											2011-02-22 12:08:19 +01:00
										 |  |  | /**************************************************************************
 | 
					
						
							|  |  |  | ** | 
					
						
							|  |  |  | ** This file is part of Qt Creator | 
					
						
							|  |  |  | ** | 
					
						
							|  |  |  | ** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). | 
					
						
							|  |  |  | ** | 
					
						
							| 
									
										
										
										
											2012-07-19 12:26:56 +02:00
										 |  |  | ** Contact: http://www.qt-project.org/
 | 
					
						
							| 
									
										
										
										
											2011-02-22 12:08:19 +01:00
										 |  |  | ** | 
					
						
							|  |  |  | ** | 
					
						
							|  |  |  | ** GNU Lesser General Public License Usage | 
					
						
							|  |  |  | ** | 
					
						
							| 
									
										
										
										
											2011-04-13 08:42:33 +02:00
										 |  |  | ** 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.
 | 
					
						
							| 
									
										
										
										
											2011-02-22 12:08:19 +01:00
										 |  |  | ** | 
					
						
							|  |  |  | ** In addition, as a special exception, Nokia gives you certain additional | 
					
						
							| 
									
										
										
										
											2011-04-13 08:42:33 +02:00
										 |  |  | ** rights. These rights are described in the Nokia Qt LGPL Exception | 
					
						
							| 
									
										
										
										
											2011-02-22 12:08:19 +01:00
										 |  |  | ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. | 
					
						
							|  |  |  | ** | 
					
						
							| 
									
										
										
										
											2011-04-13 08:42:33 +02:00
										 |  |  | ** Other Usage | 
					
						
							|  |  |  | ** | 
					
						
							|  |  |  | ** Alternatively, this file may be used in accordance with the terms and | 
					
						
							|  |  |  | ** conditions contained in a signed written agreement between you and Nokia. | 
					
						
							|  |  |  | ** | 
					
						
							| 
									
										
										
										
											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"
 | 
					
						
							| 
									
										
										
										
											2010-11-30 21:32:52 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											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"); | 
					
						
							|  |  |  |     qRegisterMetaTypeStreamOperators<PropertyAbstractContainer>("ChangeStateCommand"); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     qRegisterMetaType<RemoveInstancesCommand>("RemoveInstancesCommand"); | 
					
						
							|  |  |  |     qRegisterMetaTypeStreamOperators<RemoveInstancesCommand>("RemoveInstancesCommand"); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     qRegisterMetaType<RemovePropertiesCommand>("RemovePropertiesCommand"); | 
					
						
							|  |  |  |     qRegisterMetaTypeStreamOperators<RemovePropertiesCommand>("RemovePropertiesCommand"); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     qRegisterMetaType<ReparentInstancesCommand>("ReparentInstancesCommand"); | 
					
						
							|  |  |  |     qRegisterMetaTypeStreamOperators<ReparentInstancesCommand>("ReparentInstancesCommand"); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     qRegisterMetaType<ChangeIdsCommand>("ChangeIdsCommand"); | 
					
						
							|  |  |  |     qRegisterMetaTypeStreamOperators<ChangeIdsCommand>("ChangeIdsCommand"); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     qRegisterMetaType<ChangeStateCommand>("ChangeStateCommand"); | 
					
						
							|  |  |  |     qRegisterMetaTypeStreamOperators<ChangeStateCommand>("ChangeStateCommand"); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     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"); | 
					
						
							| 
									
										
										
										
											2010-11-24 14:52:06 +01:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | } |