1 /**************************************************************************
3 ** This file is part of Qt Creator
5 ** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
7 ** Contact: Nokia Corporation (qt-info@nokia.com)
11 ** This file contains pre-release code and may not be distributed.
12 ** You may use this file in accordance with the terms and conditions
13 ** contained in the Technology Preview License Agreement accompanying
16 ** GNU Lesser General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 2.1 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 2.1 requirements
23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
25 ** In addition, as a special exception, Nokia gives you certain additional
26 ** rights. These rights are described in the Nokia Qt LGPL Exception
27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
29 ** If you have questions regarding the use of this file, please contact
30 ** Nokia at qt-info@nokia.com.
32 **************************************************************************/
34 #ifndef NODEINSTANCECLIENTPROXY_H
35 #define NODEINSTANCECLIENTPROXY_H
37 #include "nodeinstanceclientinterface.h"
41 #include <QWeakPointer>
47 namespace QmlDesigner {
49 class NodeInstanceServerInterface;
50 class CreateSceneCommand;
51 class CreateInstancesCommand;
52 class ClearSceneCommand;
53 class ReparentInstancesCommand;
54 class ChangeFileUrlCommand;
55 class ChangeValuesCommand;
56 class ChangeBindingsCommand;
57 class ChangeIdsCommand;
58 class RemoveInstancesCommand;
59 class RemovePropertiesCommand;
60 class AddImportCommand;
61 class CompleteComponentCommand;
62 class ChangeStateCommand;
64 class NodeInstanceClientProxy : public QObject, public NodeInstanceClientInterface
69 NodeInstanceClientProxy(QObject *parent = 0);
71 void informationChanged(const InformationChangedCommand &command);
72 void valuesChanged(const ValuesChangedCommand &command);
73 void pixmapChanged(const PixmapChangedCommand &command);
74 void childrenChanged(const ChildrenChangedCommand &command);
75 void statePreviewImagesChanged(const StatePreviewImageChangedCommand &command);
76 void componentCompleted(const ComponentCompletedCommand &command);
79 void synchronizeWithClientProcess();
80 qint64 bytesToWrite() const;
83 void writeCommand(const QVariant &command);
84 void dispatchCommand(const QVariant &command);
85 NodeInstanceServerInterface *nodeInstanceServer() const;
87 void createInstances(const CreateInstancesCommand &command);
88 void changeFileUrl(const ChangeFileUrlCommand &command);
89 void createScene(const CreateSceneCommand &command);
90 void clearScene(const ClearSceneCommand &command);
91 void removeInstances(const RemoveInstancesCommand &command);
92 void removeProperties(const RemovePropertiesCommand &command);
93 void changePropertyBindings(const ChangeBindingsCommand &command);
94 void changePropertyValues(const ChangeValuesCommand &command);
95 void reparentInstances(const ReparentInstancesCommand &command);
96 void changeIds(const ChangeIdsCommand &command);
97 void changeState(const ChangeStateCommand &command);
98 void addImport(const AddImportCommand &command);
99 void completeComponent(const CompleteComponentCommand &command);
102 void readDataStream();
105 QLocalSocket *m_socket;
106 NodeInstanceServerInterface *m_nodeInstanceServer;
111 } // namespace QmlDesigner
113 #endif // NODEINSTANCECLIENTPROXY_H