pqCollaborationManager.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-FileCopyrightText: Copyright (c) Sandia Corporation
3 // SPDX-License-Identifier: BSD-3-Clause
4 #ifndef pqCollaborationManager_h
5 #define pqCollaborationManager_h
6 
7 #include "pqCoreModule.h"
8 #include "vtkSMMessageMinimal.h"
9 #include <QObject>
10 
11 class vtkObject;
12 class pqServer;
13 class pqView;
14 class pqPipelineSource;
16 class QMouseEvent;
17 
30 class PQCORE_EXPORT pqCollaborationManager : public QObject
31 {
32  Q_OBJECT
33  typedef QObject Superclass;
34 
35 public:
36  pqCollaborationManager(QObject* parent);
37  ~pqCollaborationManager() override;
38 
42  vtkSMCollaborationManager* activeCollaborationManager();
43 
44 Q_SIGNALS:
50  void triggerChatMessage(pqServer* server, int userId, QString& msgContent);
51 
56  void triggerStateClientOnlyMessage(pqServer* origin, vtkSMMessage* msg);
57 
64  void triggeredMasterUser(int);
65  void triggeredMasterChanged(bool);
66  void triggeredUserName(int, QString&);
67  void triggeredUserListChanged();
68 
73  void triggerFollowCamera(int);
74 
75 public Q_SLOTS:
81  void onServerAdded(pqServer*);
82  void onServerRemoved(pqServer*);
83 
88  void onChatMessage(pqServer* server, int userId, QString& msgContent);
89 
97  void updateEnabledState();
98 
103  void updateMousePointerLocation(QMouseEvent* e);
104 
110  void sendMousePointerLocationToOtherClients();
111 
117  void sendChartViewBoundsToOtherClients();
118 
123  void attachMouseListenerTo3DViews();
124 
128  void enableMousePointerSharing(bool);
129 
133  void disableFurtherConnections(bool disable);
134 
138  void setConnectID(int connectID);
139 
140 private Q_SLOTS:
146  void onClientMessage(pqServer* server, vtkSMMessage* msg);
147 
151  void onChartViewChange(vtkTypeUInt32 gid, double* bounds);
152 
159  void showMousePointer(vtkTypeUInt32 viewId, double x, double y, int ratioToUse);
160 
161 private: // NOLINT(readability-redundant-access-specifiers)
162  Q_DISABLE_COPY(pqCollaborationManager)
163 
164  class pqInternals;
165  pqInternals* Internals;
166 };
167 
168 #endif // !pqCollaborationManager_h
pqCollaborationManager is a QObject that aims to handle the collaboration for the Qt layer...
This is a PQ abstraction of a generic view module.
Definition: pqView.h:26
Class used to broadcast message from one client to the others.
Header class that setup every thing in order to use Protobuf messages in a transparent manner...
#define PQCORE_EXPORT
Definition: pqCoreModule.h:15
PQ representation for a vtkSMProxy that can be involved in a pipeline.
pqServer (should be renamed to pqSession) is a pqServerManagerModelItem subclass that represents a vt...
Definition: pqServer.h:35