| 
									
										
										
										
											2012-10-02 09:12:39 +02:00
										 |  |  | /****************************************************************************
 | 
					
						
							| 
									
										
										
										
											2011-05-12 16:22:51 +02:00
										 |  |  | ** | 
					
						
							| 
									
										
										
										
											2016-01-15 14:59:14 +01:00
										 |  |  | ** Copyright (C) 2016 The Qt Company Ltd. | 
					
						
							|  |  |  | ** Contact: https://www.qt.io/licensing/
 | 
					
						
							| 
									
										
										
										
											2011-05-12 16:22:51 +02:00
										 |  |  | ** | 
					
						
							| 
									
										
										
										
											2012-10-02 09:12:39 +02:00
										 |  |  | ** This file is part of Qt Creator. | 
					
						
							| 
									
										
										
										
											2011-05-12 16:22:51 +02: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-05-12 16:22:51 +02: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-05-12 16:22:51 +02:00
										 |  |  | ** | 
					
						
							| 
									
										
										
										
											2012-10-02 09:12:39 +02:00
										 |  |  | ****************************************************************************/ | 
					
						
							| 
									
										
										
										
											2011-05-12 16:22:51 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-03-18 07:55:01 +01:00
										 |  |  | #pragma once
 | 
					
						
							| 
									
										
										
										
											2011-06-09 15:50:48 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | #include <QtGlobal>
 | 
					
						
							| 
									
										
										
										
											2011-05-12 16:22:51 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | #include "nodeinstanceserver.h"
 | 
					
						
							| 
									
										
										
										
											2015-07-14 12:06:07 +02:00
										 |  |  | #include <designersupportdelegate.h>
 | 
					
						
							| 
									
										
										
										
											2011-05-12 16:22:51 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-06-09 15:50:48 +02:00
										 |  |  | QT_BEGIN_NAMESPACE | 
					
						
							| 
									
										
										
										
											2012-09-19 15:57:22 +02:00
										 |  |  | class QQuickItem; | 
					
						
							| 
									
										
										
										
											2011-06-09 15:50:48 +02:00
										 |  |  | QT_END_NAMESPACE | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-05-12 16:22:51 +02:00
										 |  |  | namespace QmlDesigner { | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-06-09 15:50:48 +02:00
										 |  |  | class Qt5NodeInstanceServer : public NodeInstanceServer | 
					
						
							| 
									
										
										
										
											2011-05-12 16:22:51 +02:00
										 |  |  | { | 
					
						
							|  |  |  |     Q_OBJECT | 
					
						
							|  |  |  | public: | 
					
						
							| 
									
										
										
										
											2011-06-09 15:50:48 +02:00
										 |  |  |     Qt5NodeInstanceServer(NodeInstanceClientInterface *nodeInstanceClient); | 
					
						
							| 
									
										
										
										
											2018-05-07 14:56:23 +02:00
										 |  |  |     ~Qt5NodeInstanceServer() override; | 
					
						
							| 
									
										
										
										
											2011-06-09 15:50:48 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-06-03 15:34:34 +02:00
										 |  |  |     QQuickView *quickView() const override; | 
					
						
							|  |  |  |     QQmlView *declarativeView() const override; | 
					
						
							|  |  |  |     QQmlEngine *engine() const override; | 
					
						
							|  |  |  |     void refreshBindings() override; | 
					
						
							| 
									
										
										
										
											2011-06-09 15:50:48 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-10-16 13:56:47 +02:00
										 |  |  |     DesignerSupport *designerSupport(); | 
					
						
							| 
									
										
										
										
											2011-05-12 16:22:51 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-06-03 15:34:34 +02:00
										 |  |  |     void createScene(const CreateSceneCommand &command) override; | 
					
						
							|  |  |  |     void clearScene(const ClearSceneCommand &command) override; | 
					
						
							|  |  |  |     void reparentInstances(const ReparentInstancesCommand &command) override; | 
					
						
							| 
									
										
										
										
											2011-05-12 16:22:51 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | protected: | 
					
						
							| 
									
										
										
										
											2015-06-03 15:34:34 +02:00
										 |  |  |     void initializeView() override; | 
					
						
							|  |  |  |     void resizeCanvasSizeToRootItemSize() override; | 
					
						
							| 
									
										
										
										
											2011-06-09 15:50:48 +02:00
										 |  |  |     void resetAllItems(); | 
					
						
							| 
									
										
										
										
											2015-06-03 15:34:34 +02:00
										 |  |  |     void setupScene(const CreateSceneCommand &command) override; | 
					
						
							| 
									
										
										
										
											2012-09-19 15:57:22 +02:00
										 |  |  |     QList<QQuickItem*> allItems() const; | 
					
						
							| 
									
										
										
										
											2011-05-12 16:22:51 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | private: | 
					
						
							| 
									
										
										
										
											2012-10-04 17:44:48 +02:00
										 |  |  |     QPointer<QQuickView> m_quickView; | 
					
						
							| 
									
										
										
										
											2014-10-16 13:56:47 +02:00
										 |  |  |     DesignerSupport m_designerSupport; | 
					
						
							| 
									
										
										
										
											2011-05-12 16:22:51 +02:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-06-09 15:50:48 +02:00
										 |  |  | } // QmlDesigner
 |