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